001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/user/tags/sakai_2-4-1/user-api/api/src/java/org/sakaiproject/user/api/User.java $
003: * $Id: User.java 10591 2006-06-14 14:57:46Z ggolden@umich.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.user.api;
021:
022: import org.sakaiproject.entity.api.Entity;
023: import org.sakaiproject.time.api.Time;
024:
025: /**
026: * <p>
027: * User models a Sakai end-user.
028: * </p>
029: */
030: public interface User extends Entity, Comparable {
031: /**
032: * @return the user who created this.
033: */
034: User getCreatedBy();
035:
036: /**
037: * @return the user who last modified this.
038: */
039: User getModifiedBy();
040:
041: /**
042: * @return the time created.
043: */
044: Time getCreatedTime();
045:
046: /**
047: * @return the time last modified.
048: */
049: Time getModifiedTime();
050:
051: /**
052: * Access the email address.
053: *
054: * @return The email address string.
055: */
056: String getEmail();
057:
058: /**
059: * Access the user's name for display purposes.
060: *
061: * @return The user's name for display purposes.
062: */
063: String getDisplayName();
064:
065: /**
066: * Access the user's name for sorting purposes.
067: *
068: * @return The user's name for sorting purposes.
069: */
070: String getSortName();
071:
072: /**
073: * Access the user's first name.
074: *
075: * @return The user's first name.
076: */
077: String getFirstName();
078:
079: /**
080: * Access the user's last name.
081: *
082: * @return The user's last name.
083: */
084: String getLastName();
085:
086: /**
087: * Check if this is the user's password.
088: *
089: * @param pw
090: * The clear text password to check.
091: * @return true if the password matches, false if not.
092: */
093: boolean checkPassword(String pw);
094:
095: /**
096: * Access the user type.
097: *
098: * @return The user type.
099: */
100: String getType();
101:
102: /**
103: * Access the user's enterprise id; the id they and the enterprise know as belonging to them.<br />
104: * The Enterprise id, like the User id, is unique among all defined users.<br />
105: * The EID may be used by the user to login, and will be used when communicating with the user directory provider.
106: *
107: * @return The user's enterprise id.
108: */
109: String getEid();
110:
111: /**
112: * Access a string portraying the user's enterprise identity, for display purposes.<br />
113: * Use this, not getEid(), when displaying the user's id, probably along with the user's sort or display name, for disambiguating purposes.
114: *
115: * @return The user's display id string.
116: */
117: String getDisplayId();
118: }
|