001    /**
002     * Copyright 2005-2012 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     */
016    package org.kuali.rice.kim.api.role;
017    
018    import org.kuali.rice.core.api.membership.MemberType;
019    import org.kuali.rice.core.api.mo.common.GloballyUnique;
020    import org.kuali.rice.core.api.mo.common.Identifiable;
021    import org.kuali.rice.core.api.mo.common.Versioned;
022    import org.kuali.rice.core.api.mo.common.active.InactivatableFromTo;
023    
024    import java.util.List;
025    import java.util.Map;
026    /**
027     * This is a contract for RoleMember. Role members can be Principals, Groups, or other Roles.
028     * Each RoleMember has certain permissions and responsibilities assigned to it based on which role it belongs to.
029     *
030     * @author Kuali Rice Team (rice.collab@kuali.org)
031     */
032    public interface RoleMemberContract extends Versioned, GloballyUnique, InactivatableFromTo, Identifiable {
033        /**
034         * This is the member id for the Role Member.
035         *
036         * <p>
037         * This is a id value that defines the Role Member.  This value is either a Principal Id, Group Id, or Role Id
038         * depending on the type code
039         * </p>
040         *
041         * @return memberId
042         */
043        String getMemberId();
044    
045        /**
046         * This is the type code for the Role Member.
047         *
048         * <p>
049         * This is a value that defines the type of Role Member.  This value determines whether memberId is
050         * either a Principal Id, Group Id, or Role Id
051         * </p>
052         *
053         * @return typeCode
054         */
055        MemberType getType();
056    
057        /**
058         * This is the id for the Role.
059         *
060         * <p>
061         * This is a id assigned to a Role.  It defines the role this role member belongs to.
062         * </p>
063         *
064         * @return roleId
065         */
066        String getRoleId();
067    
068        /**
069         * This returns specific attributes to be set on a Role Member in order to match permission and responsibilitys.
070         * These attributes match the attributes set to a KimType
071         *
072         * @return attributes
073         */
074        Map<String, String> getAttributes();
075    
076        /**
077         * This returns a list of role responsibility actions assigned to a role member
078         *
079         * @return roleRspActions
080         */
081        List<? extends RoleResponsibilityActionContract> getRoleRspActions();
082    
083        String getMemberName();
084    
085        String getMemberNamespaceCode();
086    }