public enum IdentifierErrorTemplate extends Enum<IdentifierErrorTemplate>
| Enum Constant and Description |
|---|
DATABASE_CONNECTION_ERROR
Database Connection Error - HTTP Code: 500
|
GENERIC_ERROR
Unspecified Error - HTTP Code: 500
|
INVALID_PASSWORD
The password is invalid - HTTP code: 404
|
INVALID_USERNAME
The requested record set for the provider id is empty - HTTP code: 404
|
USER_DOES_NOT_EXIST
User does not exist already in the database - HTTP code: 404
|
USER_EXISTS
User exists already in the database - HTTP code: 409
|
| Modifier and Type | Method and Description |
|---|---|
abstract eu.europeana.cloud.common.response.ErrorInfo |
getErrorInfo(String... args)
Generate the error message for each case
|
abstract <T extends eu.europeana.cloud.common.exceptions.GenericException> |
getException(eu.europeana.cloud.common.response.ErrorInfo e)
Generate an exception according to the type of ErrorCode
|
abstract javax.ws.rs.core.Response.Status |
getHttpCode()
Return the according HTTP Code
|
static IdentifierErrorTemplate |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IdentifierErrorTemplate[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IdentifierErrorTemplate GENERIC_ERROR
public static final IdentifierErrorTemplate DATABASE_CONNECTION_ERROR
public static final IdentifierErrorTemplate USER_EXISTS
public static final IdentifierErrorTemplate USER_DOES_NOT_EXIST
public static final IdentifierErrorTemplate INVALID_USERNAME
public static final IdentifierErrorTemplate INVALID_PASSWORD
public static IdentifierErrorTemplate[] values()
for (IdentifierErrorTemplate c : IdentifierErrorTemplate.values()) System.out.println(c);
public static IdentifierErrorTemplate valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract eu.europeana.cloud.common.response.ErrorInfo getErrorInfo(String... args)
args - public abstract javax.ws.rs.core.Response.Status getHttpCode()
public abstract <T extends eu.europeana.cloud.common.exceptions.GenericException> T getException(eu.europeana.cloud.common.response.ErrorInfo e)
e - The related Error informationCopyright © 2013–2017 Europeana Cloud Development Team. All rights reserved.