ingo@104: /*
ingo@104: * Copyright (c) 2011 by Intevation GmbH
ingo@104: *
ingo@104: * This program is free software under the LGPL (>=v2.1)
ingo@104: * Read the file LGPL.txt coming with the software for details
ingo@104: * or visit http://www.gnu.org/licenses/ if it does not exist.
ingo@104: */
ingo@104: package de.intevation.artifactdatabase.state;
ingo@104:
ingo@104: import java.io.Serializable;
ingo@210: import java.util.List;
ingo@104: import java.util.Map;
ingo@104:
ingo@104: import org.w3c.dom.Document;
ingo@205: import org.w3c.dom.Element;
ingo@104: import org.w3c.dom.Node;
ingo@104:
ingo@244: import de.intevation.artifacts.Artifact;
ingo@104: import de.intevation.artifacts.CallContext;
ingo@363: import de.intevation.artifacts.CallMeta;
ingo@104:
ingo@104: import de.intevation.artifactdatabase.data.StateData;
ingo@104:
ingo@104:
ingo@104: /**
ingo@104: * This interface describes the basic methods a concrete state class needs to
ingo@104: * implement.
ingo@104: *
ingo@104: * @author Ingo Weinzierl
ingo@104: */
ingo@104: public interface State extends Serializable {
ingo@104:
ingo@104: /**
ingo@104: * Return the id of the state.
ingo@104: *
ingo@104: * @return the id.
ingo@104: */
ingo@104: public String getID();
ingo@104:
ingo@104:
ingo@104: /**
ingo@104: * Return the description of the state.
ingo@104: *
ingo@104: * @return the description of the state.
ingo@104: */
ingo@104: public String getDescription();
ingo@104:
ingo@104:
ingo@104: /**
ingo@104: * Returns the data provided by this state.
ingo@104: *
ingo@104: * @return the data stored in this state.
ingo@104: */
ingo@104: public Map getData();
ingo@104:
ingo@104:
ingo@104: /**
ingo@256: * Returns a single desired StateData object based on its name.
ingo@256: *
ingo@256: * @param name The name of the desired StateData object.
ingo@256: *
ingo@256: * @return the desired StateData object.
ingo@256: */
ingo@256: public StateData getData(String name);
ingo@256:
ingo@256:
ingo@256: /**
ingo@110: * This method should be used to add a new {@link StateData} object to the
ingo@110: * data pool of the state.
ingo@110: *
ingo@110: * @param name The name of the data object.
ingo@110: * @param data The data object.
ingo@110: */
ingo@110: public void addData(String name, StateData data);
ingo@110:
ingo@110:
ingo@110: /**
ingo@210: * Returns the list of possible outputs of this state. The list is empty
ingo@210: * if no output is available for this state.
ingo@210: *
ingo@210: * @return a list of possible outputs of this state.
ingo@210: */
ingo@210: public List