001/*
002 * Copyright 2008-2009 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.kim.api.services;
017
018import java.util.Map;
019
020import org.kuali.rice.kim.api.identity.entity.Entity;
021import org.kuali.rice.kim.api.identity.entity.EntityDefault;
022import org.kuali.rice.kim.api.identity.principal.Principal;
023
024/**
025 * This is the front end for the KIM module.  Clients of KIM should access this service from
026 * their applications.  If KIM is not running on the same machine (VM) as the application
027 * (as would be the case with a standalone Rice server), then this service should be implemented
028 * locally within the application and access the core KIM services
029 * (Authentication/Authorization/Identity/Group) via the service bus.
030 *
031 *  For efficiency, implementations of this interface should add appropriate caching of
032 *  the information retrieved from the core services for load and performance reasons.
033 *
034 *  Most of the methods on this interface are straight pass-thrus to methods on the four core services.
035 *
036 * @author Kuali Rice Team (rice.collab@kuali.org)
037 *
038 */
039@Deprecated
040public interface IdentityManagementService {
041
042        // *******************************
043        // IdentityService
044        // *******************************
045
046        Principal getPrincipal( String principalId);
047        Principal getPrincipalByPrincipalName( String principalName);
048
049        EntityDefault getEntityDefaultInfo( String entityId);
050        EntityDefault getEntityDefaultInfoByPrincipalId( String principalId);
051        EntityDefault getEntityDefaultInfoByPrincipalName( String principalName);
052
053        Entity getEntityByPrincipalId( String principalId);
054
055    // --------------------
056    // Authorization Checks
057    // --------------------
058
059    boolean hasPermission(
060             String principalId,
061             String namespaceCode,
062             String permissionName
063    );
064
065    boolean isAuthorized(
066             String principalId,
067             String namespaceCode,
068             String permissionName,
069              Map<String, String> qualification
070    );
071
072    boolean hasPermissionByTemplateName(
073             String principalId,
074             String namespaceCode,
075             String permissionTemplateName,
076              Map<String, String> permissionDetails
077    );
078
079    boolean isAuthorizedByTemplateName(
080             String principalId,
081             String namespaceCode,
082             String permissionTemplateName,
083             Map<String, String> permissionDetails,
084             Map<String, String> qualification
085    );
086
087}