de.twenty11.skysail.common.responses
Class Response<T>
java.lang.Object
de.twenty11.skysail.common.responses.Response<T>
- Type Parameters:
T - a type extending SkysailData
- Direct Known Subclasses:
- FailureResponse, SuccessResponse
public class Response<T>
- extends Object
The root class for restful responses served by skysail server. A skysail response always wraps an object of type
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
validationViolations
protected T validationViolations
- violations of validating T.
Response
public Response()
Response
public Response(T data)
Response
public Response(T data,
org.restlet.Request request,
Set<String> mappings)
getSuccess
public final Boolean getSuccess()
setSuccess
public final void setSuccess(Boolean successful)
getMessage
public final String getMessage()
setMessage
public final void setMessage(String msg)
setNavigation
public void setNavigation(Navigation navigation)
getData
public T getData()
getValidationViolations
public T getValidationViolations()
setData
public final void setData(T mydata)
setValidationViolations
public void setValidationViolations(T constraintViolations)
getNavigation
public Navigation getNavigation()
Copyright © 2011-2012. All Rights Reserved.