diff artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java @ 7178:12248d9eb326 3.0.16

Only filter the facets for unbound outs
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 26 Sep 2013 19:15:17 +0200
parents fbbba09ac6a8
children 744df5a03337
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java	Thu Sep 26 19:14:37 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java	Thu Sep 26 19:15:17 2013 +0200
@@ -1305,8 +1305,9 @@
 
         for (Output out: list) {
             log.debug("check facets for output: " + out.getName());
+            String outName = out.getName();
             Output o = new DefaultOutput(
-                out.getName(),
+                outName,
                 out.getDescription(),
                 out.getMimeType(),
                 out.getType());
@@ -1323,7 +1324,14 @@
             for (Facet f: fs) {
                 String type = f.getName();
 
-                if (outTypes.contains(type)) {
+                /* Match the facets to the output configuration.
+                 * This is only done when we are not already bound to an out.
+                 * If we are bound we come from the datacage so the user has
+                 * explicitly requested our nice and shiny facets. And who
+                 * are we to deny them to him. */
+                if (outTypes.contains(type) ||
+                        (boundToOut != null &&
+                         boundToOut.equals(outName))) {
                     if (debug) {
                         log.debug("Add facet " + f);
                     }

http://dive4elements.wald.intevation.org