Package org.apache.sling.servlets.post.impl.wrapper

# Klasse JavaxToJakartaPostResponse

java.lang.Object
org.apache.sling.servlets.post.impl.wrapper.JavaxToJakartaPostResponse

Alle implementierten Schnittstellen:
  `JakartaPostResponse`

public class JavaxToJakartaPostResponse extends Object implements JakartaPostResponse

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`JavaxToJakartaPostResponse(PostResponse p)`

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`Throwable`
`getError()`
Returns any recorded error or `null`
`String`
`getLocation()`
Returns the location of the modification.
`String`
`getParentLocation()`
Returns the parent location of the modification.
`String`
`getPath()`
Returns the absolute path of the item upon which the request operated.
`String`
`getReferer()`
Returns the referer previously set by `JakartaPostResponse.setReferer(String)`
`int`
`getStatusCode()`
Returns the status code of this instance.
`String`
`getStatusMessage()`
Returns the status message or `null` if no has been set with the `JakartaPostResponse.setStatus(int, String)` method.
`boolean`
`isCreateRequest()`
Returns `true` if this was a create request.
`boolean`
`isSuccessful()`
Returns `true` if no `error` is set and if the `status code` is one of the 2xx codes.
`void`
`onChange(String type, String... arguments)`
Records a generic change of the given `type` with arguments.
`void`
`onCopied(String srcPath, String dstPath)`
Records a 'copied' change.
`void`
`onCreated(String path)`
Records a 'created' change
`void`
`onDeleted(String path)`
Records a 'deleted' change
`void`
`onModified(String path)`
Records a 'modified' change
`void`
`onMoved(String srcPath, String dstPath)`
Records a 'moved' change.
`void`
`send(jakarta.servlet.http.HttpServletResponse response, boolean setStatus)`
Writes the response back over the provided HTTP channel.
`void`
`setCreateRequest(boolean isCreateRequest)`
Sets whether the request was a create request or not.
`void`
`setError(Throwable error)`
Sets the recorded error causing the operation to fail.
`void`
`setLocation(String location)`
Sets the location of this modification.
`void`
`setParentLocation(String parentLocation)`
Sets the parent location of the modification.
`void`
`setPath(String path)`
Sets the absolute path of the item upon which the request operated.
`void`
`setReferer(String referer)`
Sets the referer property
`void`
`setStatus(int code, String message)`
Sets the response status code properties
`void`
`setTitle(String title)`
Sets the title of the response message

### Von Klasse geerbte Methoden java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Konstruktordetails

### JavaxToJakartaPostResponse

public JavaxToJakartaPostResponse(PostResponse p)

## Methodendetails

### getError

public Throwable getError()
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Returns any recorded error or `null`

Angegeben von:
  `getError` in Schnittstelle `JakartaPostResponse`
Gibt zurück:
  an error or `null`

### getLocation

public String getLocation()
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Returns the location of the modification.

If the `JakartaPostResponse.setLocation(String)` method has not been called yet, this method returns `null`.

Angegeben von:
  `getLocation` in Schnittstelle `JakartaPostResponse`
Gibt zurück:
  the location

### getParentLocation

public String getParentLocation()
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Returns the parent location of the modification.

If the `JakartaPostResponse.setParentLocation(String)` method has not been called yet, this method returns `null`.

Angegeben von:
  `getParentLocation` in Schnittstelle `JakartaPostResponse`
Gibt zurück:
  the parent location

### getPath

public String getPath()
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Returns the absolute path of the item upon which the request operated.

If the `JakartaPostResponse.setPath(String)` method has not been called yet, this method returns `null`.

Angegeben von:
  `getPath` in Schnittstelle `JakartaPostResponse`
Gibt zurück:
  the path (might be null)

### getReferer

public String getReferer()
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Returns the referer previously set by `JakartaPostResponse.setReferer(String)`

Angegeben von:
  `getReferer` in Schnittstelle `JakartaPostResponse`
Gibt zurück:
  the referer

### getStatusCode

public int getStatusCode()
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Returns the status code of this instance. If the status code has never been set by calling the `JakartaPostResponse.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:
  `getStatusCode` in Schnittstelle `JakartaPostResponse`
Gibt zurück:
  the status code

### getStatusMessage

public String getStatusMessage()
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Returns the status message or `null` if no has been set with the `JakartaPostResponse.setStatus(int, String)` method.

Angegeben von:
  `getStatusMessage` in Schnittstelle `JakartaPostResponse`
Gibt zurück:
  the status message (might be null)

### isCreateRequest

public boolean isCreateRequest()
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Returns `true` if this was a create request.

Before calling the `JakartaPostResponse.setCreateRequest(boolean)` method, this method always returns `false`.

Angegeben von:
  `isCreateRequest` in Schnittstelle `JakartaPostResponse`
Gibt zurück:
  if this was a create request

### isSuccessful

public boolean isSuccessful()
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Returns `true` if no `error` is set and if the `status code` is one of the 2xx codes.

Angegeben von:
  `isSuccessful` in Schnittstelle `JakartaPostResponse`
Gibt zurück:
  true if the status code is 2xx

### onChange

public void onChange(String type, String... arguments)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Records a generic change of the given `type` with arguments.

Angegeben von:
  `onChange` in Schnittstelle `JakartaPostResponse`
Parameter:
  `type` - The type of the modification
  `arguments` - The arguments to the modifications

### onCopied

public void onCopied(String srcPath, String dstPath)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Records 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:
  `onCopied` in Schnittstelle `JakartaPostResponse`
Parameter:
  `srcPath` - source path of the node that was copied
  `dstPath` - destination path of the node that was copied.

### onCreated

public void onCreated(String path)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Records a 'created' change

Angegeben von:
  `onCreated` in Schnittstelle `JakartaPostResponse`
Parameter:
  `path` - path of the item that was created

### onDeleted

public void onDeleted(String path)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Records a 'deleted' change

Angegeben von:
  `onDeleted` in Schnittstelle `JakartaPostResponse`
Parameter:
  `path` - path of the item that was deleted

### onModified

public void onModified(String path)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Records a 'modified' change

Angegeben von:
  `onModified` in Schnittstelle `JakartaPostResponse`
Parameter:
  `path` - path of the item that was modified

### onMoved

public void onMoved(String srcPath, String dstPath)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Records 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:
  `onMoved` in Schnittstelle `JakartaPostResponse`
Parameter:
  `srcPath` - source path of the node that was moved
  `dstPath` - destination path of the node that was moved.

### send

public void send(jakarta.servlet.http.HttpServletResponse response, boolean setStatus) throws IOException
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Writes the response back over the provided HTTP channel. The actual format of the response is implementation dependent.

Angegeben von:
  `send` in Schnittstelle `JakartaPostResponse`
Parameter:
  `response` - to send to
  `setStatus` - 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: `JakartaPostResponse`
Sets whether the request was a create request or not.

Angegeben von:
  `setCreateRequest` in Schnittstelle `JakartaPostResponse`
Parameter:
  `isCreateRequest` - true if the request was a create request

### setError

public void setError(Throwable error)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Sets the recorded error causing the operation to fail.

Angegeben von:
  `setError` in Schnittstelle `JakartaPostResponse`
Parameter:
  `error` - the throwable

### setLocation

public void setLocation(String location)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Sets the location of this modification. This is the externalized form of the `current path`.

Angegeben von:
  `setLocation` in Schnittstelle `JakartaPostResponse`
Parameter:
  `location` - the location

### setParentLocation

public void setParentLocation(String parentLocation)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Sets the parent location of the modification. This is the externalized form of the parent node of the `current path`.

Angegeben von:
  `setParentLocation` in Schnittstelle `JakartaPostResponse`
Parameter:
  `parentLocation` - the parent location of the modification

### setPath

public void setPath(String path)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Sets the absolute path of the item upon which the request operated.

Angegeben von:
  `setPath` in Schnittstelle `JakartaPostResponse`
Parameter:
  `path` - the path

### setReferer

public void setReferer(String referer)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Sets the referer property

Angegeben von:
  `setReferer` in Schnittstelle `JakartaPostResponse`
Parameter:
  `referer` - the referer

### setStatus

public void setStatus(int code, String message)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Sets the response status code properties

Angegeben von:
  `setStatus` in Schnittstelle `JakartaPostResponse`
Parameter:
  `code` - the code
  `message` - the message

### setTitle

public void setTitle(String title)
Beschreibung aus Schnittstelle kopiert: `JakartaPostResponse`
Sets the title of the response message

Angegeben von:
  `setTitle` in Schnittstelle `JakartaPostResponse`
Parameter:
  `title` - the title