Klasse HtmlPostResponseProxy

java.lang.Object
org.apache.sling.servlets.post.impl.helper.HtmlPostResponseProxy
Alle implementierten Schnittstellen:
PostResponse

@Deprecated public class HtmlPostResponseProxy extends Object implements PostResponse
Veraltet.
The 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.

  • Konstruktordetails

    • HtmlPostResponseProxy

      public HtmlPostResponseProxy(org.apache.sling.api.servlets.HtmlResponse apiHtmlResponse)
      Veraltet.
  • Methodendetails

    • getHtmlResponse

      public org.apache.sling.api.servlets.HtmlResponse getHtmlResponse()
      Veraltet.
    • getError

      public Throwable getError()
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Returns any recorded error or null
      Angegeben von:
      getError in Schnittstelle PostResponse
      Gibt zurück:
      an error or null
    • getLocation

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

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

      Angegeben von:
      getLocation in Schnittstelle PostResponse
      Gibt zurück:
      the location
    • getParentLocation

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

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

      Angegeben von:
      getParentLocation in Schnittstelle PostResponse
      Gibt zurück:
      the parent location
    • getPath

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

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

      Angegeben von:
      getPath in Schnittstelle PostResponse
      Gibt zurück:
      the path (might be null)
    • getProperty

      public <Type> Type getProperty(String name, Class<Type> type)
      Veraltet.
    • getProperty

      public Object getProperty(String name)
      Veraltet.
    • getReferer

      public String getReferer()
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Returns the referer previously set by PostResponse.setReferer(String)
      Angegeben von:
      getReferer in Schnittstelle PostResponse
      Gibt zurück:
      the referer
    • getStatusCode

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

      public String getStatusMessage()
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Returns the status message or null if no has been set with the PostResponse.setStatus(int, String) method.
      Angegeben von:
      getStatusMessage in Schnittstelle PostResponse
      Gibt zurück:
      the status message (might be null)
    • isCreateRequest

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

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

      Angegeben von:
      isCreateRequest in Schnittstelle PostResponse
      Gibt zurück:
      if this was a create request
    • isSuccessful

      public boolean isSuccessful()
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Returns true if no error is set and if the status code is one of the 2xx codes.
      Angegeben von:
      isSuccessful in Schnittstelle PostResponse
      Gibt zurück:
      true if the status code is 2xx
    • onChange

      public void onChange(String type, String... arguments)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Records a generic change of the given type with arguments.
      Angegeben von:
      onChange in Schnittstelle PostResponse
      Parameter:
      type - The type of the modification
      arguments - The arguments to the modifications
    • onCopied

      public void onCopied(String srcPath, String dstPath)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      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 PostResponse
      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)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Records a 'created' change
      Angegeben von:
      onCreated in Schnittstelle PostResponse
      Parameter:
      path - path of the item that was created
    • onDeleted

      public void onDeleted(String path)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Records a 'deleted' change
      Angegeben von:
      onDeleted in Schnittstelle PostResponse
      Parameter:
      path - path of the item that was deleted
    • onModified

      public void onModified(String path)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Records a 'modified' change
      Angegeben von:
      onModified in Schnittstelle PostResponse
      Parameter:
      path - path of the item that was modified
    • onMoved

      public void onMoved(String srcPath, String dstPath)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      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 PostResponse
      Parameter:
      srcPath - source path of the node that was moved
      dstPath - 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: PostResponse
      Writes the response back over the provided HTTP channel. The actual format of the response is implementation dependent.
      Angegeben von:
      send in Schnittstelle PostResponse
      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)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Sets whether the request was a create request or not.
      Angegeben von:
      setCreateRequest in Schnittstelle PostResponse
      Parameter:
      isCreateRequest - true if the request was a create request
    • setError

      public void setError(Throwable error)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Sets the recorded error causing the operation to fail.
      Angegeben von:
      setError in Schnittstelle PostResponse
      Parameter:
      error - the throwable
    • setLocation

      public void setLocation(String location)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Sets the location of this modification. This is the externalized form of the current path.
      Angegeben von:
      setLocation in Schnittstelle PostResponse
      Parameter:
      location - the location
    • setParentLocation

      public void setParentLocation(String parentLocation)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      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 PostResponse
      Parameter:
      parentLocation - the parent location of the modification
    • setPath

      public void setPath(String path)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Sets the absolute path of the item upon which the request operated.
      Angegeben von:
      setPath in Schnittstelle PostResponse
      Parameter:
      path - the path
    • setProperty

      public void setProperty(String name, Object value)
      Veraltet.
    • setReferer

      public void setReferer(String referer)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Sets the referer property
      Angegeben von:
      setReferer in Schnittstelle PostResponse
      Parameter:
      referer - the referer
    • setStatus

      public void setStatus(int code, String message)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Sets the response status code properties
      Angegeben von:
      setStatus in Schnittstelle PostResponse
      Parameter:
      code - the code
      message - the message
    • setTitle

      public void setTitle(String title)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: PostResponse
      Sets the title of the response message
      Angegeben von:
      setTitle in Schnittstelle PostResponse
      Parameter:
      title - the title