Package com.emc.documentum.rest.http
Class SimpleUriTemplate
java.lang.Object
com.emc.documentum.rest.http.AbstractUriTemplate
com.emc.documentum.rest.http.SimpleUriTemplate
Simple URI template with normalization.
Examples of input uri pattern:
(1) {baseUri}/modules/{moduleId}{ext}
(2) /modules/{moduleId}
(3) {repositoryUri}/objects/{id}
(4) /repositories/{repositoryId}/objects/{id}
(5) http://acme.org/searches
Examples of normalized uri pattern:
(1) {baseUri}/modules/{moduleId}{ext}
(2) {baseUri}/modules/{moduleId}{ext}
(3) {baseUri}/repositories/{repositoryName}/objects/{id}{ext}
(4) {baseUri}/repositories/{repositoryName}/objects/{id}{ext}
(5) http://acme.org/searches
-
Field Summary
Fields inherited from class com.emc.documentum.rest.http.AbstractUriTemplate
BASE_URI_VAR_NAME, EXT_VAR_NAME, isHrefTemplate, mandatoryQueryParams, normalizedPattern, pathVariables, patterns, queryVarToParamsMap, raw, REPOSITORY_VAR_NAME, templateExcludingParamNames, templateExcludingQueryParams, templateFixedQueryParams, templateIncludingParamNames
-
Constructor Summary
ConstructorDescriptionSimpleUriTemplate
(String pattern) ConstructorSimpleUriTemplate
(String pattern, boolean requireNormalization, boolean isHrefTemplate, String[] mandatoryQueryParams) ConstructorSimpleUriTemplate
(String pattern, boolean isHrefTemplate, String[] templateQueryParams) Constructor -
Method Summary
Modifier and TypeMethodDescriptionBuild the URI using the path variables.Build the URI using the path variables and query parameters.fullExpand
(Object[] segments, Map<String, String> additionalQueryParams, Set<String> templateParams, boolean noHrefTemplate) Build the URI using the path variables and query parameters.Build the URI using the given variable mapping.Methods inherited from class com.emc.documentum.rest.http.AbstractUriTemplate
convertToAntVersion, equals, getHrefTemplateQuery, getMandatoryQueryParams, getNormalizedPattern, hasBaseUriVariable, hasExtensionVariable, hashCode, hasRepositoryVariable, hasVariable, isBaseUriVariable, isExtensionVariable, isHrefTemplate, pathVariables, queryVariables, raw, toString
-
Constructor Details
-
SimpleUriTemplate
Constructor- Parameters:
pattern
- URL pattern
-
SimpleUriTemplate
Constructor- Parameters:
pattern
- URL patternisHrefTemplate
-true
if the input is href templatetemplateQueryParams
- href template query parameters
-
SimpleUriTemplate
public SimpleUriTemplate(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
-
expand
Build the URI using the path variables. The built URI does not contain query parameters or template parameters.- Parameters:
segments
- the path variable values for all segments on the URI template- Returns:
- the variable resolved URI that does not contain query parameters or template parameters.
-
fullExpand
public String fullExpand(Object[] segments, Map<String, String> additionalQueryParams, Set<String> templateParams) Build the URI using the path variables and query parameters. The built URI contains query parameters and template parameters.- Parameters:
additionalQueryParams
- the additional query parameters set to the urisegments
- the path variable values for all segments on the URI templatetemplateParams
- href template query parameters- Returns:
- the variable resolved URI that contains query parameters and template parameters.
-
fullExpand
public String fullExpand(Object[] segments, Map<String, String> additionalQueryParams, Set<String> templateParams, boolean noHrefTemplate) Build the URI using the path variables and query parameters. The built URI contains query parameters and template parameters.- Parameters:
additionalQueryParams
- the additional query parameters set to the urisegments
- the path variable values for all segments on the URI templatetemplateParams
- href template query parametersnoHrefTemplate
- not build the URI as href template- Returns:
- the variable resolved URI that contains query parameters and template parameters.
-
fullExpand
Build the URI using the given variable mapping. The built URI contains query parameters and template parameters.- Parameters:
varMapping
- the variable mapping that could be used to resolve variable values in path segments or query parameters.additionalQueryParams
- the additional query parameters set to the uri- Returns:
- the variable resolved URI containing query parameters and template parameters.
-