Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUser.java @ 119:3bb121d5b0b7
Added a default implementation of an ArtifactCollection and a User.
artifacts/trunk@1342 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 01 Mar 2011 15:58:09 +0000 |
parents | |
children | 9187abefba8b |
comparison
equal
deleted
inserted
replaced
118:0e0c27bc0b90 | 119:3bb121d5b0b7 |
---|---|
1 /* | |
2 * Copyright (c) 2011 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 package de.intevation.artifactdatabase; | |
9 | |
10 import org.w3c.dom.Document; | |
11 | |
12 import de.intevation.artifacts.User; | |
13 | |
14 | |
15 /** | |
16 * Trivial implementation of a user. Useful to be subclassed. | |
17 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
18 */ | |
19 public class DefaultUser | |
20 implements User | |
21 { | |
22 /** The identifier of the user.*/ | |
23 protected String identifier; | |
24 | |
25 /** The name of the user.*/ | |
26 protected String name; | |
27 | |
28 /** The role of the user.*/ | |
29 protected Document role; | |
30 | |
31 | |
32 /** | |
33 * The default constructor. | |
34 */ | |
35 public DefaultUser() { | |
36 } | |
37 | |
38 | |
39 /** | |
40 * Returns the identifier of this user. | |
41 * | |
42 * @return the identifier of this user. | |
43 */ | |
44 public String identifier() { | |
45 return identifier; | |
46 } | |
47 | |
48 | |
49 /** | |
50 * Returns the name of the user. | |
51 * | |
52 * @return the name of the user. | |
53 */ | |
54 public String getName() { | |
55 return name; | |
56 } | |
57 | |
58 | |
59 /** | |
60 * Set the name of the user. | |
61 * | |
62 * @param name The name for this user. | |
63 */ | |
64 public void setName(String name) { | |
65 this.name = name; | |
66 } | |
67 | |
68 | |
69 /** | |
70 * Set the identifier of the user. | |
71 * | |
72 * @param identifier The new identifier. | |
73 */ | |
74 public void setIdentifier(String identifier) { | |
75 this.identifier = identifier; | |
76 } | |
77 | |
78 | |
79 /** | |
80 * Set the role of the user. | |
81 * | |
82 * @param role The new role of the user. | |
83 */ | |
84 public void setRole(Document role) { | |
85 this.role = role; | |
86 } | |
87 | |
88 | |
89 /** | |
90 * Returns the role of the user. | |
91 * | |
92 * @return the role of the user. | |
93 */ | |
94 public Document getRole() { | |
95 return role; | |
96 } | |
97 } | |
98 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |