public final class UriUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<Map<String,String>> |
getTokenMaps(RequestContext context)
Builds a list of all the maps that can be used for performing token substitution.
|
static String |
relativeUri(String uri)
Return the relative section of a URI from a complete URI
|
static String |
replaceTokens(String s,
RequestContext context,
Pattern tokenPattern,
Integer groupNumber,
String missingTokenString)
Replaces tokens in using all available properties built from the
getTokenMaps() method. |
static String |
replaceUriTokens(String s,
Map<String,String> tokens)
Deprecated.
|
public static Pattern pattern
public static List<Map<String,String>> getTokenMaps(RequestContext context)
Builds a list of all the maps that can be used for performing token substitution. The list will be populated as follows (assuming that each token map is available).
context - The current RequestContext.public static String replaceTokens(String s, RequestContext context, Pattern tokenPattern, Integer groupNumber, String missingTokenString)
Replaces tokens in using all available properties built from the getTokenMaps() method.
s - The String to replace the tokens in.context - The current RequestContexttokenPattern - An alternative token pattern to process (if null, uses the default)groupNumber - The group number to use as the token key (if null, defaults to 1)missingTokenString - TODOpublic static String replaceUriTokens(String s, Map<String,String> tokens)
s - String to work on - cannot be nulltokens - Map of token name -> token value for replacementsCopyright © 2005–2016 Alfresco Software. All rights reserved.