Project Wonder 5.0

er.extensions.appserver
Class ERXPathDirectActionRequestHandler

java.lang.Object
  extended by com.webobjects.appserver.WORequestHandler
      extended by com.webobjects.appserver._private.WOActionRequestHandler
          extended by com.webobjects.appserver._private.WODirectActionRequestHandler
              extended by er.extensions.appserver.ERXDirectActionRequestHandler
                  extended by er.extensions.appserver.ERXPathDirectActionRequestHandler

public class ERXPathDirectActionRequestHandler
extends ERXDirectActionRequestHandler

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


Field Summary
 
Fields inherited from class er.extensions.appserver.ERXDirectActionRequestHandler
automaticMessageEncodingEnabled, log
 
Fields inherited from class com.webobjects.appserver._private.WOActionRequestHandler
actionClassClass, actionClassName, CLASS_NOT_FOUND, defaultActionName, INSTANTIATION, INVALID_PATH, INVOCATION, shouldAddToStatistics
 
Fields inherited from class com.webobjects.appserver.WORequestHandler
DidHandleRequestNotification
 
Constructor Summary
ERXPathDirectActionRequestHandler()
          Public constructor, just calls super
ERXPathDirectActionRequestHandler(java.lang.String actionClassName, java.lang.String defaultActionName, boolean shouldAddToStatistics)
          Public constructor, just calls super
ERXPathDirectActionRequestHandler(java.lang.String actionClassName, java.lang.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.
 
Method Summary
static com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.String> formValuesFromRequest(com.webobjects.appserver.WORequest request, boolean useActionClass, boolean useActionName)
          Returns a dictionary similar to the normal request form value dict.
 com.webobjects.foundation.NSArray getRequestHandlerPathForRequest(com.webobjects.appserver.WORequest aRequest)
          Modified version for getting the request handler path for a given request.
 
Methods inherited from class er.extensions.appserver.ERXDirectActionRequestHandler
automaticMessageEncodingEnabled, handleRequest, isSystemRequest
 
Methods inherited from class com.webobjects.appserver._private.WODirectActionRequestHandler
allowsContentInputStream, defaultActionClassName, generateErrorResponse, generateRequestRefusal, handler, nullResponse, registerDidHandleActionRequestWithActionNamed, registerWillHandleActionRequest, setAllowsContentInputStream
 
Methods inherited from class com.webobjects.appserver._private.WOActionRequestHandler
_actionClassForName, _handleRequest, _putComponentsToSleepInContext, defaultDefaultActionName, defaultShouldAddToStatistics, getActionInstance, getRequestActionClassAndNameForPath, isSessionIDInRequest, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ERXPathDirectActionRequestHandler

public ERXPathDirectActionRequestHandler()
Public constructor, just calls super


ERXPathDirectActionRequestHandler

public ERXPathDirectActionRequestHandler(java.lang.String actionClassName,
                                         java.lang.String defaultActionName,
                                         boolean shouldAddToStatistics)
Public constructor, just calls super

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

ERXPathDirectActionRequestHandler

public ERXPathDirectActionRequestHandler(java.lang.String actionClassName,
                                         java.lang.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
Method Detail

getRequestHandlerPathForRequest

public com.webobjects.foundation.NSArray getRequestHandlerPathForRequest(com.webobjects.appserver.WORequest aRequest)
Modified version for getting the request handler path for a given request.

Overrides:
getRequestHandlerPathForRequest in class com.webobjects.appserver._private.WODirectActionRequestHandler
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.

formValuesFromRequest

public static com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.String> formValuesFromRequest(com.webobjects.appserver.WORequest request,
                                                                                                              boolean useActionClass,
                                                                                                              boolean useActionName)
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

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.