Package org.apache.sling.servlets.post
Klasse AbstractPostResponseWrapper
java.lang.Object
org.apache.sling.servlets.post.AbstractPostResponseWrapper
- Alle implementierten Schnittstellen:
PostResponse
@Deprecated
public abstract class AbstractPostResponseWrapper
extends Object
implements PostResponse
Veraltet.
Provides a simple implementation of PostResponse that can be subclassed by developers wishing to provide specialized behavior
to an existing PostResponse instance. The default implementation of all methods is to call through to the wrapped
PostResponse instance.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetError()Veraltet.Returns any recorded error ornullVeraltet.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.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.abstract PostResponseVeraltet.Use this method to return an instance of the class being wrapped.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.voidsetReferer(String referer) Veraltet.Sets the referer propertyvoidVeraltet.Sets the response status code propertiesvoidVeraltet.Sets the title of the response message
-
Konstruktordetails
-
AbstractPostResponseWrapper
public AbstractPostResponseWrapper()Veraltet.
-
-
Methodendetails
-
getWrapped
Veraltet.Use this method to return an instance of the class being wrapped.- Gibt zurück:
- the wrapped PostResponse instance
-
setReferer
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the referer property- Angegeben von:
setRefererin SchnittstellePostResponse- Parameter:
referer- the referer
-
getReferer
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseReturns the referer previously set byPostResponse.setReferer(String)- Angegeben von:
getRefererin SchnittstellePostResponse- Gibt zurück:
- the referer
-
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
-
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)
-
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
-
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
-
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
-
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
-
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
-
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
-
setTitle
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the title of the response message- Angegeben von:
setTitlein SchnittstellePostResponse- Parameter:
title- the title
-
setStatus
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the response status code properties- Angegeben von:
setStatusin SchnittstellePostResponse- Parameter:
code- the codemessage- the message
-
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)
-
setError
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseSets the recorded error causing the operation to fail.- Angegeben von:
setErrorin SchnittstellePostResponse- Parameter:
error- the throwable
-
getError
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseReturns any recorded error ornull- Angegeben von:
getErrorin SchnittstellePostResponse- Gibt zurück:
- an error or
null
-
isSuccessful
public boolean isSuccessful()Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponse- Angegeben von:
isSuccessfulin SchnittstellePostResponse- Gibt zurück:
- true if the status code is 2xx
-
onCreated
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'created' change- Angegeben von:
onCreatedin SchnittstellePostResponse- Parameter:
path- path of the item that was created
-
onModified
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'modified' change- Angegeben von:
onModifiedin SchnittstellePostResponse- Parameter:
path- path of the item that was modified
-
onDeleted
Veraltet.Beschreibung aus Schnittstelle kopiert:PostResponseRecords a 'deleted' change- Angegeben von:
onDeletedin SchnittstellePostResponse- Parameter:
path- path of the item that was deleted
-
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.
-
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.
-
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
-
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
-
AbstractJakartaPostResponseWrapperinstead.