edu.jhu.tmaj.beans.data
Enum ArrayBuilderPermission

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

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

Represents the level of permission a user has for the ArrayBuilder Application.


Enum Constant Summary
NONE
          ArrayBuilder App may not be accessed.
READ_ONLY
          ArrayBuilder may be used to see, but not change ArrayBlocks.
STANDARD
          ArrayBuilder may be used to see and change ArrayBlocks.
 
Method Summary
 int getDBValue()
           
static ArrayBuilderPermission getInstance(java.lang.Integer dbValue)
          Get an Instance of this class.
static java.lang.String[] getPermissionsArray()
           
 boolean hasWritePermission()
          Returns true if a user can design an ArrayBlock, as oppose to just view them.
 boolean isHigherAccess(ArrayBuilderPermission permission)
           
 boolean mayAccessArrayBuilderApp()
          Returns true if a user may get into the ArrayBuilder Application.
static ArrayBuilderPermission valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ArrayBuilderPermission[] 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 ArrayBuilderPermission NONE
ArrayBuilder App may not be accessed.


READ_ONLY

public static final ArrayBuilderPermission READ_ONLY
ArrayBuilder may be used to see, but not change ArrayBlocks.


STANDARD

public static final ArrayBuilderPermission STANDARD
ArrayBuilder may be used to see and change ArrayBlocks.

Method Detail

values

public static ArrayBuilderPermission[] 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 (ArrayBuilderPermission c : ArrayBuilderPermission.values())
    System.out.println(c);

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

valueOf

public static ArrayBuilderPermission 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

getDBValue

public int getDBValue()

getInstance

public static ArrayBuilderPermission getInstance(java.lang.Integer dbValue)
Get an Instance of this class.

Parameters:
dbValue - the database value recorded in the ArrayBuilderApp field in the Users table

mayAccessArrayBuilderApp

public boolean mayAccessArrayBuilderApp()
Returns true if a user may get into the ArrayBuilder Application.


hasWritePermission

public boolean hasWritePermission()
Returns true if a user can design an ArrayBlock, as oppose to just view them.


getPermissionsArray

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

isHigherAccess

public boolean isHigherAccess(ArrayBuilderPermission permission)