Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/org/dive4elements/artifactdatabase/DefaultUserFactory.java @ 473:d0ac790a6c89 dive4elements-move
Moved directories to org.dive4elements
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 10:57:18 +0200 |
parents | artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUserFactory.java@4748949c4f19 |
children | 415df0fc4fa1 |
comparison
equal
deleted
inserted
replaced
472:783cc1b6b615 | 473:d0ac790a6c89 |
---|---|
1 /* | |
2 * Copyright (c) 2010 by Intevation GmbH | |
3 * | |
4 * This program is free software under the LGPL (>=v2.1) | |
5 * Read the file LGPL.txt coming with the software for details | |
6 * or visit http://www.gnu.org/licenses/ if it does not exist. | |
7 */ | |
8 | |
9 package de.intevation.artifactdatabase; | |
10 | |
11 import org.apache.log4j.Logger; | |
12 | |
13 import org.w3c.dom.Document; | |
14 import org.w3c.dom.Node; | |
15 | |
16 import de.intevation.artifacts.User; | |
17 import de.intevation.artifacts.UserFactory; | |
18 | |
19 | |
20 /** | |
21 * Default implementation of a UserFactory. | |
22 * | |
23 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
24 */ | |
25 public class DefaultUserFactory | |
26 implements UserFactory | |
27 { | |
28 /** The logger that is used in this factory.*/ | |
29 private static Logger logger = Logger.getLogger(DefaultUserFactory.class); | |
30 | |
31 | |
32 /** | |
33 * Default constructor. | |
34 */ | |
35 public DefaultUserFactory() { | |
36 } | |
37 | |
38 | |
39 public void setup(Document config, Node factoryNode) { | |
40 logger.debug("DefaultUserFactory.setup"); | |
41 } | |
42 | |
43 | |
44 /** | |
45 * This method creates a new DefaultUser with the given identifier, name and | |
46 * role. | |
47 * | |
48 * @param identifier The identifier for the new user. | |
49 * @param name The name for the new user. | |
50 * @param account The name of the new users account. | |
51 * @param role The role for the new user. | |
52 * @param context The CallContext. | |
53 */ | |
54 public User createUser( | |
55 String identifier, | |
56 String name, | |
57 String account, | |
58 Document role, | |
59 Object context) | |
60 { | |
61 logger.debug("DefaultUserFactory.createUser: " + name); | |
62 return new DefaultUser(identifier, name, account, role); | |
63 } | |
64 } | |
65 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |