# HG changeset patch # User Ingo Weinzierl # Date 1300878391 0 # Node ID 3d646d3e8e27a8536ed6f2a6b3dc1139f7569e1e # Parent c8e651530f34a499a1c8446f28bd1e566f32349d Enhanced the ArtifactDescription and its default implementation to provide output modes. flys-client/trunk@1546 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r c8e651530f34 -r 3d646d3e8e27 flys-client/ChangeLog --- a/flys-client/ChangeLog Wed Mar 23 10:58:07 2011 +0000 +++ b/flys-client/ChangeLog Wed Mar 23 11:06:31 2011 +0000 @@ -1,3 +1,12 @@ +2011-03-23 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/shared/model/ArtifactDescription.java: + Added a method to retrieve the available output modes of the artifact. + + * src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java: + Implemented the method to retrieve the available output modes and + enhanced the default constructor with a parameter for output modes. + 2011-03-23 Ingo Weinzierl * src/main/java/de/intevation/flys/client/shared/model/OutputMode.java, diff -r c8e651530f34 -r 3d646d3e8e27 flys-client/src/main/java/de/intevation/flys/client/shared/model/ArtifactDescription.java --- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/ArtifactDescription.java Wed Mar 23 10:58:07 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/ArtifactDescription.java Wed Mar 23 11:06:31 2011 +0000 @@ -44,5 +44,13 @@ * @return the reachable states. */ public String[] getReachableStates(); + + + /** + * Returns the available output modes. + * + * @return the available output modes. + */ + public OutputMode[] getOutputModes(); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r c8e651530f34 -r 3d646d3e8e27 flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java --- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java Wed Mar 23 10:58:07 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java Wed Mar 23 11:06:31 2011 +0000 @@ -22,6 +22,9 @@ /** The names of reachable states.*/ protected String[] reachableStates; + /** The output modes of this state.*/ + protected OutputMode[] outputModes; + public DefaultArtifactDescription() { } @@ -36,7 +39,10 @@ * @param reachableStates The names of the reachable states. */ public DefaultArtifactDescription( - DataList[] old, DataList current, String state, String[] reachableStates) + DataList[] old, + DataList current, + String state, + String[] reachableStates) { this.oldData = old; this.currentData = current; @@ -45,6 +51,27 @@ } + /** + * The default constructor. + * + * @param old The data that have been inserted in former states. + * @param current The data that might be inserted in the current state. + * @param state The name of the current state. + * @param reachableStates The names of the reachable states. + * @param outputModes The available output modes of this artifact. + */ + public DefaultArtifactDescription( + DataList[] old, + DataList current, + String state, + String[] reachableStates, + OutputMode[] outputModes) + { + this(old, current, state, reachableStates); + this.outputModes = outputModes; + } + + public DataList[] getOldData() { return oldData; } @@ -63,5 +90,10 @@ public String[] getReachableStates() { return reachableStates; } + + + public OutputMode[] getOutputModes() { + return outputModes; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :