[Dive4elements-commits] [PATCH] Datacage: Store the official lines of an artifact under the key 'official-lines'. Can be treated with <dc:container-context>
Wald Commits
scm-commit at wald.intevation.org
Fri Jun 21 23:35:11 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1371850501 -7200
# Node ID 25230bc3137cf098091a5cecbab88cc7eef42f44
# Parent 10fe6758dfb053186452d0bb396860df0b19b209
Datacage: Store the official lines of an artifact under the key 'official-lines'. Can be treated with <dc:container-context>.
diff -r 10fe6758dfb0 -r 25230bc3137c artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Recommendations.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Recommendations.java Fri Jun 21 20:02:15 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Recommendations.java Fri Jun 21 23:35:01 2013 +0200
@@ -45,6 +45,7 @@
import org.dive4elements.river.artifacts.datacage.templating.Builder;
import org.dive4elements.river.artifacts.datacage.templating.BuilderPool;
+import org.dive4elements.river.artifacts.model.OfficialLineFinder;
/**
@@ -136,7 +137,7 @@
}
protected static void artifactToParameters(
- D4EArtifact artifact,
+ D4EArtifact artifact,
Map<String, Object> parameters
) {
parameters.put("CURRENT-STATE-ID", artifact.getCurrentStateId());
@@ -150,6 +151,10 @@
String key = sd.getName().replace('.', '-').toUpperCase();
parameters.put(key, value);
}
+
+ // XXX: THIS IS THE HACK TO BRING THE OFFICIAL LINES INTO THE DATACAGE!
+ parameters.put(
+ "OFFICIAL-LINES", OfficialLineFinder.findOfficialLines(artifact));
}
/**
@@ -171,7 +176,7 @@
* @param extraParameters parameters (typicall example: 'recommended')
*/
public void recommend(
- D4EArtifact artifact,
+ D4EArtifact artifact,
String userId,
String [] outs,
Map<String, Object> extraParameters,
More information about the Dive4elements-commits
mailing list