Package uk.ac.starlink.topcat

## Enum Safety

- java.lang.Object
- - java.lang.Enum<Safety>
  - - uk.ac.starlink.topcat.Safety

- All Implemented Interfaces:
    `java.io.Serializable`, `java.lang.Comparable<Safety>`

      public enum Safety
      extends java.lang.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:

  - invocation of activation-type JEL functions (those from uk.ac.starlink.topcat.func.*, though not those from uk.ac.starlink.ttools.func.*)
  - unrestricted execution of System (shell) commands
  - acquiring input streams from `DataSource.makeDataSource(java.lang.String)` (these may include shell execution; note that table load typically calls this method)
  - sending a SAMP message of unknown semantics (except one marked as mostly-harmless)
  Since:
    13 Jul 2018
  Author:
    Mark Taylor

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---
    `SAFE` | Poses no security risk.
    `UNSAFE` | Poses a potential security risk.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Safety` | `valueOf​(java.lang.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​(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