Klasse UriTemplateData

java.lang.Object
de.kamillionlabs.hateoflux.linkbuilder.UriTemplateData

public class UriTemplateData extends Object
Represents a parsed URI template and provides methods to retrieve information from it.
  • Methodendetails

    • getQueryParameterNames

      public List<String> getQueryParameterNames()
      Returns the names of the query parameters in the URI template.
      Gibt zurück:
      a list of query parameter names
    • of

      public static UriTemplateData of(String originalUriTemplate)
      Creates a new UriTemplateData instance 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:
      true if there are exploded query parameters; false otherwise
    • isExplodedQueryParameter

      public boolean isExplodedQueryParameter(String parameterName)
      Checks if the specified query parameter is exploded in the URI template.
      Parameter:
      parameterName - the name of the query parameter
      Gibt zurück:
      true if the parameter is exploded; false otherwise
    • hasOnlyQueryParameters

      public boolean hasOnlyQueryParameters()
      Checks if the URI template contains only query parameters and no path parameters.
      Gibt zurück:
      true if the template has only query parameters; false otherwise
    • doesNotIncludeAllPathParameters

      public boolean doesNotIncludeAllPathParameters(Set<String> parameterNamesToTest)
      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:
      true if not all path parameters are included; false otherwise
    • includesUnknownParameters

      public boolean includesUnknownParameters(Set<String> parameterNamesToTest)
      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:
      true if unknown parameters are included; false otherwise
    • 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:
      true if the template is parameterized; false otherwise