Package fr.gouv.vitam.common.error
Enum ServiceName
- java.lang.Object
-
- java.lang.Enum<ServiceName>
-
- fr.gouv.vitam.common.error.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 Summary
Enum Constants Enum Constant Description DISTRIBUTOR
Used for distribution errorEXTERNAL_ACCESS
Used for external access errorEXTERNAL_INGEST
used for external ingest errorFUNCTIONAL_ADMINISTRATION
Used for Functional Administration errorINTERNAL_ACCESS
Used for internal access errorINTERNAL_INGEST
Used for internal ingest errorLOGBOOK
Use for logbook errorMETADATA
Used for metadata errorPROCESSING
Used for processing errorSTORAGE
Used for storage errorVITAM
Used if the service does not exist.WORKER
Used for worker errorWORKSPACE
Used for workspace error
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCode()
static ServiceName
getFromCode(java.lang.String code)
Retrieve ServiceName from codejava.lang.String
getName()
static ServiceName
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ServiceName[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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
-
-
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 namejava.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
-
-