ingo@12: package de.intevation.flys.client.shared.model; ingo@12: ingo@12: ingo@12: /** ingo@12: * The default implementation of an {@link ArtifactDescription}. This class just ingo@12: * implements constructors to create new instances and the necessary methods of ingo@12: * the interface. ingo@12: * ingo@12: * @author Ingo Weinzierl ingo@12: */ ingo@12: public class DefaultArtifactDescription implements ArtifactDescription { ingo@12: ingo@12: /** Data that have been inserted in former states.*/ ingo@12: protected Data[] oldData; ingo@12: ingo@12: /** The Data that is allowed to be inserted in the current state.*/ ingo@12: protected Data currentData; ingo@12: ingo@12: /** The current state name.*/ ingo@12: protected String currentState; ingo@12: ingo@12: /** The names of reachable states.*/ ingo@12: protected String[] reachableStates; ingo@12: ingo@12: ingo@12: public DefaultArtifactDescription() { ingo@12: } ingo@12: ingo@12: ingo@12: /** ingo@12: * The default constructor. ingo@12: * ingo@12: * @param old The data that have been inserted in former states. ingo@12: * @param current The data that might be inserted in the current state. ingo@12: * @param state The name of the current state. ingo@12: * @param reachableStates The names of the reachable states. ingo@12: */ ingo@12: public DefaultArtifactDescription( ingo@12: Data[] old, Data current, String state, String[] reachableStates) ingo@12: { ingo@12: this.oldData = old; ingo@12: this.currentData = current; ingo@12: this.currentState = state; ingo@12: this.reachableStates = reachableStates; ingo@12: } ingo@12: ingo@12: ingo@12: public Data[] getOldData() { ingo@12: return oldData; ingo@12: } ingo@12: ingo@12: ingo@12: public Data getCurrentData() { ingo@12: return currentData; ingo@12: } ingo@12: ingo@12: ingo@12: public String getCurrentState() { ingo@12: return currentState; ingo@12: } ingo@12: ingo@12: ingo@12: public String[] getReachableStates() { ingo@12: return reachableStates; ingo@12: } ingo@12: } ingo@12: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :