okapi.coreobjects
Class OkapiRole

java.lang.Object
  extended by okapi.coreobjects.OkapiRole
All Implemented Interfaces:
java.io.Serializable

public class OkapiRole
extends java.lang.Object
implements java.io.Serializable

Role: Possible roles for a User within an OkapiNexus. Examples of roles are "Student" or "Learner", "Faculty", "Grader", "TA", "Administrator", "Guest", "Manager", "Mentor", "Content Developer" These map to IMS Enterprise Membership Data Object roles and subtypes as follows: "Student" or "Learner" = 01
"Faculty", "Grader", "TA" are subtypes of 02
"Administrator" = 07,
"Guest" is subtype of 04
"Manager" = 05
"Mentor" = 06
"Content Developer" = 03

Version:
$Revision: 31044 $, $Date: 2008-09-02 17:08:01 -0400 (Tue, 02 Sep 2008) $
Author:
MIT Stellar team
See Also:
Serialized Form

Field Summary
static OkapiRole CONTENT_DEVELOPER
          Content Developer contributes content to nexus, otherwise not involved.
static OkapiRole COURSE_ADMINISTRATOR
          Class administrator
protected  java.lang.String description
          description of the entity represented by this object.
static OkapiRole GRADER
          Grader of assignments.
static OkapiRole GUEST
          Guest: person given access to class but with no other association
static OkapiRole HELP_DESK_STAFF
          Help Desk Staff.
static OkapiRole INSTRUCTOR
          Instructor for class
static OkapiRole LEARNER
          Student auditing class
protected  java.lang.String longName
          Long-form name for the entity represented by this object.
static OkapiRole MANAGER
          Manager: non-instructional staff for nexus.
static OkapiRole MENTOR
          Mentor: guest of instructor, contributing to education.
protected  java.lang.String name
          Short, single word name for the entity represented by this object.
static OkapiRole NULL
          No role in class, used for lists of people who had or may in the future have access
static OkapiRole STUDENT
          Student in class for credit
static OkapiRole SYSTEM_ADMINISTRATOR
          System Administrator for Site.
static OkapiRole TA
          Teaching Assistant for class
 
Constructor Summary
OkapiRole()
          Create new empty OkapiRole object.
OkapiRole(java.lang.String name, java.lang.String longName, java.lang.String description, java.lang.String imsRoleType, java.lang.String imsRoleSubType)
          Create new fully defined OkapiRole object.
 
Method Summary
 boolean equals(java.lang.Object o)
          Method equals
 java.lang.String getAsXml(java.util.Map options)
          Method getAsXml
 java.lang.String getAsXml(java.util.Map options, int indent)
          Method getAsXml
 java.lang.String getAsXml(java.util.Map options, java.lang.String tag)
          Method getAsXml
 java.lang.String getAsXml(java.util.Map options, java.lang.String tag, int indent)
          Returns an xml representation of this object, with the options defined by the options map, an element of type tag surrounding the xml, and the first line indented indent times.
 java.lang.String getDescription()
          Method getDescription
 java.lang.String getIMSRoleSubType()
          Method getIMSRoleSubType
 java.lang.String getIMSRoleType()
          Method getIMSRoleType
 java.lang.String getLongName()
          Method getLongName
 java.lang.String getName()
          Method getName
static OkapiRole getRole(java.lang.String name)
          Return Role with this name
protected  int getRoleCode()
          Return roleCode of this Role
protected static int getRoleCode(java.lang.String name)
          Return roleCode of the Role with this name
 void setDescription(java.lang.String newDescription)
          Method setDescription
 void setIMSRoleSubType(java.lang.String imsRoleSubType)
          Method setIMSRoleSubType
 void setIMSRoleType(java.lang.String imsRoleType)
          Method setIMSRoleType
 void setLongName(java.lang.String newLongName)
          Method setLongName
 void setName(java.lang.String newName)
          Method setName
 java.lang.String toString()
          Method toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Short, single word name for the entity represented by this object.


longName

protected java.lang.String longName
Long-form name for the entity represented by this object.


description

protected java.lang.String description
description of the entity represented by this object.


