View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package org.kuali.rice.kim.api.services;
20  
21  import java.util.Map;
22  
23  import org.kuali.rice.kim.api.identity.entity.Entity;
24  import org.kuali.rice.kim.api.identity.entity.EntityDefault;
25  import org.kuali.rice.kim.api.identity.principal.Principal;
26  
27  /**
28   * This is the front end for the KIM module.  Clients of KIM should access this service from
29   * their applications.  If KIM is not running on the same machine (VM) as the application
30   * (as would be the case with a standalone Rice server), then this service should be implemented
31   * locally within the application and access the core KIM services
32   * (Authentication/Authorization/Identity/Group) via the service bus.
33   *
34   *  For efficiency, implementations of this interface should add appropriate caching of
35   *  the information retrieved from the core services for load and performance reasons.
36   *
37   *  Most of the methods on this interface are straight pass-thrus to methods on the four core services.
38   *
39   * @author Kuali Rice Team (rice.collab@kuali.org)
40   *
41   */
42  @Deprecated
43  public interface IdentityManagementService {
44  
45  	// *******************************
46  	// IdentityService
47  	// *******************************
48  
49  	Principal getPrincipal( String principalId);
50  	Principal getPrincipalByPrincipalName( String principalName);
51  
52  	EntityDefault getEntityDefaultInfo( String entityId);
53  	EntityDefault getEntityDefaultInfoByPrincipalId( String principalId);
54  	EntityDefault getEntityDefaultInfoByPrincipalName( String principalName);
55  
56  	Entity getEntityByPrincipalId( String principalId);
57  
58      // --------------------
59      // Authorization Checks
60      // --------------------
61  
62      boolean hasPermission(
63               String principalId,
64               String namespaceCode,
65               String permissionName
66      );
67  
68      boolean isAuthorized(
69               String principalId,
70               String namespaceCode,
71               String permissionName,
72                Map<String, String> qualification
73      );
74  
75      boolean hasPermissionByTemplateName(
76               String principalId,
77               String namespaceCode,
78               String permissionTemplateName,
79                Map<String, String> permissionDetails
80      );
81  
82      boolean isAuthorizedByTemplateName(
83               String principalId,
84               String namespaceCode,
85               String permissionTemplateName,
86               Map<String, String> permissionDetails,
87               Map<String, String> qualification
88      );
89  
90  }