diff artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java @ 133:2950c6011afa

Fixed typo in keys. Removed superfluous identifier in UserFactory.createUser(). Added backend stubs for handling of users. artifacts/trunk@1358 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 02 Mar 2011 10:07:37 +0000
parents bfa65a812c7a
children b90e831d3dfe
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java	Wed Mar 02 09:52:21 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java	Wed Mar 02 10:07:37 2011 +0000
@@ -11,6 +11,7 @@
 import de.intevation.artifacts.Artifact;
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.artifacts.ArtifactSerializer;
+import de.intevation.artifacts.User;
 
 import java.sql.Connection;
 import java.sql.PreparedStatement;
@@ -22,6 +23,9 @@
 
 import org.apache.log4j.Logger;
 
+import org.w3c.dom.Document;
+
+
 /**
  * The backend implements the low level layer used to store artifacts
  * in a SQL database.
@@ -80,6 +84,26 @@
     public static final String SQL_REPLACE =
         SQL.get("artifacts.replace");
 
+    // USER SQL
+
+    public static final String SQL_USERS_NEXT_ID =
+        SQL.get("users.id.nextval");
+
+    public static final String SQL_USERS_INSERT =
+        SQL.get("users.insert");
+
+    public static final String SQL_USERS_SELECT_GID =
+        SQL.get("users.select.gid");
+
+    public static final String SQL_USERS_DELETE_ID =
+        SQL.get("users.delete.id");
+
+    public static final String SQL_USERS_DELETE_COLLECTIONS =
+        SQL.get("users.delete.collections");
+
+    public static final String SQL_USER_SELECT_ALL =
+        SQL.get("users.select.all");
+
     /** The singleton.*/
     protected static Backend instance;
 
@@ -764,5 +788,27 @@
             logger.error(e.getLocalizedMessage(), e);
         }
     }
+
+    public User createUser(
+        String   name, 
+        Document role
+    ) {
+        // TODO: implement me!
+        return null;
+    }
+
+    public void deleteUser(User user) {
+        // TODO: implement me!
+    }
+
+    public User getUser(String identifier) {
+        // TODO: implement me!
+        return null;
+    }
+
+    public User [] getUsers() {
+        // TODO: implement me!
+        return null;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org