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