Project Wonder 5.0

er.extensions.appserver
Class ERXPathDirectAction

java.lang.Object
  extended by com.webobjects.appserver.WOAction
      extended by com.webobjects.appserver.WODirectAction
          extended by er.extensions.appserver.ERXPathDirectAction
All Implemented Interfaces:
com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation

public class ERXPathDirectAction
extends com.webobjects.appserver.WODirectAction

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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
 
Field Summary
protected static org.apache.log4j.Logger log
          logging support
protected  com.webobjects.foundation.NSArray pathParts
          caches the path parts
protected  com.webobjects.foundation.NSDictionary pathPartsByKeys
          caches the path parts by keys
protected  com.webobjects.foundation.NSDictionary pathPartsByKeysCaseInsensitive
          caches the path parts by case insensitive keys
 
Fields inherited from class com.webobjects.appserver.WODirectAction
actionText
 
Fields inherited from class com.webobjects.appserver.WOAction
_actionClasses, _context
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
ERXPathDirectAction(com.webobjects.appserver.WORequest aRequest)
          Just calls super.
 
Method Summary
 boolean hasPathPartForKey(java.lang.String key)
          Determines if a path part exists for a given key.
 boolean hasPathPartForKey(java.lang.String key, boolean caseInsensitive)
          Determines if a path part exists for a given key with the option of performing a case insensitve comparison.
 java.lang.String pathPartForKey(java.lang.String key)
          Gets a path part for a given key.
 java.lang.String pathPartForKeyWithDefault(java.lang.String key, java.lang.String defaultValue)
          Gets a path part for a given key, returning the default value if nothing was specified.
 java.lang.String pathPartForKeyWithDefault(java.lang.String key, java.lang.String defaultValue, boolean caseInsensitiveCompare)
          Gets a path part for a given key, returning the default value if nothing was specified.
 com.webobjects.foundation.NSArray pathParts()
          The path parts of a request correspond to to all of the pieces between the request handler key and the class name.
 com.webobjects.foundation.NSDictionary pathPartsByKeys()
          Given an array of path parts (foo=food, bar=baz, gee) this will produce a dictionary of the form: { foo=food; bar=baz; }.
 com.webobjects.foundation.NSDictionary pathPartsByKeysCaseInsensitive()
          Same method as pathPartsByKeys except all of the keys have been down cased, ie for path parts (Foo=food, bAr=baz, gee) this will give a dictionary of the form { foo=food; bar=baz; }.
 
Methods inherited from class com.webobjects.appserver.WODirectAction
_componentAction, defaultAction, getSessionIDForRequest, performActionNamed, takeFormValueArraysForKeyArray, takeFormValuesForKeyArray
 
Methods inherited from class com.webobjects.appserver.WOAction
_isActionOnClass, _methodForAction, _preloadAllActionsOnClass, canAccessFieldsDirectly, context, debugString, existingSession, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, initializeRequestSessionIDInContext, languages, logString, pageWithName, request, session, setLanguages, takeValueForKey, takeValueForKeyPath, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
handleQueryWithUnboundKey, handleTakeValueForUnboundKey, unableToSetNullForKey
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
takeValueForKeyPath, valueForKeyPath
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding
takeValueForKey, valueForKey
 
Methods inherited from interface com.webobjects.foundation.NSValidation
validateTakeValueForKeyPath, validateValueForKey
 

Field Detail

log

protected static final org.apache.log4j.Logger log
logging support


pathParts

protected com.webobjects.foundation.NSArray pathParts
caches the path parts


pathPartsByKeys

protected com.webobjects.foundation.NSDictionary pathPartsByKeys
caches the path parts by keys


pathPartsByKeysCaseInsensitive

protected com.webobjects.foundation.NSDictionary pathPartsByKeysCaseInsensitive
caches the path parts by case insensitive keys

Constructor Detail

ERXPathDirectAction

public ERXPathDirectAction(com.webobjects.appserver.WORequest aRequest)
Just calls super.

Method Detail

pathParts

public com.webobjects.foundation.NSArray pathParts()
The path parts of a request correspond to to all of the pieces between the request handler key and the class name. For instance given the direct action path /WebObjects/MyApp.woa/wpa/foo/bar/MyDirectActionClass/action would produce the path parts (foo, bar).

Returns:
array of path parts for the given request

pathPartsByKeys

public com.webobjects.foundation.NSDictionary pathPartsByKeys()
Given an array of path parts (foo=food, bar=baz, gee) this will produce a dictionary of the form: { foo=food; bar=baz; }. In the current for this method does not handle multiple keys with the same name.

Returns:
path parts broken down by key

pathPartsByKeysCaseInsensitive

public com.webobjects.foundation.NSDictionary pathPartsByKeysCaseInsensitive()
Same method as pathPartsByKeys except all of the keys have been down cased, ie for path parts (Foo=food, bAr=baz, gee) this will give a dictionary of the form { foo=food; bar=baz; }.

Returns:
path parts by case insensitive key

hasPathPartForKey

public boolean hasPathPartForKey(java.lang.String key)
Determines if a path part exists for a given key.

Parameters:
key - path part key
Returns:
if a path was specified

hasPathPartForKey

public boolean hasPathPartForKey(java.lang.String key,
                                 boolean caseInsensitive)
Determines if a path part exists for a given key with the option of performing a case insensitve comparison.

Parameters:
key - path part key
caseInsensitive - key comparison should be case sensitive
Returns:
if a path was specified

pathPartForKey

public java.lang.String pathPartForKey(java.lang.String key)
Gets a path part for a given key.

Parameters:
key - path part key
Returns:
path part for the key

pathPartForKeyWithDefault

public java.lang.String pathPartForKeyWithDefault(java.lang.String key,
                                                  java.lang.String defaultValue)
Gets a path part for a given key, returning the default value if nothing was specified.

Parameters:
key - path part key
defaultValue - default value
Returns:
path part for the key or the default value

pathPartForKeyWithDefault

public java.lang.String pathPartForKeyWithDefault(java.lang.String key,
                                                  java.lang.String defaultValue,
                                                  boolean caseInsensitiveCompare)
Gets a path part for a given key, returning the default value if nothing was specified. Adds the option for a case insensitive comparison.

Parameters:
key - path part key
defaultValue - default value
caseInsensitiveCompare - key comparison should ignore case
Returns:
path part for the key or the default value

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

Copyright © 2002 – 2007 Project Wonder.