|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Router
Contains a list of the available routes and handles conversion of URLs to parameter maps and vice versa.
The priority of a route is based on when it was added to the router. The first route has the highest priority and a URL path will always be matched against it first. If the first route does not match, the second will be tried, continuing until either a match is found or all the routes have been tested.
When choosing the order in which to place a list of routes, the general rule is to sort the routes from least general to most general. The simplest way of determining the generality of a route is by counting the number of capturing fragments in it.
Route
,
DefaultFriendlyURLMapper
Method Summary | |
---|---|
Route |
addRoute(String pattern)
Generates a new route from its pattern string. |
String |
parametersToUrl(Map<String,String> parameters)
Generates a URL from the parameter map using the available routes. |
boolean |
urlToParameters(String url,
Map<String,String> parameters)
Parses a URL into a parameter map using the available routes. |
Method Detail |
---|
Route addRoute(String pattern)
pattern
- the route pattern string
String parametersToUrl(Map<String,String> parameters)
parameters
- the parameter map
null
if an applicable route was not
foundboolean urlToParameters(String url, Map<String,String> parameters)
url
- the URL to be parsedparameters
- the parameter map to be populated
true
if a match was found and
parameters
was populated; false
otherwise
|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |