public class JSONResponse extends AbstractPostResponse
JSONResponse
is an AbstractPostResponse
preparing
the response in JSON.Modifier and Type | Class and Description |
---|---|
class |
JSONResponse.JSONResponseException |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RESPONSE_CONTENT_TYPE |
PN_ERROR, PN_IS_CREATED, PN_LOCATION, PN_PARENT_LOCATION, PN_PATH, PN_REFERER, PN_STATUS_CODE, PN_STATUS_MESSAGE, PN_TITLE
Constructor and Description |
---|
JSONResponse() |
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getError()
Returns any recorded error or
null |
java.lang.Object |
getProperty(java.lang.String name)
Returns the generic response property with the given name and type or
null if no such property exists. |
void |
onChange(java.lang.String type,
java.lang.String... arguments)
Records a generic change of the given
type with arguments. |
void |
setError(java.lang.Throwable error)
Sets the recorded error causing the operation to fail.
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a generic response property with the given
|
getLocation, getParentLocation, getPath, getReferer, getStatusCode, getStatusMessage, isCreateRequest, isSuccessful, onCopied, onCreated, onDeleted, onModified, onMoved, send, setCreateRequest, setLocation, setParentLocation, setPath, setReferer, setStatus, setTitle
public static final java.lang.String RESPONSE_CONTENT_TYPE
public JSONResponse() throws JSONResponse.JSONResponseException
public void onChange(java.lang.String type, java.lang.String... arguments) throws JSONResponse.JSONResponseException
PostResponse
type
with arguments.type
- The type of the modificationarguments
- The arguments to the modificationsJSONResponse.JSONResponseException
public void setError(java.lang.Throwable error)
PostResponse
setError
in interface PostResponse
setError
in class AbstractPostResponse
public java.lang.Throwable getError()
AbstractPostResponse
null
getError
in interface PostResponse
getError
in class AbstractPostResponse
null
public void setProperty(java.lang.String name, java.lang.Object value)
AbstractPostResponse
name
- name of the propertyvalue
- value of the propertypublic java.lang.Object getProperty(java.lang.String name) throws JSONResponse.JSONResponseException
AbstractPostResponse
null
if no such property exists."Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"