Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultUser.java @ 25:2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
flys-client/trunk@1411 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 07 Mar 2011 13:40:37 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
24:8825ce0a537e | 25:2da6be38d8b6 |
---|---|
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.flys.client.shared.model; | |
9 | |
10 | |
11 /** | |
12 * Trivial implementation of a user. Useful to be subclassed. | |
13 * | |
14 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
15 */ | |
16 public class DefaultUser | |
17 implements User | |
18 { | |
19 /** The identifier of the user.*/ | |
20 protected String identifier; | |
21 | |
22 /** The name of the user.*/ | |
23 protected String name; | |
24 | |
25 | |
26 /** | |
27 * The default constructor. | |
28 */ | |
29 public DefaultUser() { | |
30 } | |
31 | |
32 | |
33 /** | |
34 * A constructor that creates a new user. | |
35 * | |
36 * @param identifier The uuid of the user. | |
37 * @param name The name of the user. | |
38 */ | |
39 public DefaultUser(String identifier, String name) { | |
40 this.identifier = identifier; | |
41 this.name = name; | |
42 } | |
43 | |
44 | |
45 /** | |
46 * Returns the identifier of this user. | |
47 * | |
48 * @return the identifier of this user. | |
49 */ | |
50 public String identifier() { | |
51 return identifier; | |
52 } | |
53 | |
54 | |
55 /** | |
56 * Returns the name of the user. | |
57 * | |
58 * @return the name of the user. | |
59 */ | |
60 public String getName() { | |
61 return name; | |
62 } | |
63 | |
64 | |
65 /** | |
66 * Set the identifier of the user. | |
67 * | |
68 * @param identifier The new identifier. | |
69 */ | |
70 public void setIdentifier(String identifier) { | |
71 this.identifier = identifier; | |
72 } | |
73 | |
74 | |
75 /** | |
76 * Set the name of the user. | |
77 * | |
78 * @param name The name for this user. | |
79 */ | |
80 public void setName(String name) { | |
81 this.name = name; | |
82 } | |
83 } | |
84 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |