org.sakaiproject.api.section.facade
Class Role

java.lang.Object
  extended byorg.sakaiproject.api.section.facade.Role
All Implemented Interfaces:
Serializable

public class Role
extends Object
implements Serializable

A type-safe enumeration of the roles a user can play in a LearningContext.

Author:
Josh Holtzman
See Also:
Serialized Form

Field Summary
static Role INSTRUCTOR
           
static Role NONE
           
static Role STUDENT
           
static Role TA
           
 
Method Summary
 boolean equals(Object o)
          This role is considered equal if it is a Role whos getValue() is equal to this object's getValue().
 String getDescription()
           
 String getName()
          Returns the name.
 int getValue()
          Returns the value.
 int hashCode()
          Do not use commons-lang HashCodeBuilder, since this class will be deployed to sakai's shared/lib.
 boolean isInstructor()
          Returns whether this instance is the INSTRUCTOR instance.
 boolean isNone()
          Returns whether this instance is the NONE instance.
 boolean isStudent()
          Returns whether this instance is the STUDENT instance.
 boolean isTeachingAssistant()
          Returns whether this instance is the INSTRUCTOR instance.
 String toString()
          Returns a String description of this Role.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final Role NONE

INSTRUCTOR

public static final Role INSTRUCTOR

STUDENT

public static final Role STUDENT

TA

public static final Role TA
Method Detail

isNone

public boolean isNone()
Returns whether this instance is the NONE instance.

Returns:
whether this instance is the NONE instance

isInstructor

public boolean isInstructor()
Returns whether this instance is the INSTRUCTOR instance.

Returns:
whether this instance is the INSTRUCTOR instance

isTeachingAssistant

public boolean isTeachingAssistant()
Returns whether this instance is the INSTRUCTOR instance.

Returns:
whether this instance is the INSTRUCTOR instance

isStudent

public boolean isStudent()
Returns whether this instance is the STUDENT instance.

Returns:
whether this instance is the STUDENT instance

getName

public String getName()
Returns the name.

Returns:
the name.

getValue

public int getValue()
Returns the value.

Returns:
the value.

getDescription

public String getDescription()

toString

public String toString()
Returns a String description of this Role. Do not use commons-lang ToStringBuilder, since this class will be deployed to sakai's shared/lib.

Returns:
a String description of this object.

equals

public boolean equals(Object o)
This role is considered equal if it is a Role whos getValue() is equal to this object's getValue(). Do not use commons-lang EqualsBuilder, since this class will be deployed to sakai's shared/lib.

See Also:
Object.equals(Object)

hashCode

public int hashCode()
Do not use commons-lang HashCodeBuilder, since this class will be deployed to sakai's shared/lib.

See Also:
Object.hashCode()