Package com.emc.documentum.rest.http
Class AbstractUriTemplate
java.lang.Object
com.emc.documentum.rest.http.AbstractUriTemplate
- Direct Known Subclasses:
SimpleUriTemplate
Abstract uri template.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractUriTemplate
(String pattern) Constructorprotected
AbstractUriTemplate
(String pattern, boolean requireNormalization, boolean isHrefTemplate, String[] mandatoryQueryParams) Constructorprotected
AbstractUriTemplate
(String pattern, boolean isHrefTemplate, String[] templateQueryParams) Constructor -
Method Summary
Modifier and TypeMethodDescriptionConvert raw url to Ant readable versionboolean
Return href template query string.String[]
Return href template query parametersprotected String
boolean
Check if the the path has variable 'baseUri'.boolean
Check if the the path has variable 'ext'.int
hashCode()
boolean
Check if the the path has variable 'repositoryName'.boolean
hasVariable
(String match) Check if the input matches the path variablesprotected boolean
isBaseUriVariable
(int index) protected boolean
isExtensionVariable
(int index) boolean
Check if it is href templateReturn the path variablesraw()
Return the raw URI patterntoString()
-
Field Details
-
raw
-
isHrefTemplate
protected final boolean isHrefTemplate -
mandatoryQueryParams
-
normalizedPattern
-
patterns
-
pathVariables
-
templateIncludingParamNames
-
templateExcludingParamNames
-
templateFixedQueryParams
-
templateExcludingQueryParams
-
queryVarToParamsMap
-
BASE_URI_VAR_NAME
Variable name for base URI.- See Also:
-
REPOSITORY_VAR_NAME
Variable name for repository name.- See Also:
-
EXT_VAR_NAME
Variable name for URI extension.- See Also:
-
-
Constructor Details
-
AbstractUriTemplate
Constructor- Parameters:
pattern
- URL pattern
-
AbstractUriTemplate
Constructor- Parameters:
pattern
- URL patternisHrefTemplate
-true
if the input is href templatetemplateQueryParams
- href template query parameters
-
AbstractUriTemplate
protected AbstractUriTemplate(String pattern, boolean requireNormalization, boolean isHrefTemplate, String[] mandatoryQueryParams) Constructor- Parameters:
pattern
- URL patternrequireNormalization
- require URL pattern normalization or notisHrefTemplate
-true
if the input is href templatemandatoryQueryParams
- mandatory query parameters
-
-
Method Details
-
hasVariable
Check if the input matches the path variables- Parameters:
match
- string to check- Returns:
true
ifmatch
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
Convert raw url to Ant readable version- Returns:
- Ant version url
-
equals
-
hashCode
public int hashCode() -
toString
-
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
Return href template query parameters- Returns:
- href template query parameters
-
queryVariables
- Returns:
- the query variable map
-
pathVariables
Return the path variables- Returns:
- the path variables
-
getHrefTemplateQuery
Return href template query string.- Returns:
- the href template query string
-
getNormalizedPattern
-
isExtensionVariable
protected boolean isExtensionVariable(int index) -
isBaseUriVariable
protected boolean isBaseUriVariable(int index)
-