Package fr.gouv.vitam.common.error
Enum Class ServiceName
- All Implemented Interfaces:
Serializable
,Comparable<ServiceName>
,Constable
Enum of Vitam services
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUsed for collect external access errorUsed for distribution errorUsed for external access errorused for external ingest errorUsed for Functional Administration errorUsed for internal access errorUsed for internal ingest errorUse for logbook errorUsed for metadata errorUsed for processing errorUsed for storage errorUsed if the service does not exist.Used for worker errorUsed for workspace error -
Method Summary
Modifier and TypeMethodDescriptiongetCode()
static ServiceName
getFromCode
(String code) Retrieve ServiceName from codegetName()
static ServiceName
Returns the enum constant of this class with the specified name.static ServiceName[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VITAM
Used if the service does not exist. Also used in test. -
INTERNAL_ACCESS
Used for internal access error -
EXTERNAL_ACCESS
Used for external access error -
INTERNAL_INGEST
Used for internal ingest error -
EXTERNAL_INGEST
used for external ingest error -
LOGBOOK
Use for logbook error -
METADATA
Used for metadata error -
PROCESSING
Used for processing error -
DISTRIBUTOR
Used for distribution error -
WORKER
Used for worker error -
STORAGE
Used for storage error -
WORKSPACE
Used for workspace error -
FUNCTIONAL_ADMINISTRATION
Used for Functional Administration error -
COLLECT_EXTERNAL_ACCESS
Used for collect external access error
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getCode
- Returns:
- code
-
getName
- Returns:
- name
-
getFromCode
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
-