Package de.pisa.psa.rst.obj
Enum PsaRstApiErrCod
- java.lang.Object
-
- java.lang.Enum<PsaRstApiErrCod>
-
- de.pisa.psa.rst.obj.PsaRstApiErrCod
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PsaRstApiErrCod>
public enum PsaRstApiErrCod extends java.lang.Enum<PsaRstApiErrCod>
REST API: error codes- Since:
- 23.05.2023
- Author:
- weiland
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONFIGURATION_AMBIGUOUS
[400] configuration ambiguousCONFIGURATION_NOT_FOUND
[400] configuration not foundCREDENTIALS_AMBIGUOUS
[401] ambiguous credentialsCREDENTIALS_AUTH_MISSING
[401] authentication missingCREDENTIALS_INVALID
[401] invalid credentialsCREDENTIALS_UNKNOWN_USER
[401] ambiguous unknownINVALID_DATA
[400] invalid dataINVALID_FIELD
[400] invalid data object fieldINVALID_ID
[400] invalid IDJSON_PROCESSING_ERROR
[400] JSON processing errorMISSING_DATA
[400] missing dataMISSING_QUERY_BODY
[400] missing bodyRECORD_ACCESS_NO_READ
[403] no read access on the recordRECORD_AMBIGUOUS
[404] record ambiguousRECORD_NOT_FOUND
[404] record not foundUNEXPECTED_ERROR
[500] unexpected errorUSER_UNKNOWN
[403] no read access on the record
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PsaRstApiErrFac
factory()
create a factory for this errorjava.lang.String
getCode()
get the error codejava.lang.String
getMessage()
get the error messagejavax.ws.rs.core.Response.Status
getStatus()
get the associated status codestatic PsaRstApiErrCod
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PsaRstApiErrCod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INVALID_ID
public static final PsaRstApiErrCod INVALID_ID
[400] invalid ID
-
MISSING_QUERY_BODY
public static final PsaRstApiErrCod MISSING_QUERY_BODY
[400] missing body
-
CONFIGURATION_NOT_FOUND
public static final PsaRstApiErrCod CONFIGURATION_NOT_FOUND
[400] configuration not found
-
CONFIGURATION_AMBIGUOUS
public static final PsaRstApiErrCod CONFIGURATION_AMBIGUOUS
[400] configuration ambiguous
-
INVALID_FIELD
public static final PsaRstApiErrCod INVALID_FIELD
[400] invalid data object field
-
MISSING_DATA
public static final PsaRstApiErrCod MISSING_DATA
[400] missing data
-
INVALID_DATA
public static final PsaRstApiErrCod INVALID_DATA
[400] invalid data
-
JSON_PROCESSING_ERROR
public static final PsaRstApiErrCod JSON_PROCESSING_ERROR
[400] JSON processing error
-
CREDENTIALS_INVALID
public static final PsaRstApiErrCod CREDENTIALS_INVALID
[401] invalid credentials
-
CREDENTIALS_AUTH_MISSING
public static final PsaRstApiErrCod CREDENTIALS_AUTH_MISSING
[401] authentication missing
-
CREDENTIALS_AMBIGUOUS
public static final PsaRstApiErrCod CREDENTIALS_AMBIGUOUS
[401] ambiguous credentials
-
CREDENTIALS_UNKNOWN_USER
public static final PsaRstApiErrCod CREDENTIALS_UNKNOWN_USER
[401] ambiguous unknown
-
RECORD_ACCESS_NO_READ
public static final PsaRstApiErrCod RECORD_ACCESS_NO_READ
[403] no read access on the record
-
USER_UNKNOWN
public static final PsaRstApiErrCod USER_UNKNOWN
[403] no read access on the record
-
RECORD_NOT_FOUND
public static final PsaRstApiErrCod RECORD_NOT_FOUND
[404] record not found
-
RECORD_AMBIGUOUS
public static final PsaRstApiErrCod RECORD_AMBIGUOUS
[404] record ambiguous
-
UNEXPECTED_ERROR
public static final PsaRstApiErrCod UNEXPECTED_ERROR
[500] unexpected error
-
-
Method Detail
-
values
public static PsaRstApiErrCod[] 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 (PsaRstApiErrCod c : PsaRstApiErrCod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PsaRstApiErrCod 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()
get the error code- Returns:
- code
-
getMessage
public java.lang.String getMessage()
get the error message- Returns:
- message
-
getStatus
public javax.ws.rs.core.Response.Status getStatus()
get the associated status code- Returns:
- status
-
factory
public PsaRstApiErrFac factory()
create a factory for this error- Returns:
- factory
-
-