View Javadoc
1   /*
2    * Copyright 2010 The Kuali Foundation.
3    * 
4    * Licensed under the Educational Community License, Version 1.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl1.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.sec.businessobject;
17  
18  import java.util.LinkedHashMap;
19  
20  import org.kuali.ole.sec.SecPropertyConstants;
21  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
22  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
23  
24  
25  /**
26   * Represents a member who can be assigned to a model. Can be of Person, Role, or Group type
27   */
28  public class ModelMember extends PersistableBusinessObjectBase implements MutableInactivatable {
29      private String memberId;
30      private String memberName;
31      private String memberTypeCode;
32      private boolean active;
33  
34      // person fields
35      private String principalId;
36      private String principalName;
37      private String entityId;
38      private String firstName = "";
39      private String middleName = "";
40      private String lastName = "";
41      private String emailAddress = "";
42      private String employeeId = "";
43  
44      // role fields
45      private String roleId;
46      private String roleName;
47      private String namespaceCode; // part of group fields as well
48  
49      // group fields
50      private String groupId;
51      private String groupName;
52  
53      public ModelMember() {
54          super();
55      }
56  
57  
58      /**
59       * Gets the memberId attribute.
60       * 
61       * @return Returns the memberId.
62       */
63      public String getMemberId() {
64          return memberId;
65      }
66  
67  
68      /**
69       * Sets the memberId attribute value.
70       * 
71       * @param memberId The memberId to set.
72       */
73      public void setMemberId(String memberId) {
74          this.memberId = memberId;
75      }
76  
77  
78      /**
79       * Gets the memberName attribute.
80       * 
81       * @return Returns the memberName.
82       */
83      public String getMemberName() {
84          return memberName;
85      }
86  
87  
88      /**
89       * Sets the memberName attribute value.
90       * 
91       * @param memberName The memberName to set.
92       */
93      public void setMemberName(String memberName) {
94          this.memberName = memberName;
95      }
96  
97  
98      /**
99       * Gets the memberTypeCode attribute.
100      * 
101      * @return Returns the memberTypeCode.
102      */
103     public String getMemberTypeCode() {
104         return memberTypeCode;
105     }
106 
107 
108     /**
109      * Sets the memberTypeCode attribute value.
110      * 
111      * @param memberTypeCode The memberTypeCode to set.
112      */
113     public void setMemberTypeCode(String memberTypeCode) {
114         this.memberTypeCode = memberTypeCode;
115     }
116 
117 
118     /**
119      * Gets the active attribute.
120      * 
121      * @return Returns the active.
122      */
123     public boolean isActive() {
124         return active;
125     }
126 
127 
128     /**
129      * Sets the active attribute value.
130      * 
131      * @param active The active to set.
132      */
133     public void setActive(boolean active) {
134         this.active = active;
135     }
136 
137 
138     /**
139      * Gets the principalId attribute.
140      * 
141      * @return Returns the principalId.
142      */
143     public String getPrincipalId() {
144         return principalId;
145     }
146 
147 
148     /**
149      * Sets the principalId attribute value.
150      * 
151      * @param principalId The principalId to set.
152      */
153     public void setPrincipalId(String principalId) {
154         this.principalId = principalId;
155     }
156 
157 
158     /**
159      * Gets the principalName attribute.
160      * 
161      * @return Returns the principalName.
162      */
163     public String getPrincipalName() {
164         return principalName;
165     }
166 
167 
168     /**
169      * Sets the principalName attribute value.
170      * 
171      * @param principalName The principalName to set.
172      */
173     public void setPrincipalName(String principalName) {
174         this.principalName = principalName;
175     }
176 
177 
178     /**
179      * Gets the entityId attribute.
180      * 
181      * @return Returns the entityId.
182      */
183     public String getEntityId() {
184         return entityId;
185     }
186 
187 
188     /**
189      * Sets the entityId attribute value.
190      * 
191      * @param entityId The entityId to set.
192      */
193     public void setEntityId(String entityId) {
194         this.entityId = entityId;
195     }
196 
197 
198     /**
199      * Gets the firstName attribute.
200      * 
201      * @return Returns the firstName.
202      */
203     public String getFirstName() {
204         return firstName;
205     }
206 
207 
208     /**
209      * Sets the firstName attribute value.
210      * 
211      * @param firstName The firstName to set.
212      */
213     public void setFirstName(String firstName) {
214         this.firstName = firstName;
215     }
216 
217 
218     /**
219      * Gets the middleName attribute.
220      * 
221      * @return Returns the middleName.
222      */
223     public String getMiddleName() {
224         return middleName;
225     }
226 
227 
228     /**
229      * Sets the middleName attribute value.
230      * 
231      * @param middleName The middleName to set.
232      */
233     public void setMiddleName(String middleName) {
234         this.middleName = middleName;
235     }
236 
237 
238     /**
239      * Gets the lastName attribute.
240      * 
241      * @return Returns the lastName.
242      */
243     public String getLastName() {
244         return lastName;
245     }
246 
247 
248     /**
249      * Sets the lastName attribute value.
250      * 
251      * @param lastName The lastName to set.
252      */
253     public void setLastName(String lastName) {
254         this.lastName = lastName;
255     }
256 
257 
258     /**
259      * Gets the emailAddress attribute.
260      * 
261      * @return Returns the emailAddress.
262      */
263     public String getEmailAddress() {
264         return emailAddress;
265     }
266 
267 
268     /**
269      * Sets the emailAddress attribute value.
270      * 
271      * @param emailAddress The emailAddress to set.
272      */
273     public void setEmailAddress(String emailAddress) {
274         this.emailAddress = emailAddress;
275     }
276 
277 
278     /**
279      * Gets the employeeId attribute.
280      * 
281      * @return Returns the employeeId.
282      */
283     public String getEmployeeId() {
284         return employeeId;
285     }
286 
287 
288     /**
289      * Sets the employeeId attribute value.
290      * 
291      * @param employeeId The employeeId to set.
292      */
293     public void setEmployeeId(String employeeId) {
294         this.employeeId = employeeId;
295     }
296 
297 
298     /**
299      * Gets the roleId attribute.
300      * 
301      * @return Returns the roleId.
302      */
303     public String getRoleId() {
304         return roleId;
305     }
306 
307 
308     /**
309      * Sets the roleId attribute value.
310      * 
311      * @param roleId The roleId to set.
312      */
313     public void setRoleId(String roleId) {
314         this.roleId = roleId;
315     }
316 
317 
318     /**
319      * Gets the roleName attribute.
320      * 
321      * @return Returns the roleName.
322      */
323     public String getRoleName() {
324         return roleName;
325     }
326 
327 
328     /**
329      * Sets the roleName attribute value.
330      * 
331      * @param roleName The roleName to set.
332      */
333     public void setRoleName(String roleName) {
334         this.roleName = roleName;
335     }
336 
337 
338     /**
339      * Gets the namespaceCode attribute.
340      * 
341      * @return Returns the namespaceCode.
342      */
343     public String getNamespaceCode() {
344         return namespaceCode;
345     }
346 
347 
348     /**
349      * Sets the namespaceCode attribute value.
350      * 
351      * @param namespaceCode The namespaceCode to set.
352      */
353     public void setNamespaceCode(String namespaceCode) {
354         this.namespaceCode = namespaceCode;
355     }
356 
357 
358     /**
359      * Gets the groupId attribute.
360      * 
361      * @return Returns the groupId.
362      */
363     public String getGroupId() {
364         return groupId;
365     }
366 
367 
368     /**
369      * Sets the groupId attribute value.
370      * 
371      * @param groupId The groupId to set.
372      */
373     public void setGroupId(String groupId) {
374         this.groupId = groupId;
375     }
376 
377 
378     /**
379      * Gets the groupName attribute.
380      * 
381      * @return Returns the groupName.
382      */
383     public String getGroupName() {
384         return groupName;
385     }
386 
387 
388     /**
389      * Sets the groupName attribute value.
390      * 
391      * @param groupName The groupName to set.
392      */
393     public void setGroupName(String groupName) {
394         this.groupName = groupName;
395     }
396 
397 
398     /**
399      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
400      */
401     
402     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
403         LinkedHashMap m = new LinkedHashMap();
404 
405         m.put(SecPropertyConstants.MEMBER_TYPE_CODE, this.memberTypeCode);
406         m.put(SecPropertyConstants.MEMBER_ID, this.memberId);
407 
408         return m;
409     }
410 
411 }