001: /******************************************************************************
002: * JBoss, a division of Red Hat *
003: * Copyright 2006, Red Hat Middleware, LLC, and individual *
004: * contributors as indicated by the @authors tag. See the *
005: * copyright.txt in the distribution for a full listing of *
006: * individual contributors. *
007: * *
008: * This is free software; you can redistribute it and/or modify it *
009: * under the terms of the GNU Lesser General Public License as *
010: * published by the Free Software Foundation; either version 2.1 of *
011: * the License, or (at your option) any later version. *
012: * *
013: * This software is distributed in the hope that it will be useful, *
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
016: * Lesser General Public License for more details. *
017: * *
018: * You should have received a copy of the GNU Lesser General Public *
019: * License along with this software; if not, write to the Free *
020: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
021: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
022: ******************************************************************************/package org.jboss.portal.migration.model24.identity;
023:
024: import java.util.Date;
025: import java.util.Locale;
026:
027: /**
028: * A user.
029: *
030: * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
031: * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
032: * @version $Revision: 8784 $
033: */
034: public interface User {
035:
036: String INFO_USER_REGISTRATION_DATE = "portal.user.registration-date";
037: String INFO_USER_HOMEPAGE = "portal.user.homepage";
038: String INFO_USER_TIME_ZONE_OFFSET = "portal.user.time-zone-offset";
039: String INFO_USER_LOCATION = "portal.user.location";
040: String INFO_USER_OCCUPATION = "portal.user.occupation";
041: String INFO_USER_EXTRA = "portal.user.extra";
042: String INFO_USER_SIGNATURE = "portal.user.signature";
043: String INFO_USER_INTERESTS = "portal.user.interests";
044: String INFO_USER_LOCALE = "portal.user.locale";
045: String INFO_USER_IM_ICQ = "portal.user.im.icq";
046: String INFO_USER_IM_AIM = "portal.user.im.aim";
047: String INFO_USER_IM_MSNM = "portal.user.im.msnm";
048: String INFO_USER_IM_YIM = "portal.user.im.yim";
049: String INFO_USER_IM_SKYPE = "portal.user.im.skype";
050: String INFO_USER_SECURITY_QUESTION = "portal.user.security.question";
051: String INFO_USER_SECURITY_ANSWER = "portal.user.security.answer";
052: String INFO_USER_EMAIL_FAKE = "portal.user.email.fake";
053: String INFO_USER_VIEW_EMAIL_VIEW_REAL = "portal.user.email.view-real";
054: String INFO_USER_LAST_LOGIN_DATE = "portal.user.last-login-date";
055:
056: /** The user identifier. */
057: Object getId();
058:
059: // User management **************************************************************************************************
060:
061: /** Disable the user. */
062: boolean getEnabled();
063:
064: /** Enable the user. */
065: void setEnabled(boolean enable);
066:
067: /** Set the password. */
068: void updatePassword(String password);
069:
070: /** Return true if the password is valid. */
071: boolean validatePassword(String password);
072:
073: // Detyped access to properties *************************************************************************************
074:
075: /** Returns the user properties. */
076: PropertyMap getProperties();
077:
078: // Properties declared in this interface for convenient access ******************************************************
079:
080: /** The user name. */
081: String getUserName();
082:
083: /** The given name (firstname). */
084: String getGivenName();
085:
086: /**
087: *
088: */
089: void setGivenName(String givenName);
090:
091: /** The family name. */
092: String getFamilyName();
093:
094: /**
095: *
096: */
097: void setFamilyName(String familyName);
098:
099: /**
100: *
101: */
102: String getRealEmail();
103:
104: /**
105: *
106: */
107: void setRealEmail(String realEmail);
108:
109: /**
110: *
111: */
112: String getFakeEmail();
113:
114: /**
115: *
116: */
117: void setFakeEmail(String fakeEmail);
118:
119: /**
120: *
121: */
122: Date getRegistrationDate();
123:
124: /**
125: *
126: */
127: boolean getViewRealEmail();
128:
129: /**
130: *
131: */
132: void setViewRealEmail(boolean viewRealEmail);
133:
134: /** Return the user preferred locale. */
135: Locale getPreferredLocale();
136:
137: /** Set the user preferred locale. */
138: void setPreferredLocale(Locale locale);
139:
140: /** Returns the signature. */
141: String getSignature();
142:
143: /** Set the signature. */
144: void setSignature(String signature);
145:
146: /** Return the last time the user logged in or null if this date is not known. */
147: Date getLastVisitDate();
148:
149: /** Set the last visit date on this user. */
150: void setLastVisitDate(Date date);
151: }
|