|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.service.StatusService
public class StatusService
Service providing common representations for exception status.
Constructor Summary | |
---|---|
StatusService(boolean enabled)
Constructor. |
Method Summary | |
---|---|
String |
getContactEmail()
Returns the email address to contact in case of error. |
Reference |
getHomeRef()
Returns the home URI to propose in case of error. |
Representation |
getRepresentation(Status status,
Request request,
Response response)
Returns a representation for the given status. In order to customize the default representation, this method can be overriden. |
Status |
getStatus(Throwable throwable,
Request request,
Response response)
Returns a status for a given exception or error. |
boolean |
isEnabled()
Indicates if the service should be enabled. |
boolean |
isOverwrite()
Indicates if an existing entity should be overwritten. |
void |
setContactEmail(String contactEmail)
Sets the email address to contact in case of error. |
void |
setEnabled(boolean enabled)
Indicates if the service should be enabled. |
void |
setHomeRef(Reference homeRef)
Sets the home URI to propose in case of error. |
void |
setOverwrite(boolean overwrite)
Indicates if an existing entity should be overwritten. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatusService(boolean enabled)
enabled
- True if the service has been enabled.Method Detail |
---|
public String getContactEmail()
public Reference getHomeRef()
public Representation getRepresentation(Status status, Request request, Response response)
status
- The status to represent.request
- The request handled.response
- The response updated.
public Status getStatus(Throwable throwable, Request request, Response response)
Status.SERVER_ERROR_INTERNAL
status and logs a severe message.
throwable
- The exception or error caught.request
- The request handled.response
- The response updated.
public boolean isEnabled()
public boolean isOverwrite()
public void setContactEmail(String contactEmail)
contactEmail
- The email address to contact in case of error.public void setEnabled(boolean enabled)
enabled
- True if the service should be enabled.public void setHomeRef(Reference homeRef)
homeRef
- The home URI to propose in case of error.public void setOverwrite(boolean overwrite)
overwrite
- True if an existing entity should be overwritten.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |