ingo@1115: /* ingo@1115: * Copyright (c) 2010 by Intevation GmbH ingo@1115: * ingo@1115: * This program is free software under the LGPL (>=v2.1) ingo@1115: * Read the file LGPL.txt coming with the software for details ingo@1115: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@1115: */ ingo@1115: tim@337: package de.intevation.gnv.transition; tim@337: sascha@779: import de.intevation.gnv.state.State; sascha@779: tim@337: import java.io.Serializable; tim@337: tim@337: import org.w3c.dom.Node; tim@337: tim@337: /** ingo@813: * This interface describes basic methods necessary for a transition model. sascha@778: * sascha@780: * @author Tim Englich tim@337: * tim@337: */ tim@337: public interface Transition extends Serializable{ sascha@778: tim@337: /** tim@337: * Returns the ID of the State from which the Transition could be used tim@337: * @return the ID of the State from which the Transition could be used tim@337: */ tim@337: public String getFrom(); sascha@778: tim@337: /** tim@337: * Returns the ID of the State where it is possible to go as next. tim@337: * @return the ID of the State where it is possible to go as next. tim@337: */ tim@337: public String getTo(); sascha@778: tim@337: /** tim@337: * Determines if it is possible to go along this Transition or not. tim@337: * @param state the current State ingo@815: * @return true, if this transition is valid for the given state - otherwise ingo@815: * false. tim@337: */ tim@337: public boolean isValid(State state); sascha@778: tim@337: /** tim@337: * Configures the Transition. tim@337: * @param configuration tim@337: */ tim@337: public void setup(Node configuration); tim@337: tim@337: } sascha@836: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :