Expresso 5-5-0

com.jcorporate.expresso.services.dbobj
Class DefaultUserInfo

java.lang.Object
  extended bycom.jcorporate.expresso.core.dataobjects.BaseDataObject
      extended bycom.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
          extended bycom.jcorporate.expresso.core.dbobj.DBObject
              extended bycom.jcorporate.expresso.core.dbobj.SecuredDBObject
                  extended bycom.jcorporate.expresso.services.dbobj.SecurityDBObject
                      extended bycom.jcorporate.expresso.services.dbobj.DefaultUserInfo
All Implemented Interfaces:
Cacheable, ContextNested, DataObject, LookupInterface, Securable, Serializable, UserInfo

public class DefaultUserInfo
extends SecurityDBObject
implements UserInfo

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
See Also:
Serialized Form

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.dbobj.DBObject
addCacheEventListener, addDetail, addField, addField, addFieldError, addFoundKeys, addIfNeeded, addIndex, addKey, addOrUpdate, addSortKey, addToCache, addTransition, addVirtualField, addVirtualField, addVirtualField, addVirtualField, allowsNull, average, basicAdd, checkAllReferredToBy, checkAllRefsPublic, checkDeleteDetailPerm, checkField, checkRef, checkRef, clear, clearDistinctFields, clearError, clearFieldsToRetrieve, clearSortKeys, containsWildCards, delete, deleteDetails, denotesRange, disableLogging, enableLogging, equals, forKey, formatDateTime, get, getAllAttributes, getAllDBFields, getAllFields, getAllFieldsIterator, getAllFieldsMap, getAllKeys, getAllKeysIterator, getAllKeysMap, getAttribute, getAttribute, getAttributesIterator, getBinaryField, getBooleanFieldValue, getCacheSize, getCacheStats, getCacheStatsMap, getCheckZeroUpdate, getCustomWhereClause, getDataContext, getDataField, getDataTransferObject, getDBName, getDefaultValue, getDetailFieldsForeign, getDetailFieldsLocal, getDetails, getDistinctFieldCount, getDistinctFieldList, getDistinctFields, getField, getFieldBigDecimal, getFieldBoolean, getFieldByte, getFieldData, getFieldDate, getFieldDecimalFormatted, getFieldDouble, getFieldErrorMessage, getFieldFloat, getFieldInt, getFieldList, getFieldListArray, getFieldListIterator, getFieldLong, getFieldMetaData, getFields, getFieldShort, getFieldsToRetrieveCount, getFilterClass, getFoundCount, getFoundKeys, getFoundKeysArray, getIndexArray, getISOValuesDefault, getISOValuesDefault, getISOValuesDefault, getKey, getKeyFieldList, getKeyFieldListArray, getKeyFieldListIterator, getLength, getLengthInt, getLimitationPosition, getLimitationSyntax, getLocalConnection, getLocale, getLookupObject, getMax, getMax, getMaxRecords, getMyKeys, getMyUpdates, getMyUpdatesArray, getName, getOffsetRecord, getOriginalDBName, getPatternMatcher, getPrecision, getRecordSet, getRecordSetArrayList, getSchema, getSerializedForm, getStringFilter, getTableName, getTargetTable, getThisDBbj, getThisDBObj, getTransitionsIterator, getType, getValidValueDescrip, getValidValuesList, getValuesDefault, getValuesDefault, getValuesDefault, hasError, hasErrors, hasField, hasIndex, haveAllKeys, initialize, isCached, isDateType, isDistinct, isEmpty, isField, isFieldDistinct, isFieldIgnoreCase, isFieldNull, isFieldsToRetrieve, isFieldToRetrieve, isMultiValued, isNumericType, isQuotedType, isReadOnly, isSecret, isVirtual, loadFromConnection, logChange, max, min, newInstance, noNewLine, noQuotes, notifyListeners, populateDefaultValues, referredToBy, removeAttribute, removeAttribute, removeFromCache, retrieveFromCache, saveBinaryField, saveBinaryField, search, set, setAttribute, setAttribute, setCacheSize, setCharset, setCheckZeroUpdate, setConnection, setConnection, setCustomWhereClause, setCustomWhereClause, setDataField, setDataTransferObject, setDefaultValue, setDescription, setField, setField, setField, setField, setField, setField, setField, setField, setField, setFieldData, setFieldDistinct, setFieldsToRetrieve, setFilterClass, setFilterClass, setKeys, setLocale, setLookupField, setLookupObject, setMask, setMaxRecords, setMultiValued, setName, setOffsetRecord, setReadOnly, setSchema, setSchema, setSecret, setSortKey, setStringFilter, setStringFiltersOnAll, setTargetTable, sqlAggrFunction, sum, toDebugString, update, verify
 
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

