ERXRoute Class Reference

Collaboration diagram for ERXRoute:

Collaboration graph
[legend]

List of all members.

Classes

class  Key
class  RouteParameterMethod

Public Types

enum  Method {
  All, Get, Put, Post,
  Delete, Head, Options, Trace,
  Connect
}

Public Member Functions

void _clearCaches ()
Class<?extends ERXRouteControllercontroller ()
String entityName ()
 ERXRoute (String entityName, String urlPattern, ERXRoute.Method method, Class<?extends ERXRouteController > controller, String action)
 ERXRoute (String entityName, String urlPattern, Class<?extends ERXRouteController > controller, String action)
 ERXRoute (String entityName, String urlPattern, ERXRoute.Method method, String controller, String action)
 ERXRoute (String entityName, String urlPattern, String controller, String action)
 ERXRoute (String entityName, String urlPattern, ERXRoute.Method method, Class<?extends ERXRouteController > controller)
 ERXRoute (String entityName, String urlPattern, Class<?extends ERXRouteController > controller)
 ERXRoute (String entityName, String urlPattern, ERXRoute.Method method, String controller)
 ERXRoute (String entityName, String urlPattern, String controller)
 ERXRoute (String entityName, String urlPattern)
 ERXRoute (String entityName, String urlPattern, ERXRoute.Method method)
NSDictionary< ERXRoute.Key,
String
keys (String url, ERXRoute.Method method)
NSDictionary< ERXRoute.Key,
Object > 
keysWithObjects (String url, ERXRoute.Method method, IERXRestDelegate delegate)
ERXRoute.Method method ()
NSDictionary< String, Object > objects (NSDictionary< ERXRoute.Key, String > keys, IERXRestDelegate delegate)
NSDictionary< String, Object > objects (String url, ERXRoute.Method method, IERXRestDelegate delegate)
Pattern routePattern ()
void setMethod (ERXRoute.Method method)
String toString ()

Static Public Member Functions

static NSDictionary
< ERXRoute.Key, Object > 
keysWithObjects (NSDictionary< ERXRoute.Key, String > keys, IERXRestDelegate delegate)

Static Public Attributes

static final ERXRoute.Key ActionKey = new ERXRoute.Key("action")
static final ERXRoute.Key ControllerKey = new ERXRoute.Key("controller")

Private Attributes

String _action
Class<?extends ERXRouteController_controller
String _entityName
NSMutableArray< ERXRoute.Key > _keys
ERXRoute.Method _method
Pattern _routePattern


Detailed Description

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.

Author:
mschrag

Member Enumeration Documentation

enum Method

Enumerator:
All 
Get 
Put 
Post 
Delete 
Head 
Options 
Trace 
Connect 


Constructor & Destructor Documentation

ERXRoute ( String  entityName,
String  urlPattern,
ERXRoute.Method  method 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use

ERXRoute ( String  entityName,
String  urlPattern 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use

ERXRoute ( String  entityName,
String  urlPattern,
String  controller 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use
controller the default controller class name

ERXRoute ( String  entityName,
String  urlPattern,
ERXRoute.Method  method,
String  controller 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use
controller the default controller class name

ERXRoute ( String  entityName,
String  urlPattern,
Class<?extends ERXRouteController controller 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use
controller the default controller class

ERXRoute ( String  entityName,
String  urlPattern,
ERXRoute.Method  method,
Class<?extends ERXRouteController controller 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use
controller the default controller class

ERXRoute ( String  entityName,
String  urlPattern,
String  controller,
String  action 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use
controller the default controller class name
action the action name

ERXRoute ( String  entityName,
String  urlPattern,
ERXRoute.Method  method,
String  controller,
String  action 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use
controller the default controller class name
action the action name

ERXRoute ( String  entityName,
String  urlPattern,
Class<?extends ERXRouteController controller,
String  action 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use
controller the default controller class
action the action name

ERXRoute ( String  entityName,
String  urlPattern,
ERXRoute.Method  method,
Class<?extends ERXRouteController controller,
String  action 
)

Constructs a new route with the given URL pattern.

Parameters:
entityName the name of the entity this route points to
urlPattern the url pattern to use
controller the default controller class
action the action name


Member Function Documentation

void _clearCaches (  ) 

Clears any caches that may exist on ERXRoutes (probably only useful to JRebel, to clear the route parameter method cache).

Class<? extends ERXRouteController> controller (  ) 

Returns the controller class for this route.

Returns:
the controller class for this route

String entityName (  ) 

Returns the entity name of the target of this route (can be null).

Returns:
the entity name of the target of this route

NSDictionary<ERXRoute.Key, String> keys ( String  url,
ERXRoute.Method  method 
)

Returns the route keys for the given URL.

Parameters:
url the URL to parse

static NSDictionary<ERXRoute.Key, Object> keysWithObjects ( NSDictionary< ERXRoute.Key, String keys,
IERXRestDelegate  delegate 
) [static]

Returns a dictionary mapping the route's keys to their resolved objects.

Parameters:
keys the parsed keys to process
delegate the delegate to use to, for instance, fault EO's with (or null to not fault EO's)
Returns:
a dictionary mapping the route's keys to their resolved objects

NSDictionary<ERXRoute.Key, Object> keysWithObjects ( String  url,
ERXRoute.Method  method,
IERXRestDelegate  delegate 
)

Returns a dictionary mapping the route's keys to their resolved objects.

Parameters:
url the URL to process
delegate the delegate to use to, for instance, fault EO's with (or null to not fault EO's)
Returns:
a dictionary mapping the route's keys to their resolved objects

ERXRoute.Method method (  ) 

Returns the method of this request.

Returns:
the method of this request

NSDictionary<String, Object> objects ( NSDictionary< ERXRoute.Key, String keys,
IERXRestDelegate  delegate 
)

Returns a dictionary mapping the route's key names to their resolved objects.

Parameters:
keys the parsed keys to process
delegate the delegate to use to, for instance, fault EO's with (or null to not fault EO's)
Returns:
a dictionary mapping the route's key names to their resolved objects

NSDictionary<String, Object> objects ( String  url,
ERXRoute.Method  method,
IERXRestDelegate  delegate 
)

Returns a dictionary mapping the route's key names to their resolved objects.

Parameters:
url the URL to process
delegate the delegate to use to, for instance, fault EO's with (or null to not fault EO's)
Returns:
a dictionary mapping the route's key names to their resolved objects

Pattern routePattern (  ) 

Returns the Pattern used to match this route.

Returns:
the Pattern used to match this route

void setMethod ( ERXRoute.Method  method  ) 

Sets the method of this request.

Parameters:
method the method of this request

String toString (  ) 


Member Data Documentation

String _action [private]

Class<? extends ERXRouteController> _controller [private]

String _entityName [private]

NSMutableArray<ERXRoute.Key> _keys [private]

Pattern _routePattern [private]

final ERXRoute.Key ActionKey = new ERXRoute.Key("action") [static]

final ERXRoute.Key ControllerKey = new ERXRoute.Key("controller") [static]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:33 2012 for Project Wonder by  doxygen 1.5.8