NULL

public static final OkapiRole NULL
No role in class, used for lists of people who had or may in the future have access


STUDENT

public static final OkapiRole STUDENT
Student in class for credit


LEARNER

public static final OkapiRole LEARNER
Student auditing class


INSTRUCTOR

public static final OkapiRole INSTRUCTOR
Instructor for class


GRADER

public static final OkapiRole GRADER
Grader of assignments.


TA

public static final OkapiRole TA
Teaching Assistant for class


COURSE_ADMINISTRATOR

public static final OkapiRole COURSE_ADMINISTRATOR
Class administrator


GUEST

public static final OkapiRole GUEST
Guest: person given access to class but with no other association


MANAGER

public static final OkapiRole MANAGER
Manager: non-instructional staff for nexus. As of Fall 2002 this role is used for EReserves librarians.


MENTOR

public static final OkapiRole MENTOR
Mentor: guest of instructor, contributing to education.


CONTENT_DEVELOPER

public static final OkapiRole CONTENT_DEVELOPER
Content Developer contributes content to nexus, otherwise not involved.


SYSTEM_ADMINISTRATOR

public static final OkapiRole SYSTEM_ADMINISTRATOR
System Administrator for Site.


HELP_DESK_STAFF

public static final OkapiRole HELP_DESK_STAFF
Help Desk Staff.

Constructor Detail

OkapiRole

public OkapiRole()
Create new empty OkapiRole object.


OkapiRole

public OkapiRole(java.lang.String name,
                 java.lang.String longName,
                 java.lang.String description,
                 java.lang.String imsRoleType,
                 java.lang.String imsRoleSubType)
Create new fully defined OkapiRole object.

Method Detail

getRoleCode

protected int getRoleCode()
Return roleCode of this Role


getRoleCode

protected static int getRoleCode(java.lang.String name)
Return roleCode of the Role with this name


getRole

public static OkapiRole getRole(java.lang.String name)
Return Role with this name


setName

public void setName(java.lang.String newName)
Method setName

Parameters:
newName -

getName

public java.lang.String getName()
Method getName

Returns:
String

toString

public java.lang.String toString()
Method toString

Overrides:
toString in class java.lang.Object
Returns:
String

setLongName

public void setLongName(java.lang.String newLongName)
Method setLongName

Parameters:
newLongName -

getLongName

public java.lang.String getLongName()
Method getLongName

Returns:
String

setDescription

public void setDescription(java.lang.String newDescription)
Method setDescription

Parameters:
newDescription -

getDescription

public java.lang.String getDescription()
Method getDescription

Returns:
String

setIMSRoleType

public void setIMSRoleType(java.lang.String imsRoleType)
Method setIMSRoleType

Parameters:
imsRoleType -

getIMSRoleType

public java.lang.String getIMSRoleType()
Method getIMSRoleType

Returns:
String

setIMSRoleSubType

public void setIMSRoleSubType(java.lang.String imsRoleSubType)
Method setIMSRoleSubType

Parameters:
imsRoleSubType -

getIMSRoleSubType

public java.lang.String getIMSRoleSubType()
Method getIMSRoleSubType

Returns:
String

equals

public boolean equals(java.lang.Object o)
Method equals

Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:
boolean

getAsXml

public java.lang.String getAsXml(java.util.Map options,
                                 java.lang.String tag,
                                 int indent)
Returns an xml representation of this object, with the options defined by the options map, an element of type tag surrounding the xml, and the first line indented indent times. See OkapiObject.getAsXml(String tag, int indent) for more information about using the getAsXml methods.


getAsXml

public java.lang.String getAsXml(java.util.Map options,
                                 java.lang.String tag)
Method getAsXml

Parameters:
options -
tag -
Returns:
String

getAsXml

public java.lang.String getAsXml(java.util.Map options,
                                 int indent)
Method getAsXml

Parameters:
options -
indent -
Returns:
String

getAsXml

public java.lang.String getAsXml(java.util.Map options)
Method getAsXml

Parameters:
options -
Returns:
String


Copyright ? 2001-2009 MIT. All Rights Reserved.