Klasse HtmlPostResponseProxy
- Alle implementierten Schnittstellen:
PostResponse
HtmlPostResponseProxy class implements the
PostResponse interface using a Sling API HtmlResponse.
This class is mainly used by the deprecated
AbstractSlingPostOperation for
bridging into the new
AbstractPostOperation.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungHtmlPostResponseProxy(org.apache.sling.api.servlets.HtmlResponse apiHtmlResponse) Veraltet. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetError()Veraltet.Returns any recorded error ornullorg.apache.sling.api.servlets.HtmlResponseVeraltet.Veraltet.Returns the location of the modification.Veraltet.Returns the parent location of the modification.getPath()Veraltet.Returns the absolute path of the item upon which the request operated.getProperty(String name) Veraltet.<Type> TypegetProperty(String name, Class<Type> type) Veraltet.Veraltet.Returns the referer previously set byPostResponse.setReferer(String)intVeraltet.Returns the status code of this instance.Veraltet.Returns the status message ornullif no has been set with thePostResponse.setStatus(int, String)method.booleanVeraltet.Returnstrueif this was a create request.booleanVeraltet.voidVeraltet.Records a generic change of the giventypewith arguments.voidVeraltet.Records a 'copied' change.voidVeraltet.Records a 'created' changevoidVeraltet.Records a 'deleted' changevoidonModified(String path) Veraltet.Records a 'modified' changevoidVeraltet.Records a 'moved' change.voidsend(javax.servlet.http.HttpServletResponse response, boolean setStatus) Veraltet.Writes the response back over the provided HTTP channel.voidsetCreateRequest(boolean isCreateRequest) Veraltet.Sets whether the request was a create request or not.voidVeraltet.Sets the recorded error causing the operation to fail.voidsetLocation(String location) Veraltet.Sets the location of this modification.voidsetParentLocation(String parentLocation) Veraltet.Sets the parent location of the modification.voidVeraltet.Sets the absolute path of the item upon which the request operated.voidsetProperty(String name, Object value) Veraltet.voidsetReferer(String referer) Veraltet.Sets the referer propertyvoidVeraltet.Sets the response status code propertiesvoidVeraltet.Sets the title of the response message
-
Konstruktordetails
-
HtmlPostResponseProxy
public HtmlPostResponseProxy(org.apache.sling.api.servlets.HtmlResponse apiHtmlResponse) Veraltet.
-
-
Methodendetails
-
getHtmlResponse
public org.apache.sling.api.servlets.HtmlResponse getHtmlResponse()Veraltet. -
getError
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseReturns any recorded error ornull- Angegeben von:
getErrorin SchnittstellePostResponse- Gibt zurück:
- an error or
null
-
getLocation
Veraltet.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
Veraltet.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
Veraltet.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)
-
getProperty
Veraltet. -
getProperty
Veraltet. -
getReferer
Veraltet.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()Veraltet.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
Veraltet.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()Veraltet.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()Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponse- Angegeben von:
isSuccessfulin SchnittstellePostResponse- Gibt zurück:
- true if the status code is 2xx
-
onChange
Veraltet.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
Veraltet.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
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'created' change- Angegeben von:
onCreatedin SchnittstellePostResponse- Parameter:
path- path of the item that was created
-
onDeleted
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'deleted' change- Angegeben von:
onDeletedin SchnittstellePostResponse- Parameter:
path- path of the item that was deleted
-
onModified
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'modified' change- Angegeben von:
onModifiedin SchnittstellePostResponse- Parameter:
path- path of the item that was modified
-
onMoved
Veraltet.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 Veraltet.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) Veraltet.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
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the recorded error causing the operation to fail.- Angegeben von:
setErrorin SchnittstellePostResponse- Parameter:
error- the throwable
-
setLocation
Veraltet.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
Veraltet.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
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the absolute path of the item upon which the request operated.- Angegeben von:
setPathin SchnittstellePostResponse- Parameter:
path- the path
-
setProperty
Veraltet. -
setReferer
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the referer property- Angegeben von:
setRefererin SchnittstellePostResponse- Parameter:
referer- the referer
-
setStatus
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the response status code properties- Angegeben von:
setStatusin SchnittstellePostResponse- Parameter:
code- the codemessage- the message
-
setTitle
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the title of the response message- Angegeben von:
setTitlein SchnittstellePostResponse- Parameter:
title- the title
-