public class ERXWOContext extends ERXAjaxContext implements ERXMutableUserInfoHolderInterface
Modifier and Type | Class and Description |
---|---|
static class |
ERXWOContext.Observer |
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_DICTIONARY_KEY |
static String |
CONTEXT_KEY |
_pageFragementID, _session, _userInfo, EscapeQueryDictionary, SessionIDBindingKey, WOURLEncoding
_CLASS
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
NullValue
Constructor and Description |
---|
ERXWOContext(WORequest worequest) |
Modifier and Type | Method and Description |
---|---|
static NSArray<WOComponent> |
_componentPath(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(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(WOContext context)
Debugging help, returns the path to current component as a list of component names.
|
static NSMutableDictionary |
contextDictionary() |
static WOContext |
currentContext() |
static String |
directActionUrl(WOContext context,
String directActionName,
Boolean secure,
boolean includeSessionID)
Generates direct action URLs with support for various overrides.
|
static String |
directActionUrl(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(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(WOContext context,
String directActionName,
NSDictionary<String,Object> queryParameters,
Boolean secure,
boolean includeSessionID)
Generates direct action URLs with support for various overrides.
|
static String |
directActionUrl(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() |
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(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 ERXWOContext(WORequest worequest)
public WOSession existingSession()
null
public boolean hasSession()
hasSession
in class WOContext
public static NSMutableDictionary contextDictionary()
public static WOContext currentContext()
public static void setCurrentContext(Object object)
protected static NSMutableDictionary _contextDictionary()
public void _setCurrentComponent(WOComponent component)
_setCurrentComponent
in class WOContext
component
- the current componentpublic void _setGenerateCompleteResourceURLs(boolean generateCompleteResourceURLs)
generateCompleteResourceURLs
- if true, resources will generate complete URLs.public boolean _generatingCompleteResourceURLs()
public void generateCompleteURLs()
generateCompleteURLs
in class WOContext
public void generateRelativeURLs()
generateRelativeURLs
in class WOContext
public boolean doesGenerateCompleteURLs()
doesGenerateCompleteURLs
in class 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()
protected void _preprocessURL()
public String _urlWithRequestHandlerKey(String requestHandlerKey, String requestHandlerPath, String queryString, boolean secure)
_urlWithRequestHandlerKey
in class WOContext
public String _urlWithRequestHandlerKey(String requestHandlerKey, String requestHandlerPath, String queryString, boolean isSecure, int somePort)
_urlWithRequestHandlerKey
in class 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(WOContext context)
context
- the current contextpublic static NSArray<WOComponent> _componentPath(WOContext context)
context
- the current contextpublic static String safeIdentifierName(WOContext context, boolean willCache)
context
- the WOContextwillCache
- if true, you should cache the resulting value in your componentpublic static String directActionUrl(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(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(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(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(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 – 2024 Project Wonder.