Package ru.bgcrm.struts.form

# Class Response

java.lang.Object
ru.bgcrm.struts.form.Response

public class Response extends Object
HTTP response object, may be JSON serialized.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `STATUS_ERROR`
  `static final String`
  `STATUS_MESSAGE`
  `static final String`
  `STATUS_OK`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Response()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `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'
  `Map<String,Object>`
  `getData()`
  Response data.
  `List<ClientEvent>`
  `getEventList()`
  Events for processing of frontend.
  `String`
  `getMessage()`
  Message for `STATUS_ERROR` or `STATUS_MESSAGE`.
  `String`
  `getStatus()`
  Status of request's execution, may be: `STATUS_OK`, `STATUS_ERROR`, `STATUS_MESSAGE`
  `void`
  `setData(String key, Object data)`
  Set response data object.
  `void`
  `setMessage(String message)`
  `void`
  `setStatus(String status)`
  Set status of request's execution.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### STATUS_OK

    public static final String STATUS_OK
    See Also:
      - Constant Field Values

  - ### STATUS_ERROR

    public static final String STATUS_ERROR
    See Also:
      - Constant Field Values

  - ### STATUS_MESSAGE

    public static final String STATUS_MESSAGE
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Response

    public Response()

- ## Method Details

  - ### getStatus

    public String getStatus()
    Status of request's execution, may be: `STATUS_OK`, `STATUS_ERROR`, `STATUS_MESSAGE`
    Returns:

  - ### setStatus

    public void setStatus(String status)
    Set status of request's execution.
    Parameters:
      `status` -

  - ### getMessage

    public String getMessage()
    Message for `STATUS_ERROR` or `STATUS_MESSAGE`.
    Returns:

  - ### setMessage

    public void setMessage(String message)

  - ### getEventList

    public List<ClientEvent> getEventList()
    Events for processing of frontend.
    Returns:

  - ### addEvent

    public void addEvent(ClientEvent event)
    Add an event for frontend.
    Parameters:
      `event` -

  - ### getData

    public Map<String,Object> getData()
    Response data. May be serialized to JSON, or available on JSP page.
    Returns:

  - ### setData

    public void setData(String key, Object data)
    Set response data object.
    Parameters:
      `key` -
      `data` -

  - ### addPageable

    public void addPageable(Pageable<?> result)
    Adds search result to the response data, two objects with keys: 'page' and 'list'
    Parameters:
      `result` -