Package ru.bgcrm.struts.form
Class Response
java.lang.Object
ru.bgcrm.struts.form.Response
HTTP response object, may be JSON serialized.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEvent
(ClientEvent event) Add an event for frontend.void
addPageable
(Pageable<?> result) Adds search result to the response data, two objects with keys: 'page' and 'list'getData()
Response data.Events for processing of frontend.Message forSTATUS_ERROR
orSTATUS_MESSAGE
.void
Set response data object.void
setMessage
(String message) void
Set status of request's execution.
-
Field Details
-
STATUS_OK
- See Also:
-
STATUS_ERROR
- See Also:
-
STATUS_MESSAGE
- See Also:
-
-
Constructor Details
-
Response
public Response()
-
-
Method Details
-
getStatus
- Returns:
-
setStatus
Set status of request's execution.- Parameters:
status
-
-
getMessage
Message forSTATUS_ERROR
orSTATUS_MESSAGE
.- Returns:
-
setMessage
-
getEventList
Events for processing of frontend.- Returns:
-
addEvent
Add an event for frontend.- Parameters:
event
-
-
getData
Response data. May be serialized to JSON, or available on JSP page.- Returns:
-
setData
Set response data object.- Parameters:
key
-data
-
-
addPageable
Adds search result to the response data, two objects with keys: 'page' and 'list'- Parameters:
result
-
-