comparison artifact-database/src/main/java/org/dive4elements/artifactdatabase/transition/Transition.java @ 473:d0ac790a6c89 dive4elements-move

Moved directories to org.dive4elements
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 10:57:18 +0200
parents artifact-database/src/main/java/de/intevation/artifactdatabase/transition/Transition.java@8c2b6cdf22ad
children 415df0fc4fa1
comparison
equal deleted inserted replaced
472:783cc1b6b615 473:d0ac790a6c89
1 package de.intevation.artifactdatabase.transition;
2
3 import org.w3c.dom.Node;
4
5 import de.intevation.artifacts.Artifact;
6
7 import de.intevation.artifactdatabase.state.State;
8
9
10 /**
11 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
12 */
13 public interface Transition {
14
15 /**
16 * Initializes the transition.
17 *
18 * @param config The configuration node for the transition.
19 */
20 public void init(Node config);
21
22 /**
23 * Return the ID of the start State.
24 */
25 public String getFrom();
26
27 /**
28 * Return the ID of the target State.
29 */
30 public String getTo();
31
32 /**
33 * Set the ID of the current State.
34 *
35 * @param from The ID of the current state.
36 */
37 public void setFrom(String from);
38
39 /**
40 * Set the ID of the target State.
41 *
42 * @param to The ID of the target state.
43 */
44 public void setTo(String to);
45
46 /**
47 * Determines if its valid to step from state <i>a</i> of an artifact
48 * <i>artifact</i> to state <i>b</i>.
49 *
50 * @param artifact The owner artifact of state a and b.
51 * @param a The current state.
52 * @param b The target state.
53 *
54 * @return true, if it is valid to step from a to b, otherwise false.
55 */
56 public boolean isValid(Artifact artifact, State a, State b);
57 }
58 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org