ingo@123: /* ingo@123: * Copyright (c) 2010 by Intevation GmbH ingo@123: * ingo@123: * This program is free software under the LGPL (>=v2.1) ingo@123: * Read the file LGPL.txt coming with the software for details ingo@123: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@123: */ ingo@123: ingo@123: package de.intevation.artifactdatabase; ingo@123: ingo@123: import org.apache.log4j.Logger; ingo@123: ingo@123: import org.w3c.dom.Document; ingo@130: import org.w3c.dom.Node; ingo@123: ingo@123: import de.intevation.artifacts.User; ingo@123: import de.intevation.artifacts.UserFactory; ingo@123: ingo@123: ingo@123: /** ingo@123: * Default implementation of a UserFactory. ingo@123: * ingo@123: * @author Ingo Weinzierl ingo@123: */ ingo@123: public class DefaultUserFactory ingo@123: implements UserFactory ingo@123: { ingo@123: /** The logger that is used in this factory.*/ ingo@123: private static Logger logger = Logger.getLogger(DefaultUserFactory.class); ingo@123: ingo@123: ingo@123: /** ingo@123: * Default constructor. ingo@123: */ ingo@123: public DefaultUserFactory() { ingo@123: } ingo@123: ingo@123: ingo@130: public void setup(Document config, Node factoryNode) { ingo@130: logger.debug("DefaultUserFactory.setup"); ingo@130: } ingo@130: ingo@130: ingo@123: /** ingo@123: * This method creates a new DefaultUser with the given identifier, name and ingo@123: * role. ingo@123: * ingo@123: * @param identifier The identifier for the new user. ingo@123: * @param name The name for the new user. bjoern@409: * @param account The name of the new users account. ingo@123: * @param role The role for the new user. ingo@123: * @param context The CallContext. ingo@123: */ ingo@123: public User createUser( sascha@157: String identifier, ingo@123: String name, bjoern@409: String account, ingo@123: Document role, ingo@123: Object context) ingo@123: { ingo@123: logger.debug("DefaultUserFactory.createUser: " + name); bjoern@409: return new DefaultUser(identifier, name, account, role); ingo@123: } ingo@123: } ingo@123: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :