changeset 839:6a1cd38e6e18

Made Recommendation a class for direct use. flys-client/trunk@2559 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 24 Aug 2011 13:14:42 +0000
parents a5e96a36478c
children 18fc7afe0251
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java flys-client/src/main/java/de/intevation/flys/client/server/DescribeCollectionServiceImpl.java flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultRecommendation.java flys-client/src/main/java/de/intevation/flys/client/shared/model/Recommendation.java
diffstat 5 files changed, 34 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Aug 24 12:16:41 2011 +0000
+++ b/flys-client/ChangeLog	Wed Aug 24 13:14:42 2011 +0000
@@ -1,3 +1,13 @@
+2011-08-24	Felix Wolfsteller	<felix.wolfsteller@intevation.de> 
+
+	* src/main/java/de/intevation/flys/client/shared/model/DefaultRecommendation.java,
+	  src/main/java/de/intevation/flys/client/shared/model/Recommendation.java:
+	  Deleted DefaultRecommendation. Use Recommendation as a class directly.
+
+	* src/main/java/de/intevation/flys/client/server/DescribeCollectionServiceImpl.java,
+	  src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java:
+	  Use the Recommendation class directly.
+
 2011-08-24	Felix Wolfsteller	<felix.wolfsteller@intevation.de> 
 
 	Minor cosmetics.
--- a/flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java	Wed Aug 24 12:16:41 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java	Wed Aug 24 13:14:42 2011 +0000
@@ -21,7 +21,6 @@
 import de.intevation.flys.client.shared.model.DefaultData;
 import de.intevation.flys.client.shared.model.DefaultDataItem;
 import de.intevation.flys.client.shared.model.DefaultOutputMode;
-import de.intevation.flys.client.shared.model.DefaultRecommendation;
 import de.intevation.flys.client.shared.model.OutputMode;
 import de.intevation.flys.client.shared.model.Recommendation;
 import de.intevation.flys.client.shared.model.WQDataItem;
@@ -493,7 +492,7 @@
             String  index   = e.getAttribute("ids");
 
             if (factory != null && factory.length() > 0) {
-                rec[i] = new DefaultRecommendation(factory, index);
+                rec[i] = new Recommendation(factory, index);
             }
         }
 
--- a/flys-client/src/main/java/de/intevation/flys/client/server/DescribeCollectionServiceImpl.java	Wed Aug 24 12:16:41 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/DescribeCollectionServiceImpl.java	Wed Aug 24 13:14:42 2011 +0000
@@ -31,7 +31,6 @@
 import de.intevation.flys.client.shared.model.DefaultCollection;
 import de.intevation.flys.client.shared.model.DefaultCollectionItem;
 import de.intevation.flys.client.shared.model.DefaultFacet;
-import de.intevation.flys.client.shared.model.DefaultRecommendation;
 import de.intevation.flys.client.shared.model.ChartMode;
 import de.intevation.flys.client.shared.model.ExportMode;
 import de.intevation.flys.client.shared.model.MapMode;
@@ -425,7 +424,7 @@
             String dbids   = rec.getAttributeNS(uri, "ids");
 
             if (factory != null && factory.length() > 0) {
-                recs.add(new DefaultRecommendation(factory, dbids));
+                recs.add(new Recommendation(factory, dbids));
             }
         }
 
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultRecommendation.java	Wed Aug 24 12:16:41 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-package de.intevation.flys.client.shared.model;
-
-
-/**
- * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
- */
-public class DefaultRecommendation implements Recommendation {
-
-    protected String factory;
-    protected String ids;
-
-
-    public DefaultRecommendation() {
-    }
-
-
-    public DefaultRecommendation(String factory, String ids) {
-        this.factory = factory;
-        this.ids     = ids;
-    }
-
-
-    public String getFactory() {
-        return factory;
-    }
-
-
-    public String getIDs() {
-        return ids;
-    }
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/Recommendation.java	Wed Aug 24 12:16:41 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/Recommendation.java	Wed Aug 24 13:14:42 2011 +0000
@@ -2,14 +2,32 @@
 
 import java.io.Serializable;
 
-
 /**
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
-public interface Recommendation extends Serializable {
+public class Recommendation implements Serializable {
 
-    String getFactory();
+    protected String factory;
+    protected String ids;
 
-    String getIDs();
+
+    public Recommendation() {
+    }
+
+
+    public Recommendation(String factory, String ids) {
+        this.factory = factory;
+        this.ids     = ids;
+    }
+
+
+    public String getFactory() {
+        return factory;
+    }
+
+
+    public String getIDs() {
+        return ids;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org