blackboard.data.user
Class User

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.user.UserInfo
          extended by blackboard.data.user.User
All Implemented Interfaces:
Available, IBbObject, Identifiable, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Person

public class User
extends UserInfo
implements Available

The User class is a representation of a user within the Bb Course Management System.

Since:
Bb 5.5
See Also:
Serialized Form

Nested Class Summary
static class User.EducationLevel
          Enumeration to capture standard education level.
static class User.Gender
          Enumeration for reflecting user's gender
static class User.InstRole
          Deprecated. Since 6.3.
static class User.SystemRole
          An enumeration for System Roles assigned to users in the system.
 
Field Summary
protected  AttributePermission _getAuthInfo
           
protected  AttributePermission _getCardNumber
           
protected  AttributePermission _setAuthInfo
           
protected  AttributePermission _setCardNumber
           
static DataType DATA_TYPE
          Object data type constant, used in finding loaders and persisters
static java.lang.String USER_NAME_BAD_CHARS_LIST
           
 
Fields inherited from class blackboard.data.user.UserInfo
_getPersonalInfo, _setPersonalInfo
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Constructor Summary
User()
          Creates an instance of User with default property values.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getBatchUid()
          Returns the batch uid associated with this User.
 java.util.Calendar getBirthDate()
          Returns the birth date of this User.
 java.lang.String getCardNumber()
          Returns a String representing the encrypted BbCard number for this User.
 java.lang.String getCDRomDriveMac()
          Returns the CDRomDriveMac of this User object.
 java.lang.String getCDRomDrivePC()
          Returns the CDRomDrivePC of this User object.
 Id getDataSourceId()
          Returns the data source Id of this User.
 DataType getDataType()
          Returns the DataType identifier for this object.
 User.EducationLevel getEducationLevel()
          Returns the education level of this User object Requires AttributePermission with name "user.personalinfo", actions "get".
 User.Gender getGender()
          Returns the gender of this User object.
 User.InstRole getInstitutionRole()
          Deprecated. Since 6.3. Use getPortalRoleId() instead
 boolean getIsAvailable()
          Returns the availability flag for this User.
 boolean getIsInfoPublic()
          Returns the is info public flag for this User.
 java.util.Calendar getLastLoginDate()
          Returns the last login date of this User.
 java.lang.String getLocale()
          Returns the locale of this User object.
 java.lang.String getPassword()
          Returns the password of this User object.
 PortalRole getPortalRole()
          Returns the PortalRole object, representing the primary institution role associated with this User.
 Id getPortalRoleId()
          Returns the primary institution role Id of this User.
 blackboard.data.registry.Registry getRegistry()
          Returns the Registry associated with this User.
 java.lang.String getSettings()
          Returns the settings of this User object.
 boolean getShowAddContactInfo()
          Returns the show additional contact info flag for this User.
 boolean getShowAddressInfo()
          Returns the show address info flag for this User.
 boolean getShowEmailInfo()
          Returns the show email flag for this User.
 boolean getShowWorkInfo()
          Returns the show work info flag for this User.
 java.lang.String getStudentId()
          Returns the student id of this User object Requires AttributePermission with name "user.personalinfo", actions "get".
 User.SystemRole getSystemRole()
          Returns the system role (the administrative user role in the gui) for this User.
 java.lang.String getSystemRoleIdentifier()
          Returns the system role identifier (the administrative user role in the gui) for this User.
 java.lang.String getUserName()
          Returns the username of this User object.
 int hashCode()
           
 boolean isGuest()
          Indicates that this user is the unregistered guest account.
 void setBatchUid(java.lang.String strBatchUid)
          Sets the batch uid associated with this User.
 void setBirthDate(java.util.Calendar cBirthDate)
          Sets the birth date for this User.
 void setCardNumber(java.lang.String cardNumber)
          Sets the String representing the encrypted BbCard number for this User.
 void setCDRomDriveMac(java.lang.String strCDRomDriveMac)
          Sets the CDRomDriveMac value for this User object.
 void setCDRomDrivePC(java.lang.String strCDRomDrivePC)
          Sets the drive in which offline course content is stored for this User.
 void setDataSourceId(Id iDataSourceId)
          Sets the data source Id value for this User.
 void setEducationLevel(User.EducationLevel eEducationLevel)
          Sets the education level value for this User object Requires AttributePermission with name "user.personalinfo", actions "set".
 void setGender(User.Gender eGender)
          Sets the gender value for this User object.
 void setInstitutionRole(User.InstRole eInstRole)
          Deprecated. Since 6.3. Use setPortalRoleId(Id portalRoleId) instead
 void setIsAvailable(boolean bIsAvailable)
          Sets the availability flag for this User.
 void setIsInfoPublic(boolean bIsInfoPublic)
          Sets the is info public flag for this User.
 void setLastLoginDate(java.util.Calendar cLastLoginDate)
          Sets the last login date for this User.
 void setLocale(java.lang.String strLocale)
          Sets the locale value for this User object.
 void setPassword(java.lang.String strPassword)
          Sets the password value for this User object.
 void setPortalRole(PortalRole role)
          Sets the PortalRole object, representing the primary institution role associated with this User.
 void setPortalRoleId(Id iPortalRoleId)
          Sets the primary institution role Id value for this User.
 void setRegistry(blackboard.data.registry.Registry reg)
          Sets the Registry associated with this User.
 void setSettings(java.lang.String strSettings)
          Sets the settings value for this User object.
 void setShowAddContactInfo(boolean bShowAddContactInfo)
          Sets the show additional contact infor flag for this User.
 void setShowAddressInfo(boolean bShowAddressInfo)
          Sets the show address info flag for this User.
 void setShowEmailInfo(boolean bShowEmailInfo)
          Sets the show email flag for this User.
 void setShowWorkInfo(boolean bShowWorkInfo)
          Sets the availability flag for this User.
 void setStudentId(java.lang.String strStudentId)
          Sets the student id value for this User object.
 void setSystemRole(User.SystemRole eSystemRole)
          Sets the system role (the administrative user role in the gui) for this User.
 void setSystemRoleIdentifier(java.lang.String identifier)
          Sets the system role (the administrative user role in the gui) for this User.
 void setUserName(java.lang.String strUserName)
          Sets the username value for this User object.
 void validate()
          Validates the contents of this User.
 
Methods inherited from class blackboard.data.user.UserInfo
getBusinessFax, getBusinessPhone1, getBusinessPhone2, getCity, getCompany, getCountry, getDepartment, getEmailAddress, getFamilyName, getGivenName, getHomeFax, getHomePhone1, getHomePhone2, getJobTitle, getMiddleName, getMobilePhone, getOtherName, getState, getStreet1, getStreet2, getSuffix, getTitle, getWebPage, getZipCode, setBusinessFax, setBusinessPhone1, setBusinessPhone2, setCity, setCompany, setCountry, setDepartment, setEmailAddress, setFamilyName, setGivenName, setHomeFax, setHomePhone1, setHomePhone2, setJobTitle, setMiddleName, setMobilePhone, setOtherName, setState, setStreet1, setStreet2, setSuffix, setTitle, setWebPage, setZipCode
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, getModifiedDate, matches, persist, setCreatedDate, setId, setModifiedDate, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_TYPE

public static final DataType DATA_TYPE
Object data type constant, used in finding loaders and persisters


USER_NAME_BAD_CHARS_LIST

public static final java.lang.String USER_NAME_BAD_CHARS_LIST
See Also:
Constant Field Values

_getAuthInfo

protected AttributePermission _getAuthInfo

_setAuthInfo

protected AttributePermission _setAuthInfo

_getCardNumber

protected AttributePermission _getCardNumber

_setCardNumber

protected AttributePermission _setCardNumber
Constructor Detail

User

public User()
Creates an instance of User with default property values.

Method Detail

getDataSourceId

public Id getDataSourceId()
Returns the data source Id of this User. Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
data source Id value for this user

setDataSourceId

public void setDataSourceId(Id iDataSourceId)
Sets the data source Id value for this User. Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
iDataSourceId - a data source Id value to use for this user

getInstitutionRole

@Deprecated
public User.InstRole getInstitutionRole()
Deprecated. Since 6.3. Use getPortalRoleId() instead

Returns the institution role (the portal role in the gui) for this User. Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a role value as defined in User.InstRole
See Also:
User.InstRole

setInstitutionRole

@Deprecated
public void setInstitutionRole(User.InstRole eInstRole)
Deprecated. Since 6.3. Use setPortalRoleId(Id portalRoleId) instead

Sets the institution role (the portal role in the gui) for this User. Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
eInstRole - a valid role value as defined in User.InstRole
See Also:
User.InstRole

getPortalRoleId

public Id getPortalRoleId()
Returns the primary institution role Id of this User. Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
PortalRole Id value for this user

setPortalRoleId

public void setPortalRoleId(Id iPortalRoleId)
Sets the primary institution role Id value for this User. Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
iPortalRoleId - a PortalRole Id value to use for this user

getBatchUid

public java.lang.String getBatchUid()
Returns the batch uid associated with this User. The batch uid value is used by the integration component to uniquely mark records for automatic updating/processing through the bridge. Requires AttributePermission with name "user.personalinfo", actions "read".

Returns:
the batch uid value of this User as a String

setBatchUid

public void setBatchUid(java.lang.String strBatchUid)
Sets the batch uid associated with this User. Setting this value is not necessary when creating a User for persisting to the database since either the database persister or the database will set this value. Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
strBatchUid - a String containing the batch uid for this User

getUserName

public java.lang.String getUserName()
Returns the username of this User object. Code that calls this method must have AttributePermission with name "user.authinfo", actions "read".

Returns:
a String representing the username of this user

setUserName

public void setUserName(java.lang.String strUserName)
Sets the username value for this User object. Username values are case-insensitive and always stored in lowercase form. If the provided username is not all lowercase, it will be made so upon setting within this object.

Parameters:
strUserName - a String with the username for this user

getPassword

public java.lang.String getPassword()
Returns the password of this User object. Code that calls this method must have AttributePermission with name "user.authinfo", actions "get". Note that the password will be an MD5 hash; if external authentication is used, this value will not reflect the actual password.

Returns:
a String representing the password of this user

setPassword

public void setPassword(java.lang.String strPassword)
Sets the password value for this User object. Code that calls this method must have AttributePermission with name "user.authinfo", actions "set". The password should be MD5 hashed. This can be done by using SecurityUtil.getHashValue().

Parameters:
strPassword - a String with the password for this user

getIsInfoPublic

public boolean getIsInfoPublic()
Returns the is info public flag for this User. This value is used to determine whether or not user contact information should be displayed within the user directory or other places where lists of users are displayed. This particular flag acts as a master switch for the show methods within User ( getShowWorkInfo(), getShowEmailInfo(), etc.). If this value is true then the show methods control the granularity of the information displayed. If this value is false, then no information will be displayed regardless of the values for the show methods.

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a boolean denoting whether this user's information is public

setIsInfoPublic

public void setIsInfoPublic(boolean bIsInfoPublic)
Sets the is info public flag for this User. This value is used to determine whether or not user contact information should be displayed within the user directory or other places where lists of users are displayed. This particular flag acts as a master switch for the show methods within User ( getShowWorkInfo(), getShowEmailInfo(), etc.). If this value is true then the show methods control the granularity of the information displayed. If this value is false, then no information will be displayed regardless of the values for the show methods.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
bIsInfoPublic - true if this user's informaiton is public, false otherwise.

getShowWorkInfo

public boolean getShowWorkInfo()
Returns the show work info flag for this User. This flag controls whether work related information (company, job title, work phone, work fax) are displayed within the user directory or other places where lists of users are displayed. The setting of this value has no effect if the is info public flag is set to false (see getIsInfoPublic()).

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a boolean denoting whether this user's work info should displayed

setShowWorkInfo

public void setShowWorkInfo(boolean bShowWorkInfo)
Sets the availability flag for this User. This flag controls whether work related information (company, job title, work phone, work fax) are displayed within the user directory or other places where lists of users are displayed. The setting of this value has no effect if the is info public flag is set to false (see getIsInfoPublic()).

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
bShowWorkInfo - true if this user's work information should be displayed, false otherwise.

getShowEmailInfo

public boolean getShowEmailInfo()
Returns the show email flag for this User. This flag controls whether the user's email address is displayed within the user directory or other places where lists of users are displayed. The setting of this value has no effect if the is info public flag is set to false (see getIsInfoPublic()).

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a boolean denoting whether this user's email address should displayed

setShowEmailInfo

public void setShowEmailInfo(boolean bShowEmailInfo)
Sets the show email flag for this User. This flag controls whether the user's email address is displayed within the user directory or other places where lists of users are displayed. The setting of this value has no effect if the is info public flag is set to false (see getIsInfoPublic()).

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
bShowEmailInfo - true if this user's email address should be displayed, false otherwise.

getShowAddressInfo

