Package org.apache.sling.servlets.post
Klasse JSONResponse
java.lang.Object
org.apache.sling.servlets.post.AbstractPostResponse
org.apache.sling.servlets.post.JSONResponse
- Alle implementierten Schnittstellen:
PostResponse
Veraltet.
The
JSONResponse is an AbstractPostResponse preparing
the response in JSON.-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Feldübersicht
FelderVon Klasse geerbte Felder org.apache.sling.servlets.post.AbstractPostResponse
PN_ERROR, PN_IS_CREATED, PN_LOCATION, PN_PARENT_LOCATION, PN_PATH, PN_REFERER, PN_STATUS_CODE, PN_STATUS_MESSAGE, PN_TITLE -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected voiddoSend(javax.servlet.http.HttpServletResponse response) Veraltet.getError()Veraltet.Returns any recorded error ornullgetProperty(String name) Veraltet.Returns the generic response property with the given name and type ornullif no such property exists.voidVeraltet.Records a generic change of the giventypewith arguments.voidVeraltet.Sets the recorded error causing the operation to fail.voidsetProperty(String name, Object value) Veraltet.This method accepts values that correspond to json primitives or otherwise assumes that the toString() of the value can be parsed as json.Von Klasse geerbte Methoden org.apache.sling.servlets.post.AbstractPostResponse
getLocation, getParentLocation, getPath, getProperty, getReferer, getStatusCode, getStatusMessage, isCreateRequest, isSafeReferer, isSuccessful, onCopied, onCreated, onDeleted, onModified, onMoved, send, setCreateRequest, setLocation, setParentLocation, setPath, setReferer, setStatus, setTitle
-
Felddetails
-
RESPONSE_CONTENT_TYPE
Veraltet.- Siehe auch:
-
-
Konstruktordetails
-
JSONResponse
public JSONResponse()Veraltet.
-
-
Methodendetails
-
onChange
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseRecords a generic change of the giventypewith arguments.- Parameter:
type- The type of the modificationarguments- The arguments to the modifications
-
setError
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the recorded error causing the operation to fail.- Angegeben von:
setErrorin SchnittstellePostResponse- Setzt außer Kraft:
setErrorin KlasseAbstractPostResponse- Parameter:
error- the throwable
-
getError
Veraltet.Beschreibung aus Klasse kopiert:AbstractPostResponseReturns any recorded error ornull- Angegeben von:
getErrorin SchnittstellePostResponse- Setzt außer Kraft:
getErrorin KlasseAbstractPostResponse- Gibt zurück:
- an error or
null
-
setProperty
Veraltet.This method accepts values that correspond to json primitives or otherwise assumes that the toString() of the value can be parsed as json. If neither is the case it will throw an Exception. Assuming the above holds, it will put the value as json directly into the json value part of the response.- Setzt außer Kraft:
setPropertyin KlasseAbstractPostResponse- Parameter:
name- name of the propertyvalue- value of the property - either of type {String, Boolean, Number, null} or the toString() is parseable as json- Löst aus:
JSONResponse.JSONResponseException- if the value is not usable
-
getProperty
Veraltet.Beschreibung aus Klasse kopiert:AbstractPostResponseReturns the generic response property with the given name and type ornullif no such property exists.- Setzt außer Kraft:
getPropertyin KlasseAbstractPostResponse- Parameter:
name- the name of the response property- Gibt zurück:
- the requested property (might be null)
-
doSend
Veraltet.- Angegeben von:
doSendin KlasseAbstractPostResponse- Löst aus:
IOException
-
JakartaJSONResponseinstead.