|
Oracle Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 2 (11.1.2.0.0) E17488-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.adf.view.rich.context.ApplicationContextManager
Deprecated. use ComponentContextManager
instead of this class
@Deprecated
public abstract class ApplicationContextManager
ApplicationContextManager
is used to track changes to the runtime context of an ADF application during the request lifecycle. The series of changes that lead to the current application context are represented as a stack data structure.
Any time a change is made to the application context outside of component traversal during a JSF phase, a change object representing the change should be pushed onto the stack using the ApplicationContextManager
. For example, if a UI component modifies the application's context by changing how EL expressions get evaluated then the component implementation should push a context change onto the stack when the component becomes active and pop the change when the component is no longer active.
There are times when application code running in one contexts need to invoke code that executes in a different context. An example of this is the UIComponent.invokeOnComponent(FacesContext,String,ContextCallback)
method. To support these use cases the suspendContext(FacesContext)
and resumeContext(FacesContext,SuspendedContext)
methods may be used. The suspendContext(FacesContext)
suspends the current set of context changes and restores the original root context. A new context may then be established and application logic executed. Once the the application logic has completed the previous context may be restored using the resumeContext(FacesContext, SuspendedContext)
method.
Nested Class Summary | |
---|---|
static class |
ApplicationContextManager.SuspendedContext Deprecated. Opaque handle representing a set of suspended context changes. |
Constructor Summary | |
---|---|
ApplicationContextManager() Deprecated. |
Method Summary | |
---|---|
protected ApplicationContextManager.SuspendedContext |
createSuspendedContext(javax.faces.context.FacesContext context, java.util.Deque<ApplicationContextChange> stack) Deprecated. Creates a new suspended context |
protected ApplicationContextManager.SuspendedContext |
createSuspendedContext(org.apache.myfaces.trinidad.context.SuspendedContextChanges suspendedChanges) Deprecated. Wrap a SuspendedContextChanges class as a ApplicationContextManager.SuspendedContext instance. |
protected ApplicationContextChange |
getAsApplicationContextChange(org.apache.myfaces.trinidad.context.ComponentContextChange componentContextChange) Deprecated. Method to cast a Trinidad ComponentContextChange as a ApplicationContextChange . |
abstract ApplicationContextChange |
peekContextChange() Deprecated. |
abstract ApplicationContextChange |
popContextChange() Deprecated. Pops the top context change off of the application context change stack. |
abstract void |
pushContextChange(ApplicationContextChange change) Deprecated. Pushes a new context change onto the application context change stack. |
abstract void |
resumeContext(javax.faces.context.FacesContext context, ApplicationContextManager.SuspendedContext suspendedContext) Deprecated. Resume a previously suspended set of context changes. |
protected java.util.Deque<ApplicationContextChange> |
resumeSuspendedContext(javax.faces.context.FacesContext facesContext, ApplicationContextManager.SuspendedContext suspendedContext) Deprecated. Resumes a suspended context |
abstract ApplicationContextManager.SuspendedContext |
suspendContext(javax.faces.context.FacesContext context) Deprecated. Suspends the current application context changes on the stack by calling ApplicationContextChange.suspend(FacesContext) on each stack entry, starting from the top of the stack and working down the stack to the root of the page. |
abstract ApplicationContextManager.SuspendedContext |
suspendContext(javax.faces.context.FacesContext facesContext, SuspendCallback suspendCallback) Deprecated. Suspends the current application context changes on the stack by calling ApplicationContextChange.suspend(FacesContext) on each stack entry, starting from the top of the stack and working down the stack until the callback signals where to stop suspending to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApplicationContextManager()
Method Detail |
---|
public abstract void pushContextChange(ApplicationContextChange change)
change
- the change to be pushed.java.lang.NullPointerException
- if the change object is null
.public abstract ApplicationContextChange popContextChange() throws java.util.NoSuchElementException
java.util.NoSuchElementException
- if the stack is empty.public abstract ApplicationContextChange peekContextChange()
null
if the stack is empty.public abstract ApplicationContextManager.SuspendedContext suspendContext(javax.faces.context.FacesContext context)
ApplicationContextChange.suspend(FacesContext)
on each stack entry, starting from the top of the stack and working down the stack to the root of the page. This operation returns the application back to the root context that existed at the beginning of the current request lifecycle phase. The suspended context changes are remove from the stack so that the stack is empty when this method completes.context
- FacesContext.public abstract ApplicationContextManager.SuspendedContext suspendContext(javax.faces.context.FacesContext facesContext, SuspendCallback suspendCallback)
ApplicationContextChange.suspend(FacesContext)
on each stack entry, starting from the top of the stack and working down the stack until the callback signals where to stop suspending to.facesContext
- FacesContext.suspendCallback
- callback to determine where to suspend topublic abstract void resumeContext(javax.faces.context.FacesContext context, ApplicationContextManager.SuspendedContext suspendedContext) throws java.lang.IllegalStateException
Note: A set of suspended context changes may only be resumed once.
context
- FacesContext.suspendedContext
- the set of suspened contexts to resume.java.lang.IllegalStateException
- if the suspendedContext has already been resumed or if the current stack of context changes is not empty (i.e. the current context is not the page root).protected final ApplicationContextManager.SuspendedContext createSuspendedContext(javax.faces.context.FacesContext context, java.util.Deque<ApplicationContextChange> stack)
context
- the faces contextstack
- the stack of changesprotected final ApplicationContextManager.SuspendedContext createSuspendedContext(org.apache.myfaces.trinidad.context.SuspendedContextChanges suspendedChanges)
SuspendedContextChanges
class as a ApplicationContextManager.SuspendedContext
instance.suspendedChanges
- The changes to wrapprotected final java.util.Deque<ApplicationContextChange> resumeSuspendedContext(javax.faces.context.FacesContext facesContext, ApplicationContextManager.SuspendedContext suspendedContext)
facesContext
- the faces contextsuspendedContext
- the suspended contextprotected ApplicationContextChange getAsApplicationContextChange(org.apache.myfaces.trinidad.context.ComponentContextChange componentContextChange)
ComponentContextChange
as a ApplicationContextChange
. If the passed in argument is a ApplicationContextChange
, it will just return that object, otherwise it will wrap the ComponentContextChange
with a ApplicationContextChange
implementation.componentContextChange
- the change to castApplicationContextChange
class
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 2 (11.1.2.0.0) E17488-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |