1 /* 2 * Copyright 2008-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.api.services; 17 18 import java.util.Map; 19 20 import org.kuali.rice.kim.api.identity.entity.Entity; 21 import org.kuali.rice.kim.api.identity.entity.EntityDefault; 22 import org.kuali.rice.kim.api.identity.principal.Principal; 23 24 /** 25 * This is the front end for the KIM module. Clients of KIM should access this service from 26 * their applications. If KIM is not running on the same machine (VM) as the application 27 * (as would be the case with a standalone Rice server), then this service should be implemented 28 * locally within the application and access the core KIM services 29 * (Authentication/Authorization/Identity/Group) via the service bus. 30 * 31 * For efficiency, implementations of this interface should add appropriate caching of 32 * the information retrieved from the core services for load and performance reasons. 33 * 34 * Most of the methods on this interface are straight pass-thrus to methods on the four core services. 35 * 36 * @author Kuali Rice Team (rice.collab@kuali.org) 37 * 38 */ 39 @Deprecated 40 public interface IdentityManagementService { 41 42 // ******************************* 43 // IdentityService 44 // ******************************* 45 46 Principal getPrincipal( String principalId); 47 Principal getPrincipalByPrincipalName( String principalName); 48 49 EntityDefault getEntityDefaultInfo( String entityId); 50 EntityDefault getEntityDefaultInfoByPrincipalId( String principalId); 51 EntityDefault getEntityDefaultInfoByPrincipalName( String principalName); 52 53 Entity getEntityByPrincipalId( String principalId); 54 55 // -------------------- 56 // Authorization Checks 57 // -------------------- 58 59 boolean hasPermission( 60 String principalId, 61 String namespaceCode, 62 String permissionName 63 ); 64 65 boolean isAuthorized( 66 String principalId, 67 String namespaceCode, 68 String permissionName, 69 Map<String, String> qualification 70 ); 71 72 boolean hasPermissionByTemplateName( 73 String principalId, 74 String namespaceCode, 75 String permissionTemplateName, 76 Map<String, String> permissionDetails 77 ); 78 79 boolean isAuthorizedByTemplateName( 80 String principalId, 81 String namespaceCode, 82 String permissionTemplateName, 83 Map<String, String> permissionDetails, 84 Map<String, String> qualification 85 ); 86 87 }