public class Route extends Object
Constructor and Description |
---|
Route(String httpMethod,
String uri,
Method controllerMethod,
FilterChain filterChain) |
Modifier and Type | Method and Description |
---|---|
protected static String |
convertRawUriToRegex(String rawUri)
Gets a raw uri like "/{name}/id/*" and returns "/([^/]*)/id/*."
Also handles regular expressions if defined inside routes:
For instance "/users/{username: [a-zA-Z][a-zA-Z_0-9]}" becomes
"/users/([a-zA-Z][a-zA-Z_0-9])"
|
Class<?> |
getControllerClass() |
Method |
getControllerMethod() |
FilterChain |
getFilterChain() |
String |
getHttpMethod() |
LinkedHashMap<String,RouteParameter> |
getParameters() |
Map<String,String> |
getPathParametersEncoded(String uri)
This method does not do any decoding / encoding.
|
String |
getUri() |
String |
getUrl()
Deprecated.
Use getUri()
|
boolean |
matches(String httpMethod,
String uri)
Matches /index to /index or /me/1 to /person/{id}
|
public Route(String httpMethod, String uri, Method controllerMethod, FilterChain filterChain)
public String getUrl()
public String getHttpMethod()
public String getUri()
public Class<?> getControllerClass()
public FilterChain getFilterChain()
public Method getControllerMethod()
public LinkedHashMap<String,RouteParameter> getParameters()
public boolean matches(String httpMethod, String uri)
public Map<String,String> getPathParametersEncoded(String uri)
uri
- The whole encoded uri.protected static String convertRawUriToRegex(String rawUri)
Copyright © 2017 ninjaframework. All rights reserved.