changeset 134:19267b9960c3

Wired Backend with DefaultUserFactory via the singleton. artifacts/trunk@1359 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 02 Mar 2011 10:21:19 +0000
parents 2950c6011afa
children a48882c9e096
files ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUserFactory.java
diffstat 2 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Mar 02 10:07:37 2011 +0000
+++ b/ChangeLog	Wed Mar 02 10:21:19 2011 +0000
@@ -1,3 +1,8 @@
+2011-03-02	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUserFactory.java:
+	  Wired Backend with DefaultUserFactory via the singleton.
+
 2011-03-02	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* artifact-database/src/main/resources/sql/org-h2-driver.properties,
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUserFactory.java	Wed Mar 02 10:07:37 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUserFactory.java	Wed Mar 02 10:21:19 2011 +0000
@@ -57,9 +57,7 @@
     {
         logger.debug("DefaultUserFactory.createUser: " + name);
 
-        String identifier = "FIXME";
-
-        return new DefaultUser(identifier, name, role);
+        return Backend.getInstance().createUser(name, role);
     }
 
 
@@ -71,6 +69,8 @@
      */
     public void deleteUser(User user, Object context) {
         logger.debug("DefaultUserFactory.deleteUser: " + user.identifier());
+
+        Backend.getInstance().deleteUser(user);
     }
 
 
@@ -85,8 +85,7 @@
     public User getUser(String identifier, Object context) {
         logger.debug("DefaultUserFactory.getUser: " + identifier);
 
-        // TODO Implement me
-        return null;
+        return Backend.getInstance().getUser(identifier);
     }
 
 
@@ -100,8 +99,7 @@
     public User [] getUsers(Object context) {
         logger.debug("DefaultUserFactory.getUsers");
 
-        // TODO Implement me
-        return null;
+        return Backend.getInstance().getUsers();
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org