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

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

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

For access profiles, what type of access is permitted.


Enum Constant Summary
NO_VISIBILITY
          No access to project or any samples - public profile version.
NONE
          No access to project or any samples.
READ
          Read access to project and all samples.
READ_SELECTIVE
          Partial Read access to project and specified samples.
READ_WRITE_SELECTIVE
          Partial Write access to project.
VISIBLE
          Limited access to project and no access to samples.
WRITE
          Write access to project and all samples.
 
Method Summary
static java.util.List<SecurityLevel> collaboratorGroupLevels()
           
 java.lang.String getResourceKey()
          
 java.util.List<SampleSecurityLevel> getSampleSecurityLevels()
           
 boolean isAllowsRead()
           
 boolean isAllowsWrite()
           
 boolean isAvailableToGroups()
           
 boolean isAvailableToPublic()
           
 boolean isPartialRead()
           
 boolean isPartialWrite()
           
 boolean isSampleLevelPermissionsAllowed()
           
static java.util.List<SecurityLevel> publicLevels()
           
static SecurityLevel valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SecurityLevel[] 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 SecurityLevel NONE
No access to project or any samples.


VISIBLE

public static final SecurityLevel VISIBLE
Limited access to project and no access to samples.


READ

public static final SecurityLevel READ
Read access to project and all samples.


READ_SELECTIVE

public static final SecurityLevel READ_SELECTIVE
Partial Read access to project and specified samples.


WRITE

public static final SecurityLevel WRITE
Write access to project and all samples.


READ_WRITE_SELECTIVE

public static final SecurityLevel READ_WRITE_SELECTIVE
Partial Write access to project. Read access and/or write access to specificed samples.


NO_VISIBILITY

public static final SecurityLevel NO_VISIBILITY
No access to project or any samples - public profile version.

Method Detail

values

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

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

valueOf

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

isAvailableToGroups

public boolean isAvailableToGroups()
Returns:
whether or not this security level can be granted in a group access profile

getSampleSecurityLevels

public java.util.List<SampleSecurityLevel> getSampleSecurityLevels()
Returns:
the set of security levels that can be assigned to samples given this project security level

isSampleLevelPermissionsAllowed

public boolean isSampleLevelPermissionsAllowed()
Returns:
whether this project security level allows permissions to be set at the sample level

publicLevels

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

collaboratorGroupLevels

public static java.util.List<SecurityLevel> collaboratorGroupLevels()
Returns:
the list of SecurityLevels that are available to the group 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

isPartialRead

public boolean isPartialRead()
Returns:
the partialRead

isPartialWrite

public boolean isPartialWrite()
Returns:
the partialWrite