smbdav
Class DefaultMoveHandler

java.lang.Object
  extended bysmbdav.AbstractHandler
      extended bysmbdav.DefaultMoveHandler
All Implemented Interfaces:
MethodHandler

public class DefaultMoveHandler
extends AbstractHandler

Default implementation of a handler for requests using the WebDAV MOVE method.

Author:
Eric Glass

Field Summary
 
Fields inherited from interface smbdav.MethodHandler
SC_FAILED_DEPENDENCY, SC_INSUFFICIENT_STORAGE, SC_LOCKED, SC_MULTISTATUS, SC_PROCESSING, SC_UNPROCESSABLE_ENTITY
 
Constructor Summary
DefaultMoveHandler()
           
 
Method Summary
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, jcifs.smb.NtlmPasswordAuthentication auth)
          Services requests which use the WebDAV MOVE method.
 
Methods inherited from class smbdav.AbstractHandler
checkConditionalRequest, checkLockOwnership, createSmbFile, destroy, getFilter, getLockManager, getPrincipal, getRequestURICharset, getRequestURL, getServletConfig, getSmbFile, getSmbURL, getSmbURL, init, rewriteURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMoveHandler

public DefaultMoveHandler()
Method Detail

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response,
                    jcifs.smb.NtlmPasswordAuthentication auth)
             throws javax.servlet.ServletException,
                    java.io.IOException
Services requests which use the WebDAV MOVE method. This implementation moves the source file to the destination location.
If the source file does not exist, a 404 (Not Found) error is sent to the client.
If the destination is not specified, a 400 (Bad Request) error is sent to the client.
If the destination already exists, and the client has sent the "Overwrite" request header with a value of "T", then the request succeeds and the file is overwritten. If the "Overwrite" header is not provided, a 412 (Precondition Failed) error is sent to the client.
If the destination was created, but the source could not be removed, a 403 (Forbidden) error is sent to the client.

Specified by:
service in interface MethodHandler
Specified by:
service in class AbstractHandler
Parameters:
request - The request being serviced.
response - The servlet response.
auth - The user's authentication information.
Throws:
SerlvetException - If an application error occurs.
java.io.IOException - If an IO error occurs while handling the request.
javax.servlet.ServletException


Copyright © 2004 Eric Glass