Mercurial > dive4elements > framework
diff artifact-database/src/main/java/de/intevation/artifactdatabase/transition/Transition.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 | 8c2b6cdf22ad |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/transition/Transition.java Thu Feb 03 18:00:41 2011 +0000 @@ -0,0 +1,40 @@ +package de.intevation.artifactdatabase.transition; + +import de.intevation.artifactdatabase.state.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 :