gov.nih.nci.caarray.domain.permissions
Enum SampleSecurityLevel

java.lang.Object
  extended by java.lang.Enum<SampleSecurityLevel>
      extended by gov.nih.nci.caarray.domain.permissions.SampleSecurityLevel
All Implemented Interfaces:
ResourceBasedEnum, java.io.Serializable, java.lang.Comparable<SampleSecurityLevel>

public enum SampleSecurityLevel
extends java.lang.Enum<SampleSecurityLevel>
implements ResourceBasedEnum

Enum of access types for sample-level security.


Enum Constant Summary
NONE
          No access to the sample.
READ
          Read access to the sample.
READ_WRITE
          Read / write access to the sample.
 
Method Summary
 java.lang.String getResourceKey()
          
 boolean isAllowsRead()
           
 boolean isAllowsWrite()
           
 boolean isAvailableToPublic()
           
static java.util.List<SampleSecurityLevel> publicLevels()
           
static SampleSecurityLevel valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SampleSecurityLevel[] 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 SampleSecurityLevel NONE
No access to the sample.


READ

public static final SampleSecurityLevel READ
Read access to the sample.


READ_WRITE

public static final SampleSecurityLevel READ_WRITE
Read / write access to the sample.

Method Detail

values

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

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

valueOf

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

getResourceKey

public java.lang.String getResourceKey()

Specified by:
getResourceKey in interface ResourceBasedEnum
Returns:
the resource key that should be used to retrieve a label for the Enum instance in the UI

isAvailableToPublic

public boolean isAvailableToPublic()
Returns:
whether or not this security level can be granted in the public access profile

publicLevels

public static java.util.List<SampleSecurityLevel> publicLevels()
Returns:
the list of SecurityLevels that are available to the public access profile

isAllowsRead

public boolean isAllowsRead()
Returns:
whether this security level allows read access

isAllowsWrite

public boolean isAllowsWrite()
Returns:
whether this security level allows write access