Package org.opencms.xml.xml2json
Class CmsJsonResult
- java.lang.Object
-
- org.opencms.xml.xml2json.CmsJsonResult
-
public class CmsJsonResult extends java.lang.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 Summary
Constructors Constructor Description CmsJsonResult(java.lang.Object json, int status)Creates a new instance.CmsJsonResult(CmsResource resource)Creates a result which indicates that a different resource should be loaded instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetJson()Gets the JSON data.CmsResourcegetNextResource()Gets the next resource which should be loaded.intgetStatus()Gets the HTTP status code to set.
-
-
-
Constructor Detail
-
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(java.lang.Object json, int status)
Creates a new instance.- Parameters:
json- the JSON datastatus- the result
-
-
Method Detail
-
getJson
public java.lang.Object getJson()
Gets the JSON data.- Returns:
- the JSON data
-
getNextResource
public CmsResource 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
-
-