|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.could.webdav.DAVServlet
A very simple servlet capable of processing very simple WebDAV requests.
Field Summary |
Fields inherited from interface it.could.webdav.DAVListener |
COLLECTION_CREATED, COLLECTION_REMOVED, RESOURCE_CREATED, RESOURCE_MODIFIED, RESOURCE_REMOVED |
Constructor Summary | |
DAVServlet()
Create a new DAVServlet instance. |
Method Summary | |
void |
destroy()
Detroy this Servlet instance. |
DAVRepository |
getRepository(File root)
Retrieve a DAVRepository for a given File . |
static String |
getRepositoryKey(String servletName)
Retrieve the key in the ServletContext where the instance of
the DAVRepository associated with a named DAVServlet
can be found. |
ServletConfig |
getServletConfig()
Return the ServletConfig associated with this instance. |
ServletContext |
getServletContext()
Return the ServletContext associated with this instance. |
String |
getServletInfo()
Return a informative String about this servlet. |
void |
init(ServletConfig config)
Initialize this Servlet instance. |
void |
notify(DAVResource resource,
int event)
Receive notification of an event occurred in a specific DAVRepository . |
void |
service(ServletRequest request,
ServletResponse response)
Execute the current request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DAVServlet()
Create a new DAVServlet
instance.
Method Detail |
public void init(ServletConfig config) throws ServletException
Initialize this Servlet
instance.
The only initialization parameter required by this servlet is the
"rootPath
" parameter specifying the path
of the repository root (either absolute or relative to the configured
ServletContext
.
If the specified root is relative, it will be considered to
be relative to the ServletContext
deployment path.
In any case, the specified root must ultimately point to an existing directory on a locally-accessible file system.
When set to true
, an optional parameter called
xmlOnly
will force this DAVServlet
to use an
XMLRepository
instead of the default DAVRepository
.
Finally, when set to true
, the optional parameter
debugEnabled
will enable logging of method invocation and
events in the repository.
init
in interface Servlet
ServletException
public DAVRepository getRepository(File root) throws IOException
Retrieve a DAVRepository
for a given File
.
IOException
public void destroy()
Detroy this Servlet
instance.
destroy
in interface Servlet
public ServletConfig getServletConfig()
Return the ServletConfig
associated with this instance.
getServletConfig
in interface Servlet
public ServletContext getServletContext()
Return the ServletContext
associated with this instance.
public String getServletInfo()
Return a informative String
about this servlet.
getServletInfo
in interface Servlet
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException
Execute the current request.
service
in interface Servlet
ServletException
IOException
public void notify(DAVResource resource, int event)
Receive notification of an event occurred in a specific
DAVRepository
.
notify
in interface DAVListener
resource
- the DAVResource
associated with the notification.event
- a number identifying the type of the notification.public static String getRepositoryKey(String servletName)
Retrieve the key in the ServletContext
where the instance of
the DAVRepository
associated with a named DAVServlet
can be found.
servletName
- the name of the DAVServlet
as specified in
the web.xml
deployment descriptor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |