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
ConstructorsModifierConstructorDescriptionprotectedAbstractUriTemplate(String pattern) ConstructorprotectedAbstractUriTemplate(String pattern, boolean requireNormalization, boolean isHrefTemplate, String[] mandatoryQueryParams) ConstructorprotectedAbstractUriTemplate(String pattern, boolean isHrefTemplate, String[] templateQueryParams) Constructor -
Method Summary
Modifier and TypeMethodDescriptionConvert raw url to Ant readable versionbooleanReturn href template query string.String[]Return href template query parametersprotected StringbooleanCheck if the the path has variable 'baseUri'.booleanCheck if the the path has variable 'ext'.inthashCode()booleanCheck if the the path has variable 'repositoryName'.booleanhasVariable(String match) Check if the input matches the path variablesprotected booleanisBaseUriVariable(int index) protected booleanisExtensionVariable(int index) booleanCheck 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-trueif 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-trueif 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:
trueifmatchis one of path variables
-
hasBaseUriVariable
public boolean hasBaseUriVariable()Check if the the path has variable 'baseUri'.- Returns:
trueif it contains 'baseUri'.
-
hasRepositoryVariable
public boolean hasRepositoryVariable()Check if the the path has variable 'repositoryName'.- Returns:
trueif it contains 'repositoryName'.
-
hasExtensionVariable
public boolean hasExtensionVariable()Check if the the path has variable 'ext'.- Returns:
trueif 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:
trueif 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)
-