public boolean getShowAddressInfo()
Returns the show address info flag for this User. This flag controls whether address information (street, city, state, zip code, country) are displayed within the user directory or other places where lists of users are displayed. The setting of this value has no effect if the is info public flag is set to false (see getIsInfoPublic()).

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a boolean denoting whether this user's address info should displayed

setShowAddressInfo

public void setShowAddressInfo(boolean bShowAddressInfo)
Sets the show address info flag for this User. This flag controls whether address information (street, city, state, zip code, country) are displayed within the user directory or other places where lists of users are displayed. The setting of this value has no effect if the is info public flag is set to false (see getIsInfoPublic()).

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
bShowAddressInfo - true if this user's address information should be displayed, false otherwise.

getShowAddContactInfo

public boolean getShowAddContactInfo()
Returns the show additional contact info flag for this User. This flag controls whether additional contact information (home phone, work phone, web site address) are displayed within the user directory or other places where lists of users are displayed. The setting of this value has no effect if the is info public flag is set to false (see getIsInfoPublic()).

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a boolean denoting whether this user's additional contact info should displayed

setShowAddContactInfo

public void setShowAddContactInfo(boolean bShowAddContactInfo)
Sets the show additional contact infor flag for this User. This flag controls whether additional contact information (home phone, work phone, web site address) are displayed within the user directory or other places where lists of users are displayed. The setting of this value has no effect if the is info public flag is set to false (see getIsInfoPublic()).

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
bShowAddContactInfo - true if this user's additional contact information should be displayed, false otherwise.

getIsAvailable

public boolean getIsAvailable()
Returns the availability flag for this User.

Requires AttributePermission with name "user.personalinfo", actions "get".

Specified by:
getIsAvailable in interface Available
Returns:
a boolean denoted whether this user is available

setIsAvailable

public void setIsAvailable(boolean bIsAvailable)
Sets the availability flag for this User.

Requires AttributePermission with name "user.personalinfo", actions "set".

Specified by:
setIsAvailable in interface Available
Parameters:
bIsAvailable - true if this user is to be made available, false otherwise.

getSystemRole

public User.SystemRole getSystemRole()
Returns the system role (the administrative user role in the gui) for this User.

Requires AttributePermission with name "user.personalinfo", actions "set".

Returns:
a role value as defined in User.SystemRole
See Also:
User.SystemRole

setSystemRole

public void setSystemRole(User.SystemRole eSystemRole)
Sets the system role (the administrative user role in the gui) for this User.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
eSystemRole - a valid role value as defined in User.SystemRole
See Also:
User.SystemRole

getSystemRoleIdentifier

public java.lang.String getSystemRoleIdentifier()
Returns the system role identifier (the administrative user role in the gui) for this User.

Requires AttributePermission with name "user.personalinfo", actions "set".

Returns:
a role identifier as a String

setSystemRoleIdentifier

public void setSystemRoleIdentifier(java.lang.String identifier)
Sets the system role (the administrative user role in the gui) for this User.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
identifier - a valid role value as defined in User.SystemRole
See Also:
User.SystemRole

getGender

public User.Gender getGender()
Returns the gender of this User object.

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a gender value as defined in User.Gender
See Also:
User.Gender

setGender

public void setGender(User.Gender eGender)
Sets the gender value for this User object.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
eGender - a valid gender value as defined in User.Gender
See Also:
User.Gender

getEducationLevel

public User.EducationLevel getEducationLevel()
Returns the education level of this User object

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
an education level value as defined in User.EducationLevel
See Also:
User.EducationLevel

setEducationLevel

public void setEducationLevel(User.EducationLevel eEducationLevel)
Sets the education level value for this User object

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
eEducationLevel - a valid education level value as defined in User.EducationLevel
See Also:
User.EducationLevel

getBirthDate

public java.util.Calendar getBirthDate()
Returns the birth date of this User.

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a Calendar representing the birth date of this user

setBirthDate

public void setBirthDate(java.util.Calendar cBirthDate)
Sets the birth date for this User.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
cBirthDate - a Calendar to use for the birth date of this user

getLastLoginDate

public java.util.Calendar getLastLoginDate()
Returns the last login date of this User.

Requires AttributePermission with name "user.authinfo", actions "get".

Returns:
a Calendar representing the last login date of this user

setLastLoginDate

public void setLastLoginDate(java.util.Calendar cLastLoginDate)
Sets the last login date for this User.

