org.oscelot.webct.dao
Class UserVO

java.lang.Object
  extended byorg.oscelot.webct.dao.UserVO

public class UserVO
extends java.lang.Object

The UserVO is a value object that contains details about the user.

Based on com.webct.platform.sdkext.authmoduledata.UserVO

Version:
2.5 (31-Oct-11)
Author:
Stephen P Vickers

Field Summary
static java.lang.String ADDRESS_COUNTRY
           
static java.lang.String ADDRESS_EXTADD
           
static java.lang.String ADDRESS_LOCALITY
           
static java.lang.String ADDRESS_PCODE
           
static java.lang.String ADDRESS_POBOX
           
static java.lang.String ADDRESS_REGION
           
static java.lang.String ADDRESS_STREET
           
static java.lang.String COURSE_DESIGNER_ROLE
           
static java.lang.String COURSE_INSTRUCTOR_ROLE
           
static java.lang.String DIVISION_ADMIN_ROLE
           
static java.lang.String DIVISION_DESIGNER_ROLE
           
static java.lang.String DIVISION_ENROLMENT_MANAGER_ROLE
           
static java.lang.String DIVISION_LEARNING_CONTEXT_MANAGER_ROLE
           
static java.lang.String DIVISION_REPOSITORY_MANAGER_ROLE
           
static java.lang.String DIVISION_TEMPLATE_MANAGER_ROLE
           
static java.lang.String DOMAIN_ADMIN_ROLE
           
static java.lang.String DOMAIN_DESIGNER_ROLE
           
static java.lang.String GROUP_ADMIN_ROLE
           
static java.lang.String GROUP_DESIGNER_ROLE
           
static java.lang.String GROUP_ENROLMENT_MANAGER_ROLE
           
static java.lang.String GROUP_LEARNING_CONTEXT_MANAGER_ROLE
           
static java.lang.String GROUP_REPOSITORY_MANAGER_ROLE
           
static java.lang.String GROUP_TEMPLATE_MANAGER_ROLE
           
static java.lang.String INSTITUTION_ADMIN_ROLE
           
static java.lang.String INSTITUTION_DESIGNER_ROLE
           
static java.lang.String INSTITUTION_ENROLMENT_MANAGER_ROLE
           
static java.lang.String INSTITUTION_LEARNING_CONTEXT_MANAGER_ROLE
           
static java.lang.String INSTITUTION_MEMBER_ROLE
           
static java.lang.String INSTITUTION_REPOSITORY_MANAGER_ROLE
           
static java.lang.String INSTITUTION_TEMPLATE_MANAGER_ROLE
           
static java.lang.String INSTITUTION_USER_MANAGER_ROLE
           
static java.lang.String PHONE_FAX
           
static java.lang.String PHONE_MOBILE
           
static java.lang.String PHONE_PAGER
           
static java.lang.String PHONE_VOICE1
           
static java.lang.String PHONE_VOICE2
           
static java.lang.String SECTION_AUDITOR_ROLE
           
static java.lang.String SECTION_DESIGNER_ROLE
           
static java.lang.String SECTION_INSTRUCTOR_ROLE
           
static java.lang.String SECTION_STUDENT_ROLE
           
static java.lang.String SECTION_TEACHING_ASSISTANT_ROLE
           
static java.lang.String SERVER_ADMIN_ROLE
           
static int SQL_WHERE_ADDRESS
           
static int SQL_WHERE_CUSTOM
           
static int SQL_WHERE_NONE
           
static int SQL_WHERE_PHONE
           
static int SQL_WHERE_USER
           
 
Constructor Summary
UserVO()
          Deprecated. UserVO objects should be created using the UserService.getUser(String, Long) and UserService.getMembers(Long) methods.
UserVO(int demoUser, java.lang.String firstName, long institutionId, long personId, java.lang.String lastName, java.lang.String namePrefix, java.lang.String nameSuffix, java.lang.String otherName, java.lang.String sourceId, java.lang.String sourceName, int status, java.lang.String userId, java.lang.String passwordHash, java.lang.String email, java.lang.String userPrimaryKey, java.util.List userRoles)
          Deprecated. UserVO objects should be created using the UserService.getUser(String, Long) and UserService.getMembers(Long) methods.
 
