comparison artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUserFactory.java @ 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 bf596b83d984
comparison
equal deleted inserted replaced
133:2950c6011afa 134:19267b9960c3
55 Document role, 55 Document role,
56 Object context) 56 Object context)
57 { 57 {
58 logger.debug("DefaultUserFactory.createUser: " + name); 58 logger.debug("DefaultUserFactory.createUser: " + name);
59 59
60 String identifier = "FIXME"; 60 return Backend.getInstance().createUser(name, role);
61
62 return new DefaultUser(identifier, name, role);
63 } 61 }
64 62
65 63
66 /** 64 /**
67 * Deletes the given user. 65 * Deletes the given user.
69 * @param user The user to be deleted. 67 * @param user The user to be deleted.
70 * @param context The CallContext. 68 * @param context The CallContext.
71 */ 69 */
72 public void deleteUser(User user, Object context) { 70 public void deleteUser(User user, Object context) {
73 logger.debug("DefaultUserFactory.deleteUser: " + user.identifier()); 71 logger.debug("DefaultUserFactory.deleteUser: " + user.identifier());
72
73 Backend.getInstance().deleteUser(user);
74 } 74 }
75 75
76 76
77 /** 77 /**
78 * Returns the user with the given identifier. 78 * Returns the user with the given identifier.
83 * @return the user with the given identifier. 83 * @return the user with the given identifier.
84 */ 84 */
85 public User getUser(String identifier, Object context) { 85 public User getUser(String identifier, Object context) {
86 logger.debug("DefaultUserFactory.getUser: " + identifier); 86 logger.debug("DefaultUserFactory.getUser: " + identifier);
87 87
88 // TODO Implement me 88 return Backend.getInstance().getUser(identifier);
89 return null;
90 } 89 }
91 90
92 91
93 /** 92 /**
94 * Returns a list of users available for this application. 93 * Returns a list of users available for this application.
98 * @return a list of users. 97 * @return a list of users.
99 */ 98 */
100 public User [] getUsers(Object context) { 99 public User [] getUsers(Object context) {
101 logger.debug("DefaultUserFactory.getUsers"); 100 logger.debug("DefaultUserFactory.getUsers");
102 101
103 // TODO Implement me 102 return Backend.getInstance().getUsers();
104 return null;
105 } 103 }
106 } 104 }
107 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 105 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org