Holds information about a parsed URL such as the tokens that make up the URL, The URLs (plural) that the UrLMapping logically maps to and so forth
Type Params | Return Type | Name and description |
---|---|---|
|
UrlMappingData |
createRelative(java.lang.String path) Creates a new UrlMappingData instance relative to this one for the given path |
|
java.lang.String[] |
getLogicalUrls() |
|
java.lang.String[] |
getTokens() |
|
java.lang.String |
getUrlPattern() Retrieves the URL pattern for this UrlMappingData instance |
|
boolean |
hasOptionalExtension() @return Whether the pattern has an optional extension |
|
boolean |
isOptional(int index) Returns whether the given token in the URL is optional. |
Creates a new UrlMappingData instance relative to this one for the given path
path
- The path
Obtains the logical URLs for this URL
Retrieves the tokens that make up a URL. For example the tokens for the URL /blog/2007/* would be "blog", "2007" and "*"
Retrieves the URL pattern for this UrlMappingData instance
Returns whether the given token in the URL is optional. The index takes into account matching groups so for example the URL /blog/(*)/(*) has two entries for the two (*) matching groups with the index 0 relating to the the first entry
index
- The index of the matching token