Method Summary
 java.util.Map getAddresses()
          Get the list of address details associated with the user.
 java.lang.Long getBirthday()
          Get the birthday of the user
 java.util.Map getCustomColumns()
          Get the list of custom column values associated with the user
 java.lang.String getDataSource()
          Get the data source
 int getDemoUser()
          Deprecated. Use the isDemoUser() method instead
 java.lang.String getEmail()
          Get the email address of the user
 java.lang.String getFirstname()
          Get the first name of the user
 java.lang.String getFormattedName(java.lang.String format)
          Get a formatted user name.
 java.lang.String getFullname()
          Get the full name of the user
 long getInstitutionLCId()
          Get the institution learning context Id for the user
 java.lang.String getLastname()
          Get the last name of the user
 java.util.List getLearningContexts(int typeLevel)
          Get the learning contexts in which the user is a member
 java.lang.String getNamePrefix()
          Get the name prefix of the user
 java.lang.String getNameSuffix()
          Get the name suffix of the user
 java.lang.String getNickname()
          Get the nickname of the user
 java.lang.String getOtherName()
          Get the other name of the user
 java.lang.String getPasswordHash()
          Deprecated. Always returns null
 long getPersonId()
          Get the person Id for the user
 java.util.Map getPhones()
          Get the list of phone numbers associated with the user.
 java.util.List getRoles()
          Get the list of roles associated with the user for the learning context; this is equivalent to getRoles(Boolean.TRUE)
 java.util.List getRoles(java.lang.Boolean lcRoles)
          Get the list of roles associated with the user
 java.lang.String getSortName()
          Get the sort name of the user
 java.lang.String getsourceId()
          Deprecated. Use the getSourceId() method instead
 java.lang.String getSourceId()
          Get the source Id for the user
 java.lang.String getsourceName()
          Deprecated. Use the getSourceName() method instead
 java.lang.String getSourceName()
          Get the source name for the user
 int getStatus()
          Get the status of the user
 java.lang.String getUserId()
          Get the user Id
 java.lang.String getUserPrimaryKey()
          Deprecated. Use the getSourceId() method instead
 java.util.List getUserRoles()
          Deprecated. Use the getRoles() method instead
 boolean hasGender()
          Is this user's gender known?
 boolean isAuditor()
          Is this user an auditor?
 boolean isCourseDesigner()
          Is this user a course designer?
 boolean isCourseInstructor()
          Is this user a course instructor?
 boolean isDemoUser()
          Is this user a demo student?
 boolean isDesignerInstructor()
          Deprecated. This does not represent a valid role type for a user
 boolean isDivisionAdmin()
          Is this user a division administrator?
 boolean isDivisionDesigner()
          Is this user a division designer?
 boolean isDomainAdmin()
          Is this user a domain admin?
 boolean isDomainDesigner()
          Is this user a domain designer?
 boolean isFemale()
          Is this user a female?
 boolean isGroupAdmin()
          Is this user a group admin?
 boolean isGroupDesigner()
          Is this user a group designer?
 boolean isInstitutionalAdmin()
          Is this user an institutional admin?
 boolean isInstitutionalDesigner()
          Is this user an institutional designer?
 boolean isMale()
          Is this user a male?
 boolean isMentor()
          Deprecated. This does not represent a valid role type for a user
 boolean isPrimarySectionInstructor()
          Is this user a primary section instructor?
 boolean isSectionDesigner()
          Is this user a section designer?
 boolean isSectionInstructor()
          Is this user a section instructor?
 boolean isServerAdmin()
          Is this user a server administrator?
 boolean isStudent()
          Is this user a student?
 boolean isTA()
          Is this user a TA?
 boolean isUserInRole(java.lang.String roleName)
          Is this user in the given role?
 boolean isUserInRole(UserRole role)
          Deprecated. As the UserRole class has been deprecated, use the isUserInRole(String) method instead.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVER_ADMIN_ROLE

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

