Oracle Fusion Middleware Java API Reference for Oracle ADF Controller
11g Release 2 (11.1.2.0.0)

E17480-01

oracle.adf.controller.savepoint
Interface SavePointManager


public interface SavePointManager

Defines an interface for creating, listing, retrieving and removing the save points. An instance of the SavePointManager can be obtained as follow:

 SavePointManager mgr =
    ControllerContext.getInstance().getSavePointManager();
 
The listSavePointIds() method will return an list of id strings of the existing save points for current user's security context. The attributes of a save point or the save point itself can be obtained by methods getSavePointAttributes() and getSavePoint() using the save point id.


Method Summary
 void cleanup()
          Cleanup resources used by the save point manager.
 void clearSavePoints()
          Removes all save points for the current user.
 java.lang.String createSavePoint()
          Creates a save point with no custom attributes.
 java.lang.String createSavePoint(SavePointAttributes attrs)
          Creates a save point for the current root view port and stores it.
 java.lang.String createSavePoint(SavePointAttributes attrs, boolean removeOnComplete)
          Deprecated. use createSavePoint() or createSavePoint(SavePointAttributes)
 SavePoint getSavePoint(java.lang.String id)
          Gets the save point by id.
 SavePointAttributes getSavePointAttributes(java.lang.String id)
          Gets the attributes of a save point by id.
 java.util.List<java.lang.String> listSavePointIds()
          Returns an iterator of id strings for the save points that can be found in the state manager for the current user.
 SavePoint removeSavePoint(java.lang.String id)
          Removes the save point with a given id.
 void setSavePointTimeToLive(long timeInSeconds)
          Set the time to live period for all the created save points.
 

Method Detail

createSavePoint

java.lang.String createSavePoint()
Creates a save point with no custom attributes. The save point will be automatically removed when a top level bounded task flow on the stack completes execution. In order to ensure successful save point creation, all entries in the page flow scope must be serializable.

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(SavePointAttributes attrs,
                                            boolean removeOnComplete)
Deprecated. use createSavePoint() or createSavePoint(SavePointAttributes)

Creates a save point for the current root view port and stores it. The save point will contain:

Parameters:
attrs - attributes used to describe a save point, or null
removeOnComplete - if true, the save point will be automatically removed when the top level bounded task flow on the stack completes. If there is no bounded task flow on top of the stack, removeOnComplete has no effect. The false value is currently deprecated. So all save points are assumed to be removable on complete, regardless of the value of this argument.
Returns:
id of the save point that was created, or null if the save point was not successfully created.

createSavePoint

java.lang.String createSavePoint(SavePointAttributes attrs)
Creates a save point for the current root view port and stores it. The save point will contain: The save point will be automatically removed when the top level bounded task flow on the stack completes. If there is no bounded task flow on top of the stack, the save point will not be removed.

Parameters:
attrs - attributes used to describe a save point, or null
Returns:
id of the save point that was created, or null if the save point was not successfully created.

setSavePointTimeToLive

void setSavePointTimeToLive(long timeInSeconds)
Set the time to live period for all the created save points. This is the time beyond which the save point will be removed by the SavePointManager, if the implementation allows it. 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.

getSavePoint

SavePoint getSavePoint(java.lang.String id)
Gets the save point by id. Returns null if the save point does not exist.

Parameters:
id - the id of the save point.
Returns:
the save point.

getSavePointAttributes

SavePointAttributes getSavePointAttributes(java.lang.String id)
Gets the attributes of a save point by id. Returns null if the save point attributes do not exist.

Parameters:
id - the id of the save point.
Returns:
the save point attributes.

removeSavePoint

SavePoint removeSavePoint(java.lang.String id)
Removes the save point with a given id. Returns null if the save point does not exist.

Parameters:
id - the id of the save point.
Returns:
the removed save point.

clearSavePoints

void clearSavePoints()
Removes all save points for the current user.


listSavePointIds

java.util.List<java.lang.String> listSavePointIds()
Returns an iterator of id strings for the save points that can be found in the state manager for the current user.

Returns:
an iterator of save point ids.

cleanup

void cleanup()
Cleanup resources used by the save point manager. Database connection closure should be added in this method.


Oracle Fusion Middleware Java API Reference for Oracle ADF Controller
11g Release 2 (11.1.2.0.0)

E17480-01

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