public class ERXRoute
extends java.lang.Object
ERXRoute encapsulates a URL path with matching values inside of it. For instance, the route "/company/{company:Company}/employees/{Person}/name/{name:String}" would yield an objects(..) dictionary with a Company EO mapped to the key "company," a Person EO mapped to the key "Person" and a String mapped to the key "name". ERXRoutes do not enforce any security -- they simply represent a way to map URL patterns onto objects.
| 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(java.lang.String entityName,
java.lang.String urlPattern)
Constructs a new route with the given URL pattern.
|
ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
java.lang.Class<? extends ERXRouteController> controller)
Constructs a new route with the given URL pattern.
|
ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
java.lang.Class<? extends ERXRouteController> controller,
java.lang.String action)
Constructs a new route with the given URL pattern.
|
ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method)
Constructs a new route with the given URL pattern.
|
ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method,
java.lang.Class<? extends ERXRouteController> controller)
Constructs a new route with the given URL pattern.
|
ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method,
java.lang.Class<? extends ERXRouteController> controller,
java.lang.String action)
Constructs a new route with the given URL pattern.
|
ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method,
java.lang.String controller)
Constructs a new route with the given URL pattern.
|
ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method,
java.lang.String controller,
java.lang.String action)
Constructs a new route with the given URL pattern.
|
ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
java.lang.String controller)
Constructs a new route with the given URL pattern.
|
ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
java.lang.String controller,
java.lang.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).
|
java.lang.String |
action() |
java.lang.Class<? extends ERXRouteController> |
controller()
Returns the controller class for this route.
|
java.lang.String |
entityName()
Returns the entity name of the target of this route (can be null).
|
NSDictionary<ERXRoute.Key,java.lang.String> |
keys(java.lang.String url,
ERXRoute.Method method)
Returns the route keys for the given URL.
|
static NSDictionary<ERXRoute.Key,java.lang.Object> |
keysWithObjects(NSDictionary<ERXRoute.Key,java.lang.String> keys,
ERXRestContext context)
Returns a dictionary mapping the route's keys to their resolved objects.
|
NSDictionary<ERXRoute.Key,java.lang.Object> |
keysWithObjects(java.lang.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<java.lang.String,java.lang.Object> |
objects(NSDictionary<ERXRoute.Key,java.lang.String> keys,
ERXRestContext context)
Returns a dictionary mapping the route's key names to their resolved objects.
|
NSDictionary<java.lang.String,java.lang.Object> |
objects(java.lang.String url,
ERXRoute.Method method,
ERXRestContext context)
Returns a dictionary mapping the route's key names to their resolved objects.
|
java.util.regex.Pattern |
routePattern()
Returns the Pattern used to match this route.
|
void |
setMethod(ERXRoute.Method method)
Sets the method of this request.
|
java.lang.String |
toString() |
public static final ERXRoute.Key ControllerKey
public static final ERXRoute.Key ActionKey
public ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method)
entityName - the name of the entity this route points tourlPattern - the url pattern to usepublic ERXRoute(java.lang.String entityName,
java.lang.String urlPattern)
entityName - the name of the entity this route points tourlPattern - the url pattern to usepublic ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
java.lang.String controller)
entityName - the name of the entity this route points tourlPattern - the url pattern to usecontroller - the default controller class namepublic ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method,
java.lang.String controller)
entityName - the name of the entity this route points tourlPattern - the url pattern to usecontroller - the default controller class namepublic ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
java.lang.Class<? extends ERXRouteController> controller)
entityName - the name of the entity this route points tourlPattern - the url pattern to usecontroller - the default controller classpublic ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method,
java.lang.Class<? extends ERXRouteController> controller)
entityName - the name of the entity this route points tourlPattern - the url pattern to usecontroller - the default controller classpublic ERXRoute(java.lang.String entityName,
java.lang.String urlPattern,
java.lang.String controller,
java.lang.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(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method,
java.lang.String controller,
java.lang.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(java.lang.String entityName,
java.lang.String urlPattern,
java.lang.Class<? extends ERXRouteController> controller,
java.lang.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(java.lang.String entityName,
java.lang.String urlPattern,
ERXRoute.Method method,
java.lang.Class<? extends ERXRouteController> controller,
java.lang.String action)
entityName - the name of the entity this route points tourlPattern - the url pattern to usecontroller - the default controller classaction - the action namepublic java.lang.String entityName()
public java.lang.Class<? extends ERXRouteController> controller()
public java.lang.String action()
public java.util.regex.Pattern routePattern()
public ERXRoute.Method method()
public void setMethod(ERXRoute.Method method)
method - the method of this requestpublic void _clearCaches()
public NSDictionary<ERXRoute.Key,java.lang.String> keys(java.lang.String url, ERXRoute.Method method)
url - the URL to parsepublic NSDictionary<ERXRoute.Key,java.lang.Object> keysWithObjects(java.lang.String url, ERXRoute.Method method, ERXRestContext context)
url - the URL to processmethod - context - the delegate to use to, for instance, fault EO's with (or null to not fault EO's)public NSDictionary<java.lang.String,java.lang.Object> objects(java.lang.String url, ERXRoute.Method method, ERXRestContext context)
url - the URL to processcontext - the delegate to use to, for instance, fault EO's with (or null to not fault EO's)public static NSDictionary<ERXRoute.Key,java.lang.Object> keysWithObjects(NSDictionary<ERXRoute.Key,java.lang.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<java.lang.String,java.lang.Object> objects(NSDictionary<ERXRoute.Key,java.lang.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 java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2002 – 2022 Project Wonder.