Interface DavServletResponse

All Superinterfaces:
jakarta.servlet.http.HttpServletResponse, jakarta.servlet.ServletResponse
All Known Subinterfaces:
org.apache.jackrabbit.webdav.observation.ObservationDavServletResponse, WebdavResponse
All Known Implementing Classes:
WebdavResponseImpl

public interface DavServletResponse extends jakarta.servlet.http.HttpServletResponse
WebdavResponse extends the HttpServletResponse by Webdav specific status codes and METHODS.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Status code (424) indicating that the method could not be performed on the resource, because the requested action depended on another action which failed.
    static final int
    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.
    static final int
    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.
    static final int
    Status code (207) indicating that the response requires providing status for multiple independent operations.
    static final int
    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.
    static final int
    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.

    Fields inherited from interface jakarta.servlet.http.HttpServletResponse

    SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MISDIRECTED_REQUEST, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PERMANENT_REDIRECT, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNPROCESSABLE_CONTENT, SC_UNSUPPORTED_MEDIA_TYPE, SC_UPGRADE_REQUIRED, SC_USE_PROXY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Send a response body given more detailed information about the error occurred.
    void
    Send the multistatus response to the client.
    default void
    sendMultiStatus(MultiStatus multistatus, List<String> acceptableContentCodings)
    Send the multistatus response to the client.
    void
    sendRefreshLockResponse(org.apache.jackrabbit.webdav.lock.ActiveLock[] locks)
    Send the lock response for a successful LOCK request, that was intended to refresh an existing lock.
    void
    sendXmlResponse(XmlSerializable serializable, int status)
    Generic method to return an Xml response body.
    default void
    sendXmlResponse(XmlSerializable serializable, int status, List<String> acceptableContentCodings)
    Generic method to return an Xml response body.

    Methods inherited from interface jakarta.servlet.http.HttpServletResponse

    addCookie, addDateHeader, addHeader, addIntHeader, containsHeader, encodeRedirectURL, encodeURL, getHeader, getHeaderNames, getHeaders, getStatus, getTrailerFields, sendError, sendError, sendRedirect, sendRedirect, sendRedirect, sendRedirect, setDateHeader, setHeader, setIntHeader, setStatus, setTrailerFields

    Methods inherited from interface jakarta.servlet.ServletResponse

    flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setCharacterEncoding, setContentLength, setContentLengthLong, setContentType, setLocale
  • Field Details

    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
  • Method Details

    • sendError

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

      void sendMultiStatus(MultiStatus multistatus) throws 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:
      IOException
      See Also:
    • sendMultiStatus

      default void sendMultiStatus(MultiStatus multistatus, List<String> acceptableContentCodings) throws 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 -
      acceptableContentCodings - content codings accepted by the client
      Throws:
      IOException
      See Also:
    • sendRefreshLockResponse

      void sendRefreshLockResponse(org.apache.jackrabbit.webdav.lock.ActiveLock[] locks) throws 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:
      IOException
      See Also:
    • sendXmlResponse

      void sendXmlResponse(XmlSerializable serializable, int status) throws 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:
      IOException
    • sendXmlResponse

      default void sendXmlResponse(XmlSerializable serializable, int status, List<String> acceptableContentCodings) throws 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).
      acceptableContentCodings - content codings accepted by the client
      Throws:
      IOException