Oracle Fusion Middleware Java API Reference for Oracle ADF Controller
11g Release 1 (11.1.1.4.0)

E10651-05

oracle.adf.controller
Class ControllerContext

java.lang.Object
  extended by oracle.adf.controller.ControllerContext
All Implemented Interfaces:
java.io.Serializable

public abstract class ControllerContext
extends java.lang.Object
implements java.io.Serializable

Context class for per request per web application Controller information.

See Also:
Serialized Form

Constructor Summary
ControllerContext()
           
 
Method Summary
abstract  void detectMetadataChanges()
          Forces Controller to detect metadata and customization class changes (due to DT@RT operations) on the next Http request, when MDS metadata provider is used.
abstract  ViewPortContext getCurrentRootViewPort()
          Returns a ViewPortContext corresponding to the current root view port.
abstract  ViewPortContext getCurrentViewPort()
          Returns a ViewPortContext corresponding to the current view port.
abstract  java.lang.String getGlobalViewActivityURL(java.lang.String localViewId)
          Generate a URL for a view activity in the unbounded task flow.
static ControllerContext getInstance()
          Retrieves the ControllerContext active for the current thread.
abstract  java.lang.String getLocalViewActivityURL(java.lang.String localViewId)
          Generate a URL for a view activity in the local task flow.
abstract  SavePointManager getSavePointManager()
          Returns SavePointManager.
abstract  java.lang.String getSavePointRestoreURL(java.lang.String savePointId)
          Generates a URL to a save point restore activity within the current web application.
abstract  ControllerSecurityManager getSecurity()
          Returns the current ControllerSecurityManager instance.
abstract  java.lang.String getTaskFlowURL(boolean currentViewPort, TaskFlowId taskFlowId, java.util.Map<java.lang.String,java.lang.Object> params)
          Generate a URL for invoking a specific task flow within the current web application.
abstract  java.lang.String getViewActivityViewID(java.lang.String localViewId)
          Generate view ID for a view activity inside a task flow definition.
abstract  void markScopeDirty(java.util.Map<java.lang.String,java.lang.Object> scopeMap)
          Used to mark the contents of a custom ADF scope as dirty.
protected static void setInstance(ControllerContext controller)
          Specifies a ControllerContext instance to be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerContext

public ControllerContext()
Method Detail

getCurrentViewPort

public abstract ViewPortContext getCurrentViewPort()
Returns a ViewPortContext corresponding to the current view port. If called from the context of a region the view port will represent the region, if called from the context of the root page the view port will represent the browser window/tab.

Returns:
the current ViewPortContext

getCurrentRootViewPort

public abstract ViewPortContext getCurrentRootViewPort()
Returns a ViewPortContext corresponding to the current root view port. The root view port is the view port for the current browser window/tab.

Returns:
the current root ViewPortContext

getSavePointManager

public abstract SavePointManager getSavePointManager()
Returns SavePointManager.

Returns:
the current SavePointManager

getInstance

public static ControllerContext getInstance()
Retrieves the ControllerContext active for the current thread.

Returns:
an instance of ControllerContext

setInstance

protected static void setInstance(ControllerContext controller)
Specifies a ControllerContext instance to be used.

Parameters:
controller - an instance of ControllerContext

getSecurity

public abstract ControllerSecurityManager getSecurity()
Returns the current ControllerSecurityManager instance.

Returns:
The Security information.

getGlobalViewActivityURL

public abstract java.lang.String getGlobalViewActivityURL(java.lang.String localViewId)
                                                   throws AdfcIllegalArgumentException
Generate a URL for a view activity in the unbounded task flow.
Note: the view activity being referenced must be in the unbounded task flow. URL access to view activities within bounded task flows is not supported. It is caller's responsibility to ensure that the view activity exists.

Parameters:
localViewId - view ID of a view activity in the local task flow. For example, if a view activity definition looks like:
<view id="myID">
  <page>/myPage.jspx</page>
</view>
Returns:
a properly encounded URL that will result in navigation to the specified view activity.
Throws:
AdfcIllegalArgumentException - if the specified local view ID is not a valid view ID in the unbounded task flow.

getLocalViewActivityURL

public abstract java.lang.String getLocalViewActivityURL(java.lang.String localViewId)
                                                  throws AdfcIllegalArgumentException
Generate a URL for a view activity in the local task flow. It is caller's responsibility to ensure that the view activity exists.

Parameters:
localViewId - view ID of a view activity in the local task flow. For example, if a view activity definition looks like:
<view id="myID">
  <page>/myPage.jspx</page>
</view>
The local view ID is "myID".
Returns:
a properly encounded URL that will result in navigation to the specified view activity.
Throws:
AdfcIllegalArgumentException - if the specified local view ID is not a valid view ID in the current task flow.

getTaskFlowURL

public abstract java.lang.String getTaskFlowURL(boolean currentViewPort,
                                                TaskFlowId taskFlowId,
                                                java.util.Map<java.lang.String,java.lang.Object> params)
Generate a URL for invoking a specific task flow within the current web application.

Parameters:
currentViewPort - should the URL included state information for display in the current view port?
taskFlowId - ID of the task flow to be invoked.
params - map of task flow parameter values to include in the URL.
Returns:
a properly encoded URL for invoking the task flow.

getViewActivityViewID

public abstract java.lang.String getViewActivityViewID(java.lang.String localViewId)
Generate view ID for a view activity inside a task flow definition. The view ID can be used when creating a UIViewRoot representing this view activity so that it can be launched in a dialog window. It is caller's responsibility to ensure that the view activity exists.

Parameters:
localViewId - view ID of a view activity in the local task flow. For example, if a view activity definition looks like:
<view id="myID">
  <page>/myPage.jspx</page>
</view>
The local view ID is "myID".
Returns:
a view ID for a task flow activity
See Also:
UIViewRoot, org.apache.myfaces.trinidad.context.RequestContext#launchDialog

getSavePointRestoreURL

public abstract java.lang.String getSavePointRestoreURL(java.lang.String savePointId)
Generates a URL to a save point restore activity within the current web application.

Parameters:
savePointId - the id of the save point to be restored
Returns:
a properly encoded URL for restoring a save point.

detectMetadataChanges

public abstract void detectMetadataChanges()
Forces Controller to detect metadata and customization class changes (due to DT@RT operations) on the next Http request, when MDS metadata provider is used. This method should be used in conjunction with 'detect-metadata-changes' setting in adf-config.xml to optimize performance for requests with no customization changes.


markScopeDirty

public abstract void markScopeDirty(java.util.Map<java.lang.String,java.lang.Object> scopeMap)
                             throws java.lang.IllegalArgumentException
Used to mark the contents of a custom ADF scope as dirty.

When running in a clustered server environment an application needs to indicate when it has changed the contents of an object stored in one of the custom ADF scopes so that those changes may be replicated within the cluster. This is only needed for scopes that have a lifespan longer than a request (e.g. pageFlowScope, viewScope) but not scopes with a lifespan of request of less (e.g backingBeanScope).

Parameters:
scopeMap - the scope whose contents have changed.
Throws:
java.lang.IllegalArgumentException - if the scope specified is not one of the ADF custom scopes with a lifespan longer then one request.

Oracle Fusion Middleware Java API Reference for Oracle ADF Controller
11g Release 1 (11.1.1.4.0)

E10651-05

Copyright © 1997, 2011, Oracle. All rights reserved.