View Javadoc

1   /**
2    * Copyright 2005-2012 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.service;
17  
18  import org.kuali.rice.core.api.membership.MemberType;
19  import org.kuali.rice.kim.api.group.Group;
20  import org.kuali.rice.kim.api.group.GroupMember;
21  import org.kuali.rice.kim.api.identity.employment.EntityEmployment;
22  import org.kuali.rice.kim.api.identity.entity.Entity;
23  import org.kuali.rice.kim.api.identity.entity.EntityDefault;
24  import org.kuali.rice.kim.api.role.Role;
25  import org.kuali.rice.kim.api.role.RoleMember;
26  import org.kuali.rice.kim.api.type.KimAttributeField;
27  import org.kuali.rice.kim.bo.ui.KimDocumentRoleMember;
28  import org.kuali.rice.kim.document.IdentityManagementGroupDocument;
29  import org.kuali.rice.kim.document.IdentityManagementPersonDocument;
30  import org.kuali.rice.kim.document.IdentityManagementRoleDocument;
31  import org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo;
32  import org.kuali.rice.kim.impl.role.RoleMemberBo;
33  import org.kuali.rice.kim.impl.role.RoleResponsibilityActionBo;
34  import org.kuali.rice.krad.bo.BusinessObject;
35  import org.springframework.cache.annotation.CacheEvict;
36  
37  import java.util.List;
38  import java.util.Map;
39  
40  /**
41   * This is a description of what this class does - shyu don't forget to fill this in. 
42   * 
43   * @author Kuali Rice Team (rice.collab@kuali.org)
44   *
45   */
46  public interface UiDocumentService {
47  	/**
48  	 * 
49  	 * This method to populate Entity tables from person document pending tables when it is approved.
50  	 * 	  
51  	 * @param identityManagementPersonDocument
52  	 */
53      @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME, GroupMember.Cache.NAME, RoleMember.Cache.NAME}, allEntries = true)
54      void saveEntityPerson(IdentityManagementPersonDocument identityManagementPersonDocument);
55      
56      /**
57       * 
58       * This method is to set up the DD attribute entry map for role qualifiers, so it can be rendered.
59       * 
60       * @param definitions
61       */
62      Map<String,Object> getAttributeEntries( List<KimAttributeField> definitions );
63  	/**
64  	 * 
65  	 * This method is to load identity to person document pending Bos when user 'initiate' a document for 'editing' identity.
66  	 * 
67  	 * @param identityManagementPersonDocument
68  	 * @param principalId
69  	 */
70  	void loadEntityToPersonDoc(IdentityManagementPersonDocument identityManagementPersonDocument, String principalId);
71  
72  	/**
73  	 * 
74  	 * This method loads a role document
75  	 * 
76  	 * @param identityManagementRoleDocument
77  	 */
78  	public void loadRoleDoc(IdentityManagementRoleDocument identityManagementRoleDocument, Role kimRole);
79  	
80  	/**
81  	 * 
82  	 * This method ...
83  	 * 
84  	 * @param identityManagementRoleDocument
85  	 */
86      @CacheEvict(value={Role.Cache.NAME, RoleMember.Cache.NAME}, allEntries = true)
87  	public void saveRole(IdentityManagementRoleDocument identityManagementRoleDocument);
88  
89  
90  	/**
91  	 * 
92  	 * This method loads a role document
93  	 * 
94  	 * @param identityManagementGroupDocument
95  	 */
96  	public void loadGroupDoc(IdentityManagementGroupDocument identityManagementGroupDocument, Group kimGroup);
97  	
98  	/**
99  	 * 
100 	 * This method ...
101 	 * 
102 	 * @param identityManagementGroupDocument
103 	 */
104     @CacheEvict(value={Group.Cache.NAME,GroupMember.Cache.NAME}, allEntries = true)
105 	public void saveGroup(IdentityManagementGroupDocument identityManagementGroupDocument);
106 
107 	public BusinessObject getMember(MemberType memberType, String memberId);
108 	
109 	public String getMemberName(MemberType memberType, String memberId);
110 	
111 	public String getMemberNamespaceCode(MemberType memberType, String memberId);
112 
113 	public String getMemberName(MemberType memberType, BusinessObject member);
114 	
115 	public String getMemberNamespaceCode(MemberType memberType, BusinessObject member);
116 
117 	public List<RoleResponsibilityActionBo> getRoleMemberResponsibilityActionImpls(String roleMemberId);
118 	
119 	public List<DelegateTypeBo> getRoleDelegations(String roleId);
120 	
121 	public KimDocumentRoleMember getKimDocumentRoleMember(MemberType memberType, String memberId, String roleId);
122 	
123 	public String getMemberIdByName(MemberType memberType, String memberNamespaceCode, String memberName);
124 
125 	public void setDelegationMembersInDocument(IdentityManagementRoleDocument identityManagementRoleDocument);
126 	
127 	public RoleMemberBo getRoleMember(String roleMemberId);
128 	
129 	public List<KimDocumentRoleMember> getRoleMembers(Map<String,String> fieldValues);
130 	
131 	public boolean canModifyEntity( String currentUserPrincipalId, String toModifyPrincipalId );
132 	public boolean canOverrideEntityPrivacyPreferences( String currentUserPrincipalId, String toModifyPrincipalId );
133 
134 	public List<EntityEmployment> getEntityEmploymentInformationInfo(String entityId);
135 }