edu.jhu.tmaj.beans.data
Enum MetaDataAppPermission

java.lang.Object
  extended by java.lang.Enum<MetaDataAppPermission>
      extended by edu.jhu.tmaj.beans.data.MetaDataAppPermission
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MetaDataAppPermission>

public enum MetaDataAppPermission
extends java.lang.Enum<MetaDataAppPermission>

Represents the user's permission to the Meta Data Application. Either the user has no access at all, or may only view the Meta Data (READ), or may view and make changes to the Meta Data (WRITE).


Enum Constant Summary
NONE
           
READ
           
WRITE
           
 
Method Summary
 int getDBValue()
           
static MetaDataAppPermission getInstance(java.lang.Integer dbValue)
           
static java.lang.String[] getPermissionsArray()
           
 boolean isHigherAccess(MetaDataAppPermission permission)
           
 boolean mayAccessApplication()
           
 boolean mayChangeMetaData()
           
static MetaDataAppPermission valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MetaDataAppPermission[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final MetaDataAppPermission NONE

READ

public static final MetaDataAppPermission READ

WRITE

public static final MetaDataAppPermission WRITE
Method Detail

values

public static MetaDataAppPermission[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MetaDataAppPermission c : MetaDataAppPermission.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MetaDataAppPermission valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getInstance

public static MetaDataAppPermission getInstance(java.lang.Integer dbValue)

getDBValue

public int getDBValue()

mayAccessApplication

public boolean mayAccessApplication()

mayChangeMetaData

public boolean mayChangeMetaData()

getPermissionsArray

public static java.lang.String[] getPermissionsArray()

isHigherAccess

public boolean isHigherAccess(MetaDataAppPermission permission)