Mercurial > dive4elements > framework
comparison 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 |
comparison
equal
deleted
inserted
replaced
274:92166f7c3842 | 275:e92d5944fe4b |
---|---|
95 public static final String ACTION_LIST_ARTIFACTS = "listartifacts"; | 95 public static final String ACTION_LIST_ARTIFACTS = "listartifacts"; |
96 | 96 |
97 /** Action name for setting the ttl of a collection.*/ | 97 /** Action name for setting the ttl of a collection.*/ |
98 public static final String ACTION_SET_TTL = "settimetolive"; | 98 public static final String ACTION_SET_TTL = "settimetolive"; |
99 | 99 |
100 /** Action name for setting the name of a collection.*/ | |
101 public static final String ACTION_SET_NAME = "setname"; | |
102 | |
100 | 103 |
101 /** | 104 /** |
102 * Method to figure out which POST action was triggered and perform this | 105 * Method to figure out which POST action was triggered and perform this |
103 * operation on the collection specified by 'identifier' and found in the | 106 * operation on the collection specified by 'identifier' and found in the |
104 * artifact database 'db'. | 107 * artifact database 'db'. |
174 out = db.getCollectionItemAttribute(identifier, art, meta); | 177 out = db.getCollectionItemAttribute(identifier, art, meta); |
175 } | 178 } |
176 else if (action.equals(ACTION_SET_TTL)) { | 179 else if (action.equals(ACTION_SET_TTL)) { |
177 out = db.setCollectionTTL(identifier, source, meta); | 180 out = db.setCollectionTTL(identifier, source, meta); |
178 } | 181 } |
182 else if (action.equals(ACTION_SET_NAME)) { | |
183 out = db.setCollectionName(identifier, source, meta); | |
184 } | |
179 else { | 185 else { |
180 throw new ArtifactDatabaseException(NO_SUCH_ACTION_MSG); | 186 throw new ArtifactDatabaseException(NO_SUCH_ACTION_MSG); |
181 } | 187 } |
182 } | 188 } |
183 catch (ArtifactDatabaseException adbe) { | 189 catch (ArtifactDatabaseException adbe) { |