Class WebDavAccessOpener


  • public class WebDavAccessOpener
    extends Object
    An opener of the access to a given document through the WebDAV protocol. It has to be invoked when an HTTP request is asking for accessing a document in the JCR. The opener takes the HTTP response that will be sent back to the client to inform it to redirect its request to a given WebDAV URL at which the document is accessible. The WebDAV URL is based upon the Custom Protocol (see WebDavProtocol class) defined here for the circumstance. This Custom Protocol allows to customize the behaviour of the client when receiving such a URL; the client, a web browser, is expected to delegate the interpretation of the URL to an external tool (provided by Silverpeas) which will look for a program in the host knowing how to open by WebDAV the document referred by the URL.
    Author:
    mmoquillon
    • Constructor Detail

      • WebDavAccessOpener

        public WebDavAccessOpener()
    • Method Detail

      • open

        public void open​(User user,
                         String documentURL,
                         javax.servlet.http.HttpServletResponse response)
                  throws IOException
        Opens for the specified user the access to the document referred by the given URL through the WebDAV protocol. The given HTTP response will be enriched with information required for the requester to redirect its request to a WebDAV URL locating the document in the JCR by a WebDAV access. The URL is minted for the user behind the request and as such it cannot be reused by another user. The schema of the URL is a Custom Protocol to get the client to delegate its treatment to an external tool developed by Silverpeas for the circumstance.
        Parameters:
        user - the requester of the access to the document.
        documentURL - the Web URL of the document in the JCR.
        response - the HTTP response to use to inform the client how to access the document by WebDAV.
        Throws:
        IOException - if an error occurs with the HTTP response.