uk.ac.starlink.topcat
Enum Safety

java.lang.Object
  extended by java.lang.Enum<Safety>
      extended by uk.ac.starlink.topcat.Safety
All Implemented Interfaces:
Serializable, Comparable<Safety>

public enum Safety
extends Enum<Safety>

Characterises a security risk. There are currently two values, SAFE and UNSAFE.

A value of SAFE indicates that the action so characterised is known to be harmless. This applies to actions that can only affect the internal state of the application. Actions that might be the target of an injection attack should be marked UNSAFE.

Potentially unsafe capabilities, which should be marked UNSAFE, include:

Since:
13 Jul 2018
Author:
Mark Taylor

Enum Constant Summary
SAFE
          Poses no security risk.
UNSAFE
          Poses a potential security risk.
 
Method Summary
static Safety valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Safety[] 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

SAFE

public static final Safety SAFE
Poses no security risk.


UNSAFE

public static final Safety UNSAFE
Poses a potential security risk.

Method Detail

values

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

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

valueOf

public static Safety valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.