Project Wonder 2.0

er.extensions
Class ERXWOContext

java.lang.Object
  extended bycom.webobjects.appserver.WOContext
      extended byer.extensions.ERXWOContext
All Implemented Interfaces:
Cloneable, ERXMutableUserInfoHolderInterface, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions

public class ERXWOContext
extends WOContext
implements ERXMutableUserInfoHolderInterface

Replacement of WOContext. This subclass is installed when the frameworks loads.


Nested Class Summary
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Field Summary
protected  NSMutableDictionary mutableUserInfo
           
 
Fields inherited from class com.webobjects.appserver.WOContext
_session
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
_CLASS, NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Constructor Summary
ERXWOContext(WORequest worequest)
           
 
Method Summary
 String directActionURLForActionNamed(String actionName, NSDictionary queryDict, boolean includeSessionID)
          Returns a complete URL for the specified action.
 NSMutableDictionary mutableUserInfo()
          Returns the mutableUserInfo.
static WOContext newContext()
           
 void setMutableUserInfo(NSMutableDictionary userInfo)
          Set the mutableUserInfo
static String stripSessionIDFromURL(String url)
          Removes Session ID (wosid) query key/value pair from the given URL string.
 NSDictionary userInfo()
           
 
Methods inherited from class com.webobjects.appserver.WOContext
_componentActionURL, _componentName, _directActionURL, _generateCompleteURLs, _generateRelativeURLs, _incrementContextID, _isMultipleSubmitForm, _languages, _pageChanged, _pageComponent, _pageElement, _putAwakeComponentsToSleep, _refuseThisRequest, _requestContextID, _requestSessionID, _session, _set_refuseThisRequest, _setActionInvoked, _setComponentName, _setCurrentComponent, _setFormSubmitted, _setIsMultipleSubmitForm, _setPageChanged, _setPageComponent, _setPageElement, _setRequest, _setRequestContextID, _setRequestSessionID, _setResponse, _setSenderID, _setSession, _setTempComponentDefinition, _setUserInfo, _synchronizeForDistribution, _takeAwakeComponent, _tempComponentDefinition, _url, _urlForResourceNamed, _urlWithRequestHandlerKey, _userInfo, _wasActionInvoked, _wasFormSubmitted, appendElementIDComponent, appendZeroElementIDComponent, canAccessFieldsDirectly, clone, completeURLWithRequestHandlerKey, component, componentActionURL, contextID, contextWithRequest, deleteAllElementIDComponents, deleteLastElementIDComponent, directActionURLForActionNamed, elementID, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasSession, incrementLastElementIDComponent, isInForm, page, request, response, senderID, session, setInForm, takeValueForKey, takeValueForKeyPath, toString, unableToSetNullForKey, urlWithRequestHandlerKey, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mutableUserInfo

protected NSMutableDictionary mutableUserInfo
Constructor Detail

ERXWOContext

public ERXWOContext(WORequest worequest)
Method Detail

newContext

public static WOContext newContext()

mutableUserInfo

public NSMutableDictionary mutableUserInfo()
Description copied from interface: ERXMutableUserInfoHolderInterface
Returns the mutableUserInfo.

Specified by:
mutableUserInfo in interface ERXMutableUserInfoHolderInterface

setMutableUserInfo

public void setMutableUserInfo(NSMutableDictionary userInfo)
Description copied from interface: ERXMutableUserInfoHolderInterface
Set the mutableUserInfo

Specified by:
setMutableUserInfo in interface ERXMutableUserInfoHolderInterface

userInfo

public NSDictionary userInfo()

directActionURLForActionNamed

public String directActionURLForActionNamed(String actionName,
                                            NSDictionary queryDict,
                                            boolean includeSessionID)
Returns a complete URL for the specified action. Works like WOContext.directActionURLForActionNamed(java.lang.String, com.webobjects.foundation.NSDictionary) but has one extra parameter to specify whether or not to include the current Session ID (wosid) in the URL. Convenient if you embed the link for the direct action into an email message and don't want to keep the Session ID in it.

actionName can be either an action -- "ActionName" -- or an action on a class -- "ActionClass/ActionName". You can also specify queryDict to be an NSDictionary which contains form values as key/value pairs. includeSessionID indicates if you want to include the Session ID (wosid) in the URL.

Parameters:
actionName - String action name
queryDict - NSDictionary containing query key/value pairs
includeSessionID - true: to include the Session ID (if has one),
false: not to include the Session ID
Returns:
a String containing the URL for the specified action
See Also:
WODirectAction

stripSessionIDFromURL

public static String stripSessionIDFromURL(String url)
Removes Session ID (wosid) query key/value pair from the given URL string.

Returns:
a String with the Session ID removed

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.