01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/authz/tags/sakai_2-4-1/authz-api/api/src/java/org/sakaiproject/authz/api/Member.java $
03: * $Id: Member.java 10599 2006-06-14 14:59:11Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.authz.api;
21:
22: import java.io.Serializable;
23:
24: /**
25: * <p>
26: * Member records membership in an AuthzGroup; user, role, and flags.
27: * </p>
28: */
29: public interface Member extends Comparable, Serializable {
30: /**
31: * Access the user id of the member.
32: *
33: * @return The user id of the member.
34: */
35: String getUserId();
36:
37: /**
38: * Access the user eid of the member, if we can find it - fall back to the user id if not.
39: *
40: * @return The user eid of the member.
41: */
42: String getUserEid();
43:
44: /**
45: * Access the user display id, if we can find it - fall back to the user id if not.
46: *
47: * @return The user display id of the member.
48: */
49: String getUserDisplayId();
50:
51: /**
52: * Access the member's Role.
53: *
54: * @return The member's Role.
55: */
56: Role getRole();
57:
58: /**
59: * Check if the membership is from the external provider.
60: *
61: * @return true if the membership is from the external provider, false if not.
62: */
63: boolean isProvided();
64:
65: /**
66: * Check if the membership is active.
67: *
68: * @return true if the membership is active, false if not.
69: */
70: boolean isActive();
71:
72: /**
73: * Set the active value.
74: *
75: * @param active
76: * The new active value.
77: */
78: void setActive(boolean active);
79: }
|