Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/state/State.java @ 104:26bfff409dd3
Added interfaces and engines used in concrete artifact packages.
artifacts/trunk@1289 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 03 Feb 2011 18:00:41 +0000 |
parents | |
children | 33271242e303 |
comparison
equal
deleted
inserted
replaced
103:1282cf96d3eb | 104:26bfff409dd3 |
---|---|
1 /* | |
2 * Copyright (c) 2011 by Intevation GmbH | |
3 * | |
4 * This program is free software under the LGPL (>=v2.1) | |
5 * Read the file LGPL.txt coming with the software for details | |
6 * or visit http://www.gnu.org/licenses/ if it does not exist. | |
7 */ | |
8 package de.intevation.artifactdatabase.state; | |
9 | |
10 import java.io.Serializable; | |
11 import java.util.Map; | |
12 | |
13 import org.w3c.dom.Document; | |
14 import org.w3c.dom.Node; | |
15 | |
16 import de.intevation.artifacts.CallContext; | |
17 | |
18 import de.intevation.artifactdatabase.data.StateData; | |
19 | |
20 | |
21 /** | |
22 * This interface describes the basic methods a concrete state class needs to | |
23 * implement. | |
24 * | |
25 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
26 */ | |
27 public interface State extends Serializable { | |
28 | |
29 /** | |
30 * Return the id of the state. | |
31 * | |
32 * @return the id. | |
33 */ | |
34 public String getID(); | |
35 | |
36 | |
37 /** | |
38 * Return the description of the state. | |
39 * | |
40 * @return the description of the state. | |
41 */ | |
42 public String getDescription(); | |
43 | |
44 | |
45 /** | |
46 * Returns the data provided by this state. | |
47 * | |
48 * @return the data stored in this state. | |
49 */ | |
50 public Map<String, StateData> getData(); | |
51 | |
52 | |
53 /** | |
54 * Initialize the state based on the state node in the configuration. | |
55 * | |
56 * @param config The state configuration node. | |
57 */ | |
58 public void setup(Node config); | |
59 | |
60 | |
61 /** | |
62 * This method is called when an artifacts retrieves a describe request. It | |
63 * creates the user interface description of the current state. | |
64 * | |
65 * @param document Describe doucment. | |
66 * @param rootNode Parent node for all new elements. | |
67 * @param context The CallContext. | |
68 * @param uuid The uuid of an artifact. | |
69 */ | |
70 public void describe( | |
71 Document document, | |
72 Node rootNode, | |
73 CallContext context, | |
74 String uuid | |
75 ); | |
76 } | |
77 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |