changeset 64:3d646d3e8e27

Enhanced the ArtifactDescription and its default implementation to provide output modes. flys-client/trunk@1546 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 23 Mar 2011 11:06:31 +0000
parents c8e651530f34
children 8f719fa1a691
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/shared/model/ArtifactDescription.java flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java
diffstat 3 files changed, 50 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 <ingo@intevation.de>
+
+	* 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 <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/shared/model/OutputMode.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 :
--- 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 :

http://dive4elements.wald.intevation.org