T - a type extending SkysailDatapublic class Response<T> extends Object
SkysailData which is available via the method getData().
Futhermore, a skysail response provides:
- a success flag: did the request run ok on the server side?
- a message: a string providing some information about the response (or an error message if appropriate)
This class is used in SkysailServerResource to define the common structure how skysail REST representations
of resources look like. The plain 'data' of the resource itself is augmented with the additional information shown
above.
Remark: This class is not abstract as of jackson serialization issues| Modifier and Type | Field and Description |
|---|---|
protected T |
validationViolations
violations of validating T.
|
| Constructor and Description |
|---|
Response() |
Response(T data) |
Response(T data,
org.restlet.Request request,
Set<String> mappings) |
| Modifier and Type | Method and Description |
|---|---|
T |
getData() |
String |
getMessage() |
Navigation |
getNavigation() |
Boolean |
getSuccess() |
T |
getValidationViolations() |
void |
setData(T mydata) |
void |
setMessage(String msg) |
void |
setNavigation(Navigation navigation) |
void |
setSuccess(Boolean successful) |
void |
setValidationViolations(T constraintViolations) |
protected T validationViolations
public Response()
public Response(T data)
public final Boolean getSuccess()
public final void setSuccess(Boolean successful)
public final String getMessage()
public final void setMessage(String msg)
public void setNavigation(Navigation navigation)
public T getData()
public T getValidationViolations()
public final void setData(T mydata)
public void setValidationViolations(T constraintViolations)
public Navigation getNavigation()
Copyright © 2011-2013. All Rights Reserved.