comparison artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionResource.java @ 196:171b6200d26d

Added a describe() action for collections - the implementation in the artifact server is currently just a stub that throws an not implemented exception. artifacts/trunk@1426 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 08 Mar 2011 10:38:14 +0000
parents fbaeb5931d10
children 6de74b0b878e
comparison
equal deleted inserted replaced
195:63f555bbdbc0 196:171b6200d26d
61 public static final String NO_SUCH_ACTION_MSG = "no such action"; 61 public static final String NO_SUCH_ACTION_MSG = "no such action";
62 62
63 /** Action name for deleting a collection.*/ 63 /** Action name for deleting a collection.*/
64 public static final String ACTION_DELETE = "delete"; 64 public static final String ACTION_DELETE = "delete";
65 65
66 /** Action name for describing the collection.*/
67 public static final String ACTION_DESCRIBE = "describe";
68
66 /** Action name for retrieving the attributes of an artifact stored in the 69 /** Action name for retrieving the attributes of an artifact stored in the
67 * collection.*/ 70 * collection.*/
68 public static final String ACTION_GET_ATTRIBUTE = "getattribute"; 71 public static final String ACTION_GET_ATTRIBUTE = "getattribute";
69 72
70 /** Action name for setting the attribute for an artifact stored in the 73 /** Action name for setting the attribute for an artifact stored in the
106 109
107 if (action.equals(ACTION_DELETE)) { 110 if (action.equals(ACTION_DELETE)) {
108 logger.info("Delete collection '" + identifier + "'"); 111 logger.info("Delete collection '" + identifier + "'");
109 out = db.deleteCollection(identifier, getCallMeta()); 112 out = db.deleteCollection(identifier, getCallMeta());
110 } 113 }
114 else if (action.equals(ACTION_DESCRIBE)) {
115 logger.info("Describe collection '" + identifier + "'");
116
117 out = db.describeCollection(identifier, meta);
118 }
111 else if (action.equals(ACTION_ADD_ARTIFACT)) { 119 else if (action.equals(ACTION_ADD_ARTIFACT)) {
112 String art = getArtifactIdentifier(source); 120 String art = getArtifactIdentifier(source);
113 121
114 logger.info("Add artifact '" + art + "' to collection."); 122 logger.info("Add artifact '" + art + "' to collection.");
115 out = db.addCollectionArtifact(identifier, art, source, meta); 123 out = db.addCollectionArtifact(identifier, art, source, meta);

http://dive4elements.wald.intevation.org