diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/transitions/Transition.java @ 106:5864c41219db

Initializes a TransitionEngine storing all transitions for each artifact at the application start. flys-artifacts/trunk@1288 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 03 Feb 2011 10:23:30 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/transitions/Transition.java	Thu Feb 03 10:23:30 2011 +0000
@@ -0,0 +1,40 @@
+package de.intevation.flys.artifacts.transitions;
+
+import de.intevation.flys.artifacts.states.State;
+
+
+/**
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public interface Transition {
+
+    /**
+     * Return the ID of the start State.
+     */
+    public String getFrom();
+
+    /**
+     * Return the ID of the target State.
+     */
+    public String getTo();
+
+    /**
+     * Set the ID of the current State.
+     *
+     * @param from The ID of the current state.
+     */
+    public void setFrom(String from);
+
+    /**
+     * Set the ID of the target State.
+     *
+     * @param to The ID of the target state.
+     */
+    public void setTo(String to);
+
+    /**
+     * Determines if the transition from <code>state</code> is valid.
+     */
+    public boolean isValid(State state);
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org