edu.vt.middleware.ed
Class RoleType

java.lang.Object
  extended by edu.vt.middleware.ed.AbstractDataType
      extended by edu.vt.middleware.ed.RoleType
All Implemented Interfaces:
DataType, Serializable, Comparable<DataType>

public class RoleType
extends AbstractDataType

Role data type planned initially for role-based security, but generic enough for other uses.

Version:
$Revision: 7971 $
Author:
Marvin S. Addison
See Also:
Serialized Form

Field Summary
static RoleType ADMINISTRATOR
          Administrator role
static DataType[] ALL_TYPES
          all types
static RoleType CONTACT
          Contact role
static RoleType MANAGER
          Manager role
static RoleType MEMBER
          Member role
private static long serialVersionUID
          Serialization version marker
static RoleType SPONSOR
          Sponsor role
static RoleType VIEWER
          Viewer role
 
Fields inherited from class edu.vt.middleware.ed.AbstractDataType
HASH_CODE_SEED
 
Constructor Summary
protected RoleType()
          Default constructor.
protected RoleType(String code, String name)
          Creates a RoleType with the supplied code and name.
 
Method Summary
static RoleType getDataType(String typeCode)
          Gets a RoleType object whose typeCode matches the given value.
 String getTypeCode()
          This returns the type code.
 String getTypeName()
          This returns the type name.
 
Methods inherited from class edu.vt.middleware.ed.AbstractDataType
compareTo, equals, getDataType, hashCode, setTypeCode, setTypeName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MEMBER

public static final RoleType MEMBER
Member role


VIEWER

public static final RoleType VIEWER
Viewer role


ADMINISTRATOR

public static final RoleType ADMINISTRATOR
Administrator role


MANAGER

public static final RoleType MANAGER
Manager role


CONTACT

public static final RoleType CONTACT
Contact role


SPONSOR

public static final RoleType SPONSOR
Sponsor role


ALL_TYPES

public static final DataType[] ALL_TYPES
all types


serialVersionUID

private static final long serialVersionUID
Serialization version marker

See Also:
Constant Field Values
Constructor Detail

RoleType

protected RoleType()
Default constructor.


RoleType

protected RoleType(String code,
                   String name)
Creates a RoleType with the supplied code and name.

Parameters:
code - 3-letter role code.
name - Role name.
Method Detail

getDataType

public static RoleType getDataType(String typeCode)
Gets a RoleType object whose typeCode matches the given value.

Parameters:
typeCode - The typeCode of the RoleType to fetch.
Returns:
A role type object or null if none is found matching the given value.

getTypeCode

public String getTypeCode()
This returns the type code.

Specified by:
getTypeCode in interface DataType
Overrides:
getTypeCode in class AbstractDataType
Returns:
String - code

getTypeName

public String getTypeName()
This returns the type name.

Specified by:
getTypeName in interface DataType
Overrides:
getTypeName in class AbstractDataType
Returns:
String - name


Copyright © 2008 Virginia Tech. All Rights Reserved.