public class ClientMdsException extends Exception
Modifier and Type | Field and Description |
---|---|
static int |
CLIENT_BAD_REQUEST
invalid XML, wrong prefix or request body must be exactly two lines: "DOI
and URL; wrong domain, wrong prefix".
|
static int |
CLIENT_ERROR_CONFLICT
DOIServer : Cannot know which role must be applied.
|
static int |
CLIENT_ERROR_FORBIDDEN
login problem, quota exceeded or dataset belongs to another party.
|
static int |
CLIENT_ERROR_GONE
the requested dataset was marked inactive (using DELETE method).
|
static int |
CLIENT_ERROR_NOT_FOUND
DOI does not exist in our database.
|
static int |
CLIENT_ERROR_PRECONDITION_FAILED
metadata must be uploaded first.
|
static int |
CLIENT_ERROR_UNAUTHORIZED
no login.
|
static int |
CONNECTOR_ERROR_COMMUNICATION
no login.
|
private String |
detailMessage
Detail message.
|
private static long |
serialVersionUID
SeralVersionUID
|
private org.restlet.data.Status |
status
HTTP status.
|
static int |
SUCCESS_CREATED
Operation successful.
|
static int |
SUCCESS_NO_CONTENT
no DOIs founds.
|
static int |
SUCCESS_OK
Operation successful.
|
Constructor and Description |
---|
ClientMdsException(org.restlet.data.Status status)
Constructs a new exception with HTTP status as its detail message.
|
ClientMdsException(org.restlet.data.Status status,
String message)
Constructs a new exception with the specified HTTP status and detail
message.
|
ClientMdsException(org.restlet.data.Status status,
String message,
org.restlet.representation.Representation responseEntity,
Throwable cause)
Constructs a new exception with the specified detail HTTP status,
response and cause.
|
ClientMdsException(org.restlet.data.Status status,
String message,
Throwable cause)
Constructs a new exception with the specified detail HTTP status, message
and cause.
|
ClientMdsException(org.restlet.data.Status status,
Throwable cause)
Constructs a new exception with the specified detail cause.
|
Modifier and Type | Method and Description |
---|---|
private String |
computeDetailMessage(org.restlet.data.Status status)
Returns the detail message according to the status.
|
private org.restlet.data.Status |
computeStatus(org.restlet.data.Status status)
Computes status
|
String |
getDetailMessage()
Returns detail message;
|
org.restlet.data.Status |
getStatus()
Returns the status.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int SUCCESS_CREATED
public static final int SUCCESS_OK
public static final int SUCCESS_NO_CONTENT
public static final int CLIENT_BAD_REQUEST
public static final int CLIENT_ERROR_UNAUTHORIZED
public static final int CONNECTOR_ERROR_COMMUNICATION
public static final int CLIENT_ERROR_FORBIDDEN
public static final int CLIENT_ERROR_NOT_FOUND
public static final int CLIENT_ERROR_CONFLICT
public static final int CLIENT_ERROR_GONE
public static final int CLIENT_ERROR_PRECONDITION_FAILED
private static final long serialVersionUID
private final String detailMessage
private final org.restlet.data.Status status
public ClientMdsException(org.restlet.data.Status status)
status
- HTTP statuspublic ClientMdsException(org.restlet.data.Status status, String message)
status
- HTTP messagemessage
- messagepublic ClientMdsException(org.restlet.data.Status status, Throwable cause)
status
- HTTP statuscause
- causepublic ClientMdsException(org.restlet.data.Status status, String message, Throwable cause)
status
- HTTP statusmessage
- messagecause
- causepublic ClientMdsException(org.restlet.data.Status status, String message, org.restlet.representation.Representation responseEntity, Throwable cause)
status
- HTTP statusmessage
- messageresponseEntity
- Representation of the responsecause
- causeprivate org.restlet.data.Status computeStatus(org.restlet.data.Status status)
status
- statusprivate String computeDetailMessage(org.restlet.data.Status status)
status
- HTTP statuspublic org.restlet.data.Status getStatus()
public String getDetailMessage()
Copyright © 2017–2020 CNES. All rights reserved.