Mercurial > dive4elements > framework
changeset 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 | 9e12f3fbcf78 |
children | a2df2b48d2aa |
files | ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionResource.java artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java |
diffstat | 5 files changed, 22 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Apr 21 13:43:24 2011 +0000 +++ b/ChangeLog Tue Apr 26 06:56:01 2011 +0000 @@ -1,3 +1,15 @@ +2011-04-26 Ingo Weinzierl <ingo@intevation.de> + + * artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java: + Changed the names of the method names that set and retrieve the + attributes of collection items (e.g. getCollectionAttribute() -> + getCollectionItemAttribute()). + + * artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionResource.java: + Modified method calls based on the changes above. + 2011-04-21 Ingo Weinzierl <ingo@intevation.de> * artifact-database/src/main/java/de/intevation/artifactdatabase/state/Output.java,
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java Thu Apr 21 13:43:24 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java Tue Apr 26 06:56:01 2011 +0000 @@ -1268,15 +1268,15 @@ } - public Document getCollectionAttribute(String collectionId, String artifactId, + public Document getCollectionItemAttribute(String collectionId, String artifactId, CallMeta callMeta) throws ArtifactDatabaseException { logger.debug("Fetch the attribute for the artifact: " + artifactId); - return backend.getCollectionAttribute(collectionId, artifactId); + return backend.getCollectionItemAttribute(collectionId, artifactId); } - public Document setCollectionAttribute(String collectionId, String artifactId, + public Document setCollectionItemAttribute(String collectionId, String artifactId, Document source, CallMeta callMeta) throws ArtifactDatabaseException { @@ -1304,7 +1304,7 @@ Element root = ec.create("result"); result.appendChild(root); - boolean success = backend.setCollectionAttribute( + boolean success = backend.setCollectionItemAttribute( collectionId, artifactId, attribute); root.setTextContent(success ? OPERATION_SUCCESSFUL: OPERATION_FAILURE);
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Thu Apr 21 13:43:24 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Tue Apr 26 06:56:01 2011 +0000 @@ -1202,7 +1202,7 @@ return exec.runWrite(); } - public Document getCollectionAttribute( + public Document getCollectionItemAttribute( final String collectionId, final String artifactId ) { @@ -1237,7 +1237,7 @@ : null; } - public boolean setCollectionAttribute( + public boolean setCollectionItemAttribute( final String collectionId, final String artifactId, Document attribute
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionResource.java Thu Apr 21 13:43:24 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CollectionResource.java Tue Apr 26 06:56:01 2011 +0000 @@ -136,13 +136,13 @@ String art = getArtifactIdentifier(source); logger.info("Set attribute for artifact '" + art + "'"); - out = db.setCollectionAttribute(identifier, art, source, meta); + out = db.setCollectionItemAttribute(identifier, art, source, meta); } else if (action.equals(ACTION_GET_ATTRIBUTE)) { String art = getArtifactIdentifier(source); logger.info("Retrieve attribute of artifact '" + art + "'"); - out = db.getCollectionAttribute(identifier, art, meta); + out = db.getCollectionItemAttribute(identifier, art, meta); } else { throw new ArtifactDatabaseException(NO_SUCH_ACTION_MSG);
--- a/artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java Thu Apr 21 13:43:24 2011 +0000 +++ b/artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java Tue Apr 26 06:56:01 2011 +0000 @@ -206,10 +206,10 @@ Document describeCollection(String collectionId, CallMeta callMeta) throws ArtifactDatabaseException; - Document getCollectionAttribute(String collectionId, String artifactId, + Document getCollectionItemAttribute(String collectionId, String artifactId, CallMeta callMeta) throws ArtifactDatabaseException; - Document setCollectionAttribute(String collectionId, String artifactId, + Document setCollectionItemAttribute(String collectionId, String artifactId, Document attribute, CallMeta callMeta) throws ArtifactDatabaseException;