Requires AttributePermission with name "user.authinfo", actions "set".

Parameters:
cLastLoginDate - a Calendar to use for the last login date of this user

getStudentId

public java.lang.String getStudentId()
Returns the student id of this User object

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a String representing the student id of this user

setStudentId

public void setStudentId(java.lang.String strStudentId)
Sets the student id value for this User object.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
strStudentId - a String with the student id for this user

getSettings

public java.lang.String getSettings()
Returns the settings of this User object.

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a String representing the settings of this user

setSettings

public void setSettings(java.lang.String strSettings)
Sets the settings value for this User object.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
strSettings - a String with the settings for this user

getLocale

public java.lang.String getLocale()
Returns the locale of this User object.

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a String representing the locale of this user

setLocale

public void setLocale(java.lang.String strLocale)
Sets the locale value for this User object.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
strLocale - a String with the locale for this user

getCDRomDriveMac

public java.lang.String getCDRomDriveMac()
Returns the CDRomDriveMac of this User object.

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a String representing the settings of this user

setCDRomDriveMac

public void setCDRomDriveMac(java.lang.String strCDRomDriveMac)
Sets the CDRomDriveMac value for this User object.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
strCDRomDriveMac - a String with the settings for this user

getCDRomDrivePC

public java.lang.String getCDRomDrivePC()
Returns the CDRomDrivePC of this User object.

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
a String representing the settings of this user

setCDRomDrivePC

public void setCDRomDrivePC(java.lang.String strCDRomDrivePC)
Sets the drive in which offline course content is stored for this User. When a user accesses a piece of offline content within a course from a Windows-based PC, the link to the content will be created by appending the path defined for the content item to this drive value.

If this value is not set, the user will not be able to access offline content until they manually set the value for themselves through the user interface.

Requires an AttributePermission with the name "user.personalinfo", action "set" in order to modify this value.

Parameters:
strCDRomDrivePC - a String which represents the drive letter (A-Z) in which offline content is stored. The value provided should not contain a drive letter separator (":"). A value of null is allowed.
See Also:
setCDRomDriveMac(String), Content.getOfflinePath()

getRegistry

public blackboard.data.registry.Registry getRegistry()
Returns the Registry associated with this User.

This attribute is a "heavy" attribute and only contains a value if this User was loaded using a "heavy" load method. Accessing this value when it has not been loaded is an error.

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
Registry value for this user

setRegistry

public void setRegistry(blackboard.data.registry.Registry reg)
Sets the Registry associated with this User. The Registry provided should only contain UserRegistryEntry values.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
reg - a Registry value to use for this user

getPortalRole

public PortalRole getPortalRole()
Returns the PortalRole object, representing the primary institution role associated with this User.

This attribute is a "heavy" attribute and only contains a value if this User was loaded using a "heavy" load method. Accessing this value when it has not been loaded is an error.

Requires AttributePermission with name "user.personalinfo", actions "get".

Returns:
PortalRole value for this user

setPortalRole

public void setPortalRole(PortalRole role)
Sets the PortalRole object, representing the primary institution role associated with this User.

Requires AttributePermission with name "user.personalinfo", actions "set".

Parameters:
role - a PortalRole value to use for this user

getCardNumber

public java.lang.String getCardNumber()
Returns a String representing the encrypted BbCard number for this User.

Requires AttributePermission with name "user.cardnumber", actions "get".

Returns:
String enrypted card number value for this user

setCardNumber

public void setCardNumber(java.lang.String cardNumber)
Sets the String representing the encrypted BbCard number for this User.

Requires AttributePermission with name "user.cardnumber", actions "set".

Parameters:
cardNumber - a String value to use for this user

getDataType

public DataType getDataType()
Returns the DataType identifier for this object. Can be used to uniquely identify the "type" of this data object.

Specified by:
getDataType in interface IBbObject
Specified by:
getDataType in interface Identifiable
Specified by:
getDataType in class BbObject
Returns:
the DataType for this object

isGuest

public boolean isGuest()
Indicates that this user is the unregistered guest account.

Since:
Bb 9.1SP5

validate

public void validate()
              throws ValidationException
Validates the contents of this User. Internal consistency checks are also performed.

Specified by:
validate in interface IBbObject
Overrides:
validate in class BbObject
Throws:
ValidationException - if validation of this object fails

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2012 Blackboard, Inc. All Rights Reserved.