Class Faults
java.lang.Object
io.github.venkateshamurthy.enums.DynamicEnum<Faults>
io.github.venkateshamurthy.enums.examples.Faults
- All Implemented Interfaces:
FaultCode
Faults is an example
DynamicEnum for experimental purpose that could potentially resolve the serialization issues
observed in serializing/de-serializing newer instances (This is an issue with static Enum which i am to trying address)-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FaultsFile checksum error with a correspondingHttpStatus.UNPROCESSABLE_ENTITY.static final FaultsFile already locked fault with a correspondingHttpStatus.LOCKED.static final FaultsServer error with a correspondingHttpStatus.INTERNAL_SERVER_ERRORstatic final FaultsUnknown error.static final FaultsGeneral validation error with a correspondingHttpStatus.BAD_REQUEST.Fields inherited from class io.github.venkateshamurthy.enums.DynamicEnum
instances, mappers -
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.ObjectMapperGet aObjectMapperwith any configurationname()Gets the namestatic FaultsA valueOf function getting the Faults corresponding to name passedstatic Faults[]values()Get an array of Fault instances created in this JVM.Methods inherited from class io.github.venkateshamurthy.enums.DynamicEnum
allOf, getDefaultMapper, ordinal, valueOf, valueOf, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.venkateshamurthy.enums.examples.FaultCode
getDescription, getStatus, toCommonRTE, toCommonRTE, toCommonRTE, toCommonRTE
-
Field Details
-
UNKNOWN
Unknown error. The field name and thename()should match to see this close to an enum. -
FILE_LOCKED_ERR
File already locked fault with a correspondingHttpStatus.LOCKED. -
FILE_LNCK_ERR
File checksum error with a correspondingHttpStatus.UNPROCESSABLE_ENTITY. -
VALIDATION_ERR
General validation error with a correspondingHttpStatus.BAD_REQUEST. -
SERVER_ERR
Server error with a correspondingHttpStatus.INTERNAL_SERVER_ERROR
-
-
Method Details
-
name
Gets the name.- Specified by:
namein interfaceFaultCode- Overrides:
namein classDynamicEnum<Faults>- Returns:
- name
-
values
Get an array of Fault instances created in this JVM.- Returns:
- array of
Faults
-
getDefaultMapper
public static com.fasterxml.jackson.databind.ObjectMapper getDefaultMapper()Get aObjectMapperwith any configuration- Returns:
- ObjectMapper
-
valueOf
A valueOf function getting the Faults corresponding to name passed- Parameters:
name- ofFaults- Returns:
- Faults
-