Class ResponseInfo

java.lang.Object
com.gentics.contentnode.rest.model.response.ResponseInfo
All Implemented Interfaces:
Serializable

public class ResponseInfo extends Object implements Serializable
Response information that contains a response code and a response message.

The response message should not be internationalized. If you want to provide a user friendly message use the message object instead.
Author:
floriangutmann
See Also:
  • Constructor Details

    • ResponseInfo

      public ResponseInfo()
      Empty construtor. Necessary for JAXB.
    • ResponseInfo

      public ResponseInfo(ResponseCode responseCode, String responseMessage)
      Constructor for a ResponseInfo with all parameters.
      Parameters:
      responseCode - Code for the response
      responseMessage - Message for the response
    • ResponseInfo

      public ResponseInfo(ResponseCode responseCode, String responseMessage, String property)
      Create an instance
      Parameters:
      responseCode - response code
      responseMessage - response message
      property - property name
  • Method Details

    • ok

      public static ResponseInfo ok(String message)
      Create an instance with ResponseCode.OK and message
      Parameters:
      message - response message
      Returns:
      instance
    • getResponseCode

      public ResponseCode getResponseCode()
      Response code
      Returns:
      response code
    • setResponseCode

      public void setResponseCode(ResponseCode responseCode)
    • getResponseMessage

      public String getResponseMessage()
      Response message
      Returns:
      response message
    • setResponseMessage

      public void setResponseMessage(String responseMessage)
    • getProperty

      public String getProperty()
      Property, that caused the request to fail (may be null)
      Returns:
      property name
    • setProperty

      public void setProperty(String property)