public class ERXWOContext extends ERXAjaxContext implements ERXMutableUserInfoHolderInterface
Modifier and Type | Class and Description |
---|---|
static class |
ERXWOContext.Observer |
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
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.MapImplementation, com.webobjects.foundation.NSKeyValueCoding.Null<T>, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_DICTIONARY_KEY |
static String |
CONTEXT_KEY |
_pageFragementID, _session, _userInfo, EscapeQueryDictionary, SessionIDBindingKey, WOURLEncoding
Constructor and Description |
---|
ERXWOContext(com.webobjects.appserver.WORequest worequest) |
Modifier and Type | Method and Description |
---|---|
static NSArray<com.webobjects.appserver.WOComponent> |
_componentPath(com.webobjects.appserver.WOContext context)
Debugging help, returns the path to current component as WOComponent objects.
|
protected static NSMutableDictionary |
_contextDictionary() |
boolean |
_generatingCompleteResourceURLs()
Returns whether or not resources generate complete URLs.
|
protected String |
_postprocessURL(String url) |
protected void |
_preprocessURL()
If er.extensions.ERXWOContext.forceRemoveApplicationNumber is true, then always remove the
application number from the generated URLs.
|
void |
_setCurrentComponent(com.webobjects.appserver.WOComponent component)
Implemented so that the thread checks if it should get interrupted.
|
void |
_setGenerateCompleteResourceURLs(boolean generateCompleteResourceURLs)
Turn on complete resource URL generation.
|
String |
_urlWithRequestHandlerKey(String requestHandlerKey,
String requestHandlerPath,
String queryString,
boolean secure) |
String |
_urlWithRequestHandlerKey(String requestHandlerKey,
String requestHandlerPath,
String queryString,
boolean isSecure,
int somePort) |
Object |
clone() |
static NSArray<String> |
componentPath(com.webobjects.appserver.WOContext context)
Debugging help, returns the path to current component as a list of component names.
|
static NSMutableDictionary |
contextDictionary() |
static com.webobjects.appserver.WOContext |
currentContext() |
static String |
directActionUrl(com.webobjects.appserver.WOContext context,
String directActionName,
Boolean secure,
boolean includeSessionID)
Generates direct action URLs with support for various overrides.
|
static String |
directActionUrl(com.webobjects.appserver.WOContext context,
String host,
Integer port,
String path,
String directActionName,
NSDictionary<String,Object> queryParameters,
Boolean secure,
boolean includeSessionID)
Generates direct action URLs with support for various overrides.
|
static String |
directActionUrl(com.webobjects.appserver.WOContext context,
String host,
Integer port,
String path,
String directActionName,
String key,
Object value,
Boolean secure,
boolean includeSessionID)
Generates direct action URLs with support for various overrides.
|
static String |
directActionUrl(com.webobjects.appserver.WOContext context,
String directActionName,
NSDictionary<String,Object> queryParameters,
Boolean secure,
boolean includeSessionID)
Generates direct action URLs with support for various overrides.
|
static String |
directActionUrl(com.webobjects.appserver.WOContext context,
String directActionName,
String key,
String value,
Boolean secure,
boolean includeSessionID)
Generates direct action URLs with support for various overrides.
|
String |
directActionURLForActionNamed(String actionName,
NSDictionary queryDict,
boolean includeSessionID)
Returns a complete URL for the specified action.
|
boolean |
doesGenerateCompleteURLs() |
<T extends ERXRequest> |
erxRequest() |
com.webobjects.appserver.WOSession |
existingSession()
Returns the existing session if any is given in the form values or URL.
|
void |
generateCompleteURLs() |
void |
generateRelativeURLs() |
boolean |
hasSession()
Returns true if there is an existing session.
|
NSMutableDictionary |
mutableUserInfo()
Returns the mutableUserInfo.
|
static ERXWOContext |
newContext()
Creates a WOContext using a dummy WORequest.
|
protected String |
relativeURLWithRequestHandlerKey(String requestHandlerKey,
String requestHandlerPath,
String queryString) |
String |
safeElementID() |
static String |
safeIdentifierName(com.webobjects.appserver.WOContext context,
boolean willCache)
Returns a safe identifier for the current component.
|
static void |
setCurrentContext(Object object) |
void |
setMutableUserInfo(NSMutableDictionary userInfo)
Set the mutableUserInfo
|
static String |
stripSessionIDFromURL(String url)
Removes session ID query key/value pair from the given URL
string.
|
NSDictionary |
userInfo() |
_wasFormSubmitted, wasFormSubmitted
_componentActionURL, _componentName, _directActionURL, _directActionURL, _generateCompleteURLs, _generateRelativeURLs, _incrementContextID, _isMultipleSubmitForm, _languages, _originalContextID, _pageChanged, _pageComponent, _pageElement, _putAwakeComponentsToSleep, _refuseThisRequest, _removeSessionIDFromDictionary, _requestContextID, _requestSessionID, _session, _sessionIDInURL, _set_refuseThisRequest, _setActionInvoked, _setComponentName, _setFormSubmitted, _setIsMultipleSubmitForm, _setOriginalContextID, _setPageChanged, _setPageComponent, _setPageElement, _setRequest, _setRequestContextID, _setRequestSessionID, _setResponse, _setSenderID, _setSession, _setTempComponentDefinition, _setUserInfo, _stripSessionIDFromURL, _synchronizeForDistribution, _takeAwakeComponent, _tempComponentDefinition, _url, _urlForResourceNamed, _userInfo, _wasActionInvoked, appendElementIDComponent, appendZeroElementIDComponent, canAccessFieldsDirectly, completeApplicationURLPrefix, completeURLWithRequestHandlerKey, completeURLWithRequestHandlerKey, component, componentActionURL, componentActionURL, componentActionURL, computeQueryDictionary, contextID, contextWithRequest, deleteAllElementIDComponents, deleteLastElementIDComponent, directActionURLForActionNamed, directActionURLForActionNamed, directActionURLForActionNamed, directConnect, elementID, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, incrementLastElementIDComponent, isInForm, isMultipleSubmitForm, javaScriptElementID, javaScriptElementIDPrefix, javaScriptElementIDSeparator, page, pageFragementID, request, response, secureMode, secureRequest, senderID, session, sessionIDInQueryDictionary, setActionInvoked, setFormSubmitted, setInForm, setIsMultipleSubmitForm, setJavaScriptElementIDPrefix, setJavaScriptElementIDSeparator, setPageFragmentID, setSecureMode, setUserInfo, setUserInfoForKey, shouldNotStorePageInBacktrackCache, takeValueForKey, takeValueForKeyPath, toString, unableToSetNullForKey, urlWithRequestHandlerKey, userInfoForKey, valueForKey, valueForKeyPath, wasActionInvoked
public static final String CONTEXT_KEY
public static final String CONTEXT_DICTIONARY_KEY
public com.webobjects.appserver.WOSession existingSession()
null
public boolean hasSession()
hasSession
in class com.webobjects.appserver.WOContext
public static NSMutableDictionary contextDictionary()
public static com.webobjects.appserver.WOContext currentContext()
public static void setCurrentContext(Object object)
protected static NSMutableDictionary _contextDictionary()
public void _setCurrentComponent(com.webobjects.appserver.WOComponent component)
_setCurrentComponent
in class com.webobjects.appserver.WOContext
component
- the current componentpublic Object clone()
clone
in class com.webobjects.appserver.WOContext
public void _setGenerateCompleteResourceURLs(boolean generateCompleteResourceURLs)
generateCompleteResourceURLs
- if true, resources will generate complete URLs.public boolean _generatingCompleteResourceURLs()
public void generateCompleteURLs()
generateCompleteURLs
in class com.webobjects.appserver.WOContext
public void generateRelativeURLs()
generateRelativeURLs
in class com.webobjects.appserver.WOContext
public boolean doesGenerateCompleteURLs()
doesGenerateCompleteURLs
in class com.webobjects.appserver.WOContext
public static ERXWOContext newContext()
public <T extends ERXRequest> T erxRequest()
public NSMutableDictionary mutableUserInfo()
ERXMutableUserInfoHolderInterface
mutableUserInfo
in interface ERXMutableUserInfoHolderInterface
public void setMutableUserInfo(NSMutableDictionary userInfo)
ERXMutableUserInfoHolderInterface
setMutableUserInfo
in interface ERXMutableUserInfoHolderInterface
public NSDictionary userInfo()
userInfo
in class com.webobjects.appserver.WOContext
protected void _preprocessURL()
public String _urlWithRequestHandlerKey(String requestHandlerKey, String requestHandlerPath, String queryString, boolean secure)
_urlWithRequestHandlerKey
in class com.webobjects.appserver.WOContext
public String _urlWithRequestHandlerKey(String requestHandlerKey, String requestHandlerPath, String queryString, boolean isSecure, int somePort)
_urlWithRequestHandlerKey
in class com.webobjects.appserver.WOContext
public String directActionURLForActionNamed(String actionName, NSDictionary queryDict, boolean includeSessionID)
WOContext.directActionURLForActionNamed(java.lang.String, com.webobjects.foundation.NSDictionary<java.lang.String, java.lang.Object>)
but has one extra
parameter to specify whether or not to include the current session ID
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 in the URL.
actionName
- String action namequeryDict
- NSDictionary containing query key/value pairsincludeSessionID
- true
: to include the session ID (if has one), false
: not to include the session IDWODirectAction
public static String stripSessionIDFromURL(String url)
url
- String URLpublic static NSArray<String> componentPath(com.webobjects.appserver.WOContext context)
context
- the current contextpublic static NSArray<com.webobjects.appserver.WOComponent> _componentPath(com.webobjects.appserver.WOContext context)
context
- the current contextpublic static String safeIdentifierName(com.webobjects.appserver.WOContext context, boolean willCache)
context
- the WOContextwillCache
- if true, you should cache the resulting value in your componentpublic static String directActionUrl(com.webobjects.appserver.WOContext context, String directActionName, Boolean secure, boolean includeSessionID)
context
- the context to generate the URL withindirectActionName
- the direct action namesecure
- true
= https, false
= http, null
= same as requestincludeSessionID
- if false
, removes session ID from query parameterspublic static String directActionUrl(com.webobjects.appserver.WOContext context, String directActionName, String key, String value, Boolean secure, boolean includeSessionID)
context
- the context to generate the URL withindirectActionName
- the direct action namekey
- the query parameter key to add (or null
to skip)value
- the query parameter value to add (or null
to skip)secure
- true
= https, false
= http, null
= same as requestincludeSessionID
- if false
, removes session ID from query parameterspublic static String directActionUrl(com.webobjects.appserver.WOContext context, String directActionName, NSDictionary<String,Object> queryParameters, Boolean secure, boolean includeSessionID)
context
- the context to generate the URL withindirectActionName
- the direct action namequeryParameters
- the query parameters to append (or null
)secure
- true
= https, false
= http, null
= same as requestincludeSessionID
- if false
, removes session ID from query parameterspublic static String directActionUrl(com.webobjects.appserver.WOContext context, String host, Integer port, String path, String directActionName, String key, Object value, Boolean secure, boolean includeSessionID)
context
- the context to generate the URL withinhost
- the host name for the URL (or null
for default)port
- the port number of the URL (or null
for default)path
- the custom path prefix (or null
for none)directActionName
- the direct action namekey
- the query parameter key to add (or null
to skip)value
- the query parameter value to add (or null
to skip)secure
- true
= https, false
= http, null
= same as requestincludeSessionID
- if false
, removes session ID from query parameterspublic static String directActionUrl(com.webobjects.appserver.WOContext context, String host, Integer port, String path, String directActionName, NSDictionary<String,Object> queryParameters, Boolean secure, boolean includeSessionID)
context
- the context to generate the URL withinhost
- the host name for the URL (or null
for default)port
- the port number of the URL (or null
for default)path
- the custom path prefix (or null
for none)directActionName
- the direct action namequeryParameters
- the query parameters to append (or null
)secure
- true
= https, false
= http, null
= same as requestincludeSessionID
- if false
, removes session ID from query parameterspublic String safeElementID()
Copyright © 2002 – 2020 Project Wonder.