1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 package net.sf.hermesftp.usermanager.model;
26
27 import java.util.ArrayList;
28 import java.util.List;
29
30 /***
31 * Represents the configuration for a particular user; Constructor.
32 */
33 public class UserData {
34
35 private String uid;
36
37 private String fullName;
38
39 private String password;
40
41 private List<String> groupNames;
42
43 private String dir;
44
45 private boolean adminRole;
46
47 /***
48 * Getter method for the java bean <code>uid</code>.
49 *
50 * @return Returns the value of the java bean <code>uid</code>.
51 */
52 public String getUid() {
53 return uid;
54 }
55
56 /***
57 * Setter method for the java bean <code>uid</code>.
58 *
59 * @param uid The value of uid to set.
60 */
61 public void setUid(String uid) {
62 this.uid = uid;
63 }
64
65 /***
66 * Getter method for the java bean <code>password</code>.
67 *
68 * @return Returns the value of the java bean <code>password</code>.
69 */
70 public String getPassword() {
71 return password;
72 }
73
74 /***
75 * Setter method for the java bean <code>password</code>.
76 *
77 * @param password The value of password to set.
78 */
79 public void setPassword(String password) {
80 this.password = password;
81 }
82
83 /***
84 * Getter method for the java bean <code>fullName</code>.
85 *
86 * @return Returns the value of the java bean <code>fullName</code>.
87 */
88 public String getFullName() {
89 return fullName;
90 }
91
92 /***
93 * Setter method for the java bean <code>fullName</code>.
94 *
95 * @param fullName The value of fullName to set.
96 */
97 public void setFullName(String fullName) {
98 this.fullName = fullName;
99 }
100
101 /***
102 * Getter method for the java bean <code>groupNames</code>.
103 *
104 * @return Returns the value of the java bean <code>groupNames</code>.
105 */
106 public List<String> getGroupNames() {
107 if (groupNames == null) {
108 groupNames = new ArrayList<String>();
109 }
110 return groupNames;
111 }
112
113 /***
114 * Adds the name of a group the user belongs to.
115 *
116 * @param name The group name.
117 */
118 public void addGroupName(String name) {
119 getGroupNames().add(name);
120 }
121
122 /***
123 * Setter method for the java bean <code>groupNames</code>.
124 *
125 * @param groupNames The value of groupNames to set.
126 */
127 public void setGroupNames(List<String> groupNames) {
128 this.groupNames = groupNames;
129 }
130
131 /***
132 * Getter method for the java bean <code>dir</code>.
133 *
134 * @return Returns the value of the java bean <code>dir</code>.
135 */
136 public String getDir() {
137 return dir;
138 }
139
140 /***
141 * Setter method for the java bean <code>dir</code>.
142 *
143 * @param dir The value of dir to set.
144 */
145 public void setDir(String dir) {
146 this.dir = dir;
147 }
148
149 /***
150 * Getter method for the java bean <code>adminRole</code>.
151 *
152 * @return Returns the value of the java bean <code>adminRole</code>.
153 */
154 public boolean isAdminRole() {
155 return adminRole;
156 }
157
158 /***
159 * Setter method for the java bean <code>adminRole</code>.
160 *
161 * @param adminRole The value of adminRole to set.
162 */
163 public void setAdminRole(boolean adminRole) {
164 this.adminRole = adminRole;
165 }
166
167 }