changeset 3391:2b3c4abe034f

Doc, TODO added. flys-artifacts/trunk@5019 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 16 Jul 2012 10:12:14 +0000
parents 1c9aaef89f51
children 56f62b5209f5
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Recommendations.java
diffstat 3 files changed, 26 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Jul 16 10:05:34 2012 +0000
+++ b/flys-artifacts/ChangeLog	Mon Jul 16 10:12:14 2012 +0000
@@ -1,3 +1,11 @@
+2012-07-16	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/datacage/Recommendations.java:
+	  Bit of doc.
+
+	* src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java:
+	  TODO for automatic official lines added.
+
 2012-07-16	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java	Mon Jul 16 10:05:34 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java	Mon Jul 16 10:12:14 2012 +0000
@@ -28,7 +28,6 @@
 
     public static final String XPATH_RESULT = "/art:result";
 
-
     private static final Logger logger =
         Logger.getLogger(CollectionMonitor.class);
 
@@ -60,6 +59,9 @@
         Map<String, Object> params = getNoneUserSpecificParameters(flys, context);
 
         Recommendations rec = Recommendations.getInstance();
+
+        // TODO For newer official-lines recommendations we actually
+        // need user-id (null here).
         rec.recommend(flys, null, outs, params, recommended);
     }
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Recommendations.java	Mon Jul 16 10:05:34 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Recommendations.java	Mon Jul 16 10:12:14 2012 +0000
@@ -35,6 +35,10 @@
 
 import de.intevation.flys.artifacts.datacage.templating.Builder;
 
+
+/**
+ * Also accessible as Singleton with getInstance().
+ */
 public class Recommendations
 {
     private static Logger log = Logger.getLogger(Recommendations.class);
@@ -140,6 +144,10 @@
         }
     }
 
+
+    /**
+     * Append recommendations to \param result.
+     */
     public void  recommend(
         FLYSArtifact        artifact,
         String              userId,
@@ -168,6 +176,10 @@
         recommend(parameters, userId, result);
     }
 
+
+    /**
+     * Append recommendations to \param result.
+     */
     public void recommend(
         Map<String, Object> parameters,
         String              userId,
@@ -218,6 +230,8 @@
         });
     }
 
+
+    /** Get singleton instance. */
     public static synchronized Recommendations getInstance() {
         if (INSTANCE == null) {
             INSTANCE = createRecommendations();
@@ -225,6 +239,7 @@
         return INSTANCE;
     }
 
+
     protected static Document loadTemplate(File file) throws IOException {
         InputStream in = null;
 

http://dive4elements.wald.intevation.org