View Javadoc

1   /*
2    * To change this template, choose Tools | Templates
3    * and open the template in the editor.
4    */
5   package org.kuali.student.kim.permission.mock;
6   
7   import org.kuali.rice.kim.bo.group.dto.GroupInfo;
8   import org.kuali.rice.kim.bo.types.dto.AttributeSet;
9   import org.kuali.rice.kim.bo.types.dto.KimTypeInfo;
10  import org.kuali.rice.kim.service.KIMServiceLocator;
11  import org.kuali.rice.kim.service.support.KimRoleTypeService;
12  import org.kuali.rice.kim.service.support.KimTypeService;
13  
14  /**
15   *
16   * @author nwright
17   */
18  public class MockHelper {
19  
20      public AttributeSet copy(AttributeSet info) {
21          if (info == null) {
22              return null;
23          }
24          AttributeSet copy = new AttributeSet(info);
25          return copy;
26      }
27  
28      public GroupInfo copy(GroupInfo info) {
29          GroupInfo copy = new GroupInfo();
30          copy.setActive(info.isActive());
31          copy.setAttributes(this.copy(info.getAttributes()));
32          copy.setGroupDescription(info.getGroupDescription());
33          copy.setGroupId(info.getGroupId());
34          copy.setGroupName(info.getGroupName());
35          copy.setKimTypeId(info.getKimTypeId());
36          copy.setNamespaceCode(info.getNamespaceCode());
37          return copy;
38      }
39  }