changeset 1009:fc5fca0c33b3

Datacage: Set the name of the collections at initial scan, too. flys-artifacts/trunk@2454 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 02 Aug 2011 14:09:01 +0000
parents 6268009e177d
children d419c9904825
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Aug 02 13:40:04 2011 +0000
+++ b/flys-artifacts/ChangeLog	Tue Aug 02 14:09:01 2011 +0000
@@ -1,3 +1,8 @@
+2011-08-02  Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java:
+	  Set the name of the collections at initial scan, too.
+
 2011-08-02  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java	Tue Aug 02 13:40:04 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java	Tue Aug 02 14:09:01 2011 +0000
@@ -106,6 +106,7 @@
         public void artifactLoaded(
             String   userId,
             String   collectionId,
+            String   collectionName,
             String   artifactId,
             Artifact artifact
         ) {
@@ -117,8 +118,7 @@
             FLYSArtifact flysArtifact = (FLYSArtifact)artifact;
 
             Integer uId = getUserId(userId);
-            // TODO: We need the name of the collection
-            Integer cId = getCollectionId(collectionId, uId, "XXX");
+            Integer cId = getCollectionId(collectionId, uId, collectionName);
 
             storeArtifact(artifactId, cId, flysArtifact);
         }
@@ -264,7 +264,7 @@
                     stmnt.setInt   (1, res[0]);
                     stmnt.setString(2, collectionId);
                     stmnt.setInt   (3, ownerId);
-                    stmnt.setString(4, collectionName);
+                    setString(stmnt, 4, collectionName);
                     stmnt.execute();
                     conn.commit();
                     return true;

http://dive4elements.wald.intevation.org