DOMAIN_ADMIN_ROLE

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

DOMAIN_DESIGNER_ROLE

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

INSTITUTION_ADMIN_ROLE

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

INSTITUTION_DESIGNER_ROLE

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

INSTITUTION_LEARNING_CONTEXT_MANAGER_ROLE

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

INSTITUTION_ENROLMENT_MANAGER_ROLE

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

INSTITUTION_REPOSITORY_MANAGER_ROLE

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

INSTITUTION_TEMPLATE_MANAGER_ROLE

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

INSTITUTION_USER_MANAGER_ROLE

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

INSTITUTION_MEMBER_ROLE

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

DIVISION_ADMIN_ROLE

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

DIVISION_DESIGNER_ROLE

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

DIVISION_LEARNING_CONTEXT_MANAGER_ROLE

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

DIVISION_ENROLMENT_MANAGER_ROLE

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

DIVISION_REPOSITORY_MANAGER_ROLE

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

DIVISION_TEMPLATE_MANAGER_ROLE

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

GROUP_ADMIN_ROLE

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

GROUP_DESIGNER_ROLE

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

GROUP_LEARNING_CONTEXT_MANAGER_ROLE

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

GROUP_ENROLMENT_MANAGER_ROLE

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

GROUP_REPOSITORY_MANAGER_ROLE

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

GROUP_TEMPLATE_MANAGER_ROLE

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

COURSE_INSTRUCTOR_ROLE

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

COURSE_DESIGNER_ROLE

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

SECTION_INSTRUCTOR_ROLE

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

SECTION_DESIGNER_ROLE

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

SECTION_TEACHING_ASSISTANT_ROLE

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

SECTION_STUDENT_ROLE

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

SECTION_AUDITOR_ROLE

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

ADDRESS_POBOX

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

ADDRESS_STREET

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

ADDRESS_EXTADD

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

ADDRESS_LOCALITY

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

ADDRESS_REGION

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

ADDRESS_PCODE

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

ADDRESS_COUNTRY

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

PHONE_VOICE1

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

PHONE_VOICE2

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

PHONE_FAX

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

PHONE_MOBILE

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

PHONE_PAGER

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

SQL_WHERE_NONE

public static final int SQL_WHERE_NONE
See Also:
Constant Field Values

SQL_WHERE_USER

public static final int SQL_WHERE_USER
See Also:
Constant Field Values

SQL_WHERE_ADDRESS

public static final int SQL_WHERE_ADDRESS
See Also:
Constant Field Values

SQL_WHERE_PHONE

public static final int SQL_WHERE_PHONE
See Also:
Constant Field Values

SQL_WHERE_CUSTOM

public static final int SQL_WHERE_CUSTOM
See Also:
Constant Field Values
Constructor Detail

UserVO

public UserVO()
Deprecated. UserVO objects should be created using the UserService.getUser(String, Long) and UserService.getMembers(Long) methods.


UserVO

public UserVO(int demoUser,
              java.lang.String firstName,
              long institutionId,
              long personId,
              java.lang.String lastName,
              java.lang.String namePrefix,
              java.lang.String nameSuffix,
              java.lang.String otherName,
              java.lang.String sourceId,
              java.lang.String sourceName,
              int status,
              java.lang.String userId,
              java.lang.String passwordHash,
              java.lang.String email,
              java.lang.String userPrimaryKey,
              java.util.List userRoles)
Deprecated. UserVO objects should be created using the UserService.getUser(String, Long) and UserService.getMembers(Long) methods.

Parameters:
demoUser - demo user value
firstName - first name
institutionId - institution Id
personId - person Id
lastName - last name
namePrefix - name prefix
nameSuffix - name suffix
otherName - other name
sourceId - source Id
sourceName - source name
status - status
userId - user Id
passwordHash - deprecated
email - email
userPrimaryKey - user primary key
userRoles - user roles
Method Detail

getDataSource

