pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.webdav
Class AbstractDAVServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.torweg.pulse.webdav.AbstractDAVServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
WebDAVServlet

public abstract class AbstractDAVServlet
extends javax.servlet.http.HttpServlet

A DAV 1 compliant servlet.

Version:
$Revision: 2043 $
Author:
Thomas Weber
See Also:
Serialized Form

Field Summary
static org.jdom.Namespace DAV_NAMESPACE
          the DAV namespace.
 
Constructor Summary
AbstractDAVServlet()
           
 
Method Summary
protected  void copy(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          performs a COPY request.
protected  void delete(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          performs a DELETE request.
protected  void get(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          performs a GET request.
protected abstract  DAVConfiguration getConfiguration()
          returns the DAV configuration.
protected  java.lang.String getDAVServletPath(javax.servlet.http.HttpServletRequest req)
          returns the path to the DAVServlet.
protected  void head(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          performs a HEAD request.
protected  void mkcol(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          performs an MKCOL request.
protected  void move(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          performs a MOVE request.
protected  void options(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          sets the the current user' allowed options for the requested URI.
protected  void post(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          POST requests are not implemented, since they are not used by WebDAV.
protected  void propFind(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          performs a PROPFIND request.
protected  void propPatch(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          performs a PROPPATCH request.
protected  void put(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
          performs a PUT request.
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          takes care of the DAV requests and delegates to the actual worker methods.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAV_NAMESPACE

public static final org.jdom.Namespace DAV_NAMESPACE
the DAV namespace.

Constructor Detail

AbstractDAVServlet

public AbstractDAVServlet()
Method Detail

service

public final void service(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse res)
                   throws java.io.IOException
takes care of the DAV requests and delegates to the actual worker methods.

Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
req - the request
res - the response
Throws:
java.io.IOException - on i/o errors

getConfiguration

protected abstract DAVConfiguration getConfiguration()
returns the DAV configuration.

Returns:
the DAV configutaion

options

protected final void options(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
sets the the current user' allowed options for the requested URI.

Parameters:
req - the current request
res - the response
user - the user

propFind

protected final void propFind(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                       throws java.io.IOException
performs a PROPFIND request.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on i/o errors

propPatch

protected final void propPatch(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                        throws java.io.IOException
performs a PROPPATCH request.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on i/o errors

mkcol

protected final void mkcol(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                    throws java.io.IOException
performs an MKCOL request.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on errors

get

protected final void get(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                  throws java.io.IOException
performs a GET request.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on errors accessing the resource

head

protected final void head(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                   throws java.io.IOException
performs a HEAD request.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on errors accessing the resource

post

protected final void post(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                   throws java.io.IOException
POST requests are not implemented, since they are not used by WebDAV.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on errors sending the error

put

protected final void put(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                  throws java.io.IOException
performs a PUT request.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on errors

delete

protected final void delete(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                     throws java.io.IOException
performs a DELETE request.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on errors

copy

protected final void copy(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                   throws java.io.IOException
performs a COPY request.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on errors

move

protected final void move(HttpDAVServletRequest req, HttpDAVServletResponse res, User user)
                   throws java.io.IOException
performs a MOVE request.

Parameters:
req - the current request
res - the response
user - the user
Throws:
java.io.IOException - on errors

getDAVServletPath

protected final java.lang.String getDAVServletPath(javax.servlet.http.HttpServletRequest req)
returns the path to the DAVServlet.

Parameters:
req - the current request
Returns:
the path to the servlet