[PATCH 1 of 2] Upcoming issue1532: Extracted method where 'cloning/initialize' takes place

Wald Commits scm-commit at wald.intevation.org
Tue Feb 11 16:17:05 CET 2014


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1392131891 -3600
# Node ID 56001dce01dd29de0ec2ad113afc15dda26677c3
# Parent  1d6b957d8953da796b8e0eb008043d544175893d
Upcoming issue1532: Extracted method where 'cloning/initialize' takes place.

diff -r 1d6b957d8953 -r 56001dce01dd artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java	Tue Feb 11 12:37:16 2014 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java	Tue Feb 11 16:18:11 2014 +0100
@@ -219,6 +219,16 @@
         }
         setCurrentState(states.get(0));
 
+        handleInitModel(data, context, callMeta);
+
+        filterFacets = buildFilterFacets(data);
+
+        extractOut(data);
+    }
+
+    protected void handleInitModel(Document data, Object context, CallMeta callMeta) {
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+
         String model = XMLUtils.xpathString(
             data,
             XPATH_MODEL_ARTIFACT,
@@ -235,10 +245,6 @@
                 log.error(adbe, adbe);
             }
         }
-
-        filterFacets = buildFilterFacets(data);
-
-        extractOut(data);
     }
 
     protected void extractOut(Document data) {
@@ -1607,7 +1613,7 @@
             String      out     = entry.getKey();
             List<Facet> filters = entry.getValue();
 
-            log.debug("There are " + filters.size() + " filters for: " +out);
+            log.debug("There are " + filters.size() + " filters for: " + out);
 
             for (Facet filter: filters) {
                 log.debug("  filter: " + filter.getName());


More information about the Dive4elements-commits mailing list