Mercurial > dive4elements > framework
diff artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUserFactory.java @ 157:6e6965873a48
Simplified creation of users.
artifacts/trunk@1382 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 03 Mar 2011 10:33:49 +0000 |
parents | 1a72f08ce8d7 |
children | 4748949c4f19 |
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUserFactory.java Thu Mar 03 09:53:02 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUserFactory.java Thu Mar 03 10:33:49 2011 +0000 @@ -51,55 +51,13 @@ * @param context The CallContext. */ public User createUser( + String identifier, String name, Document role, Object context) { logger.debug("DefaultUserFactory.createUser: " + name); - - return Backend.getInstance().createUser(name, role); - } - - - /** - * Deletes the given user. - * - * @param user The user to be deleted. - * @param context The CallContext. - */ - public boolean deleteUser(String identifier, Object context) { - logger.debug("DefaultUserFactory.deleteUser: " + identifier); - - return Backend.getInstance().deleteUser(identifier); - } - - - /** - * Returns the user with the given identifier. - * - * @param identifier The identifier of a user. - * @param context The CallContext. - * - * @return the user with the given identifier. - */ - public User getUser(String identifier, Object context) { - logger.debug("DefaultUserFactory.getUser: " + identifier); - - return Backend.getInstance().getUser(identifier); - } - - - /** - * Returns a list of users available for this application. - * - * @param context The CallContext. - * - * @return a list of users. - */ - public User [] getUsers(Object context) { - logger.debug("DefaultUserFactory.getUsers"); - - return Backend.getInstance().getUsers(); + return new DefaultUser(identifier, name, role); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :