1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.jameleon;
20
21 import java.io.IOException;
22
23 /***
24 * Used to represent an object that needs to store it's state. This is intended to store the state that an function point was in
25 * at a certain moment.
26 */
27 public interface Storable{
28
29 /***
30 * Stores the current state of the object to a given <code>File</code>.
31 * @param filename - the name of file to store the state to
32 * @param event - The even that occured (error, state change ...)
33 * @throws IOException - If the state of the object could not be stored in File <code>f</code>.
34 */
35 public void store(String filename, int event) throws IOException;
36
37
38 /***
39 * Gets the filename to store the state of the application to.
40 * The default implementation is to simply use timestamps.
41 * If this is not the desired behavior, override this method.
42 * @param event - the StateStorer Event
43 * @return the appropriate filename which starts with ERROR- if the StateStorer Event was an Error
44 */
45 public String getStoreToFileName(int event);
46
47 }