Interface DavServletResponse

    • Field Detail

      • SC_PROCESSING

        static final int SC_PROCESSING
        The 102 (Processing) status code is an interim response used to inform the client that the server has accepted the complete request, but has not yet completed it.
        See Also:
        Constant Field Values
      • SC_MULTI_STATUS

        static final int SC_MULTI_STATUS
        Status code (207) indicating that the response requires providing status for multiple independent operations.
        See Also:
        Constant Field Values
      • SC_UNPROCESSABLE_ENTITY

        static final int SC_UNPROCESSABLE_ENTITY
        The 422 (Unprocessable Entity) status code means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions. For example, this error condition may occur if an XML request body contains well-formed (i.e., syntactically correct), but semantically erroneous XML instructions.
        See Also:
        Constant Field Values
      • SC_LOCKED

        static final int SC_LOCKED
        Status code (423) indicating the destination resource of a method is locked, and either the request did not contain a valid Lock-Info header, or the Lock-Info header identifies a lock held by another principal.
        See Also:
        Constant Field Values
      • SC_FAILED_DEPENDENCY

        static final int SC_FAILED_DEPENDENCY
        Status code (424) indicating that the method could not be performed on the resource, because the requested action depended on another action which failed.
        See Also:
        Constant Field Values
      • SC_INSUFFICIENT_SPACE_ON_RESOURCE

        static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE
        Status code (507) indicating that the resource does not have sufficient space to record the state of the resource after the execution of this method.
        See Also:
        Constant Field Values
    • Method Detail

      • sendError

        void sendError​(DavException error)
                throws java.io.IOException
        Send a response body given more detailed information about the error occurred.
        Parameters:
        error -
        Throws:
        java.io.IOException
      • sendMultiStatus

        void sendMultiStatus​(MultiStatus multistatus)
                      throws java.io.IOException
        Send the multistatus response to the client. A multistatus response is returned in response to a successful PROPFIND and PROPPATCH request. In addition multistatus response is required response in case a COPY, MOVE, DELETE, LOCK or PROPPATCH request fails.
        Parameters:
        multistatus -
        Throws:
        java.io.IOException
        See Also:
        SC_MULTI_STATUS
      • sendRefreshLockResponse

        void sendRefreshLockResponse​(ActiveLock[] locks)
                              throws java.io.IOException
        Send the lock response for a successful LOCK request, that was intended to refresh an existing lock. The locks array must contain at least a single element; the ActiveLock objects are then included in the lockdiscovery property of the response body as required by RFC 2518.
        Parameters:
        locks -
        Throws:
        java.io.IOException
        See Also:
        DavConstants.PROPERTY_LOCKDISCOVERY
      • sendXmlResponse

        void sendXmlResponse​(XmlSerializable serializable,
                             int status)
                      throws java.io.IOException
        Generic method to return an Xml response body.
        Parameters:
        serializable - object that can be converted to the root Xml element of the document to be sent as response body.
        status - Status code to be used with HttpServletResponse.setStatus(int).
        Throws:
        java.io.IOException