public class ERXRoute extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ERXRoute.Key
ERXRoute.Key encapsulates a key name and an expected value type.
|
static class |
ERXRoute.Method |
static class |
ERXRoute.RouteParameterMethod |
Modifier and Type | Field and Description |
---|---|
static ERXRoute.Key |
ActionKey |
static ERXRoute.Key |
ControllerKey |
Constructor and Description |
---|
ERXRoute(String entityName,
String urlPattern)
Constructs a new route with the given URL pattern.
|
ERXRoute(String entityName,
String urlPattern,
Class<? extends ERXRouteController> controller)
Constructs a new route with the given URL pattern.
|
ERXRoute(String entityName,
String urlPattern,
Class<? extends ERXRouteController> controller,
String action)
Constructs a new route with the given URL pattern.
|
ERXRoute(String entityName,
String urlPattern,
ERXRoute.Method method)
Constructs a new route with the given URL pattern.
|
ERXRoute(String entityName,
String urlPattern,
ERXRoute.Method method,
Class<? extends ERXRouteController> controller)
Constructs a new route with the given URL pattern.
|
ERXRoute(String entityName,
String urlPattern,
ERXRoute.Method method,
Class<? extends ERXRouteController> controller,
String action)
Constructs a new route with the given URL pattern.
|
ERXRoute(String entityName,
String urlPattern,
ERXRoute.Method method,
String controller)
Constructs a new route with the given URL pattern.
|
ERXRoute(String entityName,
String urlPattern,
ERXRoute.Method method,
String controller,
String action)
Constructs a new route with the given URL pattern.
|
ERXRoute(String entityName,
String urlPattern,
String controller)
Constructs a new route with the given URL pattern.
|
ERXRoute(String entityName,
String urlPattern,
String controller,
String action)
Constructs a new route with the given URL pattern.
|
Modifier and Type | Method and Description |
---|---|
void |
_clearCaches()
Clears any caches that may exist on ERXRoutes (probably only useful to JRebel, to clear the route parameter method cache).
|
String |
action() |
Class<? extends ERXRouteController> |
controller()
Returns the controller class for this route.
|
String |
entityName()
Returns the entity name of the target of this route (can be null).
|
NSDictionary<ERXRoute.Key,String> |
keys(String url,
ERXRoute.Method method)
Returns the route keys for the given URL.
|
static NSDictionary<ERXRoute.Key,Object> |
keysWithObjects(NSDictionary<ERXRoute.Key,String> keys,
ERXRestContext context)
Returns a dictionary mapping the route's keys to their resolved objects.
|
NSDictionary<ERXRoute.Key,Object> |
keysWithObjects(String url,
ERXRoute.Method method,
ERXRestContext context)
Returns a dictionary mapping the route's keys to their resolved objects.
|
ERXRoute.Method |
method()
Returns the method of this request.
|
NSDictionary<String,Object> |
objects(NSDictionary<ERXRoute.Key,String> keys,
ERXRestContext context)
Returns a dictionary mapping the route's key names to their resolved objects.
|
NSDictionary<String,Object> |
objects(String url,
ERXRoute.Method method,
ERXRestContext context)
Returns a dictionary mapping the route's key names to their resolved objects.
|
Pattern |
routePattern()
Returns the Pattern used to match this route.
|
void |
setMethod(ERXRoute.Method method)
Sets the method of this request.
|
String |
toString() |
public static final ERXRoute.Key ControllerKey
public static final ERXRoute.Key ActionKey
public ERXRoute(String entityName, String urlPattern, ERXRoute.Method method)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usemethod
- the request methodpublic ERXRoute(String entityName, String urlPattern)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usepublic ERXRoute(String entityName, String urlPattern, String controller)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usecontroller
- the default controller class namepublic ERXRoute(String entityName, String urlPattern, ERXRoute.Method method, String controller)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usemethod
- the request methodcontroller
- the default controller class namepublic ERXRoute(String entityName, String urlPattern, Class<? extends ERXRouteController> controller)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usecontroller
- the default controller classpublic ERXRoute(String entityName, String urlPattern, ERXRoute.Method method, Class<? extends ERXRouteController> controller)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usemethod
- the request methodcontroller
- the default controller classpublic ERXRoute(String entityName, String urlPattern, String controller, String action)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usecontroller
- the default controller class nameaction
- the action namepublic ERXRoute(String entityName, String urlPattern, ERXRoute.Method method, String controller, String action)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usemethod
- the request methodcontroller
- the default controller class nameaction
- the action namepublic ERXRoute(String entityName, String urlPattern, Class<? extends ERXRouteController> controller, String action)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usecontroller
- the default controller classaction
- the action namepublic ERXRoute(String entityName, String urlPattern, ERXRoute.Method method, Class<? extends ERXRouteController> controller, String action)
entityName
- the name of the entity this route points tourlPattern
- the URL pattern to usemethod
- the request methodcontroller
- the default controller classaction
- the action namepublic String entityName()
public Class<? extends ERXRouteController> controller()
public String action()
public Pattern routePattern()
public ERXRoute.Method method()
public void setMethod(ERXRoute.Method method)
method
- the method of this requestpublic void _clearCaches()
public NSDictionary<ERXRoute.Key,String> keys(String url, ERXRoute.Method method)
url
- the URL to parsemethod
- the request methodpublic NSDictionary<ERXRoute.Key,Object> keysWithObjects(String url, ERXRoute.Method method, ERXRestContext context)
url
- the URL to processmethod
- the request methodcontext
- the delegate to use to, for instance, fault EO's with (or null to not fault EO's)public NSDictionary<String,Object> objects(String url, ERXRoute.Method method, ERXRestContext context)
url
- the URL to processmethod
- the request methodcontext
- the delegate to use to, for instance, fault EO's with (or null to not fault EO's)public static NSDictionary<ERXRoute.Key,Object> keysWithObjects(NSDictionary<ERXRoute.Key,String> keys, ERXRestContext context)
keys
- the parsed keys to processcontext
- the delegate to use to, for instance, fault EO's with (or null to not fault EO's)public NSDictionary<String,Object> objects(NSDictionary<ERXRoute.Key,String> keys, ERXRestContext context)
keys
- the parsed keys to processcontext
- the delegate to use to, for instance, fault EO's with (or null to not fault EO's)Copyright © 2002 – 2020 Project Wonder.