diff artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionResource.java @ 275:e92d5944fe4b

Enabled the artifact database to retrieve requests to change the name of a specific collection. artifacts/trunk@2074 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 08 Jun 2011 07:36:43 +0000
parents 22a90706d32d
children
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionResource.java	Tue Jun 07 17:09:25 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionResource.java	Wed Jun 08 07:36:43 2011 +0000
@@ -97,6 +97,9 @@
     /** Action name for setting the ttl of a collection.*/
     public static final String ACTION_SET_TTL = "settimetolive";
 
+    /** Action name for setting the name of a collection.*/
+    public static final String ACTION_SET_NAME = "setname";
+
 
     /**
      * Method to figure out which POST action was triggered and perform this
@@ -176,6 +179,9 @@
             else if (action.equals(ACTION_SET_TTL)) {
                 out = db.setCollectionTTL(identifier, source, meta);
             }
+            else if (action.equals(ACTION_SET_NAME)) {
+                out = db.setCollectionName(identifier, source, meta);
+            }
             else {
                 throw new ArtifactDatabaseException(NO_SUCH_ACTION_MSG);
             }

http://dive4elements.wald.intevation.org