java.lang.Object
org.apache.jackrabbit.webdav.MultiStatus
All Implemented Interfaces:
DavConstants, XmlSerializable

public class MultiStatus extends Object implements DavConstants, XmlSerializable
MultiStatus representing the content of a multistatus response body and allows to retrieve the Xml representation.
  • Constructor Details

    • MultiStatus

      public MultiStatus()
  • Method Details

    • addResourceProperties

      public void addResourceProperties(DavResource resource, DavPropertyNameSet propNameSet, int propFindType, int depth)
      Add response(s) to this multistatus, in order to build a multistatus for responding to a PROPFIND request.
      Parameters:
      resource - The resource to add property from
      propNameSet - The requested property names of the PROPFIND request
      propFindType -
      depth -
    • addResourceProperties

      public void addResourceProperties(DavResource resource, DavPropertyNameSet propNameSet, int depth)
      Add response(s) to this multistatus, in order to build a multistatus e.g. in order to respond to a PROPFIND request. Please note, that in terms of PROPFIND, this method would correspond to a DavConstants.PROPFIND_BY_PROPERTY propfind type.
      Parameters:
      resource - The resource to add property from
      propNameSet - The requested property names of the PROPFIND request
      depth -
      See Also:
    • addResourceStatus

      public void addResourceStatus(DavResource resource, int status, int depth)
      Add response(s) to this multistatus, in order to build a multistatus as returned for COPY, MOVE, LOCK or DELETE requests resulting in an error with a resource other than the resource identified in the Request-URI.
      Parameters:
      resource -
      status -
      depth -
    • addResponse

      public void addResponse(MultiStatusResponse response)
      Add a MultiStatusResponse element to this MultiStatus

      This method is synchronized to avoid the problem described in JCR-2755.

      Parameters:
      response -
    • getResponses

      public MultiStatusResponse[] getResponses()
      Returns the multistatus responses present as array.

      This method is synchronized to avoid the problem described in JCR-2755.

      Returns:
      array of all responses present in this multistatus.
    • setResponseDescription

      public void setResponseDescription(String responseDescription)
      Set the response description.
      Parameters:
      responseDescription -
    • getResponseDescription

      public String getResponseDescription()
      Returns the response description.
      Returns:
      responseDescription
    • toXml

      public Element toXml(Document document)
      Return the Xml representation of this MultiStatus.
      Specified by:
      toXml in interface XmlSerializable
      Parameters:
      document -
      Returns:
      Xml document
    • createFromXml

      public static MultiStatus createFromXml(Element multistatusElement)
      Build a MultiStatus from the specified xml element.
      Parameters:
      multistatusElement -
      Returns:
      new MultiStatus instance.
      Throws:
      IllegalArgumentException - if the given document is null or does not provide the required element.