# HG changeset patch # User Sascha L. Teichmann # Date 1298990578 0 # Node ID 4d725248f8d119b914fa39176d9e7e294512c533 # Parent 2707b7ec273f7e19ee5a07812b18cce5043e68a0 Added external API for users and collections. artifacts/trunk@1340 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 2707b7ec273f -r 4d725248f8d1 ChangeLog --- a/ChangeLog Tue Mar 01 14:07:05 2011 +0000 +++ b/ChangeLog Tue Mar 01 14:42:58 2011 +0000 @@ -1,3 +1,17 @@ +2011-03-01 Sascha L. Teichmann + + * artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java: + Added external API for users and collections. + + * artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java: + Trivial implementation. + +2011-03-01 Sascha L. Teichmann + + * src/main/java/de/intevation/artifacts/UserFactory.java, + src/main/java/de/intevation/artifacts/ArtifactCollection.java: Added + missing call contexts to API. + 2011-03-01 Sascha L. Teichmann * artifacts/src/main/java/de/intevation/artifacts/ArtifactCollectionFactory.java: diff -r 2707b7ec273f -r 4d725248f8d1 artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java Tue Mar 01 14:07:05 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java Tue Mar 01 14:42:58 2011 +0000 @@ -889,5 +889,79 @@ return service.process(input, context, callMeta); } + + // User API + + public Document listUsers(CallMeta callMeta) + throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + + } + + public Document createUser(Document data, CallMeta callMeta) + throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public Document deleteUser(String userId, CallMeta callMeta) + throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public Document listUsers(Document data, CallMeta callMeta) + throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + // Collection API + + public Document listCollections(String userId, CallMeta callMeta) + throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public Document createCollection(String ownerId, Document data, + CallMeta callMeta) + throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public Document deleteCollection(String collectionId, CallMeta callMeta) + throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public Document getCollectionAttribute(String collectionId, String artifactId, + CallMeta callMeta) throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public Document setCollectionAttribute(String collectionId, String artifactId, + Document attribute, CallMeta callMeta) + throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public Document addCollectionArtifact(String collectionId, String artifactId, + CallMeta callMeta) throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public Document removeCollectionArtifact(String collectionId, String artifactId, + CallMeta callMeta) throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public Document listCollectionArtifacts(String collectionId, + CallMeta callMeta) throws ArtifactDatabaseException { + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + + public DeferredOutput outCollection(String collectionId, + Document format, CallMeta callMeta) + throws ArtifactDatabaseException{ + throw new ArtifactDatabaseException("Not implemented, yet!"); + } + } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 2707b7ec273f -r 4d725248f8d1 artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java --- a/artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java Tue Mar 01 14:07:05 2011 +0000 +++ b/artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java Tue Mar 01 14:42:58 2011 +0000 @@ -179,5 +179,51 @@ */ Document process(String service, Document input, CallMeta callMeta) throws ArtifactDatabaseException; + + // User API + + Document listUsers(CallMeta callMeta) + throws ArtifactDatabaseException; + + Document createUser(Document data, CallMeta callMeta) + throws ArtifactDatabaseException; + + Document deleteUser(String userId, CallMeta callMeta) + throws ArtifactDatabaseException; + + Document listUsers(Document data, CallMeta callMeta) + throws ArtifactDatabaseException; + + // Collection API + + Document listCollections(String userId, CallMeta callMeta) + throws ArtifactDatabaseException; + + Document createCollection(String ownerId, Document data, + CallMeta callMeta) + throws ArtifactDatabaseException; + + Document deleteCollection(String collectionId, CallMeta callMeta) + throws ArtifactDatabaseException; + + Document getCollectionAttribute(String collectionId, String artifactId, + CallMeta callMeta) throws ArtifactDatabaseException; + + Document setCollectionAttribute(String collectionId, String artifactId, + Document attribute, CallMeta callMeta) + throws ArtifactDatabaseException; + + Document addCollectionArtifact(String collectionId, String artifactId, + CallMeta callMeta) throws ArtifactDatabaseException; + + Document removeCollectionArtifact(String collectionId, String artifactId, + CallMeta callMeta) throws ArtifactDatabaseException; + + Document listCollectionArtifacts(String collectionId, + CallMeta callMeta) throws ArtifactDatabaseException; + + DeferredOutput outCollection(String collectionId, + Document format, CallMeta callMeta) + throws ArtifactDatabaseException; } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :