| 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.ide.history.HistoryManager
public abstract class HistoryManager
The HistoryManager is responsible for keeping a record of local changes for the purpose of later state comparrison and restoration.
| Field Summary | |
|---|---|
static java.lang.String | 
RESTORE_HISTORY_CMD
Restore history command.  | 
static int | 
RESTORE_HISTORY_CMD_ID
Restore history command id.  | 
static java.lang.String | 
RESTORE_HISTORY_RENAME_CMD
Restore history command.  | 
static int | 
RESTORE_HISTORY_RENAME_CMD_ID
Restore history command id.  | 
| Constructor Summary | |
|---|---|
HistoryManager()
 | 
|
| Method Summary | |
|---|---|
abstract  void | 
clear(java.net.URL[] urls)
Clear the history for objects located at the given URLs.  | 
abstract  java.lang.Object[] | 
getDeletions(java.net.URL url)
Get object identifiers of all objects which have been deleted from within the descendant tree of the given root URL.  | 
static HistoryManager | 
getHistoryManager()
Get the HistoryManager instance.  | 
abstract  LocalState | 
getLastState(java.lang.Object objId)
Get the last local state for the object identified by the given ID.  | 
abstract  LocalState[] | 
getLocalHistory(java.lang.Object objId)
Get all local history for the object identified by the given ID.  | 
abstract  LocalState[] | 
getLocalHistory(java.net.URL url)
Get all local history for the object located at the given URL.  | 
abstract  java.lang.Class | 
getRegisteredHistorian(java.lang.Class objCls)
Get a registered Historian implementation associated with a given object type.  | 
abstract  boolean | 
hasLocalHistory(java.net.URL url)
Determine whether any previous history is available for the object located at the given URL.  | 
abstract  void | 
persist(java.net.URL[] urls,
        java.lang.String description)
Persist the state of the objects located at the given URLs.  | 
abstract  void | 
persistInitialState(java.net.URL[] urls)
Persist, as needed, the initial state of the objects located at the given URLs.  | 
abstract  void | 
registerHistorian(java.lang.Class historianCls,
                  java.lang.Class objCls)
Register a Historian implementation for association with a given object type.  | 
abstract  void | 
restore(LocalState[] states,
        Context context)
Restore the given states.  | 
static void | 
setHistoryManager(HistoryManager historyManager)
Set the HistoryManager instance.  | 
| 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 RESTORE_HISTORY_CMD
public static final int RESTORE_HISTORY_CMD_ID
public static final java.lang.String RESTORE_HISTORY_RENAME_CMD
public static final int RESTORE_HISTORY_RENAME_CMD_ID
| Constructor Detail | 
|---|
public HistoryManager()
| Method Detail | 
|---|
public static HistoryManager getHistoryManager()
public static void setHistoryManager(HistoryManager historyManager)
HistoryManager - the HistoryManager to use for future reference.public abstract boolean hasLocalHistory(java.net.URL url)
url - the location of the object for which history is to be queried.
public abstract LocalState[] getLocalHistory(java.net.URL url)
url - the location for which history is desired.
public abstract LocalState[] getLocalHistory(java.lang.Object objId)
objId - object identifier as received from getDeletions.
getDeletions(URL)public abstract LocalState getLastState(java.lang.Object objId)
objId - object identifier as received from getDeletions.
getDeletions(URL)public abstract java.lang.Object[] getDeletions(java.net.URL url)
url - the root under which descendant deletions are desired.
public abstract void persistInitialState(java.net.URL[] urls)
                                  throws java.lang.Exception
urls - location of objects whose contents are to be conditionally
        persisted.
HistoryPersistenceException - upon failure.
java.lang.Exception
public abstract void persist(java.net.URL[] urls,
                             java.lang.String description)
                      throws java.lang.Exception
This method is intended for use by a history generating operation such that state information for the objects located at the given URLs can be made available for later restoration. The classic example would be a Save command.
Typically this call would be preceded by a call to persistInitialState such that an initial state is assured to exist before persisting the current state.
 For example;
   ...
   URL urls[] = ...
   HistoryManager mgr = HistoryManager.getHistoryManager();
   mgr.persistInitialState(urls); // Persist initial state
    
urls - location of objects to be persisted.description - text describing the cause of the persist (e.g. "Save").
HistoryPersistenceException - upon failure.
java.lang.Exception
public abstract void restore(LocalState[] states,
                             Context context)
                      throws java.lang.Exception
states - the states to restore.context - the Context in which to restore the states.
HistoryPersistenceException - upon failure.
java.lang.Exceptionpublic abstract void clear(java.net.URL[] urls)
urls - location of objects whose history will be cleared.
public abstract void registerHistorian(java.lang.Class historianCls,
                                       java.lang.Class objCls)
                                throws java.lang.IllegalArgumentException
historianCls - an implementation of oracle.ide.history.HistorianobjCls - an implementation for which history is supported.
java.lang.IllegalArgumentException - if either argument is not of the expected type.
public abstract java.lang.Class getRegisteredHistorian(java.lang.Class objCls)
                                                throws java.lang.IllegalArgumentException
objCls - an implementation for which history is supported.
java.lang.IllegalArgumentException - if objCls is not of the expected type.
  | 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||