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, java.lang.Cloneable

public class User
extends UserInfo
implements Available

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

Since:
Bb 5.5
Version:
$Revision: #1 $ $Date: 2005/06/27 $

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.  
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 DataType USER_DATA_TYPE
          Deprecated. Use the constant DATA_TYPE instead
 
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
 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.
 Id getDomainId()
          Deprecated. This field no longer exists as of Bb6 and should not be used.
 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. 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.
 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 getUserName()
          Returns the username of this User object.
 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 CDRomDrivePC value for this User object.
 void setDataSourceId(Id iDataSourceId)
          Sets the data source Id value for this User.
 void setDomainId(Id iDomainId)
          Deprecated. This field no longer exists as of Bb6 and should not be used.
 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. 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(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 setUserName(java.lang.String strUserName)
          Sets the username value for this User object.
 
Methods inherited from class blackboard.data.user.UserInfo
getBusinessFax, getBusinessPhone1, getBusinessPhone2, getCity, getCompany, getCountry, getDepartment, getEmailAddress, getFamilyName, getGivenName, getHomeFax, getHomePhone1, getHomePhone2, getJobTitle, getMiddleName, getMobilePhone, getState, getStreet1, getStreet2, getTitle, getWebPage, getZipCode, setBusinessFax, setBusinessPhone1, setBusinessPhone2, setCity, setCompany, setCountry, setDepartment, setEmailAddress, setFamilyName, setGivenName, setHomeFax, setHomePhone1, setHomePhone2, setJobTitle, setMiddleName, setMobilePhone, setState, setStreet1, setStreet2, setTitle, setWebPage, setZipCode
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, getModifiedDate, persist, setCreatedDate, setId, setModifiedDate, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, 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_DATA_TYPE

public static final DataType USER_DATA_TYPE
Deprecated. Use the constant DATA_TYPE instead

_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

getDomainId

public Id getDomainId()
Deprecated. This field no longer exists as of Bb6 and should not be used.

This field no longer exists as of Bb6 and should not be used.


setDomainId

public void setDomainId(Id iDomainId)
Deprecated. This field no longer exists as of Bb6 and should not be used.

This field no longer exists as of Bb6 and should not be used.


getInstitutionRole

public User.InstRole getInstitutionRole()
Deprecated. 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

public void setInstitutionRole(User.InstRole eInstRole)
Deprecated. 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 LicenseUtil.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

getGender

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

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

Returns:
a gender calue 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:
cBirthDate - 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:
strSettings - 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 CDRomDrivePC value for this User object.

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

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

getRegistry

public 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(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:
role - 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 class BbObject
Returns:
the DataType for this object


Copyright © 2003 Blackboard, Inc. All Rights Reserved.