ERXPathDirectActionRequestHandler Class Reference

Inherits er::extensions::appserver::ERXDirectActionRequestHandler.

Collaboration diagram for ERXPathDirectActionRequestHandler:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ERXPathDirectActionRequestHandler (String actionClassName, String defaultActionName, boolean shouldAddToStatistics, boolean doUseClassName, boolean doUseActionName)
 ERXPathDirectActionRequestHandler (String actionClassName, String defaultActionName, boolean shouldAddToStatistics)
 ERXPathDirectActionRequestHandler ()
NSArray getRequestHandlerPathForRequest (WORequest aRequest)

Static Public Member Functions

static NSDictionary< String,
String
formValuesFromRequest (WORequest request, boolean useActionClass, boolean useActionName)

Private Attributes

boolean useActionName = true
boolean useClassName = true


Detailed Description

The path direct action request handler allows for storing information in the request path. For instance you could have the request path: /WebObjects/MyApp.woa/wpa/com.foo.SomeActionClass/bar/gee/wiz=neat/actionName This action is treated just like: /WebObjects/MyApp.woa/wpa/com.foo.SomeActionClass/actionName

Utility direct action class that provides a bunch of nice utility methods if the direct action is accessed via a path direct action. See { for more information.


Constructor & Destructor Documentation

Public constructor, just calls super

ERXPathDirectActionRequestHandler ( String  actionClassName,
String  defaultActionName,
boolean  shouldAddToStatistics 
)

Public constructor, just calls super

Parameters:
actionClassName action class name
defaultActionName action name
shouldAddToStatistics boolean to add to stats

ERXPathDirectActionRequestHandler ( String  actionClassName,
String  defaultActionName,
boolean  shouldAddToStatistics,
boolean  doUseClassName,
boolean  doUseActionName 
)

Creates the request handler and lets you specify if the URLs assume and action class in front and action name in back. This is useful when you have inner DA classes like SomeComponent$SomeAction and don't want this to appear in the URLs.

Parameters:
actionClassName action class name
defaultActionName default action name
shouldAddToStatistics boolean if request should add to stats
doUseClassName if false, do not assume action class name in URL
doUseActionName if false, do not assume action name in URL


Member Function Documentation

static NSDictionary<String, String> formValuesFromRequest ( WORequest  request,
boolean  useActionClass,
boolean  useActionName 
) [static]

Returns a dictionary similar to the normal request form value dict. Translates /cgi-bin/.../wpa/foo/bar=2/baz into {foo = foo; bar = 2; baz = baz}

Parameters:
request request to parse
useActionClass true if first item should get ignored
useActionName true if last item should get ignored
Returns:
the dictionary of form values

NSArray getRequestHandlerPathForRequest ( WORequest  aRequest  ) 

Modified version for getting the request handler path for a given request.

Parameters:
aRequest a given request
Returns:
array of request handler paths for a given request, truncates to the first and last component if the number of components is greater than 2, and tries to divine the meaning of paths when there are only one or 2 path components.


Member Data Documentation

boolean useActionName = true [private]

Specifies if the request handler eats the action name from the URL

boolean useClassName = true [private]

Specifies if the request handler eats the action class from the URL


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

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