public java.lang.String getDataSource()
Get the data source

Returns:
String - data source

getDemoUser

public int getDemoUser()
Deprecated. Use the isDemoUser() method instead

Returns:
int - demo user value

getFirstname

public java.lang.String getFirstname()
Get the first name of the user

Returns:
String - value of property firstname.

getInstitutionLCId

public long getInstitutionLCId()
Get the institution learning context Id for the user

Returns:
int - value of the institution learning context Id

getPersonId

public long getPersonId()
Get the person Id for the user

Returns:
long - value of the person Id

getLastname

public java.lang.String getLastname()
Get the last name of the user

Returns:
String - value of property lastname.

getNamePrefix

public java.lang.String getNamePrefix()
Get the name prefix of the user

Returns:
String - name prefix

getNameSuffix

public java.lang.String getNameSuffix()
Get the name suffix of the user

Returns:
String - name suffix

getOtherName

public java.lang.String getOtherName()
Get the other name of the user

Returns:
String - other name

getsourceId

public java.lang.String getsourceId()
Deprecated. Use the getSourceId() method instead

Returns:
String - source Id

getSourceId

public java.lang.String getSourceId()
Get the source Id for the user

Returns:
String - source Id

getsourceName

public java.lang.String getsourceName()
Deprecated. Use the getSourceName() method instead

Returns:
String - source name

getSourceName

public java.lang.String getSourceName()
Get the source name for the user

Returns:
String - source name

getStatus

public int getStatus()
Get the status of the user

Returns:
int - status of the user

getUserId

public java.lang.String getUserId()
Get the user Id

Returns:
String - user Id

getPasswordHash

public java.lang.String getPasswordHash()
Deprecated. Always returns null

Returns:
String - password hash

getEmail

public java.lang.String getEmail()
Get the email address of the user

Returns:
String - email address

getFullname

public java.lang.String getFullname()
Get the full name of the user

Returns:
String - full name

getNickname

public java.lang.String getNickname()
Get the nickname of the user

Returns:
String - nickname

getSortName

public java.lang.String getSortName()
Get the sort name of the user

Returns:
String - sort name

getBirthday

public java.lang.Long getBirthday()
Get the birthday of the user

Returns:
Long - birthday (unix epoch time in milliseconds)

getUserPrimaryKey

public java.lang.String getUserPrimaryKey()
Deprecated. Use the getSourceId() method instead

Returns:
String - user primary key

getFormattedName

public java.lang.String getFormattedName(java.lang.String format)
Get a formatted user name.

The format parameter is used to specify how a name is displayed. It supports the following variable substitutions:

The names of elements from the user's addresses (see getAddresses()), phone numbers (see getPhones()) and custom columns (see getCustomColumns()) may also be substituted using the syntax %{element name}; for example, %{Street 1} will be replaced with the user's street name from address 1. Element names are case insensitive.

Parameters:
format - format of name to be generated
Returns:
String - formatted learning context name

getLearningContexts

public java.util.List getLearningContexts(int typeLevel)
Get the learning contexts in which the user is a member

Parameters:
typeLevel - the learning context type level
Returns:
List - list of learning contexts (as LearningContextVO elements)

getUserRoles

public java.util.List getUserRoles()
Deprecated. Use the getRoles() method instead

Returns:
List - list of user roles (as UserRole elements)

getRoles

public java.util.List getRoles()
Get the list of roles associated with the user for the learning context; this is equivalent to getRoles(Boolean.TRUE)

Returns:
List - list of user roles (as Strings)

getRoles

public java.util.List getRoles(java.lang.Boolean lcRoles)
Get the list of roles associated with the user

Parameters:
lcRoles - true if only roles for the learning context should be returned, false if only roles for parent learning contexts should be returned, or null if both sets of roles should be returned
Returns:
List - list of user roles (as Strings)

getAddresses

public java.util.Map getAddresses()
Get the list of address details associated with the user.

The map will contain an entry for each address element even if it has no value (to allow them to be used in variable substitution, see getFormattedName(String)). The following address elements are populated:

