Class MultiStatus

    • Constructor Detail

      • MultiStatus

        public MultiStatus()
    • Method Detail

      • 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 -
      • 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.