Changeset 4358 for openmrs/trunk/src/api/org/openmrs/User.java
- Timestamp:
- 05/24/08 14:37:02 (8 months ago)
- Files:
-
- openmrs/trunk/src/api/org/openmrs/User.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs/trunk/src/api/org/openmrs/User.java
r4230 r4358 281 281 /** 282 282 * Add the given Role to the list of roles for this User 283 * 283 284 * @param roleservation 284 */ 285 public void addRole(Role role) { 285 * @return this user with the given role attached 286 */ 287 public User addRole(Role role) { 286 288 if (roles == null) 287 289 roles = new HashSet<Role>(); 288 290 if (!roles.contains(role) && role != null) 289 291 roles.add(role); 292 293 return this; 290 294 } 291 295 … … 293 297 * Remove the given Role from the list of roles for this User 294 298 * @param roleservation 295 */ 296 public void removeRole(Role role) { 299 * @return this user with the given role removed 300 */ 301 public User removeRole(Role role) { 297 302 if (roles != null) 298 303 roles.remove(role); 304 305 return this; 299 306 } 300 307