changeset 3934:33fcc786f246

Add FLYSArtifact addFacets method flys-artifacts/trunk@5634 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Fri, 28 Sep 2012 08:39:36 +0000
parents 608e127fc0f5
children 6cdd994ee8a4
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java
diffstat 2 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Sep 28 08:38:17 2012 +0000
+++ b/flys-artifacts/ChangeLog	Fri Sep 28 08:39:36 2012 +0000
@@ -1,3 +1,9 @@
+2012-09-29	Björn Ricks	<bjoern.ricks@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java:
+	  Add protected method addFacets to allow child classes to add facets
+	  without accessing the member variable.
+
 2012-09-28  Ingo Weinzierl <ingo@intevation.de>
 
 	* doc/conf/meta-data.xml: Added 'info' column to the dem section of the
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Fri Sep 28 08:38:17 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Fri Sep 28 08:39:36 2012 +0000
@@ -1396,12 +1396,24 @@
                     facets.remove(stateID);
                 }
                 else {
-                    facets.put(stateID, fs);
+                    addFacets(stateID, fs);
                 }
             }
         }
     }
 
+    /**
+     * Sets the facets for an ID
+     *
+     * Normally the id is a state ID.
+     *
+     * @param id ID to map the facets to
+     * @param facets List of facets to be stored
+     */
+    protected void addFacets(String id, List<Facet> facets) {
+        this.facets.put(id, facets);
+    }
+
 
     /**
      * Method to dump the artifacts state/data.

http://dive4elements.wald.intevation.org