Package de.pisa.psa.rst.obj
Enum Class PsaRstApiErrCod
- All Implemented Interfaces:
Serializable
,Comparable<PsaRstApiErrCod>
,Constable
REST API: error codes
- Since:
- 23.05.2023
- Author:
- weiland
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Custom HTTP response statusNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription[422] data validation failed[400] configuration ambiguous[400] configuration not found[401] ambiguous credentials[401] authentication missing[401] invalid credentials[401] ambiguous unknown[400] invalid data[400] invalid data object field[400] invalid ID[400] JSON processing error[400] missing data[400] missing body[403] no delete access on the record[403] no insert access granted[403] no read access on the record[403] no write access on the record[404] record ambiguous[404] record not found[500] unexpected error[403] no read access on the record -
Method Summary
Modifier and TypeMethodDescriptionfactory()
create a factory for this errorgetCode()
get the error codeget the error messagejavax.ws.rs.core.Response.StatusType
get the associated status codestatic PsaRstApiErrCod
Returns the enum constant of this class with the specified name.static PsaRstApiErrCod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INVALID_ID
[400] invalid ID -
MISSING_QUERY_BODY
[400] missing body -
CONFIGURATION_NOT_FOUND
[400] configuration not found -
CONFIGURATION_AMBIGUOUS
[400] configuration ambiguous -
INVALID_FIELD
[400] invalid data object field -
MISSING_DATA
[400] missing data -
INVALID_DATA
[400] invalid data -
JSON_PROCESSING_ERROR
[400] JSON processing error -
CREDENTIALS_INVALID
[401] invalid credentials -
CREDENTIALS_AUTH_MISSING
[401] authentication missing -
CREDENTIALS_AMBIGUOUS
[401] ambiguous credentials -
CREDENTIALS_UNKNOWN_USER
[401] ambiguous unknown -
RECORD_ACCESS_NO_READ
[403] no read access on the record -
RECORD_ACCESS_NO_WRITE
[403] no write access on the record -
RECORD_ACCESS_NO_DELETE
[403] no delete access on the record -
RECORD_ACCESS_NO_INSERT
[403] no insert access granted -
USER_UNKNOWN
[403] no read access on the record -
RECORD_NOT_FOUND
[404] record not found -
RECORD_AMBIGUOUS
[404] record ambiguous -
CHECK_FAILED
[422] data validation failed -
UNEXPECTED_ERROR
[500] unexpected 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
get the error code- Returns:
- code
-
getMessage
get the error message- Returns:
- message
-
getStatus
public javax.ws.rs.core.Response.StatusType getStatus()get the associated status code- Returns:
- status
-
factory
create a factory for this error- Returns:
- factory
-