Coverage Report - org.kuali.rice.kim.document.IdentityManagementRoleDocument
 
Classes in this File Line Coverage Branch Coverage Complexity
IdentityManagementRoleDocument
0%
0/203
0%
0/100
2.182
 
 1  
 /*
 2  
  * Copyright 2007-2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.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/ecl2.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.rice.kim.document;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.List;
 20  
 
 21  
 import org.apache.commons.lang.StringUtils;
 22  
 import org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO;
 23  
 import org.kuali.rice.kim.bo.types.dto.KimTypeInfo;
 24  
 import org.kuali.rice.kim.bo.ui.KimDocumentRoleMember;
 25  
 import org.kuali.rice.kim.bo.ui.KimDocumentRolePermission;
 26  
 import org.kuali.rice.kim.bo.ui.KimDocumentRoleQualifier;
 27  
 import org.kuali.rice.kim.bo.ui.KimDocumentRoleResponsibility;
 28  
 import org.kuali.rice.kim.bo.ui.KimDocumentRoleResponsibilityAction;
 29  
 import org.kuali.rice.kim.bo.ui.RoleDocumentDelegation;
 30  
 import org.kuali.rice.kim.bo.ui.RoleDocumentDelegationMember;
 31  
 import org.kuali.rice.kim.bo.ui.RoleDocumentDelegationMemberQualifier;
 32  
 import org.kuali.rice.kim.service.KIMServiceLocator;
 33  
 import org.kuali.rice.kim.service.ResponsibilityService;
 34  
 import org.kuali.rice.kim.util.KimConstants;
 35  
 import org.kuali.rice.kim.web.struts.form.IdentityManagementRoleDocumentForm;
 36  
 import org.kuali.rice.kns.datadictionary.AttributeDefinition;
 37  
 import org.kuali.rice.kns.datadictionary.KimDataDictionaryAttributeDefinition;
 38  
 import org.kuali.rice.kns.datadictionary.KimNonDataDictionaryAttributeDefinition;
 39  
 import org.kuali.rice.kns.service.SequenceAccessorService;
 40  
 import org.kuali.rice.kns.util.TypedArrayList;
 41  
 
 42  
 
 43  
 /**
 44  
  * This is a description of what this class does - bhargavp don't forget to fill this in. 
 45  
  * 
 46  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 47  
  *
 48  
  */
 49  
 public class IdentityManagementRoleDocument extends IdentityManagementTypeAttributeTransactionalDocument {
 50  
 
 51  
         private static final long serialVersionUID = 1L;
 52  
         // principal data
 53  
         protected String roleId;
 54  
         protected String roleTypeId;
 55  
         protected String roleTypeName;
 56  0
         protected String roleNamespace = "";
 57  0
         protected String roleName = "";
 58  0
         protected String roleDescription = "";
 59  
 
 60  0
         protected boolean active = true;
 61  
 
 62  
         protected boolean editing;
 63  
         
 64  0
         protected List<KimDocumentRolePermission> permissions = new TypedArrayList(KimDocumentRolePermission.class);
 65  0
         protected List<KimDocumentRoleResponsibility> responsibilities = new TypedArrayList(KimDocumentRoleResponsibility.class);
 66  0
         protected List<KimDocumentRoleMember> members = new TypedArrayList(KimDocumentRoleMember.class);
 67  0
         private List<RoleDocumentDelegationMember> delegationMembers = new TypedArrayList(RoleDocumentDelegationMember.class);
 68  0
         private List<RoleDocumentDelegation> delegations = new TypedArrayList(RoleDocumentDelegation.class);
 69  
         
 70  
         transient private ResponsibilityService responsibilityService;
 71  
         
 72  0
         public IdentityManagementRoleDocument() {
 73  0
         }
 74  
 
 75  
         /**
 76  
          * @return the active
 77  
          */
 78  
         public boolean isActive() {
 79  0
                 return this.active;
 80  
         }
 81  
 
 82  
         /**
 83  
          * @param active the active to set
 84  
          */
 85  
         public void setActive(boolean active) {
 86  0
                 this.active = active;
 87  0
         }
 88  
 
 89  
         /**
 90  
          * @param roleId the roleId to set
 91  
          */
 92  
         public void setRoleId(String roleId) {
 93  0
                 this.roleId = roleId;
 94  0
         }
 95  
 
 96  
         /**
 97  
          * @return the roleName
 98  
          */
 99  
         public String getRoleName() {
 100  0
                 return this.roleName;
 101  
         }
 102  
 
 103  
         /**
 104  
          * @param roleName the roleName to set
 105  
          */
 106  
         public void setRoleName(String roleName) {
 107  0
                 this.roleName = roleName;
 108  0
         }
 109  
 
 110  
         /**
 111  
          * @return the roleDescription
 112  
          */
 113  
         public String getRoleDescription() {
 114  0
                 return this.roleDescription;
 115  
         }
 116  
 
 117  
         /**
 118  
          * @param roleDescription the roleDescription to set
 119  
          */
 120  
         public void setRoleDescription(String roleDescription) {
 121  0
                 this.roleDescription = roleDescription;
 122  0
         }
 123  
 
 124  
         /**
 125  
          * @return the roleNamespace
 126  
          */
 127  
         public String getRoleNamespace() {
 128  0
                 return this.roleNamespace;
 129  
         }
 130  
 
 131  
         /**
 132  
          * @param roleNamespace the roleNamespace to set
 133  
          */
 134  
         public void setRoleNamespace(String roleNamespace) {
 135  0
                 this.roleNamespace = roleNamespace;
 136  0
         }
 137  
 
 138  
         /**
 139  
          * @return the roleTypeId
 140  
          */
 141  
         public String getRoleTypeId() {
 142  0
                 return this.roleTypeId;
 143  
         }
 144  
 
 145  
         /**
 146  
          * @param roleTypeId the roleTypeId to set
 147  
          */
 148  
         public void setRoleTypeId(String roleTypeId) {
 149  0
                 this.roleTypeId = roleTypeId;
 150  0
         }
 151  
 
 152  
         /**
 153  
          * @return the roleTypeName
 154  
          */
 155  
         public String getRoleTypeName() {
 156  0
                 if ( roleTypeName == null ) {
 157  0
                         if ( kimType != null ) {
 158  0
                                 roleTypeName = kimType.getName();
 159  0
                         } else if ( roleTypeId != null ) {
 160  0
                                 setKimType( KIMServiceLocator.getTypeInfoService().getKimType(roleTypeId) );
 161  0
                         if ( kimType != null ) {
 162  0
                                 roleTypeName = kimType.getName();
 163  
                         }
 164  
                         }
 165  
                 }
 166  0
                 return this.roleTypeName;
 167  
         }
 168  
 
 169  
         /**
 170  
          * @param roleTypeName the roleTypeName to set
 171  
          */
 172  
         public void setRoleTypeName(String roleTypeName) {
 173  0
                 this.roleTypeName = roleTypeName;
 174  0
         }
 175  
 
 176  
         /**
 177  
          * @return the delegationMembers
 178  
          */
 179  
         public List<RoleDocumentDelegationMember> getDelegationMembers() {
 180  0
                 return this.delegationMembers;
 181  
         }
 182  
 
 183  
         /**
 184  
          * @param delegationMembers the delegationMembers to set
 185  
          */
 186  
         public void setDelegationMembers(
 187  
                         List<RoleDocumentDelegationMember> delegationMembers) {
 188  0
                 this.delegationMembers = delegationMembers;
 189  0
         }
 190  
 
 191  
         /**
 192  
          * @return the permissions
 193  
          */
 194  
         public List<KimDocumentRolePermission> getPermissions() {
 195  0
                 return this.permissions;
 196  
         }
 197  
 
 198  
         /**
 199  
          * @param permissions the permissions to set
 200  
          */
 201  
         public void setPermissions(List<KimDocumentRolePermission> permissions) {
 202  0
                 this.permissions = permissions;
 203  0
         }
 204  
 
 205  
         /**
 206  
          * @return the responsibilities
 207  
          */
 208  
         public List<KimDocumentRoleResponsibility> getResponsibilities() {
 209  0
                 return this.responsibilities;
 210  
         }
 211  
 
 212  
         /**
 213  
          * @param responsibilities the responsibilities to set
 214  
          */
 215  
         public void setResponsibilities(
 216  
                         List<KimDocumentRoleResponsibility> responsibilities) {
 217  0
                 this.responsibilities = responsibilities;
 218  0
         }
 219  
 
 220  
         /**
 221  
          * @return the members
 222  
          */
 223  
         public List<KimDocumentRoleMember> getMembers() {
 224  0
                 return this.members;
 225  
         }
 226  
         /**
 227  
          * @return the members
 228  
          */
 229  
         public KimDocumentRoleMember getMember(String roleMemberId) {
 230  0
                 if(StringUtils.isEmpty(roleMemberId)) return null;
 231  0
                 for(KimDocumentRoleMember roleMember: getMembers()){
 232  0
                         if(roleMemberId.equals(roleMember.getRoleMemberId()))
 233  0
                                 return roleMember;
 234  
                 }
 235  0
                 return null;
 236  
         }
 237  
 
 238  
         /**
 239  
          * @param members the members to set
 240  
          */
 241  
         public void setMembers(List<KimDocumentRoleMember> members) {
 242  0
                 this.members = members;
 243  0
         }
 244  
 
 245  
         public void addResponsibility(KimDocumentRoleResponsibility roleResponsibility){
 246  0
                 if(!getResponsibilityService().areActionsAtAssignmentLevelById(roleResponsibility.getResponsibilityId())) {
 247  0
                         roleResponsibility.getRoleRspActions().add(getNewRespAction(roleResponsibility));
 248  
                 }
 249  0
                getResponsibilities().add(roleResponsibility);
 250  0
         }
 251  
 
 252  
         protected KimDocumentRoleResponsibilityAction getNewRespAction(KimDocumentRoleResponsibility roleResponsibility){
 253  0
                 KimDocumentRoleResponsibilityAction roleRspAction = new KimDocumentRoleResponsibilityAction();
 254  0
                 roleRspAction.setKimResponsibility(roleResponsibility.getKimResponsibility());
 255  0
                 roleRspAction.setRoleResponsibilityId(roleResponsibility.getRoleResponsibilityId());                        
 256  0
                 return roleRspAction;
 257  
         }
 258  
         
 259  
         public void addDelegationMember(RoleDocumentDelegationMember newDelegationMember){
 260  0
                 getDelegationMembers().add(newDelegationMember);
 261  0
         }
 262  
 
 263  
         /**
 264  
          * @param members the members to set
 265  
          */
 266  
         public void addMember(KimDocumentRoleMember member) {
 267  0
                 SequenceAccessorService sas = getSequenceAccessorService();
 268  0
                 Long nextSeq = sas.getNextAvailableSequenceNumber(
 269  
                                 KimConstants.SequenceNames.KRIM_ROLE_MBR_ID_S, 
 270  
                                 KimDocumentRoleMember.class);
 271  0
                 String roleMemberId = nextSeq.toString();
 272  0
                 member.setRoleMemberId(roleMemberId);
 273  0
                 setupMemberRspActions(member);
 274  0
                getMembers().add(member);
 275  0
         }
 276  
 
 277  
         /**
 278  
          * @param members the members to set
 279  
          */
 280  
         public KimDocumentRoleMember getBlankMember() {
 281  0
                 KimDocumentRoleMember member = new KimDocumentRoleMember();
 282  
                 KimDocumentRoleQualifier qualifier;
 283  0
                 if(getDefinitions()!=null){
 284  0
                         for(String key : getDefinitions().keySet()) {
 285  0
                         qualifier = new KimDocumentRoleQualifier();
 286  0
                         qualifier.setKimAttrDefnId(getKimAttributeDefnId(getDefinitions().get(key)));
 287  0
                         member.getQualifiers().add(qualifier);
 288  
                 }
 289  
                 }
 290  0
                setupMemberRspActions(member);
 291  0
                return member;
 292  
         }
 293  
 
 294  
         /**
 295  
          * @param members the members to set
 296  
          */
 297  
         public RoleDocumentDelegationMember getBlankDelegationMember() {
 298  0
                 RoleDocumentDelegationMember member = new RoleDocumentDelegationMember();
 299  
                 RoleDocumentDelegationMemberQualifier qualifier;
 300  0
                 if(getDefinitions()!=null){
 301  0
                         for(String key : getDefinitions().keySet()) {
 302  0
                                 qualifier = new RoleDocumentDelegationMemberQualifier();
 303  0
                                 setAttrDefnIdForDelMemberQualifier(qualifier, getDefinitions().get(key));
 304  0
                         member.getQualifiers().add(qualifier);
 305  
                 }
 306  
                 }
 307  0
                return member;
 308  
         }
 309  
 
 310  
     public void setupMemberRspActions(KimDocumentRoleMember member) {
 311  0
             member.getRoleRspActions().clear();
 312  0
         for (KimDocumentRoleResponsibility roleResp: getResponsibilities()) {
 313  0
                 if (getResponsibilityService().areActionsAtAssignmentLevelById(roleResp.getResponsibilityId())) {
 314  0
                         KimDocumentRoleResponsibilityAction action = new KimDocumentRoleResponsibilityAction();
 315  0
                         action.setRoleResponsibilityId("*");
 316  0
                         action.setRoleMemberId(member.getRoleMemberId());
 317  0
                         member.getRoleRspActions().add(action);
 318  0
                         break;
 319  
                 }                
 320  
         }
 321  0
     }
 322  
 
 323  
     public void updateMembers(IdentityManagementRoleDocumentForm roleDocumentForm){
 324  0
             for(KimDocumentRoleMember member: roleDocumentForm.getRoleDocument().getMembers()){
 325  0
                     roleDocumentForm.getRoleDocument().setupMemberRspActions(member);
 326  
             }
 327  0
     }
 328  
     
 329  
     public void updateMembers(KimDocumentRoleResponsibility newResponsibility){
 330  0
             for(KimDocumentRoleMember member: getMembers()){
 331  0
                     setupMemberRspActions(newResponsibility, member);
 332  
             }
 333  0
     }
 334  
     
 335  
     public void setupMemberRspActions(KimDocumentRoleResponsibility roleResp, KimDocumentRoleMember member) {
 336  0
             if ((member.getRoleRspActions()==null || member.getRoleRspActions().size()<1) && getResponsibilityService().areActionsAtAssignmentLevelById(roleResp.getResponsibilityId())) {
 337  0
                     KimDocumentRoleResponsibilityAction action = new KimDocumentRoleResponsibilityAction();
 338  0
                     action.setRoleResponsibilityId("*");
 339  0
                     action.setRoleMemberId(member.getRoleMemberId());
 340  0
                     if(member.getRoleRspActions()==null)
 341  0
                             member.setRoleRspActions(new ArrayList<KimDocumentRoleResponsibilityAction>());
 342  0
                     member.getRoleRspActions().add(action);
 343  
             }                
 344  0
     }
 345  
     
 346  
     protected void setAttrDefnIdForDelMemberQualifier(RoleDocumentDelegationMemberQualifier qualifier,AttributeDefinition definition) {
 347  0
             if (definition instanceof KimDataDictionaryAttributeDefinition) {
 348  0
                     qualifier.setKimAttrDefnId(((KimDataDictionaryAttributeDefinition)definition).getKimAttrDefnId());
 349  
                     //qualifier.refreshReferenceObject("kimAttribute");
 350  
             } else {
 351  0
                     qualifier.setKimAttrDefnId(((KimNonDataDictionaryAttributeDefinition)definition).getKimAttrDefnId());
 352  
                     //qualifier.refreshReferenceObject("kimAttribute");
 353  
 
 354  
             }
 355  0
     }
 356  
     
 357  
     /**
 358  
      * @see org.kuali.rice.kns.document.DocumentBase#doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO)
 359  
      */
 360  
     @Override
 361  
         public void doRouteStatusChange(DocumentRouteStatusChangeDTO statusChangeEvent) {
 362  0
                 super.doRouteStatusChange(statusChangeEvent);
 363  0
                 if (getDocumentHeader().getWorkflowDocument().stateIsProcessed()) {
 364  0
                         KIMServiceLocator.getUiDocumentService().saveRole(this);
 365  
                 }
 366  0
         }
 367  
 
 368  
         public void initializeDocumentForNewRole() {
 369  0
                 if(StringUtils.isBlank(this.roleId)){
 370  0
                         SequenceAccessorService sas = getSequenceAccessorService();
 371  0
                         Long nextSeq = sas.getNextAvailableSequenceNumber(
 372  
                                         KimConstants.SequenceNames.KRIM_ROLE_ID_S, this.getClass());
 373  0
                         this.roleId = nextSeq.toString();
 374  
                 }
 375  0
                 if(StringUtils.isBlank(this.roleTypeId)) {
 376  0
                         this.roleTypeId = "1";
 377  
                 }
 378  0
         }
 379  
         
 380  
         public String getRoleId(){
 381  0
                 if(StringUtils.isBlank(this.roleId)){
 382  0
                         initializeDocumentForNewRole();
 383  
                 }
 384  0
                 return roleId;
 385  
         }
 386  
         
 387  
         @Override
 388  
         public void prepareForSave(){
 389  0
                 SequenceAccessorService sas = getSequenceAccessorService();
 390  
                 
 391  
                 String roleId;
 392  0
                 if(StringUtils.isBlank(getRoleId())){
 393  0
                         Long nextSeq = sas.getNextAvailableSequenceNumber(
 394  
                                         KimConstants.SequenceNames.KRIM_ROLE_ID_S, this.getClass()); 
 395  0
                         roleId = nextSeq.toString();
 396  0
                         setRoleId(roleId);
 397  0
                 } else
 398  0
                         roleId = getRoleId();
 399  
 
 400  0
                 if(getPermissions()!=null){
 401  
                         String rolePermissionId;
 402  0
                         for(KimDocumentRolePermission permission: getPermissions()){
 403  0
                                 permission.setRoleId(roleId);
 404  0
                                 if(StringUtils.isBlank(permission.getRolePermissionId())){
 405  0
                                         Long nextSeq = sas.getNextAvailableSequenceNumber(
 406  
                                                         KimConstants.SequenceNames.KRIM_ROLE_PERM_ID_S, 
 407  
                                                         KimDocumentRolePermission.class);
 408  0
                                         rolePermissionId = nextSeq.toString();
 409  0
                                         permission.setRolePermissionId(rolePermissionId);
 410  0
                                 }
 411  
                         }
 412  
                 }
 413  0
                 if(getResponsibilities()!=null){
 414  
                         String roleResponsibilityId;
 415  0
                         for(KimDocumentRoleResponsibility responsibility: getResponsibilities()){
 416  0
                                 if(StringUtils.isBlank(responsibility.getRoleResponsibilityId())){
 417  0
                                         Long nextSeq = sas.getNextAvailableSequenceNumber(
 418  
                                                         KimConstants.SequenceNames.KRIM_ROLE_RSP_ID_S, 
 419  
                                                         KimDocumentRoleResponsibility.class);
 420  0
                                         roleResponsibilityId = nextSeq.toString();
 421  0
                                         responsibility.setRoleResponsibilityId(roleResponsibilityId);
 422  
                                 }
 423  0
                                 responsibility.setRoleId(roleId);
 424  0
                                 if(!getResponsibilityService().areActionsAtAssignmentLevelById(responsibility.getResponsibilityId())){
 425  0
                                         if(StringUtils.isBlank(responsibility.getRoleRspActions().get(0).getRoleResponsibilityActionId())){
 426  0
                                                 Long nextSeq = sas.getNextAvailableSequenceNumber(
 427  
                                                                 KimConstants.SequenceNames.KRIM_ROLE_RSP_ACTN_ID_S,
 428  
                                                                 KimDocumentRoleResponsibilityAction.class);
 429  0
                                                 String roleResponsibilityActionId = nextSeq.toString();
 430  0
                                                 responsibility.getRoleRspActions().get(0).setRoleResponsibilityActionId(roleResponsibilityActionId);
 431  
                                         }
 432  0
                                         responsibility.getRoleRspActions().get(0).setRoleMemberId("*");
 433  0
                                         responsibility.getRoleRspActions().get(0).setDocumentNumber(getDocumentNumber());
 434  
                                 }
 435  
                         }
 436  
                 }
 437  0
                 if(getMembers()!=null){
 438  
                         String roleMemberId;
 439  
                         String roleResponsibilityActionId;
 440  0
                         for(KimDocumentRoleMember member: getMembers()){
 441  0
                                 member.setRoleId(roleId);
 442  0
                                 if(StringUtils.isBlank(member.getRoleMemberId())){
 443  0
                                         Long nextSeq = sas.getNextAvailableSequenceNumber(
 444  
                                                         KimConstants.SequenceNames.KRIM_ROLE_MBR_ID_S,
 445  
                                                         KimDocumentRoleMember.class);
 446  0
                                         roleMemberId = nextSeq.toString();
 447  0
                                         member.setRoleMemberId(roleMemberId);
 448  
                                 }
 449  0
                                 for(KimDocumentRoleQualifier qualifier: member.getQualifiers()){
 450  0
                                         qualifier.setKimTypId(getKimType().getKimTypeId());
 451  
                                 }
 452  0
                                 for(KimDocumentRoleResponsibilityAction roleRespAction: member.getRoleRspActions()){
 453  0
                                         if(StringUtils.isBlank(roleRespAction.getRoleResponsibilityActionId())){
 454  0
                                                 Long nextSeq = sas.getNextAvailableSequenceNumber(
 455  
                                                                 KimConstants.SequenceNames.KRIM_ROLE_RSP_ACTN_ID_S,
 456  
                                                                 KimDocumentRoleResponsibilityAction.class);
 457  0
                                                 roleResponsibilityActionId = nextSeq.toString();
 458  0
                                                 roleRespAction.setRoleResponsibilityActionId(roleResponsibilityActionId);
 459  
                                         }
 460  0
                                         roleRespAction.setRoleMemberId(member.getRoleMemberId());
 461  0
                                         roleRespAction.setDocumentNumber(getDocumentNumber());
 462  0
                                         if ( !StringUtils.equals( roleRespAction.getRoleResponsibilityId(), "*" ) ) {
 463  0
                                                 for(KimDocumentRoleResponsibility responsibility: getResponsibilities()){
 464  0
                                                         if( StringUtils.equals( roleRespAction.getKimResponsibility().getResponsibilityId(), responsibility.getResponsibilityId() ) ) {
 465  0
                                                                 roleRespAction.setRoleResponsibilityId(responsibility.getRoleResponsibilityId());
 466  
                                                         }
 467  
                                                 }
 468  
                                         }
 469  
                                 }
 470  
                         }
 471  
                 }
 472  0
                 if(getDelegationMembers()!=null){
 473  0
                         for(RoleDocumentDelegationMember delegationMember: getDelegationMembers()){
 474  0
                                 delegationMember.setDocumentNumber(getDocumentNumber());
 475  0
                                 addDelegationMemberToDelegation(delegationMember);
 476  
                         }
 477  0
                         for(RoleDocumentDelegation delegation: getDelegations()){
 478  0
                                 delegation.setDocumentNumber(getDocumentNumber());
 479  0
                                 delegation.setKimTypeId(getKimType().getKimTypeId());
 480  0
                                 for(RoleDocumentDelegationMember member: delegation.getMembers()){
 481  0
                                         for(RoleDocumentDelegationMemberQualifier qualifier: member.getQualifiers()){
 482  0
                                                 qualifier.setKimTypId(getKimType().getKimTypeId());
 483  
                                         }
 484  
                                 }
 485  0
                                 delegation.setRoleId(roleId);
 486  
                         }
 487  
                 }
 488  0
         }
 489  
         
 490  
     public ResponsibilityService getResponsibilityService() {
 491  0
             if ( responsibilityService == null ) {
 492  0
                     responsibilityService = KIMServiceLocator.getResponsibilityService();
 493  
             }
 494  0
                 return responsibilityService;
 495  
         }
 496  
 
 497  
         /**
 498  
          * @return the editing
 499  
          */
 500  
         public boolean isEditing() {
 501  0
                 return this.editing;
 502  
         }
 503  
 
 504  
         /**
 505  
          * @param editing the editing to set
 506  
          */
 507  
         public void setEditing(boolean editing) {
 508  0
                 this.editing = editing;
 509  0
         }
 510  
 
 511  
         /**
 512  
          * @return the delegations
 513  
          */
 514  
         public List<RoleDocumentDelegation> getDelegations() {
 515  0
                 return this.delegations;
 516  
         }
 517  
 
 518  
         /**
 519  
          * @param delegations the delegations to set
 520  
          */
 521  
         public void setDelegations(List<RoleDocumentDelegation> delegations) {
 522  0
                 this.delegations = delegations;
 523  0
         }
 524  
         
 525  
         public void setKimType(KimTypeInfo kimType) {
 526  0
                 super.setKimType(kimType);
 527  0
                 if (kimType != null){
 528  0
                         setRoleTypeId(kimType.getKimTypeId());
 529  0
                         setRoleTypeName(kimType.getName());
 530  
                 }
 531  0
         }
 532  
 }