Class UriTemplateParser
java.lang.Object
org.exoplatform.services.rest.uri.UriTemplateParser
- Version:
- $Id: $
- Author:
- Andrey Parfonov
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PatternPattern for process URI parameters, for example /a/b/{x}/c . -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringencodeLiteralCharacters(String literalCharacters) Encode set of literal characters.final int[]final intGet the number of literal characters in the template.final StringgetRegex()Get the regular expression.final StringGet the URI template.
-
Field Details
-
URI_PARAMETERS_PATTERN
Pattern for process URI parameters, for example /a/b/{x}/c .
-
-
Constructor Details
-
UriTemplateParser
- Parameters:
template- source URI template
-
-
Method Details
-
getNumberOfLiteralCharacters
public final int getNumberOfLiteralCharacters()Get the number of literal characters in the template.- Returns:
- number of literal characters in the template
-
getParameterNames
- Returns:
- list of names
-
getRegex
Get the regular expression.- Returns:
- the regular expression
-
getTemplate
Get the URI template.- Returns:
- the URI template
-
getGroupIndexes
public final int[] getGroupIndexes()- Returns:
- indexes of regular expression capturing group
-
encodeLiteralCharacters
Encode set of literal characters. Characters must not e double encoded.- Parameters:
literalCharacters- source string- Returns:
- encoded string
-