thisClass

public static final String thisClass
Debugging information value


EXPUID

public static final String EXPUID
Field name for the user id

See Also:
Constant Field Values

LOGIN

public static final String LOGIN
Field name for the login name

See Also:
Constant Field Values

PASSWORD

public static final String PASSWORD
Field name for the password

See Also:
Constant Field Values

EMAIL_ADDRESS

public static final String EMAIL_ADDRESS
Field name for user's email

See Also:
Constant Field Values

REGISTRATION_DOMAIN

public static final String REGISTRATION_DOMAIN
Field name for the registration domain id.

See Also:
Constant Field Values

ACCOUNT_STATUS

public static final String ACCOUNT_STATUS
Field name for account status

See Also:
Constant Field Values

IS_REG_COMPLETE

public static final String IS_REG_COMPLETE
Field name for registration complete flag

See Also:
Constant Field Values

CREATED_DATE

public static final String CREATED_DATE
Field name for created date

See Also:
Constant Field Values

UPDATED_DATE

public static final String UPDATED_DATE
Field name for updated date

See Also:
Constant Field Values

VALIDATION_CODE

public static final String VALIDATION_CODE
Field name for validation code

See Also:
Constant Field Values

FULL_NAME

public static final String FULL_NAME
Field name for full name.

See Also:
Constant Field Values

FULL_NAME_LENGTH

public static final int FULL_NAME_LENGTH
Full name field length

See Also:
Constant Field Values

EMAIL_ADDRESS_LENGTH

public static final int EMAIL_ADDRESS_LENGTH
Email address length

See Also:
Constant Field Values

LOGIN_LENGTH

public static final int LOGIN_LENGTH
Login name length

See Also:
Constant Field Values

PASSWORD_LENGTH

public static final int PASSWORD_LENGTH
Password name length

See Also:
Constant Field Values

VALIDATION_CODE_LENGTH

public static final int VALIDATION_CODE_LENGTH
Validation code length

See Also:
Constant Field Values
Constructor Detail

DefaultUserInfo

public DefaultUserInfo()
                throws DBException
Default constructor

Throws:
DBException

DefaultUserInfo

public DefaultUserInfo(int uid)
                throws DBException
Constructor with UID

Parameters:
uid - The User ID of the owner object
Throws:
DBException - upon error

DefaultUserInfo

public DefaultUserInfo(ControllerRequest request)
                throws DBException
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.
Throws:
DBException
Method Detail

setUid

public void setUid(String uid)
            throws DBException
Sets the uid of the userinfo object

Parameters:
uid - the user id to set
Throws:
DBException - upon error

setUid

public void setUid(int uid)
            throws DBException
Sets the uid of the userinfo object

Specified by:
setUid in interface UserInfo
Parameters:
uid - the user id to set
Throws:
DBException - upon error

add

public void add()
         throws DBException
Override of add to check for duplicate emails.

Specified by:
add in interface UserInfo
Overrides:
add in class SecuredDBObject
Throws:
DBException - upon error

checkAllRefs

protected void checkAllRefs()
                     throws DBException
Extends the checkAllRefs method to check for valid Registration Domain Id

Overrides:
checkAllRefs in class DBObject
Throws:
DBException - If a referential integrity violation is found

delete

public void delete()
            throws DBException
Override of deleteMethod() to notify UserListeners of deltion

Specified by:
delete in interface UserInfo
Overrides:
delete in class SecuredDBObject
Throws:
DBException - upon error

getAccountStatus

public String getAccountStatus()
                        throws DBException
Retrieve the account status of the user

Specified by:
getAccountStatus in interface UserInfo
Returns:
java.lang.String : one of the account status codes
Throws:
DBException - upon error

getAllUsers

public Vector getAllUsers()
                   throws DBException
Retrieve a list of all users... may get REALLY intensive!

Specified by:
getAllUsers in interface UserInfo
Returns:
Vector of UserInfo objects
Throws:
DBException - upon database error

getCreateDate

public String getCreateDate()
                     throws DBException
Get the account creation date

Specified by:
getCreateDate in interface UserInfo
Returns:
java.lang.String as a date formatted string
Throws:
DBException - upon error

getEmail

