org.jcreme.state
Interface Memento

All Known Subinterfaces:
TableColumnModelMemento
All Known Implementing Classes:
BaseMemento

public interface Memento

This interface specifies Mementos. Mementos are classes used to store the state of presentation objects. Functional objects states should be persisted differently. Mementos are designed to be stored in Preferences, whatever the actual implementation of these.

Version:
$Revision: 1.2 $
Author:
$Author: dbregeon $

Method Summary
 void load(java.util.prefs.Preferences preferences)
          This method enables to restore a Memento from Preferences.
 void store(java.util.prefs.Preferences preferences)
          This method enables to store the Memento into Preferences.
 void updateMemento(java.lang.Object o)
          Updates the contents of the Memento from values in o.
 void updateObject(java.lang.Object o)
          Updates the Object o with values stored in this Memento.
 

Method Detail

store

public void store(java.util.prefs.Preferences preferences)
           throws MementoException
This method enables to store the Memento into Preferences.

Parameters:
preferences - the Preferences node where the Memento should be stored.
Throws:
MementoException - if an error occured while storing the memento contents in the preferences.

load

public void load(java.util.prefs.Preferences preferences)
          throws MementoException
This method enables to restore a Memento from Preferences.

Parameters:
preferences - the Preferences node from which the Memento should be loaded.
Throws:
MementoException - if an error occured while loading the memento contents from the preferences.

updateMemento

public void updateMemento(java.lang.Object o)
                   throws java.lang.IllegalArgumentException,
                          MementoException
Updates the contents of the Memento from values in o.

Parameters:
o - the Object to remember.
Throws:
java.lang.IllegalArgumentException - if this Memento can not handle o.
MementoException - if an error occured while updating the memento contents.

updateObject

public void updateObject(java.lang.Object o)
                  throws java.lang.IllegalArgumentException,
                         MementoException
Updates the Object o with values stored in this Memento.

Parameters:
o - the Object to update.
Throws:
java.lang.IllegalArgumentException - if this Memento can not handle o.
MementoException - if an error occured while updating the object.


Copyright 2006 null. All Rights Reserved.