Class AbstractUriTemplate

java.lang.Object
com.emc.documentum.rest.http.AbstractUriTemplate
Direct Known Subclasses:
SimpleUriTemplate

public abstract class AbstractUriTemplate extends Object
Abstract uri template.
  • Field Details

    • raw

      protected final String raw
    • isHrefTemplate

      protected final boolean isHrefTemplate
    • mandatoryQueryParams

      protected final String[] mandatoryQueryParams
    • normalizedPattern

      protected String normalizedPattern
    • patterns

      protected String[] patterns
    • pathVariables

      protected List<String> pathVariables
    • templateIncludingParamNames

      protected Set<String> templateIncludingParamNames
    • templateExcludingParamNames

      protected Set<String> templateExcludingParamNames
    • templateFixedQueryParams

      protected Map<String,String> templateFixedQueryParams
    • templateExcludingQueryParams

      protected Map<String,String> templateExcludingQueryParams
    • queryVarToParamsMap

      protected org.springframework.util.MultiValueMap<String,String> queryVarToParamsMap
    • BASE_URI_VAR_NAME

      public static final String BASE_URI_VAR_NAME
      Variable name for base URI.
      See Also:
    • REPOSITORY_VAR_NAME

      public static final String REPOSITORY_VAR_NAME
      Variable name for repository name.
      See Also:
    • EXT_VAR_NAME

      public static final String EXT_VAR_NAME
      Variable name for URI extension.
      See Also:
  • Constructor Details

    • AbstractUriTemplate

      protected AbstractUriTemplate(String pattern)
      Constructor
      Parameters:
      pattern - URL pattern
    • AbstractUriTemplate

      protected AbstractUriTemplate(String pattern, boolean isHrefTemplate, String[] templateQueryParams)
      Constructor
      Parameters:
      pattern - URL pattern
      isHrefTemplate - true if the input is href template
      templateQueryParams - href template query parameters
    • AbstractUriTemplate

      protected AbstractUriTemplate(String pattern, boolean requireNormalization, boolean isHrefTemplate, String[] mandatoryQueryParams)
      Constructor
      Parameters:
      pattern - URL pattern
      requireNormalization - require URL pattern normalization or not
      isHrefTemplate - true if the input is href template
      mandatoryQueryParams - mandatory query parameters
  • Method Details

    • hasVariable

      public boolean hasVariable(String match)
      Check if the input matches the path variables
      Parameters:
      match - string to check
      Returns:
      true if match is one of path variables
    • hasBaseUriVariable

      public boolean hasBaseUriVariable()
      Check if the the path has variable 'baseUri'.
      Returns:
      true if it contains 'baseUri'.
    • hasRepositoryVariable

      public boolean hasRepositoryVariable()
      Check if the the path has variable 'repositoryName'.
      Returns:
      true if it contains 'repositoryName'.
    • hasExtensionVariable

      public boolean hasExtensionVariable()
      Check if the the path has variable 'ext'.
      Returns:
      true if it contains 'ext'.
    • convertToAntVersion

      public String convertToAntVersion()
      Convert raw url to Ant readable version
      Returns:
      Ant version url
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • raw

      public String raw()
      Return the raw URI pattern
      Returns:
      the raw URI pattern
    • isHrefTemplate

      public boolean isHrefTemplate()
      Check if it is href template
      Returns:
      true if it is a href template
    • getMandatoryQueryParams

      public String[] getMandatoryQueryParams()
      Return href template query parameters
      Returns:
      href template query parameters
    • queryVariables

      public org.springframework.util.MultiValueMap<String,String> queryVariables()
      Returns:
      the query variable map
    • pathVariables

      public List<String> pathVariables()
      Return the path variables
      Returns:
      the path variables
    • getHrefTemplateQuery

      public String getHrefTemplateQuery()
      Return href template query string.
      Returns:
      the href template query string
    • getNormalizedPattern

      protected String getNormalizedPattern()
    • isExtensionVariable

      protected boolean isExtensionVariable(int index)
    • isBaseUriVariable

      protected boolean isBaseUriVariable(int index)