public class DavServlet extends HttpServlet
| Modifier and Type | Class and Description |
|---|---|
class |
DavServlet.DirContextSAKAI |
class |
DavServlet.ResourceInfoSAKAI |
class |
DavServlet.SakaidavServletInfo |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_NAMESPACE
Default namespace.
|
protected static char[] |
hexadecimal |
protected boolean |
m_siteAlias
Configuration: allow use of alias for site id in references.
|
protected static int |
MAX_XML_STREAM_LENGTH
Max Size for xml property streams 4K
|
protected static MessageDigest |
md5Helper
MD5 message digest provider.
|
protected static org.sakaiproject.util.ResourceLoader |
rb |
protected boolean |
readOnly
Read only flag.
|
protected static BitSet |
safeCharacters
Array containing the safe characters set.
|
protected static int |
STREAM_BUFFER_SIZE
Size of buffer for streaming downloads
|
| Constructor and Description |
|---|
DavServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
adjustId(String id)
Adjust the id (a resource id) to map between any tricks we want to play and the real id for content hosting.
|
protected int |
countSlashes(String s) |
protected void |
doCopy(HttpServletRequest req,
HttpServletResponse resp)
COPY Method.
|
protected void |
doDelete(HttpServletRequest req,
HttpServletResponse resp)
DELETE Method.
|
protected void |
doDispatch(DavServlet.SakaidavServletInfo info,
HttpServletRequest req,
HttpServletResponse resp)
Handles the special Webdav methods
|
protected void |
doGet(HttpServletRequest req,
HttpServletResponse resp)
GET Method.
|
protected void |
doHead(HttpServletRequest request,
HttpServletResponse response)
Process a HEAD request for the specified resource.
|
protected void |
doLock(HttpServletRequest req,
HttpServletResponse resp)
LOCK Method.
|
protected void |
doMkcol(HttpServletRequest req,
HttpServletResponse resp)
MKCOL Method.
|
protected void |
doMove(HttpServletRequest req,
HttpServletResponse resp)
MOVE Method.
|
protected void |
doOptions(HttpServletRequest req,
HttpServletResponse resp)
OPTIONS Method.
|
protected void |
doPost(HttpServletRequest req,
HttpServletResponse resp)
POST Method.
|
protected void |
doPropfind(HttpServletRequest req,
HttpServletResponse resp)
PROPFIND Method.
|
protected void |
doProppatch(HttpServletRequest req,
HttpServletResponse resp)
PROPPATCH Method.
|
protected void |
doPut(HttpServletRequest req,
HttpServletResponse resp)
Process a PUT request for the specified resource.
|
protected void |
doUnlock(HttpServletRequest req,
HttpServletResponse resp)
UNLOCK Method.
|
String |
fixDirPathSAKAI(String path) |
protected DocumentBuilder |
getDocumentBuilder()
Return JAXP document builder instance.
|
protected String |
getRelativePath(HttpServletRequest request)
Return the relative path associated with this servlet.
|
String |
getRelativePathSAKAI(HttpServletRequest req) |
String |
getResourceNameSAKAI(org.sakaiproject.entity.api.Entity mbr)
getResourceNameSAKAI - Needs to become a method of resource returns the internal name for a resource.
|
DavServlet.DirContextSAKAI |
getResourcesSAKAI() |
protected String |
getUserPropertyDisplayName(org.sakaiproject.entity.api.ResourceProperties props,
String name) |
void |
init()
Initialize this servlet.
|
protected boolean |
isFileNameAllowed(HttpServletRequest req)
Determine if this path is one of the prefixes that we have been requested to ignore by the properties settings
|
protected String |
justName(String str) |
void |
log(HttpServletRequest req,
DavServlet.SakaidavServletInfo info)
log a request processed
|
DavServlet.SakaidavServletInfo |
newInfo(HttpServletRequest req)
create the info
|
protected String |
normalize(String path)
Return a context-relative path, beginning with a "/", that represents the canonical version of the specified path after ".." and "." elements are resolved out.
|
protected boolean |
prohibited(String id) |
protected String |
rewriteUrl(String path)
URL rewriter.
|
protected void |
service(HttpServletRequest req,
HttpServletResponse res)
Setup and cleanup around this request.
|
protected void |
showRequestInfo(HttpServletRequest req)
Show HTTP header information.
|
doTrace, getLastModified, servicedestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, logprotected static org.sakaiproject.util.ResourceLoader rb
protected boolean readOnly
protected static final String DEFAULT_NAMESPACE
protected static final int STREAM_BUFFER_SIZE
protected static final int MAX_XML_STREAM_LENGTH
protected boolean m_siteAlias
protected static MessageDigest md5Helper
protected static BitSet safeCharacters
protected static final char[] hexadecimal
protected boolean prohibited(String id)
protected String adjustId(String id)
id - the id to adjust.public void init()
throws ServletException
init in class GenericServletServletExceptionpublic DavServlet.SakaidavServletInfo newInfo(HttpServletRequest req)
protected String getUserPropertyDisplayName(org.sakaiproject.entity.api.ResourceProperties props, String name)
protected void showRequestInfo(HttpServletRequest req)
protected String getRelativePath(HttpServletRequest request)
request - The servlet request we are processingprotected String normalize(String path)
null instead.path - Path to be normalizedprotected String rewriteUrl(String path)
path - Path which has to be rewitenprotected DocumentBuilder getDocumentBuilder() throws ServletException
ServletExceptionprotected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
service in class HttpServletreq - HttpServletRequest object with the client requestres - HttpServletResponse object back to the clientServletExceptionIOExceptionpublic void log(HttpServletRequest req, DavServlet.SakaidavServletInfo info)
protected void doDispatch(DavServlet.SakaidavServletInfo info, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
ServletExceptionIOExceptionprotected boolean isFileNameAllowed(HttpServletRequest req)
request - The servlet request we are processingprotected void doHead(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
doHead in class HttpServletrequest - The servlet request we are processingresponse - The servlet response we are creatingIOException - if an input/output error occursServletException - if a servlet-specified error occursprotected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doOptions in class HttpServletServletExceptionIOExceptionpublic DavServlet.DirContextSAKAI getResourcesSAKAI()
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doPost in class HttpServletServletExceptionIOExceptionprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doGet in class HttpServletServletExceptionIOExceptionprotected int countSlashes(String s)
public String getRelativePathSAKAI(HttpServletRequest req)
public String getResourceNameSAKAI(org.sakaiproject.entity.api.Entity mbr)
protected void doPropfind(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
ServletExceptionIOExceptionprotected void doProppatch(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
ServletExceptionIOExceptionprotected void doMkcol(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
ServletExceptionIOExceptionprotected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doDelete in class HttpServletServletExceptionIOExceptionprotected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doPut in class HttpServletrequest - The servlet request we are processingresponse - The servlet response we are creatingIOException - if an input/output error occursServletException - if a servlet-specified error occursprotected void doCopy(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
ServletExceptionIOExceptionprotected void doMove(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
ServletExceptionIOExceptionprotected void doLock(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
ServletExceptionIOExceptionprotected void doUnlock(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
ServletExceptionIOExceptionCopyright © 2002-2015 University of Michigan. All Rights Reserved.