Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
05/24/08 14:37:02 (8 months ago)
Author:
bwolfe
Message:

Merging api-refactoring to trunk [3595]:[4355]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/trunk/src/api/org/openmrs/User.java

    r4230 r4358  
    281281        /** 
    282282         * Add the given Role to the list of roles for this User 
     283         *  
    283284         * @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) { 
    286288                if (roles == null) 
    287289                        roles = new HashSet<Role>(); 
    288290                if (!roles.contains(role) && role != null) 
    289291                        roles.add(role); 
     292                 
     293                return this; 
    290294        } 
    291295 
     
    293297         * Remove the given Role from the list of roles for this User 
    294298         * @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) { 
    297302                if (roles != null) 
    298303                        roles.remove(role); 
     304                 
     305                return this; 
    299306        } 
    300307