changeset 425:ad74e1ba88ba

Allow to add Output objects to a state manually artifacts/trunk@5603 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Wed, 26 Sep 2012 13:26:38 +0000
parents fdfa967699b4
children 7536a3288fc6
files ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Sep 17 12:46:30 2012 +0000
+++ b/ChangeLog	Wed Sep 26 13:26:38 2012 +0000
@@ -1,3 +1,8 @@
+2012-09-26	Björn Ricks	<bjoern.ricks@intevation.de>
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java:
+	  New method addOutput to allow subclasses to add Output object manually.
+
 2012-09-17  Ingo Weinzierl <ingo@intevation.de>
 
 	Tagged RELEASE 2.9.1
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java	Mon Sep 17 12:46:30 2012 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java	Wed Sep 26 13:26:38 2012 +0000
@@ -274,10 +274,18 @@
         int size = outs.getLength();
 
         for (int i = 0; i < size; i++) {
-            outputs.add(buildOutput(outs.item(i)));
+            addOutput(buildOutput(outs.item(i)));
         }
     }
 
+    /**
+     * This methods allows subclasses to manually add outputs
+     *
+     * @param out The output to add
+     */
+    protected void addOutput(Output out) {
+        outputs.add(out);
+    }
 
     /**
      * A helper method that creates an Output object based on the <i>out</i>

http://dive4elements.wald.intevation.org