changeset 117:4d725248f8d1

Added external API for users and collections. artifacts/trunk@1340 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 01 Mar 2011 14:42:58 +0000
parents 2707b7ec273f
children 0e0c27bc0b90
files ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java
diffstat 3 files changed, 134 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 <sascha.teichmann@intevation.de>
+
+	* 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 <sascha.teichmann@intevation.de>
+
+	* 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 <sascha.teichmann@intevation.de>
 
 	* artifacts/src/main/java/de/intevation/artifacts/ArtifactCollectionFactory.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 :
--- 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 :

http://dive4elements.wald.intevation.org