Class WebDavUtil


  • public final class WebDavUtil
    extends java.lang.Object
    Utility methods needed to implement a WebDAV servlet.
    • Field Detail

      • module

        public static final java.lang.String module
    • Method Detail

      • formatDate

        public static java.lang.String formatDate​(java.lang.String formatString,
                                                  java.util.Date date)
      • getDocumentFromRequest

        public static org.w3c.dom.Document getDocumentFromRequest​(HttpServletRequest request)
                                                           throws java.io.IOException,
                                                                  org.xml.sax.SAXException,
                                                                  javax.xml.parsers.ParserConfigurationException
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        javax.xml.parsers.ParserConfigurationException
      • getCredentialsFromRequest

        public static java.util.Map<java.lang.String,​java.lang.Object> getCredentialsFromRequest​(HttpServletRequest request)
        Returns a Map containing user credentials found in the request. Returns null if no user credentials were found. The returned Map is intended to be used as parameters for the userLogin service.

        The method checks for the request parameters USERNAME and PASSWORD. If those aren't found, then the request is checked for the HTTP Authorization header. Currently, only Basic authorization is supported.

        Parameters:
        request - The WebDAV request
        Returns:
        A Map containing login.username and login.password elements.
      • getRFC1123DateFormat

        public static java.lang.String getRFC1123DateFormat()