1 | public class CvsUser {↵ | | 1 | public class ↵
|
2 | /** The user's Id */↵ | | |
|
3 | private String userID;↵ | | |
|
4 | /** The user's full↵ | | 2 | ExtraAttribute {↵
|
5 | name */↵ | | 3 | private String name;↵
|
6 | private String displayName;↵ | | 4 | private String value;↵
|
|
|
7 | /**↵ | | 5 | /**↵
|
8 | * Set the user's fullname↵ | | 6 | * Set the name of the parameter.↵
|
9 | *↵ | | 7 | *↵
|
10 | * @param displayName the user's full name↵ | | 8 | * @param name the name of parameter↵
|
11 | */↵ | | 9 | */↵
|
12 | public void setDisplayname(final String displayName) {↵ | | 10 | public void setName(final String name) {↵
|
13 | this.displayName = displayName;↵ | | 11 | this.name = name;↵
|
14 | }↵ | | 12 | }↵
|
|
|
15 | /**↵ | | 13 | /**↵
|
16 | * Set the user's id↵ | | 14 | * Set the ↵
|
17 | *↵ | | |
|
18 | * @param userID the user's new id↵ | | 15 | value of the parameter.↵
|
| | | 16 | *↵
|
19 | value.↵ | | 17 | * @param value the parameter value↵
|
20 | */↵ | | 18 | */↵
|
21 | public void setUserid(final String userID) {↵ | | 19 | public void setValue(final String value) {↵
|
22 | this.userID = userID;↵ | | 20 | this.value = value;↵
|
23 | }↵ | | 21 | }↵
|
|
|
24 | /**↵ | | 22 | /**↵
|
25 | * Get the user's id.↵ | | 23 | * Retrieve name of parameter.↵
|
26 | *↵ | | 24 | *↵
|
27 | * @return The userID value↵ | | 25 | * @return the name of parameter.↵
|
28 | */↵ | | 26 | */↵
|
29 | public String getUserID() {↵ | | 27 | String getName() {↵
|
30 | return userID;↵ | | 28 | return name;↵
|
31 | }↵ | | 29 | }↵
|
|
|
32 | /**↵ | | 30 | /**↵
|
33 | * Get the user's full name↵ | | 31 | * Retrieve the value of parameter.↵
|
34 | *↵ | | 32 | *↵
|
35 | * @return the user's full name↵ | | 33 | * @return the value of parameter.↵
|
36 | */↵ | | 34 | */↵
|
37 | public String getDisplayname() {↵ | | 35 | String getValue() {↵
|
38 | return displayName;↵ | | 36 | return value;↵
|
39 | }↵ | | 37 | }↵
|
|
|
40 | /**↵ | | 38 | /**↵
|
41 | * Validate that this object is configured↵ | | 39 | * Make sure that neither the name or the value↵
|
42 | .↵ | | 40 | * is null.↵
|
43 | *↵ | | 41 | *↵
|
44 | * @exception BuildException if the instance has not be correctly↵ | | 42 | * @throws BuildException if the ↵
|
45 | * configured.↵ | | 43 | attribute is invalid.↵
|
46 | */↵ | | 44 | */↵
|
47 | public void validate() throws BuildException {↵ | | 45 | public void validate() throws BuildException {↵
|
48 | if (null == userID) {↵ | | 46 | if (null == name) {↵
|
49 | final String message = "Username attribute must be set.";↵ | | 47 | final String message = "Missing name from parameter.";↵
|
|
50 | throw new BuildException(message);↵ | | 48 | throw new BuildException(message);↵
|
51 | }↵ | | 49 | }↵
|
52 | if (null == displayName) {↵ | | 50 | else if (null == value) {↵
|
53 | final String message =↵ | | 51 | final String message =↵
|
54 | "Displayname attribute must be set for userID " + userID;↵ | | 52 | "Mis↵
|
| | | 53 | sing value from parameter " + name + ".";↵
|
55 | throw new BuildException(message);↵ | | 54 | throw new BuildException(message);↵
|
56 | | | 55 |
|