Enum ServiceName

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ServiceName>

    public enum ServiceName
    extends java.lang.Enum<ServiceName>
    Enum of Vitam services
    • Enum Constant Detail

      • 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 Detail

      • values

        public static ServiceName[] 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 (ServiceName c : ServiceName.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ServiceName 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
      • getCode

        public java.lang.String getCode()
        Returns:
        code
      • getName

        public java.lang.String getName()
        Returns:
        name
      • getFromCode

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