Class CmsJsonResult

java.lang.Object
org.opencms.xml.xml2json.CmsJsonResult

public class CmsJsonResult extends Object
Result of rendering JSON. Can be either a JSON value together with a response status, or a resource that should be loaded for the current request.
  • Constructor Details

    • CmsJsonResult

      public CmsJsonResult(CmsResource resource)
      Creates a result which indicates that a different resource should be loaded instead.
      Parameters:
      resource - the resource
    • CmsJsonResult

      public CmsJsonResult(Object json, int status)
      Creates a new instance.
      Parameters:
      json - the JSON data
      status - the result
  • Method Details

    • getJson

      public Object getJson()
      Gets the JSON data.
      Returns:
      the JSON data
    • getNextResource

      Gets the next resource which should be loaded.
      Returns:
      the resource which should be loaded
    • getStatus

      public int getStatus()
      Gets the HTTP status code to set.
      Returns:
      the HTTP status