[Dive4elements-commits] [PATCH 2 of 6] Add method to return the facets of an artifact

Wald Commits scm-commit at wald.intevation.org
Wed Nov 14 11:25:42 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1352887864 -3600
# Node ID d8992459b408f104fe4ddd9239361025064c3453
# Parent  c095eb67c9758b7e19dc5bbf2863973cc6a5bde4
Add method to return the facets of an artifact

This methos should be used to get the facets of an artifact instead of accessing
the facets member variable directly.

diff -r c095eb67c975 -r d8992459b408 flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Wed Nov 14 11:10:06 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Wed Nov 14 11:11:04 2012 +0100
@@ -1551,5 +1551,14 @@
 
         destroyStates(toDestroy, context);
     }
+
+    /**
+     * Return the Facets which a state provides
+     * @param stateid String that identifies the state
+     * @return List of Facets belonging to the state identifier
+     */
+    protected List<Facet> getFacets(String stateid) {
+        return this.facets.get(stateid);
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :


More information about the Dive4elements-commits mailing list