View Javadoc
1   /**
2    * Copyright 2005-2015 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.role;
17  
18  import org.kuali.rice.core.api.membership.MemberType;
19  import org.kuali.rice.core.api.mo.common.GloballyUnique;
20  import org.kuali.rice.core.api.mo.common.Identifiable;
21  import org.kuali.rice.core.api.mo.common.Versioned;
22  import org.kuali.rice.core.api.mo.common.active.InactivatableFromTo;
23  
24  import java.util.List;
25  import java.util.Map;
26  /**
27   * This is a contract for RoleMember. Role members can be Principals, Groups, or other Roles.
28   * Each RoleMember has certain permissions and responsibilities assigned to it based on which role it belongs to.
29   *
30   * @author Kuali Rice Team (rice.collab@kuali.org)
31   */
32  public interface RoleMemberContract extends Versioned, GloballyUnique, InactivatableFromTo, Identifiable {
33      /**
34       * This is the member id for the Role Member.
35       *
36       * <p>
37       * This is a id value that defines the Role Member.  This value is either a Principal Id, Group Id, or Role Id
38       * depending on the type code
39       * </p>
40       *
41       * @return memberId
42       */
43      String getMemberId();
44  
45      /**
46       * This is the type code for the Role Member.
47       *
48       * <p>
49       * This is a value that defines the type of Role Member.  This value determines whether memberId is
50       * either a Principal Id, Group Id, or Role Id
51       * </p>
52       *
53       * @return typeCode
54       */
55      MemberType getType();
56  
57      /**
58       * This is the id for the Role.
59       *
60       * <p>
61       * This is a id assigned to a Role.  It defines the role this role member belongs to.
62       * </p>
63       *
64       * @return roleId
65       */
66      String getRoleId();
67  
68      /**
69       * This returns specific attributes to be set on a Role Member in order to match permission and responsibilitys.
70       * These attributes match the attributes set to a KimType
71       *
72       * @return attributes
73       */
74      Map<String, String> getAttributes();
75  
76      /**
77       * This returns a list of role responsibility actions assigned to a role member
78       *
79       * @return roleRspActions
80       */
81      List<? extends RoleResponsibilityActionContract> getRoleRspActions();
82  
83      String getMemberName();
84  
85      String getMemberNamespaceCode();
86  }