Enum Class ServiceName

java.lang.Object
java.lang.Enum<ServiceName>
fr.gouv.vitam.common.error.ServiceName
All Implemented Interfaces:
Serializable, Comparable<ServiceName>, Constable

public enum ServiceName extends Enum<ServiceName>
Enum of Vitam services
  • Enum Constant Details

    • VITAM

      public static final ServiceName VITAM
      Used if the service does not exist. Also used in test.
    • INTERNAL_ACCESS

      public static final ServiceName INTERNAL_ACCESS
      Used for internal access error
    • EXTERNAL_ACCESS

      public static final ServiceName EXTERNAL_ACCESS
      Used for external access error
    • INTERNAL_INGEST

      public static final ServiceName INTERNAL_INGEST
      Used for internal ingest error
    • EXTERNAL_INGEST

      public static final ServiceName EXTERNAL_INGEST
      used for external ingest error
    • LOGBOOK

      public static final ServiceName LOGBOOK
      Use for logbook error
    • METADATA

      public static final ServiceName METADATA
      Used for metadata error
    • PROCESSING

      public static final ServiceName PROCESSING
      Used for processing error
    • DISTRIBUTOR

      public static final ServiceName DISTRIBUTOR
      Used for distribution error
    • WORKER

      public static final ServiceName WORKER
      Used for worker error
    • STORAGE

      public static final ServiceName STORAGE
      Used for storage error
    • WORKSPACE

      public static final ServiceName WORKSPACE
      Used for workspace error
    • FUNCTIONAL_ADMINISTRATION

      public static final ServiceName FUNCTIONAL_ADMINISTRATION
      Used for Functional Administration error
    • COLLECT_EXTERNAL_ACCESS

      public static final ServiceName COLLECT_EXTERNAL_ACCESS
      Used for collect external access error
  • Method Details

    • values

      public static ServiceName[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ServiceName valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public String getCode()
      Returns:
      code
    • getName

      public String getName()
      Returns:
      name
    • getFromCode

      public static ServiceName getFromCode(String code)
      Retrieve ServiceName from code
      Parameters:
      code - the code
      Returns:
      the service if exists
      Throws:
      IllegalArgumentException - thrown if code is null or empty or if the attached service to the code does not exist