public String getEmail()
                throws DBException
Retrieve the email address of the account

Specified by:
getEmail in interface UserInfo
Returns:
java.lang.String
Throws:
DBException - upon error

getEmailAuthCode

public String getEmailAuthCode()
                        throws DBException
Create an email authorization code. Used anymore??

Specified by:
getEmailAuthCode in interface UserInfo
Returns:
java.lang.String
Throws:
DBException - upon error

getEmailValCode

public String getEmailValCode()
                       throws DBException
Retrieve the email validation code

Specified by:
getEmailValCode in interface UserInfo
Returns:
java.lang.String
Throws:
DBException

getGroups

public Vector getGroups()
                 throws DBException
Get the groups that below to this user

Specified by:
getGroups in interface UserInfo
Returns:
Vector of strings
Throws:
DBException - upon database access error

getLoginName

public String getLoginName()
                    throws DBException
get name used for login query that is accompanied by password

Specified by:
getLoginName in interface UserInfo
Returns:
java.lang.String
Throws:
DBException - If there is an error during the retrieval

getPassword

public String getPassword()
                   throws DBException
Description copied from interface: UserInfo
Returns the password for this user

Specified by:
getPassword in interface UserInfo
Returns:
java.lang.String
Throws:
DBException - If there is an error during the retrieval

getRegComplete

public boolean getRegComplete()
                       throws DBException
Description copied from interface: UserInfo
Returns the status of whether extended registration has been completed or not Valid values are "Y" or "N"

Specified by:
getRegComplete in interface UserInfo
Returns:
java.lang.String
Throws:
DBException - If there is an error during the retrieval

getRegistrationDomain

public String getRegistrationDomain()
                             throws DBException
Description copied from interface: UserInfo
Returns the unique integer for the registration domain that this user belongs to

Specified by:
getRegistrationDomain in interface UserInfo
Returns:
java.lang.String
Throws:
DBException - If the underlying User implementation throws the same

getUid

public int getUid()
           throws DBException
Description copied from interface: UserInfo
Returns the user id for this user

Specified by:
getUid in interface UserInfo
Returns:
java.lang.String
Throws:
DBException - If there is an error during the retrieval

getUpdateDate

public String getUpdateDate()
                     throws DBException
Description copied from interface: UserInfo
Returns the date that this UserInfo object was last modified

Specified by:
getUpdateDate in interface UserInfo
Returns:
java.lang.String
Throws:
DBException - If there is an error during the retrieval

getUserName

public String getUserName()
                   throws DBException
Deprecated. Since Expresso 5.5; use getFullName() instead to avoid confusion with login name

get descriptive, full name

Specified by:
getUserName in interface UserInfo
Overrides:
getUserName in class SecuredDBObject
Returns:
String: The user login name of the user accessing this object
Throws:
DBException - if the user name is invalid

getFullName

public String getFullName()
                   throws DBException
get descriptive, full name

Throws:
DBException

getValidValues

public Vector getValidValues(String fieldName)
                      throws DBException
Get the valid values for various fields on this data object

Overrides:
getValidValues in class DBObject
Parameters:
fieldName - The fieldname to retrieve the valid values for.
Returns:
a java.util.Vector of ValidValue objects
Throws:
DBException - The exception description.

getValues

public Vector getValues()
                 throws DBException
Description copied from interface: LookupInterface
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. It is strongly recommended that the valid value list be cached (via the CacheManager) for performance. The naming convention used in Expresso is to store the ValidValue list with a cache name the same as the db objects class name with ".validValues" appended

Specified by:
getValues in interface LookupInterface
Overrides:
getValues in class DBObject
Returns:
java.util.Vector of valid values
Throws:
DBException
See Also:
DBObject.getValidValues(java.lang.String)

notify

public void notify(String subject,
                   String message)
            throws DBException,
                   LogException
Send this user a notification via e-mail.

Parameters:
subject - Subject of the e-mail
message - Message to send in body of e-mail
Throws:
DBException - If the mail message cannot be sent
LogException

passwordEquals

public boolean passwordEquals(String tryPassword)
                       throws DBException
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.

Specified by:
passwordEquals in interface UserInfo
Parameters:
tryPassword - The value the user input for an attempted login.
Returns:
true if the password equals
Throws:
DBException

postLogin

public void postLogin()
               throws DBException,
                      LogException
Called by the various objects that can log in a user to do post-login tasks

Throws:
DBException
LogException

randomPassword

public String randomPassword()
Returns:
a random generated password

