diff artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionOutResource.java @ 269:d9a99b28a847

Added support for the 'type' parameter of artifacts and collections out() call. artifacts/trunk@2030 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 31 May 2011 14:53:36 +0000
parents 7e20702a90ed
children
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionOutResource.java	Fri May 27 08:47:31 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionOutResource.java	Tue May 31 14:53:36 2011 +0000
@@ -45,11 +45,19 @@
     }
 
 
+    protected String getType() {
+        Request request = getRequest();
+
+        return (String) request.getAttributes().get("type");
+    }
+
+
     /**
      * Call the ArtifactDatabase.outCollection method.
      */
     protected ArtifactDatabase.DeferredOutput doOut(
         String           identifier,
+        String           type,
         Document         input,
         ArtifactDatabase db,
         CallMeta         meta)
@@ -57,7 +65,7 @@
     {
         logger.debug("CollectionOutResource.doOut");
 
-        return db.outCollection(identifier, input, meta);
+        return db.outCollection(identifier, type, input, meta);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org