Modifier and Type | Method and Description |
---|---|
static RestError |
ALREADY_EXISTING(String id)
Creates an error saying that the database already contains an entry with
the same ID as the one in the
entry the user tried to create.
|
static RestError |
DUPLICATE_KEY(String field)
Creates an error saying that JSON object given has a duplicate field.
|
static RestError |
FIELD_NOT_ALLOWED(String field)
Creates an error saying that the given field is a primary key, and thus
cannot be changed when updating an
entry.
|
static RestError |
FILE_NOT_FOUND(String path)
Creates an error saying that the file requested for import at the given
location does not exist on the
server.
|
static RestError |
ILLEGAL_FIELD_VALUE(String field,
String value)
Creates an error saying that the given field has been assigned an illegal
value.
|
static RestError |
ILLEGAL_PARAMETER_VALUE(String parameter,
String value)
Creates an error saying that one of the request's parameters has an
illegal value.
|
static RestError |
MALFORMED_JSON(int line,
int column,
String cause)
Creates an error saying that the request content is not a valid JSON
object.
|
static RestError |
MISSING_BODY()
Creates an error saying that the request is missing a body when one was
required.
|
static RestError |
MISSING_FIELD(String field)
Creates an error saying that one of the JSON object's field is missing
when it was required.
|
static RestError |
RULE_NOT_ALLOWED(String host,
String rule)
Creates an error saying that the given host is not allowed to use the
given rule for its transfers.
|
static RestError |
UNKNOWN_FIELD(String field)
Creates an error saying that the JSON object sent had an extra unknown
field named with the given name.
|
static RestError |
UNKNOWN_HOST(String host)
Creates an error saying that the requested host name entered alongside
the newly created transfer does not
exist.
|
static RestError |
UNKNOWN_RULE(String rule)
Creates an error saying that the transfer rule entered alongside the
newly created transfer does not exist.
|
public static RestError MISSING_BODY()
public static RestError MALFORMED_JSON(int line, int column, String cause)
public static RestError DUPLICATE_KEY(String field)
field
- the missing parameter's namepublic static RestError ILLEGAL_PARAMETER_VALUE(String parameter, String value)
parameter
- the incorrect parameter's namepublic static RestError UNKNOWN_FIELD(String field)
field
- the extra field encounteredpublic static RestError MISSING_FIELD(String field)
field
- the field whose value is missingpublic static RestError ILLEGAL_FIELD_VALUE(String field, String value)
field
- the name of the field whose value is incorrectvalue
- the textual representation of the incorrect valuepublic static RestError ALREADY_EXISTING(String id)
id
- the duplicate ID in the requested collectionpublic static RestError FILE_NOT_FOUND(String path)
path
- the incorrect pathpublic static RestError UNKNOWN_RULE(String rule)
rule
- the unknown rule's namepublic static RestError UNKNOWN_HOST(String host)
host
- the unknown host namepublic static RestError RULE_NOT_ALLOWED(String host, String rule)
host
- the host processing the transferrule
- the rule which the host is not allowed to usepublic static RestError FIELD_NOT_ALLOWED(String field)
field
- the name of the field which was illegally modifiedCopyright © 2009–2020 Waarp. All rights reserved.