Package org.apache.ofbiz.webapp.webdav
Class WebDavUtil
- java.lang.Object
-
- org.apache.ofbiz.webapp.webdav.WebDavUtil
-
public final class WebDavUtil extends java.lang.Object
Utility methods needed to implement a WebDAV servlet.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
formatDate(java.lang.String formatString, java.util.Date date)
static java.util.Map<java.lang.String,java.lang.Object>
getCredentialsFromRequest(javax.servlet.http.HttpServletRequest request)
Returns aMap
containing user credentials found in the request.static org.w3c.dom.Document
getDocumentFromRequest(javax.servlet.http.HttpServletRequest request)
static java.lang.String
getRFC1123DateFormat()
-
-
-
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(javax.servlet.http.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(javax.servlet.http.HttpServletRequest request)
Returns aMap
containing user credentials found in the request. Returnsnull
if no user credentials were found. The returnedMap
is intended to be used as parameters for theuserLogin
service.The method checks for the request parameters
USERNAME
andPASSWORD
. 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
containinglogin.username
andlogin.password
elements.
-
getRFC1123DateFormat
public static java.lang.String getRFC1123DateFormat()
-
-