Each of these element names is defined as a constant value. A suffix is added to the element name when adding entries to the map to reflect which address it relates to; for example, Street 1 for the name of the street in address 1.

Returns:
Map - type of address/entry and address value pairs

getPhones

public java.util.Map getPhones()
Get the list of phone numbers associated with the user.

The map will contain an entry for each phone type even if it has no value (to allow them to be used in variable substitution, see getFormattedName(String)). The phone types defined by WebCT are as follows:

Returns:
Map - type of number and phone number pairs

getCustomColumns

public java.util.Map getCustomColumns()
Get the list of custom column values associated with the user

Returns:
Map - custom column name and value pairs

isUserInRole

public boolean isUserInRole(java.lang.String roleName)
Is this user in the given role?

Parameters:
roleName - the user role string (i.e. SINS, SDES, ...)
Returns:
boolean

isUserInRole

public boolean isUserInRole(UserRole role)
Deprecated. As the UserRole class has been deprecated, use the isUserInRole(String) method instead.

Parameters:
role - the UserRole (i.e. UserRole.STUDENT_ROLE, ...)
Returns:
boolean

isServerAdmin

public boolean isServerAdmin()
Is this user a server administrator?

Returns:
boolean - is this user a server administrator

isDivisionAdmin

public boolean isDivisionAdmin()
Is this user a division administrator?

Returns:
boolean - is this user a division administrator

isDivisionDesigner

public boolean isDivisionDesigner()
Is this user a division designer?

Returns:
boolean - is this user a division designer

isInstitutionalAdmin

public boolean isInstitutionalAdmin()
Is this user an institutional admin?

Returns:
boolean - is this user a institutional admin

isInstitutionalDesigner

public boolean isInstitutionalDesigner()
Is this user an institutional designer?

Returns:
boolean - is this user a institutional designer

isDomainAdmin

public boolean isDomainAdmin()
Is this user a domain admin?

Returns:
boolean - is this user a domain admin

isDomainDesigner

public boolean isDomainDesigner()
Is this user a domain designer?

Returns:
boolean - is this user a domain designer

isGroupAdmin

public boolean isGroupAdmin()
Is this user a group admin?

Returns:
boolean - is this user a group admin

isGroupDesigner

public boolean isGroupDesigner()
Is this user a group designer?

Returns:
boolean - is this user a group designer

isCourseDesigner

public boolean isCourseDesigner()
Is this user a course designer?

Returns:
boolean - is this user a course designer

isCourseInstructor

public boolean isCourseInstructor()
Is this user a course instructor?

Returns:
boolean - is this user a course instructor

isSectionDesigner

public boolean isSectionDesigner()
Is this user a section designer?

Returns:
boolean - is this user a section instructor

isSectionInstructor

public boolean isSectionInstructor()
Is this user a section instructor?

Returns:
boolean - is this user a section designer

isPrimarySectionInstructor

public boolean isPrimarySectionInstructor()
Is this user a primary section instructor?

Returns:
boolean - is this user a primary section designer

isTA

public boolean isTA()
Is this user a TA?

Returns:
boolean - is this user a TA

isStudent

public boolean isStudent()
Is this user a student?

Returns:
boolean - is this user a student

isAuditor

public boolean isAuditor()
Is this user an auditor?

Returns:
boolean - is this user an auditor

isDesignerInstructor

public boolean isDesignerInstructor()
Deprecated. This does not represent a valid role type for a user

Returns:
boolean - always returns false

isMentor

public boolean isMentor()
Deprecated. This does not represent a valid role type for a user

Returns:
boolean - always returns false

isDemoUser

public boolean isDemoUser()
Is this user a demo student?

Returns:
boolean - is this user a demo user

isMale

public boolean isMale()
Is this user a male?

Returns:
boolean - is this user a male

isFemale

public boolean isFemale()
Is this user a female?

Returns:
boolean - is this user a female

hasGender

public boolean hasGender()
Is this user's gender known?

Returns:
boolean - is this user's gender known

toString

public java.lang.String toString()