sendAuthEmail

public void sendAuthEmail()
                   throws DBException
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.

Specified by:
sendAuthEmail in interface UserInfo
Throws:
DBException

sendFileTo

public void sendFileTo(String subject,
                       String message,
                       Vector fileNames)
                throws DBException,
                       LogException
Send this user an e-mail with file attachments.

Parameters:
subject - Subject of the e-mail
message - Message to send in body of e-mail
fileNames - of the files to attach
Throws:
DBException - If the mail message cannot be sent
LogException

sendFollowUpEmail

public void sendFollowUpEmail()
                       throws DBException
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.

Specified by:
sendFollowUpEmail in interface UserInfo
Throws:
DBException - The exception description.

setAccountStatus

public void setAccountStatus(String accountStatus)
                      throws DBException
Description copied from interface: UserInfo
Sets the current status of the account - "A" (active), "D" (disabled), "I" (inactive)

Specified by:
setAccountStatus in interface UserInfo
Parameters:
accountStatus - java.lang.String
Throws:
DBException - If there is an error

setEmail

public void setEmail(String email)
              throws DBException
Description copied from interface: UserInfo
Sets the email address

Specified by:
setEmail in interface UserInfo
Parameters:
email - java.lang.String
Throws:
DBException - If there is an error

setEmailValCode

public void setEmailValCode(String code)
                     throws DBException
Description copied from interface: UserInfo
Sets the code required for auth. via email

Specified by:
setEmailValCode in interface UserInfo
Parameters:
code - java.lang.String
Throws:
DBException - If there is an error

setLoginName

public void setLoginName(String loginName)
                  throws DBException
Description copied from interface: UserInfo
Sets the login name

Specified by:
setLoginName in interface UserInfo
Parameters:
loginName - java.lang.String
Throws:
DBException - If there is an error

setPassword

public void setPassword(String password)
                 throws DBException
Description copied from interface: UserInfo
Sets the password

Specified by:
setPassword in interface UserInfo
Parameters:
password - java.lang.String
Throws:
DBException - If there is an error

setRegComplete

public void setRegComplete(boolean status)
                    throws DBException
Description copied from interface: UserInfo
Sets the extended registration complete flag - "Y" or "N"

Specified by:
setRegComplete in interface UserInfo
Parameters:
status - java.lang.String
Throws:
DBException - If there is an error

setRegistrationDomain

public void setRegistrationDomain(String domain)
                           throws DBException
Description copied from interface: UserInfo
Sets the registration domain

Specified by:
setRegistrationDomain in interface UserInfo
Parameters:
domain - java.lang.String
Throws:
DBException - If there is an error
See Also:
RegistrationDomain

setupFields

public void setupFields()
                 throws DBException
Description copied from class: DBObject
Method to set up the fields for this database object. This method should be defined in the implementing object and should make calls to addField, addKey, setMultiValued, etc. as required to define the content of the DBObject. Each setupFields method should call "super.setupFields()" so that field definitions can be "inheritcable"

Overrides:
setupFields in class DBObject
Throws:
DBException
See Also:
DBObject.setupFields()

setUserName

public void setUserName(String name)
                 throws DBException
Description copied from interface: UserInfo
Sets the user name

Specified by:
setUserName in interface UserInfo
Parameters:
name - java.lang.String
Throws:
DBException - If there is an error

update

public void update()
            throws DBException
Description copied from interface: UserInfo
Update the user in the repository with modified properties

Specified by:
update in interface UserInfo
Overrides:
update in class SecuredDBObject
Throws:
DBException

find

public boolean find()
             throws DBException
Override to provide better access. We store recently used LoginName/uid mapping pairs into a LRU hashmap. If we find the appropriate uid, then we map the uid that way and perform a retrieve() so we can utilize the cache instead.

Specified by:
find in interface UserInfo
Overrides:
find in class SecuredDBObject
Returns:
true if successfully found the object
Throws:
DBException - if there's an error performing the find.

getPrimaryGroup

public String getPrimaryGroup()
                       throws DBException
the primary group of this user is appropriate for unix-like purposes, such as setting the group for a file permission

Specified by:
getPrimaryGroup in interface UserInfo
Returns:
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
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
Returns:
name of the primary group of this user; null if no group is primary
Throws:
DBException - upon database access error

setPrimaryGroup

public void setPrimaryGroup(UserGroup group)
                     throws DBException
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

Expresso 5-5-0

Please see www.jcorporate.com for information about new Expresso releases.