Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.history
Class Historian

java.lang.Object
  extended by oracle.ide.history.Historian
Direct Known Subclasses:
TextNodeHistorian

public class Historian
extends java.lang.Object

The Historian is a helper class used by the HistoryManager to take on the responsibility of doing the actual persisting of a given object's contents. Implementations are expected to be capable of persisting the contents of an associated object type using a save format identical to that of the associated object's save implementation.


Constructor Summary
Historian()
           
 
Method Summary
 void copy(java.net.URL srcUrl, java.net.URL dstUrl)
          Copy the last persisted contents of the object located at the given source URL into the given destination URL.
 void recordContents(java.net.URL srcUrl, java.net.URL dstUrl)
          Persist the current contents of the object located at the given source URL into the given destination URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Historian

public Historian()
Method Detail

recordContents

public void recordContents(java.net.URL srcUrl,
                           java.net.URL dstUrl)
                    throws java.lang.Exception
Persist the current contents of the object located at the given source URL into the given destination URL. For those objects that hold an in memory representation (e.g. text buffer), it is the in memory state that should be recoreded, as opposed to the last persisted state. Otherwise, should behave identically to copy.

The default implementation provides a simple byte by byte transfer of the contents of the InputStream of a Node into an OutputStream opened upon a given URL.

Parameters:
srcUrl - the source location whose contents are to be recorded.
dstUrl - the destination location at which to record the contents.
Throws:
java.lang.Exception - on failure.

copy

public void copy(java.net.URL srcUrl,
                 java.net.URL dstUrl)
          throws java.lang.Exception
Copy the last persisted contents of the object located at the given source URL into the given destination URL. For those objects that hold an in memory representation (e.g. text buffer), it is the representation on disk that should be copied, as opposed to the in memory state.

Parameters:
srcUrl - the source location whose last state is to be copied.
dstUrl - the destination location at which to copy the contents.
Throws:
java.lang.Exception - on failure.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

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