Klasse UriTemplateData
java.lang.Object
de.kamillionlabs.hateoflux.linkbuilder.UriTemplateData
Represents a parsed URI template and provides methods to retrieve information from it.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleandoesNotIncludeAllPathParameters(Set<String> parameterNamesToTest) Checks if the given set of parameter names does not include all path parameters from the URI template.Returns the names of the query parameters in the URI template.intReturns the total number of parameters (path and query) in the URI template.booleanChecks if the URI template contains any exploded query parameters.booleanChecks if the URI template contains only query parameters and no path parameters.booleanincludesUnknownParameters(Set<String> parameterNamesToTest) Checks if the given set of parameter names includes any parameters not present in the URI template.booleanisExplodedQueryParameter(String parameterName) Checks if the specified query parameter is exploded in the URI template.booleanChecks if the URI template contains any parameters.static UriTemplateDataCreates a newUriTemplateDatainstance from the given URI template string.
-
Methodendetails
-
getQueryParameterNames
Returns the names of the query parameters in the URI template.- Gibt zurück:
- a list of query parameter names
-
of
Creates a newUriTemplateDatainstance from the given URI template string.- Parameter:
originalUriTemplate- the URI template string; may be null or empty- Gibt zurück:
- a new instance with the parsed URI template data
-
hasExplodedQueryParameters
public boolean hasExplodedQueryParameters()Checks if the URI template contains any exploded query parameters.- Gibt zurück:
trueif there are exploded query parameters;falseotherwise
-
isExplodedQueryParameter
Checks if the specified query parameter is exploded in the URI template.- Parameter:
parameterName- the name of the query parameter- Gibt zurück:
trueif the parameter is exploded;falseotherwise
-
hasOnlyQueryParameters
public boolean hasOnlyQueryParameters()Checks if the URI template contains only query parameters and no path parameters.- Gibt zurück:
trueif the template has only query parameters;falseotherwise
-
doesNotIncludeAllPathParameters
Checks if the given set of parameter names does not include all path parameters from the URI template.- Parameter:
parameterNamesToTest- the set of parameter names to test- Gibt zurück:
trueif not all path parameters are included;falseotherwise
-
includesUnknownParameters
Checks if the given set of parameter names includes any parameters not present in the URI template.- Parameter:
parameterNamesToTest- the set of parameter names to test- Gibt zurück:
trueif unknown parameters are included;falseotherwise
-
getTotalNumberOfParameters
public int getTotalNumberOfParameters()Returns the total number of parameters (path and query) in the URI template.- Gibt zurück:
- the total number of parameters
-
isTemplated
public boolean isTemplated()Checks if the URI template contains any parameters.- Gibt zurück:
trueif the template is parameterized;falseotherwise
-