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