public class URLPattern extends Object
Modifier and Type | Field and Description |
---|---|
static String |
urlSafe
A regular expression that we use to match a path parameter value.
|
Constructor and Description |
---|
URLPattern(com.google.gwt.regexp.shared.RegExp regex,
List<String> paramList,
String urlTemplate) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getParamList() |
com.google.gwt.regexp.shared.RegExp |
getRegex() |
boolean |
matches(String url) |
String |
printURL(com.google.common.collect.ImmutableMultimap<String,String> state)
Uses the state map to construct the encoded URL for this pattern.
|
String |
toString() |
public static final String urlSafe
public List<String> getParamList()
public com.google.gwt.regexp.shared.RegExp getRegex()
public boolean matches(String url)
url
- This URL path should not contain the application context and should not contain a leading slash.public String printURL(com.google.common.collect.ImmutableMultimap<String,String> state)
getParamList()
) will be appended as key-value pairs.
Note that this method only encodes the URL in a format that can be parsed by parseURL()
.state
- IllegalStateException
- If a path parameter is missing from the given state map.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.