|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
org.apache.myfaces.trinidad.context.RequestContext
public abstract class RequestContext
Context class for all per-request and per-webapp information required by Trinidad. A RequestContext object can be retrieved with the static getCurrentInstance() method. There is one and only one RequestContext object active in any one thread.
This class does not extend FacesContext; this is intentional, as extending FacesContext requires taking over the FacesContextFactory.
| Nested Class Summary | |
|---|---|
static class |
RequestContext.Accessibility |
static class |
RequestContext.ClientValidation |
static class |
RequestContext.OutputModeEnumeration representing OutputModes |
| Field Summary | |
|---|---|
static java.lang.String |
VARIABLE_NAMEName of the EL implicit variable ("requestContext") that is used to expose this context object. |
| Constructor Summary | |
|---|---|
protected |
RequestContext()Creates an RequestContext. |
| Method Summary | |
|---|---|
abstract void |
addPartialTarget(javax.faces.component.UIComponent newTarget)Add a component as a partial target. |
abstract void |
addPartialTargets(javax.faces.component.UIComponent from, java.lang.String... targets)Add components relative to the given component as partial targets. |
abstract void |
addPartialTriggerListeners(javax.faces.component.UIComponent listener, java.lang.String[] trigger)Adds a listener on a set of particular triggering components. |
void |
attach()Attaches a RequestContext to the current thread. |
abstract VisitContext |
createVisitContext(javax.faces.context.FacesContext context, java.util.Collection<java.lang.String> ids, java.util.Set<VisitHint> hints, javax.faces.event.PhaseId phaseId)Creates a VisitContext instance for use with UIComponent.visitTree(). |
abstract RequestContext.Accessibility |
getAccessibilityMode()Returns the name of the current accessibility mode. |
abstract AccessibilityProfile |
getAccessibilityProfile()Returns the accessibility profile for the current request. |
abstract Agent |
getAgent()Returns the Agent information for the current context |
java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> |
getApplicationScopedConcurrentMap()Gets a per application concurrent map. |
abstract ChangeManager |
getChangeManager()Gets the ChangeManager for the current application. |
abstract RequestContext.ClientValidation |
getClientValidation()Returns the name of the current client validation mode. |
abstract java.util.Map<java.lang.String,java.util.List<java.awt.Color>> |
getColorPalette()Returns a Map that takes color palette names as keys, and returns the color palette as a result. |
abstract java.lang.String |
getCurrencyCode()Return the ISO 4217 currency code used by default for formatting currency fields when those fields do not specify an explicit currency field via their converter. |
static RequestContext |
getCurrentInstance()Retrieves the RequestContext active for the current thread. |
abstract char |
getDecimalSeparator()Return the separator used as the decimal point. |
abstract DialogService |
getDialogService()Returns an DialogService, which exposes a number of APIs needed by component and framework developers. |
abstract java.util.Map<java.lang.Object,java.util.Map<java.lang.Object,java.lang.String>> |
getFormatter()Returns a Map that performs message formatting with a recursive Map structure. |
abstract java.util.Locale |
getFormattingLocale()Returns the formatting locale. |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getHelpSystem()Returns a Map that will accept help system properties as keys, and return an URL as a result. |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getHelpTopic()Returns a Map that will accept topic names as keys, and return an URL as a result. |
abstract char |
getNumberGroupingSeparator()Return the separator used for groups of numbers. |
abstract java.lang.String |
getOracleHelpServletUrl()Return the URL to an Oracle Help for the Web servlet. |
abstract java.lang.String |
getOutputMode()Returns the "output mode" - printable, etc. |
RequestContext.OutputMode |
getOutputModeEnum()Returns the OutputMode enumeration |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getPageFlowScope()Returns a Map of objects at "pageFlow" scope. |
abstract PageFlowScopeProvider |
getPageFlowScopeProvider()Gets the PageFlowScopeProvider for the current application. |
abstract PageResolver |
getPageResolver()Gets the PageResolver for the current application. |
abstract java.util.Set<javax.faces.component.UIComponent> |
getPartialTargets(javax.faces.component.UIComponent newTarget)Returns the set of partial targets related to a given UIComponent. |
java.util.Map<java.lang.String,java.lang.Object> |
getProcessScope()Deprecated. use getPageFlowScope() |
abstract RegionManager |
getRegionManager()Gets the RegionManager for the current application. |
abstract java.lang.String |
getSkinFamily()Returns the name of the preferred skin family. |
java.lang.String |
getSkinVersion()Returns the name of the skin version that goes with the skin-family. |
abstract java.util.TimeZone |
getTimeZone()Returns the default TimeZone used for interpreting and formatting date values. |
abstract int |
getTwoDigitYearStart()Returns the year offset for parsing years with only two digits. |
abstract java.lang.Long |
getUploadedFileMaxChunkSize() |
abstract java.lang.Long |
getUploadedFileMaxDiskSpace() |
abstract java.lang.Long |
getUploadedFileMaxFileSize() |
abstract java.lang.Long |
getUploadedFileMaxMemory() |
abstract UploadedFileProcessor |
getUploadedFileProcessor() |
abstract java.lang.String |
getUploadedFileTempDir() |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getViewMap()Method to obtain a Map stored on the view. |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getViewMap(boolean create)Method to obtain a Map stored on the view. |
WindowManager |
getWindowManager()Returns the WindowManager for this request. |
abstract boolean |
isAnimationEnabled()Returns the system wide setting to turn animation on/off. |
abstract boolean |
isClientValidationDisabled()Returns true if client-side validation should be disabled. |
abstract boolean |
isDebugOutput()Returns true if output should contain debugging information. |
abstract boolean |
isInternalViewRequest(javax.faces.context.FacesContext context)Determines whether the current View Root is an internal view |
abstract boolean |
isPartialRequest(javax.faces.context.FacesContext context)Method to indicate if this current HTTP request is a partial page rendering request. |
abstract boolean |
isPostback()Returns true if JSF is currently processing a postback request. |
abstract boolean |
isRightToLeft()Returns true if the user should be shown output in right-to-left. |
abstract void |
launchDialog(javax.faces.component.UIViewRoot dialogRoot, java.util.Map<java.lang.String,java.lang.Object> dialogParameters, javax.faces.component.UIComponent source, boolean useWindow, java.util.Map<java.lang.String,java.lang.Object> windowProperties)Launch a dialog, optionally raising it in a new dialog window. |
abstract void |
partialUpdateNotify(javax.faces.component.UIComponent updated)Called when any component gets updated. |
void |
release()Releases the RequestContext object. |
abstract javax.faces.component.UIComponent |
restoreComponent(java.lang.Object state)Restores the state of a component. |
abstract void |
returnFromDialog(java.lang.Object returnValue, java.util.Map<java.lang.Object,java.lang.Object> returnParameters)Returns from a dialog raised by a UIXCommand component, or any component implementing DialogSource, or any direct calls to launchDialog(). |
abstract java.lang.Object |
saveComponent(javax.faces.component.UIComponent component)Saves the state of a UIComponent tree into an Object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String VARIABLE_NAME
| Constructor Detail |
|---|
protected RequestContext()
RequestContextFactory| Method Detail |
|---|
public static RequestContext getCurrentInstance()
public abstract java.util.Map<java.lang.String,java.lang.Object> getPageFlowScope()
@Deprecated
public final java.util.Map<java.lang.String,java.lang.Object> getProcessScope()
public abstract java.util.Map<java.lang.String,java.lang.Object> getViewMap()
This calls getViewMap(boolean) with a true value for create.
This is a pre-cursor implementation to the JSF 2.0 UIViewRoot.getViewMap() function. The implementation is taken from the initial UIViewRoot implementation in JSF but without the event notification support.
public abstract java.util.Map<java.lang.String,java.lang.Object> getViewMap(boolean create)
This is a pre-cursor implementation to the JSF 2.0 UIViewRoot.getViewMap() function. The implementation is taken from the initial UIViewRoot implementation in JSF but without the event notification support.
create - if the map should be created if it already does not exist.
public abstract void returnFromDialog(java.lang.Object returnValue,
java.util.Map<java.lang.Object,java.lang.Object> returnParameters)
UIXCommand component, or any component implementing DialogSource, or any direct calls to launchDialog().returnValue - the value to be delivered in the the ReturnEventReturnEventpublic abstract DialogService getDialogService()
public abstract void launchDialog(javax.faces.component.UIViewRoot dialogRoot,
java.util.Map<java.lang.String,java.lang.Object> dialogParameters,
javax.faces.component.UIComponent source,
boolean useWindow,
java.util.Map<java.lang.String,java.lang.Object> windowProperties)
The dialog will receive a new pageFlowScope map, which includes all the values of the currently available pageFlowScope as well as a set of properties passed to this function in the dialogParameters map. Changes to this newly created scope will not be visible once the dialog returns.
dialogRoot - the UIViewRoot for the page being launcheddialogParameters - a set of parameters to populate the newly created pageFlowScopesource - the UIComponent that launched the dialog and should receive the ReturnEvent when the dialog is complete.useWindow - if true, use a popup window for the dialog if available on the current user agent devicewindowProperties - the set of UI parameters used to modify the window, if one is used. The set of properties that\ are supported will depend on the RenderKit, but common examples include "width", "height", "top" and "left".public abstract boolean isPostback()
isPostback() will return false if this is a request for an initial render of a page (that is, if Apply Request Values never executes), or if during the request the user is navigated to a different page (because of a navigation rule, etc). For example, during a request that results in a navigation to a new page, isPostback() will return true from Apply Request Values to Invoke Application, then false afterwards; whereas if there was no navigation, it would return true
The value of this method is undefined during (or before) the Restore View phase, but can be used in the afterPhase() method of a PhaseListener for Restore View.
public abstract boolean isPartialRequest(javax.faces.context.FacesContext context)
context - the FacesContext object for the request we are processingpublic abstract boolean isDebugOutput()
public abstract boolean isClientValidationDisabled()
public abstract java.lang.String getOutputMode()
public RequestContext.OutputMode getOutputModeEnum()
public abstract java.lang.String getSkinFamily()
public java.lang.String getSkinVersion()
public abstract boolean isInternalViewRequest(javax.faces.context.FacesContext context)
context - Faces contextpublic abstract RequestContext.Accessibility getAccessibilityMode()
public abstract AccessibilityProfile getAccessibilityProfile()
public abstract RequestContext.ClientValidation getClientValidation()
public abstract boolean isAnimationEnabled()
public abstract boolean isRightToLeft()
public abstract java.util.Locale getFormattingLocale()
public abstract char getNumberGroupingSeparator()
public abstract char getDecimalSeparator()
public abstract java.lang.String getCurrencyCode()
public abstract int getTwoDigitYearStart()
1950 This is used by @link{org.apache.myfaces.trinidad.faces.view.converter.DateTimeConverter} while converting strings to Date object.public abstract java.lang.String getOracleHelpServletUrl()
public abstract java.util.Map<java.lang.String,java.lang.Object> getHelpTopic()
public abstract java.util.Map<java.lang.String,java.lang.Object> getHelpSystem()
public abstract java.util.TimeZone getTimeZone()
public abstract ChangeManager getChangeManager()
public java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> getApplicationScopedConcurrentMap()
public abstract PageFlowScopeProvider getPageFlowScopeProvider()
public abstract PageResolver getPageResolver()
public abstract RegionManager getRegionManager()
public abstract void addPartialTarget(javax.faces.component.UIComponent newTarget)
public abstract void addPartialTargets(javax.faces.component.UIComponent from,
java.lang.String... targets)
See addPartialTarget(UIComponent) for more information.
from - the component to use as a relative reference for any relative IDs in the list of targetstargets - array of targets relative to the from component that should be added as targets.ComponentUtils#findRelativeComponent(UIComponent, String)public abstract java.util.Set<javax.faces.component.UIComponent> getPartialTargets(javax.faces.component.UIComponent newTarget)
public abstract void addPartialTriggerListeners(javax.faces.component.UIComponent listener,
java.lang.String[] trigger)
public abstract void partialUpdateNotify(javax.faces.component.UIComponent updated)
public abstract VisitContext createVisitContext(javax.faces.context.FacesContext context,
java.util.Collection<java.lang.String> ids,
java.util.Set<VisitHint> hints,
javax.faces.event.PhaseId phaseId)
Creates a VisitContext instance for use with UIComponent.visitTree().
context - the FacesContext for the current requestids - the client ids of the components to visit. If null, all components will be visited.hints - the VisitHints to apply to the visitphaseId. - PhaseId if any for this visit. If PhaseId is specified, hints must contain VisitHint.EXECUTE_LIFECYCLEpublic abstract UploadedFileProcessor getUploadedFileProcessor()
public abstract java.lang.Long getUploadedFileMaxMemory()
public abstract java.lang.Long getUploadedFileMaxDiskSpace()
public abstract java.lang.Long getUploadedFileMaxFileSize()
public abstract java.lang.Long getUploadedFileMaxChunkSize()
public abstract java.lang.String getUploadedFileTempDir()
public abstract java.util.Map<java.lang.String,java.util.List<java.awt.Color>> getColorPalette()
public abstract java.util.Map<java.lang.Object,java.util.Map<java.lang.Object,java.lang.String>> getFormatter()
public abstract Agent getAgent()
public abstract java.lang.Object saveComponent(javax.faces.component.UIComponent component)
component - the component
public abstract javax.faces.component.UIComponent restoreComponent(java.lang.Object state)
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
state - an Object created by a prior call to saveComponent().java.lang.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionpublic WindowManager getWindowManager()
Returns the WindowManager for this request. A non-null WindowManager will always be returned.
The default implementation uses the first WindowManagerFactory specified implementation class in a file named org.apache.myfaces.trinidad.context.WindowManagerFactory in the META-INF/services directory and uses the WindowManagerFactory to create the WindowManager for this Session. If no WindowManagerFactory is found, a default WindowManager that never returns any Windows is used.
public void release()
java.lang.IllegalStateException - if no RequestContext is attached to the thread, or the attached context is not this objectpublic void attach()
java.lang.IllegalStateException - if an RequestContext is already attached to the thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.