org.strutsme.wishlist.persistence.facade
Class WishlistPersistenceFacadeFile
java.lang.Object
org.strutsme.wishlist.persistence.facade.AbstractWishlistPersistenceFacade
org.strutsme.wishlist.persistence.facade.WishlistPersistenceFacadeFile
- All Implemented Interfaces:
- WishlistPersistenceFacade
public class WishlistPersistenceFacadeFile
- extends AbstractWishlistPersistenceFacade
Implentation of the facade which uses serialiation to persist the state.
- Author:
- rfalke
|
Field Summary |
static java.lang.String |
STORAGE_FILE
The filename of the storage file. |
|
Method Summary |
protected void |
load()
Should load the data and update the instance variables. |
protected void |
stateChanged()
Called if the state changed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STORAGE_FILE
public static java.lang.String STORAGE_FILE
- The filename of the storage file.
WishlistPersistenceFacadeFile
public WishlistPersistenceFacadeFile()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Empty constructor. The exceptions require this.
- Throws:
java.lang.ClassNotFoundException - if the wishes couldn't be loaded
java.io.IOException - if the wishes couldn't be loaded
load
protected final void load()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Should load the data and update the instance variables.
- Specified by:
load in class AbstractWishlistPersistenceFacade
- Throws:
java.io.IOException - if the wishes couldn't be loaded
java.lang.ClassNotFoundException - if the wishes couldn't be loaded
stateChanged
protected final void stateChanged()
throws java.io.IOException
- Called if the state changed. Can be used to save it.
- Specified by:
stateChanged in class AbstractWishlistPersistenceFacade
- Throws:
java.io.IOException - if for example the saving failed.