|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.dataobjects.BaseDataObject
com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
com.jcorporate.expresso.core.dbobj.DBObject
com.jcorporate.expresso.core.dbobj.SecuredDBObject
com.jcorporate.expresso.services.dbobj.SecurityDBObject
com.jcorporate.expresso.services.dbobj.DefaultUserInfo
Default implementation of the UserInfo object. This is the class that comes for managing users and security with Expresso.
| Nested Class Summary |
| Nested classes inherited from class com.jcorporate.expresso.core.dbobj.DBObject |
DBObject.FieldError, DBObject.FieldUpdate |
| Field Summary | |
static String |
ACCOUNT_STATUS
Field name for account status |
static String |
CREATED_DATE
Field name for created date |
static String |
EMAIL_ADDRESS
Field name for user's email |
static int |
EMAIL_ADDRESS_LENGTH
Email address length |
static String |
EXPUID
Field name for the user id |
static String |
FULL_NAME
Field name for full name. |
static int |
FULL_NAME_LENGTH
Full name field length |
static String |
IS_REG_COMPLETE
Field name for registration complete flag |
static String |
LOGIN
Field name for the login name |
static int |
LOGIN_LENGTH
Login name length |
static String |
PASSWORD
Field name for the password |
static int |
PASSWORD_LENGTH
Password name length |
static String |
REGISTRATION_DOMAIN
Field name for the registration domain id. |
static String |
thisClass
Debugging information value |
static String |
UPDATED_DATE
Field name for updated date |
static String |
VALIDATION_CODE
Field name for validation code |
static int |
VALIDATION_CODE_LENGTH
Validation code length |
| Fields inherited from class com.jcorporate.expresso.services.dbobj.SecurityDBObject |
SECURITY_CONTEXT, SECURITY_OBJECTS |
| Fields inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject |
ADD, ALL_FUNCTIONS, CACHE_NAME, CACHE_TTY, DELETE, SEARCH, SYSTEM_ACCOUNT, SYSTEM_ACCOUNT_NAME, UPDATE |
| Fields inherited from class com.jcorporate.expresso.core.dbobj.DBObject |
ATTRIBUTE_ERROR, ATTRIBUTE_ERROR_MESSAGE, ATTRIBUTE_PAGE_LIMIT, BIG_DECIMAL_ZERO, EMAIL_MASK, FLOAT_MASK, INT_MASK, IS_CHECK_RELATIONAL_INTEGRITY |
| Fields inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject |
anyFieldsDistinct, anyFieldsToRetrieve, appendCustomWhere, caseSensitiveQuery, customWhereClause, dbKey, distinctFields, localConnection, maxRecords, myClassName, myUpdates, offsetRecord, recordSet, retrieveFields, sMetadataMap, sortKeys |
| Fields inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject |
currentStatus |
| Fields inherited from interface com.jcorporate.expresso.core.dataobjects.DataObject |
STATUS_CURRENT, STATUS_DELETED, STATUS_NEW, STATUS_UPDATED |
| Constructor Summary | |
DefaultUserInfo()
Default constructor |
|
DefaultUserInfo(ControllerRequest request)
For using DBObjects within Controllers. |
|
DefaultUserInfo(int uid)
Constructor with UID |
|
| Method Summary | |
void |
add()
Override of add to check for duplicate emails. |
protected void |
checkAllRefs()
Extends the checkAllRefs method to check for valid Registration Domain Id |
void |
delete()
Override of deleteMethod() to notify UserListeners of deltion |
boolean |
find()
Override to provide better access. |
String |
getAccountStatus()
Retrieve the account status of the user |
Vector |
getAllUsers()
Retrieve a list of all users... may get REALLY intensive! |
String |
getCreateDate()
Get the account creation date |
String |
getEmail()
Retrieve the email address of the account |
String |
getEmailAuthCode()
Create an email authorization code. |
String |
getEmailValCode()
Retrieve the email validation code |
String |
getFullName()
get descriptive, full name |
Vector |
getGroups()
Get the groups that below to this user |
String |
getLoginName()
get name used for login query that is accompanied by password |
String |
getPassword()
Returns the password for this user |
String |
getPrimaryGroup()
the primary group of this user is appropriate for unix-like purposes, such as setting the group for a file permission |
static String |
getPrimaryGroup(UserInfo user)
the primary group of this user is appropriate for unix-like purposes, such as setting the group for a file permission |
boolean |
getRegComplete()
Returns the status of whether extended registration has been completed or not Valid values are "Y" or "N" |
String |
getRegistrationDomain()
Returns the unique integer for the registration domain that this user belongs to |
int |
getUid()
Returns the user id for this user |
String |
getUpdateDate()
Returns the date that this UserInfo object was last modified |
String |
getUserName()
Deprecated. Since Expresso 5.5; use getFullName() instead to avoid confusion with login name |
Vector |
getValidValues(String fieldName)
Get the valid values for various fields on this data object |
Vector |
getValues()
Method to return a Vector of ValidValue This method may be implemented by objects that want to provide a list of valid values for other DB objects. |
void |
notify(String subject,
String message)
Send this user a notification via e-mail. |
boolean |
passwordEquals(String tryPassword)
passwordEquals - feed it a password and it will tell you if the hash of it matches the one on file. |
void |
postLogin()
Called by the various objects that can log in a user to do post-login tasks |
String |
randomPassword()
|
void |
sendAuthEmail()
Sends an Authorization Email to a new User. |
void |
sendFileTo(String subject,
String message,
Vector fileNames)
Send this user an e-mail with file attachments. |
void |
sendFollowUpEmail()
Once a user has validated his email address through the email validation servlet, the user will receive this message giving previously requested username/password. |
void |
setAccountStatus(String accountStatus)
Sets the current status of the account - "A" (active), "D" (disabled), "I" (inactive) |
void |
setEmail(String email)
Sets the email address |
void |
setEmailValCode(String code)
Sets the code required for auth. via email |
void |
setLoginName(String loginName)
Sets the login name |
void |
setPassword(String password)
Sets the password |
void |
setPrimaryGroup(UserGroup group)
set the primary group of this user. |
void |
setRegComplete(boolean status)
Sets the extended registration complete flag - "Y" or "N" |
void |
setRegistrationDomain(String domain)
Sets the registration domain |
void |
setUid(int uid)
Sets the uid of the userinfo object |
void |
setUid(String uid)
Sets the uid of the userinfo object |
void |
setupFields()
Method to set up the fields for this database object. |
void |
setUserName(String name)
Sets the user name |
void |
update()
Update the user in the repository with modified properties |
| Methods inherited from class com.jcorporate.expresso.services.dbobj.SecurityDBObject |
overrideDataContext, setDataContext, setDBName |
| Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject |
canRequesterAdd, canRequesterDelete, canRequesterRead, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, deleteAll, getCharset, getDescription, getDescription, getRequestingUid, getString, getString, getString, getString, getString, getString, getSystemUid, getUser, instantiate, isAllowed, retrieve, search, searchAndRetrieveList, searchAndRetrieveList, setRequestingUid, setUser |
| Methods inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject |
buildWhereClause, buildWhereClauseBuffer, checkZeroUpdate, constructNewMetaData, createAndExecuteSearch, getConnectionPool, getCustomStringFieldValue, getDef, getDistinctFieldArrayList, getExecutor, getFieldsToRetrieveIterator, getJDBCMetaData, getJDBCUtil, getMappedDataContext, getMetaData, getQueryInterface, getSerialForm, loadFromConnection, makeLimitationStub, quoteIfNeeded, selectFieldString, setCaseSensitiveQuery, setDBConnectionPool, setMappedDataContext, setOriginalDBName |
| Methods inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject |
getStatus, setStatus |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jcorporate.expresso.core.security.UserInfo |
getDataContext, getDBName, getField, retrieve, setDBName |
| Field Detail |
public static final String thisClass
public static final String EXPUID
public static final String LOGIN
public static final String PASSWORD
public static final String EMAIL_ADDRESS
public static final String REGISTRATION_DOMAIN
public static final String ACCOUNT_STATUS
public static final String IS_REG_COMPLETE
public static final String CREATED_DATE
public static final String UPDATED_DATE
public static final String VALIDATION_CODE
public static final String FULL_NAME
public static final int FULL_NAME_LENGTH
public static final int EMAIL_ADDRESS_LENGTH
public static final int LOGIN_LENGTH
public static final int PASSWORD_LENGTH
public static final int VALIDATION_CODE_LENGTH
| Constructor Detail |
public DefaultUserInfo()
throws DBException
DBException
public DefaultUserInfo(int uid)
throws DBException
uid - The User ID of the owner object
DBException - upon error
public DefaultUserInfo(ControllerRequest request)
throws DBException
request - - The controller request handed to you by the framework.
DBException| Method Detail |
public void setUid(String uid)
throws DBException
uid - the user id to set
DBException - upon error
public void setUid(int uid)
throws DBException
setUid in interface UserInfouid - the user id to set
DBException - upon error
public void add()
throws DBException
add in interface UserInfoadd in class SecuredDBObjectDBException - upon error
protected void checkAllRefs()
throws DBException
checkAllRefs in class DBObjectDBException - If a referential integrity violation is found
public void delete()
throws DBException
delete in interface UserInfodelete in class SecuredDBObjectDBException - upon error
public String getAccountStatus()
throws DBException
getAccountStatus in interface UserInfoDBException - upon error
public Vector getAllUsers()
throws DBException
getAllUsers in interface UserInfoDBException - upon database error
public String getCreateDate()
throws DBException
getCreateDate in interface UserInfoDBException - upon error
public String getEmail()
throws DBException
getEmail in interface UserInfoDBException - upon error
public String getEmailAuthCode()
throws DBException
getEmailAuthCode in interface UserInfoDBException - upon error
public String getEmailValCode()
throws DBException
getEmailValCode in interface UserInfoDBException
public Vector getGroups()
throws DBException
getGroups in interface UserInfoDBException - upon database access error
public String getLoginName()
throws DBException
getLoginName in interface UserInfoDBException - If there is an error during the retrieval
public String getPassword()
throws DBException
UserInfo
getPassword in interface UserInfoDBException - If there is an error during the retrieval
public boolean getRegComplete()
throws DBException
UserInfo
getRegComplete in interface UserInfoDBException - If there is an error during the retrieval
public String getRegistrationDomain()
throws DBException
UserInfo
getRegistrationDomain in interface UserInfoDBException - If the underlying User implementation throws the same
public int getUid()
throws DBException
UserInfo
getUid in interface UserInfoDBException - If there is an error during the retrieval
public String getUpdateDate()
throws DBException
UserInfo
getUpdateDate in interface UserInfoDBException - If there is an error during the retrieval
public String getUserName()
throws DBException
getUserName in interface UserInfogetUserName in class SecuredDBObjectDBException - if the user name is invalid
public String getFullName()
throws DBException
DBException
public Vector getValidValues(String fieldName)
throws DBException
getValidValues in class DBObjectfieldName - The fieldname to retrieve the valid values for.
DBException - The exception description.
public Vector getValues()
throws DBException
LookupInterface
getValues in interface LookupInterfacegetValues in class DBObjectDBExceptionDBObject.getValidValues(java.lang.String)
public void notify(String subject,
String message)
throws DBException,
LogException
subject - Subject of the e-mailmessage - Message to send in body of e-mail
DBException - If the mail message cannot be sent
LogException
public boolean passwordEquals(String tryPassword)
throws DBException
passwordEquals in interface UserInfotryPassword - The value the user input for an attempted login.
DBException
public void postLogin()
throws DBException,
LogException
DBException
LogExceptionpublic String randomPassword()
public void sendAuthEmail()
throws DBException
sendAuthEmail in interface UserInfoDBException
public void sendFileTo(String subject,
String message,
Vector fileNames)
throws DBException,
LogException
subject - Subject of the e-mailmessage - Message to send in body of e-mailfileNames - of the files to attach
DBException - If the mail message cannot be sent
LogException
public void sendFollowUpEmail()
throws DBException
sendFollowUpEmail in interface UserInfoDBException - The exception description.
public void setAccountStatus(String accountStatus)
throws DBException
UserInfo
setAccountStatus in interface UserInfoaccountStatus - java.lang.String
DBException - If there is an error
public void setEmail(String email)
throws DBException
UserInfo
setEmail in interface UserInfoemail - java.lang.String
DBException - If there is an error
public void setEmailValCode(String code)
throws DBException
UserInfo
setEmailValCode in interface UserInfocode - java.lang.String
DBException - If there is an error
public void setLoginName(String loginName)
throws DBException
UserInfo
setLoginName in interface UserInfologinName - java.lang.String
DBException - If there is an error
public void setPassword(String password)
throws DBException
UserInfo
setPassword in interface UserInfopassword - java.lang.String
DBException - If there is an error
public void setRegComplete(boolean status)
throws DBException
UserInfo
setRegComplete in interface UserInfostatus - java.lang.String
DBException - If there is an error
public void setRegistrationDomain(String domain)
throws DBException
UserInfo
setRegistrationDomain in interface UserInfodomain - java.lang.String
DBException - If there is an errorRegistrationDomain
public void setupFields()
throws DBException
DBObject
setupFields in class DBObjectDBExceptionDBObject.setupFields()
public void setUserName(String name)
throws DBException
UserInfo
setUserName in interface UserInfoname - java.lang.String
DBException - If there is an error
public void update()
throws DBException
UserInfo
update in interface UserInfoupdate in class SecuredDBObjectDBException
public boolean find()
throws DBException
find in interface UserInfofind in class SecuredDBObjectDBException - if there's an error performing the find.
public String getPrimaryGroup()
throws DBException
getPrimaryGroup in interface UserInfoDBException - upon database access error
public static String getPrimaryGroup(UserInfo user)
throws DBException
user - The userInfo object to query
DBException - upon database access error
public void setPrimaryGroup(UserGroup group)
throws DBException
group - The UserGroup object to use.
DBException - upon database access error
|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||