comparison artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java @ 252:6de74b0b878e

Changed the method names to get and set the attributes of collection items. artifacts/trunk@1745 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 26 Apr 2011 06:56:01 +0000
parents 366cf4694d45
children a2df2b48d2aa
comparison
equal deleted inserted replaced
251:9e12f3fbcf78 252:6de74b0b878e
1266 cc.postCall(); 1266 cc.postCall();
1267 } 1267 }
1268 1268
1269 } 1269 }
1270 1270
1271 public Document getCollectionAttribute(String collectionId, String artifactId, 1271 public Document getCollectionItemAttribute(String collectionId, String artifactId,
1272 CallMeta callMeta) throws ArtifactDatabaseException 1272 CallMeta callMeta) throws ArtifactDatabaseException
1273 { 1273 {
1274 logger.debug("Fetch the attribute for the artifact: " + artifactId); 1274 logger.debug("Fetch the attribute for the artifact: " + artifactId);
1275 1275
1276 return backend.getCollectionAttribute(collectionId, artifactId); 1276 return backend.getCollectionItemAttribute(collectionId, artifactId);
1277 } 1277 }
1278 1278
1279 public Document setCollectionAttribute(String collectionId, String artifactId, 1279 public Document setCollectionItemAttribute(String collectionId, String artifactId,
1280 Document source, CallMeta callMeta) 1280 Document source, CallMeta callMeta)
1281 throws ArtifactDatabaseException 1281 throws ArtifactDatabaseException
1282 { 1282 {
1283 logger.debug("Set the attribute for the artifact: " + artifactId); 1283 logger.debug("Set the attribute for the artifact: " + artifactId);
1284 1284
1302 ArtifactNamespaceContext.NAMESPACE_PREFIX); 1302 ArtifactNamespaceContext.NAMESPACE_PREFIX);
1303 1303
1304 Element root = ec.create("result"); 1304 Element root = ec.create("result");
1305 result.appendChild(root); 1305 result.appendChild(root);
1306 1306
1307 boolean success = backend.setCollectionAttribute( 1307 boolean success = backend.setCollectionItemAttribute(
1308 collectionId, artifactId, attribute); 1308 collectionId, artifactId, attribute);
1309 1309
1310 root.setTextContent(success ? OPERATION_SUCCESSFUL: OPERATION_FAILURE); 1310 root.setTextContent(success ? OPERATION_SUCCESSFUL: OPERATION_FAILURE);
1311 1311
1312 return result; 1312 return result;

http://dive4elements.wald.intevation.org