Klasse JakartaToJavaxPostResponse
java.lang.Object
org.apache.sling.servlets.post.impl.wrapper.JakartaToJavaxPostResponse
- Alle implementierten Schnittstellen:
PostResponse
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetError()Returns any recorded error ornullReturns the location of the modification.Returns the parent location of the modification.getPath()Returns the absolute path of the item upon which the request operated.Returns the referer previously set byPostResponse.setReferer(String)intReturns the status code of this instance.Returns the status message ornullif no has been set with thePostResponse.setStatus(int, String)method.booleanReturnstrueif this was a create request.booleanvoidRecords a generic change of the giventypewith arguments.voidRecords a 'copied' change.voidRecords a 'created' changevoidRecords a 'deleted' changevoidonModified(String path) Records a 'modified' changevoidRecords a 'moved' change.voidsend(javax.servlet.http.HttpServletResponse response, boolean setStatus) Writes the response back over the provided HTTP channel.voidsetCreateRequest(boolean isCreateRequest) Sets whether the request was a create request or not.voidSets the recorded error causing the operation to fail.voidsetLocation(String location) Sets the location of this modification.voidsetParentLocation(String parentLocation) Sets the parent location of the modification.voidSets the absolute path of the item upon which the request operated.voidsetReferer(String referer) Sets the referer propertyvoidSets the response status code propertiesvoidSets the title of the response message
-
Konstruktordetails
-
JakartaToJavaxPostResponse
-
-
Methodendetails
-
getError
Beschreibung aus Schnittstelle kopiert:PostResponseReturns any recorded error ornull- Angegeben von:
getErrorin SchnittstellePostResponse- Gibt zurück:
- an error or
null
-
getLocation
Beschreibung aus Schnittstelle kopiert:PostResponseReturns the location of the modification.If the
PostResponse.setLocation(String)method has not been called yet, this method returnsnull.- Angegeben von:
getLocationin SchnittstellePostResponse- Gibt zurück:
- the location
-
getParentLocation
Beschreibung aus Schnittstelle kopiert:PostResponseReturns the parent location of the modification.If the
PostResponse.setParentLocation(String)method has not been called yet, this method returnsnull.- Angegeben von:
getParentLocationin SchnittstellePostResponse- Gibt zurück:
- the parent location
-
getPath
Beschreibung aus Schnittstelle kopiert:PostResponseReturns the absolute path of the item upon which the request operated.If the
PostResponse.setPath(String)method has not been called yet, this method returnsnull.- Angegeben von:
getPathin SchnittstellePostResponse- Gibt zurück:
- the path (might be null)
-
getReferer
Beschreibung aus Schnittstelle kopiert:PostResponseReturns the referer previously set byPostResponse.setReferer(String)- Angegeben von:
getRefererin SchnittstellePostResponse- Gibt zurück:
- the referer
-
getStatusCode
public int getStatusCode()Beschreibung aus Schnittstelle kopiert:PostResponseReturns the status code of this instance. If the status code has never been set by calling thePostResponse.setStatus(int, String)method, the status code is determined by checking if there was an error. If there was an error, the response is assumed to be unsuccessful and 500 is returned. If there is no error, the response is assumed to be successful and 200 is returned.- Angegeben von:
getStatusCodein SchnittstellePostResponse- Gibt zurück:
- the status code
-
getStatusMessage
Beschreibung aus Schnittstelle kopiert:PostResponseReturns the status message ornullif no has been set with thePostResponse.setStatus(int, String)method.- Angegeben von:
getStatusMessagein SchnittstellePostResponse- Gibt zurück:
- the status message (might be null)
-
isCreateRequest
public boolean isCreateRequest()Beschreibung aus Schnittstelle kopiert:PostResponseReturnstrueif this was a create request.Before calling the
PostResponse.setCreateRequest(boolean)method, this method always returnsfalse.- Angegeben von:
isCreateRequestin SchnittstellePostResponse- Gibt zurück:
- if this was a create request
-
isSuccessful
public boolean isSuccessful()Beschreibung aus Schnittstelle kopiert:PostResponse- Angegeben von:
isSuccessfulin SchnittstellePostResponse- Gibt zurück:
- true if the status code is 2xx
-
onChange
Beschreibung aus Schnittstelle kopiert:PostResponseRecords a generic change of the giventypewith arguments.- Angegeben von:
onChangein SchnittstellePostResponse- Parameter:
type- The type of the modificationarguments- The arguments to the modifications
-
onCopied
Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'copied' change.Note: the copy change only records the basic copy command. the implied changes on the copied properties and sub nodes are not recorded.
- Angegeben von:
onCopiedin SchnittstellePostResponse- Parameter:
srcPath- source path of the node that was copieddstPath- destination path of the node that was copied.
-
onCreated
Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'created' change- Angegeben von:
onCreatedin SchnittstellePostResponse- Parameter:
path- path of the item that was created
-
onDeleted
Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'deleted' change- Angegeben von:
onDeletedin SchnittstellePostResponse- Parameter:
path- path of the item that was deleted
-
onModified
Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'modified' change- Angegeben von:
onModifiedin SchnittstellePostResponse- Parameter:
path- path of the item that was modified
-
onMoved
Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'moved' change.Note: the moved change only records the basic move command. the implied changes on the moved properties and sub nodes are not recorded.
- Angegeben von:
onMovedin SchnittstellePostResponse- Parameter:
srcPath- source path of the node that was moveddstPath- destination path of the node that was moved.
-
send
public void send(javax.servlet.http.HttpServletResponse response, boolean setStatus) throws IOException Beschreibung aus Schnittstelle kopiert:PostResponseWrites the response back over the provided HTTP channel. The actual format of the response is implementation dependent.- Angegeben von:
sendin SchnittstellePostResponse- Parameter:
response- to send tosetStatus- whether to set the status code on the response- Löst aus:
IOException- if an i/o exception occurs
-
setCreateRequest
public void setCreateRequest(boolean isCreateRequest) Beschreibung aus Schnittstelle kopiert:PostResponseSets whether the request was a create request or not.- Angegeben von:
setCreateRequestin SchnittstellePostResponse- Parameter:
isCreateRequest- true if the request was a create request
-
setError
Beschreibung aus Schnittstelle kopiert:PostResponseSets the recorded error causing the operation to fail.- Angegeben von:
setErrorin SchnittstellePostResponse- Parameter:
error- the throwable
-
setLocation
Beschreibung aus Schnittstelle kopiert:PostResponseSets the location of this modification. This is the externalized form of thecurrent path.- Angegeben von:
setLocationin SchnittstellePostResponse- Parameter:
location- the location
-
setParentLocation
Beschreibung aus Schnittstelle kopiert:PostResponseSets the parent location of the modification. This is the externalized form of the parent node of thecurrent path.- Angegeben von:
setParentLocationin SchnittstellePostResponse- Parameter:
parentLocation- the parent location of the modification
-
setPath
Beschreibung aus Schnittstelle kopiert:PostResponseSets the absolute path of the item upon which the request operated.- Angegeben von:
setPathin SchnittstellePostResponse- Parameter:
path- the path
-
setReferer
Beschreibung aus Schnittstelle kopiert:PostResponseSets the referer property- Angegeben von:
setRefererin SchnittstellePostResponse- Parameter:
referer- the referer
-
setStatus
Beschreibung aus Schnittstelle kopiert:PostResponseSets the response status code properties- Angegeben von:
setStatusin SchnittstellePostResponse- Parameter:
code- the codemessage- the message
-
setTitle
Beschreibung aus Schnittstelle kopiert:PostResponseSets the title of the response message- Angegeben von:
setTitlein SchnittstellePostResponse- Parameter:
title- the title
-