01: /*
02: * Created on Nov 15, 2005
03: */
04: package uk.org.ponder.rsf.preservation;
05:
06: import uk.org.ponder.beanutil.BeanLocator;
07: import uk.org.ponder.beanutil.WriteableBeanLocator;
08:
09: /** A core RSF interface specifying a "strategy" for saving and restoring
10: * segments of a request-scope bean model. In general each strategy will be
11: * separately configured in terms of i) which bean paths it acts on, and
12: * ii) which target storage the state will be preserved in (generally
13: * a TokenStateHolder). These strategies are managed by an app-global
14: * {@link StatePreservationManager}
15: * @author Antranig Basman (antranig@caret.cam.ac.uk)
16: *
17: */
18:
19: public interface StatePreservationStrategy {
20: public int preserve(BeanLocator source, String tokenid);
21:
22: public int restore(WriteableBeanLocator target, String tokenid);
23:
24: public void clear(String tokenid);
25: }
|