ingo@104: package de.intevation.artifactdatabase.transition;
ingo@104:
ingo@104: import de.intevation.artifactdatabase.state.State;
ingo@104:
ingo@104:
ingo@104: /**
ingo@104: * @author Ingo Weinzierl
ingo@104: */
ingo@104: public interface Transition {
ingo@104:
ingo@104: /**
ingo@104: * Return the ID of the start State.
ingo@104: */
ingo@104: public String getFrom();
ingo@104:
ingo@104: /**
ingo@104: * Return the ID of the target State.
ingo@104: */
ingo@104: public String getTo();
ingo@104:
ingo@104: /**
ingo@104: * Set the ID of the current State.
ingo@104: *
ingo@104: * @param from The ID of the current state.
ingo@104: */
ingo@104: public void setFrom(String from);
ingo@104:
ingo@104: /**
ingo@104: * Set the ID of the target State.
ingo@104: *
ingo@104: * @param to The ID of the target state.
ingo@104: */
ingo@104: public void setTo(String to);
ingo@104:
ingo@104: /**
ingo@104: * Determines if the transition from state
is valid.
ingo@104: */
ingo@104: public boolean isValid(State state);
ingo@104: }
ingo@104: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :