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

E10651-08

oracle.adf.controller
Interface ViewPortContext


public interface ViewPortContext

Context class for all per request per web application per view port information. A view port displays markup produced by view activities and is capable of accepting user input. A browser window, a modal dialog and a region UI component are all examples of a view port.


Method Summary
 void clearException()
          Clear any exception held by the view port.
 java.lang.String createSavePoint()
          Deprecated. use SavePointManager.createSavePoint(SavePointAttributes, boolean)
 java.lang.String createSavePoint(java.lang.String id, SavePointAttributes attrs)
          Deprecated. use SavePointManager.createSavePoint(SavePointAttributes, boolean) Custom save point ids are no longer supported.
 java.util.Map<java.lang.String,java.lang.String> getDiagInfo()
          Get diagnostic information about the view port.
 java.lang.Exception getExceptionData()
          Returns the most recent Exception that has occurred within the view port.
 TaskFlowContext getTaskFlowContext()
          Returns the TaskFlowContext for the task flow on top of the stack corresponding to this view port.
 java.lang.String getViewId()
          Returns the View Id corresponding to the current view activity.
 boolean isDataDirty()
          Returns true if this view port, or any of its children view ports, has a current task flow with uncommitted ADF model data.
 boolean isEmpty()
          Returns true, if this view port is not executing any task flows.
 boolean isExceptionPresent()
          Returns true, if a RuntimeException has been thrown during task flow processing.
 boolean isViewBookmarkable()
          Returns true, if the current view activity is considered bookmarkable.
 void setSavePointTimeToLive(long timeInSeconds)
          Deprecated. use SavePointManager.setSavePointTimeToLive(long)
 void setViewId(java.lang.String id)
          Set the view activity to be displayed in the view port.
 

Method Detail

createSavePoint

@Deprecated
java.lang.String createSavePoint(java.lang.String id,
                                            SavePointAttributes attrs)
Deprecated. use SavePointManager.createSavePoint(SavePointAttributes, boolean) Custom save point ids are no longer supported.

Creates a save point for this view port and stores it with a SavePointManager. The save point will contain:

Parameters:
id - The save point Id, or null if the Id is to be generated.
attrs - Attributes used to describe a save point.
Returns:
Id of the save point that was created, or null if the save point was not successfully created.

createSavePoint

@Deprecated
java.lang.String createSavePoint()
Deprecated. use SavePointManager.createSavePoint(SavePointAttributes, boolean)

Creates a save point for this view port using the task flow id and description as the default save point attributes, and calls SavePointManager to store the save point. The save point created in this way will not be removed when the top level bounded task flow completes. In other words, removeOnComplete is assumed to be false.

This API can be called from EL, the expression is: #{controllerContext.currentViewPort.createSavePoint}.

Returns:
Id of the save point that was created, or null if the save point was not successfully created.

getViewId

java.lang.String getViewId()
Returns the View Id corresponding to the current view activity. If the current activity is not a view activity, returns null.

Returns:
current View Id or null

setViewId

void setViewId(java.lang.String id)
Set the view activity to be displayed in the view port.

Note: This method may only be called during the INVOKE_APPLICATION phase of the request lifecycle.

Parameters:
id - ID of a view activity within the view port's current task flow.
Throws:
AdfcUnsupportedOperationException - if called at any time other than the INVOKE_APPLICATION phase of the request lifecycle.
AdfcIllegalArgumentException - if the ID is not a valid view activity ID within the view port's current task flow.

isViewBookmarkable

boolean isViewBookmarkable()
Returns true, if the current view activity is considered bookmarkable. A view activity in unbounded task flow is considered bookmarkable, if it contains bookmark metadata. A view activity in the bounded task flow is never considered bookmarkable. Since only bounded task flow view activities can be rendered inside of a region, it follows that no view inside a region is ever bookmarkable.

Returns:
true, if current view is bookmarkable, false otherwise.

getExceptionData

java.lang.Exception getExceptionData()
Returns the most recent Exception that has occurred within the view port. The exception exists on the view port until either another exception occurrs or until removed via the clearException() method.

Returns:
the exception data

clearException

void clearException()
Clear any exception held by the view port.


getTaskFlowContext

TaskFlowContext getTaskFlowContext()
Returns the TaskFlowContext for the task flow on top of the stack corresponding to this view port. If this view port is not currently executing a task flow, throws a RuntimeException.

Returns:
the current TaskFlowContext

isEmpty

boolean isEmpty()
Returns true, if this view port is not executing any task flows.

Returns:
true, if page flow stack is empty, false otherwise.

isExceptionPresent

boolean isExceptionPresent()
Returns true, if a RuntimeException has been thrown during task flow processing.

Returns:
true, if exception has been thrown, false otherwise

setSavePointTimeToLive

@Deprecated
void setSavePointTimeToLive(long timeInSeconds)
Deprecated. use SavePointManager.setSavePointTimeToLive(long)

Set the time-to-live period of the SavePoint created for this view port. This is the time beyond which the save point will be removed by the SavePointManager. The default time-to-live is 24 hours.

Parameters:
timeInSeconds - The time-to-live in seconds. If this value is equal or less than zero, then the default time-to-live will be used.

isDataDirty

boolean isDataDirty()
Returns true if this view port, or any of its children view ports, has a current task flow with uncommitted ADF model data.

Returns:
true, if uncommitted ADF model data exists

getDiagInfo

java.util.Map<java.lang.String,java.lang.String> getDiagInfo()
Get diagnostic information about the view port.

Note: a specific set of diagnistic values is not guarenteed to be in the result every time this method is called. The content of the diagnostic map may vary depending on the state of the view port and the internal implementation of the view port abstraction. Clients should not depend on a specific value being in the result set.

Returns:
a map of name/value pairs of diagnostic information about the view port.

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

E10651-08

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