Package com.emc.documentum.rest.http

# Class SimpleUriTemplate

java.lang.Object
com.emc.documentum.rest.http.AbstractUriTemplate
com.emc.documentum.rest.http.SimpleUriTemplate

public final class SimpleUriTemplate extends AbstractUriTemplate
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

  Constructors
  Constructor
  Description
  `SimpleUriTemplate(String pattern)`
  Constructor
  `SimpleUriTemplate(String pattern, boolean requireNormalization, boolean isHrefTemplate, String[] mandatoryQueryParams)`
  Constructor
  `SimpleUriTemplate(String pattern, boolean isHrefTemplate, String[] templateQueryParams)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `expand(Object... segments)`
  Build the URI using the path variables.
  `String`
  `fullExpand(Object[] segments, Map<String,String> additionalQueryParams, Set<String> templateParams)`
  Build the URI using the path variables and query parameters.
  `String`
  `fullExpand(Object[] segments, Map<String,String> additionalQueryParams, Set<String> templateParams, boolean noHrefTemplate)`
  Build the URI using the path variables and query parameters.
  `String`
  `fullExpand(Map<String,String> varMapping, Map<String,String> additionalQueryParams)`
  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`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SimpleUriTemplate

    public SimpleUriTemplate(String pattern)
    Constructor
    Parameters:
      `pattern` - URL pattern

  - ### SimpleUriTemplate

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

  - ### SimpleUriTemplate

    public SimpleUriTemplate(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

  - ### expand

    public String expand(Object... segments)
    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 uri
      `segments` - the path variable values for all segments on the URI template
      `templateParams` - 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 uri
      `segments` - the path variable values for all segments on the URI template
      `templateParams` - href template query parameters
      `noHrefTemplate` - not build the URI as href template
    Returns:
      the variable resolved URI that contains query parameters and template parameters.

  - ### fullExpand

    public String fullExpand(Map<String,String> varMapping, Map<String,String> additionalQueryParams)
    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.