| |
|
| com.jcorporate.expresso.core.dbobj.SecuredDBObject com.jcorporate.expresso.services.dbobj.SecurityDBObject com.jcorporate.expresso.services.dbobj.DefaultUserInfo
DefaultUserInfo | public class DefaultUserInfo extends SecurityDBObject implements UserInfo(Code) | | Default implementation of the UserInfo object. This is the class that comes
for managing users and security with Expresso.
author: Michael Nash, adapted Larry Hamel, CodeGuild |
ACCOUNT_STATUS | final public static String ACCOUNT_STATUS(Code) | | Field name for account status
|
CREATED_DATE | final public static String CREATED_DATE(Code) | | Field name for created date
|
EMAIL_ADDRESS | final public static String EMAIL_ADDRESS(Code) | | Field name for user's email
|
EMAIL_ADDRESS_LENGTH | final public static int EMAIL_ADDRESS_LENGTH(Code) | | Email address length
|
EXPUID | final public static String EXPUID(Code) | | Field name for the user id
|
FULL_NAME | final public static String FULL_NAME(Code) | | Field name for full name.
|
FULL_NAME_LENGTH | final public static int FULL_NAME_LENGTH(Code) | | Full name field length
|
IS_REG_COMPLETE | final public static String IS_REG_COMPLETE(Code) | | Field name for registration complete flag
|
LOGIN | final public static String LOGIN(Code) | | Field name for the login name
|
LOGIN_LENGTH | final public static int LOGIN_LENGTH(Code) | | Login name length
|
NAME_2_ID_CACHE_NAME | final public static String NAME_2_ID_CACHE_NAME(Code) | | |
PASSWORD | final public static String PASSWORD(Code) | | Field name for the password
|
PASSWORD_LENGTH | final public static int PASSWORD_LENGTH(Code) | | Password name length
|
REGISTRATION_DOMAIN | final public static String REGISTRATION_DOMAIN(Code) | | Field name for the registration domain id.
|
THIS_CLASS | final public static String THIS_CLASS(Code) | | Debugging information value
|
UPDATED_DATE | final public static String UPDATED_DATE(Code) | | Field name for updated date
|
VALIDATION_CODE | final public static String VALIDATION_CODE(Code) | | Field name for validation code
|
VALIDATION_CODE_LENGTH | final public static int VALIDATION_CODE_LENGTH(Code) | | Validation code length
|
DefaultUserInfo | public DefaultUserInfo(int uid) throws DBException(Code) | | Constructor with UID
Parameters: uid - The User ID of the owner object throws: DBException - upon error |
DefaultUserInfo | public DefaultUserInfo(DBConnection localConnection) throws DBException(Code) | | constructor for db transactions
Parameters: localConnection - the DB connection which should be used, typically because of an ongoing transaction |
DefaultUserInfo | public DefaultUserInfo(ControllerRequest request) throws DBException(Code) | | For using DBObjects within Controllers. Initializes based upon the current
user and the requested db. [Of course this can be modified later]
Parameters: request - - The controller request handed to you by the framework. |
checkAllRefs | protected void checkAllRefs() throws DBException(Code) | | Extends the checkAllRefs method to check for valid Registration Domain Id
throws: DBException - If a referential integrity violation is found |
delete | public void delete() throws DBException(Code) | | Override of deleteMethod() to notify UserListeners of deltion
throws: DBException - upon error |
find | public boolean find() throws com.jcorporate.expresso.core.db.DBException(Code) | | Override to provide better performance. We cache recently used LoginNames
into a cache. If we find the appropriate loginname, then
we map the uid so that subsequent find() will perform a retrieve() so we can utilize the
cache instead.
true if successfully found the object throws: DBException - if there's an error performing the find. |
getAccountStatus | public String getAccountStatus() throws DBException(Code) | | Retrieve the account status of the user
java.lang.String : one of the account status codes throws: DBException - upon error |
getAllUsers | public Vector getAllUsers() throws DBException(Code) | | Retrieve a list of all users... may get REALLY intensive!
Vector of UserInfo objects throws: DBException - upon database error |
getCreateDate | public String getCreateDate() throws DBException(Code) | | Get the account creation date
java.lang.String as a date formatted string throws: DBException - upon error |
getEmailAuthCode | public String getEmailAuthCode() throws DBException(Code) | | Create an email authorization code. Used anymore??
java.lang.String throws: DBException - upon error |
getEmailValCode | public String getEmailValCode() throws DBException(Code) | | Retrieve the email validation code
java.lang.String |
getFullName | public String getFullName() throws DBException(Code) | | get descriptive, full name (first + last names) of person
|
getLoginName | public String getLoginName() throws DBException(Code) | | get name used for login query that is accompanied by password
|
getPrimaryGroup | public String getPrimaryGroup() throws DBException(Code) | | the primary group of this user is appropriate for unix-like purposes,
such as setting the group for a file permission
name of the primary group of this user; null if no group is found throws: DBException - upon database access error |
getPrimaryGroup | public static String getPrimaryGroup(UserInfo user) throws DBException(Code) | | the primary group of this user is appropriate for unix-like purposes,
such as setting the group for a file permission
Parameters: user - The userInfo object to query name of the primary group of this user; null if no group is primary throws: DBException - upon database access error |
hashEncodePassword | public String hashEncodePassword(String plaintext) throws DBException(Code) | | hashEncodePassword: If passed a plaintext string > 0 bytes, then this
function will SHA1 hash the password, then Base64 encode it and return it
as a string.
If the password is zero length, then it will simply return a zero length
string also.
Parameters: plaintext - - the password to process in this manner: returnValue = Base64(SHA-1(plaintext)) a String representing a Base64 encoded Hashed Password |
notify | public void notify(String subject, String message) throws DBException, LogException(Code) | | Send this user a notification via e-mail.
Parameters: subject - Subject of the e-mail Parameters: message - Message to send in body of e-mail throws: DBException - If the mail message cannot be sent |
passwordEquals | public boolean passwordEquals(String tryPassword) throws DBException(Code) | | passwordEquals - feed it a password and it will tell you if the hash of it
matches the one on file.
Also, for backwards compatability and some other issues, this function
will also accept a plaintext version of the password if it is sitting in
the database. However, if a plaintext match is encountered, then it will
hash the password and re-write itself to the database record.
Parameters: tryPassword - The value the user input for an attempted login. true if the password equals |
postLogin | public void postLogin() throws DBException, LogException(Code) | | Called by the various objects that can log in a user
to do post-login tasks
|
randomPassword | public String randomPassword()(Code) | | a random generated password |
sendAuthEmail | public void sendAuthEmail() throws DBException(Code) | | Sends an Authorization Email to a new User.
The user must click on the link encoded in this email before
his account will be activated.
|
sendFileTo | public void sendFileTo(String subject, String message, Vector fileNames) throws DBException, LogException(Code) | | Send this user an e-mail with file attachments.
Parameters: subject - Subject of the e-mail Parameters: message - Message to send in body of e-mail Parameters: fileNames - of the files to attach throws: DBException - If the mail message cannot be sent |
sendFollowUpEmail | public void sendFollowUpEmail() throws DBException(Code) | | Once a user has validated his email address through the email validation
servlet, the user will receive this message giving previously requested
username/password.
Creation date: (8/8/00 11:44:26 PM)
author Adam Rossi, PlatinumSolutions, Inc.
throws: com.jcorporate.expresso.core.db.DBException - The exception description. |
setPrimaryGroup | public void setPrimaryGroup(UserGroup group) throws DBException(Code) | | set the primary group of this user. primary group is appropriate for
unix-like purposes, such as setting the group for a file permission
Parameters: group - The UserGroup object to use. throws: DBException - upon database access error |
setUid | public void setUid(int uid) throws DBException(Code) | | Sets the uid of the userinfo object
Parameters: uid - the user id to set throws: DBException - upon error |
update | public void update() throws DBException(Code) | | Override of add to check for duplicate emails, and handle empty fields
throws: DBException - upon error |
Methods inherited from com.jcorporate.expresso.core.dbobj.SecuredDBObject | public void add() throws DBException(Code)(Java Doc) public boolean canRequesterAdd() throws DBException(Code)(Java Doc) public boolean canRequesterDelete() throws DBException(Code)(Java Doc) public boolean canRequesterRead() throws DBException(Code)(Java Doc) public boolean canRequesterUpdate() throws DBException(Code)(Java Doc) public boolean checkAllowed(String requestedFunction) throws DBException(Code)(Java Doc) public void copyAttributes(DBObject returnObj) throws DBException(Code)(Java Doc) public synchronized int count() throws com.jcorporate.expresso.core.db.DBException(Code)(Java Doc) protected synchronized void createSecurityCache() throws CacheException(Code)(Java Doc) public void delete() throws DBException(Code)(Java Doc) public synchronized void deleteAll() throws com.jcorporate.expresso.core.db.DBException(Code)(Java Doc) public boolean find() throws DBException(Code)(Java Doc) public int getRequestingUid()(Code)(Java Doc) protected String getString(String stringCode, Object[] args) throws DBException(Code)(Java Doc) protected String getString(String stringCode) throws DBException(Code)(Java Doc) protected String getString(String stringCode, String arg1) throws DBException(Code)(Java Doc) protected String getString(String stringCode, String arg1, String arg2) throws DBException(Code)(Java Doc) protected String getString(String stringCode, String arg1, String arg2, String arg3) throws DBException(Code)(Java Doc) protected String getString(String stringCode, String arg1, String arg2, String arg3, String arg4) throws DBException(Code)(Java Doc) public int getSystemUid()(Code)(Java Doc) public static SecuredDBObject instantiate(String className) throws DBException(Code)(Java Doc) public void isAllowed(String requestedFunction) throws SecurityException, DBException(Code)(Java Doc) public void retrieve() throws DBException(Code)(Java Doc) public synchronized void search() throws DBException(Code)(Java Doc) public synchronized ArrayList searchAndRetrieveList() throws DBException(Code)(Java Doc) public synchronized ArrayList searchAndRetrieveList(String sortKeys) throws DBException(Code)(Java Doc) public void setRequestingUid(int newUid)(Code)(Java Doc) public void update() throws DBException(Code)(Java Doc)
|
|
|
|