|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectokapi.coreobjects.OkapiObject
okapi.coreobjects.OkapiUser
public class OkapiUser
A class representing a single user (student, TA, faculty, etc) in an OkapiSite. Does not contain methods for adding or removing users to an OkapiSite.
Field Summary | |
---|---|
static OkapiUser |
content_developerRoleUser
|
static OkapiUser |
course_administratorRoleUser
|
static OkapiUser |
graderRoleUser
|
static OkapiUser |
guestRoleUser
|
static OkapiUser |
help_desk_staffRoleUser
|
static OkapiUser |
instructorRoleUser
|
static OkapiUser |
learnerRoleUser
|
static OkapiUser |
managerRoleUser
|
static OkapiUser |
mentorRoleUser
|
static OkapiUser |
nobodyUser
|
static OkapiUser |
nullUser
|
static java.util.HashMap |
PERSONAL
Options constant for getAsXml methods indicating personal information only. |
static OkapiUser |
studentRoleUser
|
static OkapiUser |
superUser
Systemwide standard users for internal utility. |
static OkapiUser |
system_administratorRoleUser
|
static OkapiUser |
taRoleUser
|
Fields inherited from class okapi.coreobjects.OkapiObject |
---|
createdBy, createdDate, description, lastModifiedBy, lastModifiedDate, longName, name, objectID, status |
Constructor Summary | |
---|---|
OkapiUser()
Create a new empty User Object. |
|
OkapiUser(int userCode)
Return new User object with values for user with this userCode |
|
OkapiUser(java.lang.String username)
Return new User object for user with this username. |
Method Summary | |
---|---|
void |
addAddresses(java.lang.String type,
OkapiUserAddress address)
Add or update address of specified type. |
void |
addContactInfo(java.lang.String type,
OkapiUserContactInfo contactInfo)
Add or update contactInfo of specified type. |
static int |
cacheCheck()
Method cacheCheck |
static int |
cacheNameCheck()
Method cacheNameCheck |
boolean |
checkAuthorization(OkapiUser user,
OkapiOperation operation)
Checks to see if the specified user is authorized to perform the specified operation on this object. |
int |
compareTo(java.lang.Object o)
implement Comparable interface |
int |
compareTo(OkapiUser user)
Method compareTo |
int |
compareTo(java.lang.String o)
Method compareTo |
boolean |
equals(java.lang.Object o)
override Object equals method to compare two users |
java.util.Map |
getAddresses()
Return all addresses of this user. |
OkapiUserAddress |
getAddresses(java.lang.String type)
Return address of specified type for this user. |
java.lang.String |
getAffiliation()
Return the affiliation for this OkapiUser. |
java.lang.String |
getAsXml(java.util.Map options,
java.lang.String tag,
int indent)
Overrides the method in OkapiObject to add Content specific information. |
java.lang.Object |
getAttributeByKey(java.lang.Object key)
Return an attribute for this OkapiUser. |
java.util.Map |
getAttributes()
Return the attributes Hashtable for this OkapiUser. |
java.util.Map |
getContactInfo()
Return all contactInfo of this user. |
OkapiUserContactInfo |
getContactInfo(java.lang.String type)
Return contactInfo of specified type for this user. |
java.lang.String |
getEmail()
Return the email address for this OkapiUser. |
java.lang.String |
getFirstName()
Return the firstName for this OkapiUser. |
java.lang.String |
getFullName()
Return the fullName for this OkapiUser. |
java.lang.String |
getLastName()
Return the lastName for this OkapiUser. |
java.lang.String |
getLocalID()
Return the localID for this OkapiUser. |
java.lang.String |
getMiddleName()
Return the middleName for this OkapiUser. |
java.util.Map |
getNexuses()
Return the nexuses in which the User has a Role or Roles. |
java.lang.String |
getNickName()
Return the nickName for this OkapiUser. |
java.util.Properties |
getPreferenceProperties()
Return all preferenceProperties of this user. |
java.lang.String |
getPreferenceProperty(java.lang.String key)
Return specified preferenceProperties for this user. |
java.lang.String |
getPreferenceProperty(java.lang.String key,
java.lang.String defaultValue)
Return specified preferenceProperties for this user, or the defaultValue if no preference is set. |
OkapiSession |
getSession()
Method getSession |
static OkapiUser |
getUser(int userCode)
Get a user from the cache if cached, instantiate and add to cache if not. |
static OkapiUser |
getUser(java.lang.String username)
Get a user from the cache if cached, instantiate and add to cache if not. |
int |
getUserCode()
Return userCode of this user. |
java.lang.String |
getUserName()
Return the userName for this OkapiUser. |
int |
hashCode()
override hashCode to use the database table sequence number |
static OkapiUser |
lookupUserByEmail(java.lang.String email)
Return user with given email address, or null |
static java.util.List |
lookupUsers(java.lang.String nameQuery)
Return list of users matching query |
void |
refreshFromDB()
Refresh this object with the data currently stored in the DB. |
static OkapiUser |
refreshUser(java.lang.String username)
Refresh user in the cache if cached, instantiate and add to cache if not. |
void |
removeAddresses(java.lang.String type)
Remove address of specified type for this user. |
void |
removeContactInfo(java.lang.String type)
Remove contactInfo of specified type for this user. |
void |
resetAuthorization()
Method resetAuthorization |
protected java.util.List |
roleInNexus(java.lang.Integer nexusCode)
Return the User's Role(s) in the specified Nexus (by nexusCode). |
java.util.List |
roleInNexus(OkapiNexus nexus)
Return the User's Role(s) in the specified Nexus. |
void |
setAddresses(java.util.Map newAddresses)
Set all addresses for this user. |
void |
setAffiliation(java.lang.String affiliation)
Set the affiliation for this OkapiUser. |
void |
setAttribute(java.lang.Object key,
java.lang.Object value)
Set an attribute for this OkapiUser. |
void |
setContactInfo(java.util.Map newContactInfo)
Set all contactInfo for this user. |
void |
setDataSource(javax.sql.DataSource dataSource)
Set the dataSource to be used for data access. |
void |
setEmail(java.lang.String email)
Set the email address for this OkapiUser. |
void |
setFirstName(java.lang.String firstName)
Set the firstName for this OkapiUser. |
void |
setFullName(java.lang.String fullName)
Set the fullName for this OkapiUser. |
void |
setLastName(java.lang.String lastName)
Set the lastName for this OkapiUser. |
void |
setLocalID(java.lang.String localID)
Set the localID for this OkapiUser. |
void |
setMiddleName(java.lang.String middleName)
Set the middleName for this OkapiUser. |
void |
setNickName(java.lang.String nickName)
Set the nickName for this OkapiUser. |
void |
setPreferenceProperties(java.util.Properties newPreferenceProperties)
Set all preferenceProperties for this user. |
void |
setPreferenceProperty(java.lang.String key,
java.lang.String value)
Add or update specifed preferenceProperty for this user. |
void |
setStatus(int newStatus)
Method setStatus Status codes: 0 - normal, 10 - sponsored, 18 - sponsored but password not set, 19 - pending sponsored 9 - deleted 11 - Created from Touchstone |
void |
setUserCode(int userCode)
Set userCode for this user. |
void |
setUserName(java.lang.String userName)
Set the userName for this OkapiUser. |
void |
updateDB()
Update the database record for this object. |
Methods inherited from class okapi.coreobjects.OkapiObject |
---|
currentDateTimeOracle, getAsXml, getAsXml, getAsXml, getCreatedBy, getCreatedDate, getDescription, getLastModifiedBy, getLastModifiedDate, getLongName, getName, getObjectID, getStatus, isEncryptionRequired, setAuthorization, setCreatedBy, setCreatedDate, setDescription, setLastModifiedBy, setLastModifiedBy, setLastModifiedDate, setLongName, setName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static OkapiUser superUser
public static OkapiUser nobodyUser
public static OkapiUser nullUser
public static OkapiUser studentRoleUser
public static OkapiUser learnerRoleUser
public static OkapiUser instructorRoleUser
public static OkapiUser graderRoleUser
public static OkapiUser taRoleUser
public static OkapiUser course_administratorRoleUser
public static OkapiUser guestRoleUser
public static OkapiUser managerRoleUser
public static OkapiUser mentorRoleUser
public static OkapiUser content_developerRoleUser
public static OkapiUser system_administratorRoleUser
public static OkapiUser help_desk_staffRoleUser
public static final java.util.HashMap PERSONAL
Constructor Detail |
---|
public OkapiUser()
public OkapiUser(int userCode)
public OkapiUser(java.lang.String username)
Method Detail |
---|
public void resetAuthorization()
public static int cacheCheck()
public static int cacheNameCheck()
public static OkapiUser getUser(int userCode)
public static OkapiUser getUser(java.lang.String username)
public static OkapiUser refreshUser(java.lang.String username)
public static java.util.List lookupUsers(java.lang.String nameQuery)
public static OkapiUser lookupUserByEmail(java.lang.String email)
public java.lang.String getUserName()
public void setUserName(java.lang.String userName)
public java.lang.String getFullName()
public void setFullName(java.lang.String fullName)
public java.lang.String getFirstName()
public void setFirstName(java.lang.String firstName)
public java.lang.String getMiddleName()
public void setMiddleName(java.lang.String middleName)
public java.lang.String getLastName()
public void setLastName(java.lang.String lastName)
public java.lang.String getNickName()
public void setNickName(java.lang.String nickName)
public java.lang.String getAffiliation()
public void setAffiliation(java.lang.String affiliation)
public java.lang.String getLocalID()
public void setLocalID(java.lang.String localID)
public java.lang.String getEmail()
public void setEmail(java.lang.String email)
public java.util.Map getAttributes()
public void setAttribute(java.lang.Object key, java.lang.Object value)
public java.lang.Object getAttributeByKey(java.lang.Object key)
key
-
public void setUserCode(int userCode)
public int getUserCode()
public void setStatus(int newStatus)
setStatus
in class OkapiObject
newStatus
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void setPreferenceProperties(java.util.Properties newPreferenceProperties)
public java.util.Properties getPreferenceProperties()
public java.lang.String getPreferenceProperty(java.lang.String key)
public java.lang.String getPreferenceProperty(java.lang.String key, java.lang.String defaultValue)
public void setPreferenceProperty(java.lang.String key, java.lang.String value)
public void setContactInfo(java.util.Map newContactInfo)
public java.util.Map getContactInfo()
public OkapiUserContactInfo getContactInfo(java.lang.String type)
public void addContactInfo(java.lang.String type, OkapiUserContactInfo contactInfo)
public void removeContactInfo(java.lang.String type)
public void setAddresses(java.util.Map newAddresses)
public java.util.Map getAddresses()
public OkapiUserAddress getAddresses(java.lang.String type)
public void addAddresses(java.lang.String type, OkapiUserAddress address)
public void removeAddresses(java.lang.String type)
public OkapiSession getSession()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int compareTo(java.lang.String o)
o
-
public int compareTo(OkapiUser user)
user
-
public void updateDB()
updateDB
in class OkapiObject
public void refreshFromDB()
refreshFromDB
in class OkapiObject
public java.util.List roleInNexus(OkapiNexus nexus)
protected java.util.List roleInNexus(java.lang.Integer nexusCode)
public java.util.Map getNexuses()
public boolean checkAuthorization(OkapiUser user, OkapiOperation operation)
checkAuthorization
in class OkapiObject
public java.lang.String getAsXml(java.util.Map options, java.lang.String tag, int indent)
getAsXml
in class OkapiObject
public void setDataSource(javax.sql.DataSource dataSource)
dataSource
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |