org.apache.maven.wagon.providers.webdav
Class WebDavWagon

java.lang.Object
  extended by org.apache.maven.wagon.AbstractWagon
      extended by org.apache.maven.wagon.StreamWagon
          extended by org.apache.maven.wagon.shared.http.AbstractHttpClientWagon
              extended by org.apache.maven.wagon.providers.webdav.WebDavWagon
All Implemented Interfaces:
StreamingWagon, Wagon

public class WebDavWagon
extends AbstractHttpClientWagon

WebDavWagon

Allows using a webdav remote repository for downloads and deployments

Author:
Henry Isidro, Joakim Erdfelt, Carlos Sanchez, James William Dumay

Field Summary
 
Fields inherited from class org.apache.maven.wagon.shared.http.AbstractHttpClientWagon
connectionManager, GMT_TIME_ZONE, SC_NULL
 
Fields inherited from class org.apache.maven.wagon.AbstractWagon
authenticationInfo, DEFAULT_BUFFER_SIZE, interactive, proxyInfo, repository, sessionEventSupport, transferEventSupport
 
Fields inherited from interface org.apache.maven.wagon.Wagon
ROLE
 
Constructor Summary
WebDavWagon()
           
 
Method Summary
 java.util.List getFileList(java.lang.String destinationDirectory)
          

Returns a List of strings naming the files and directories in the directory denoted by this abstract pathname.

 java.lang.String getURL(Repository repository)
          getUrl Implementors can override this to remove unwanted parts of the url such as role-hints
protected  void mkdirs(java.lang.String dir)
          Create directories in server as needed.
 void putDirectory(java.io.File sourceDirectory, java.lang.String destinationDirectory)
          Copy a directory from local system to remote webdav server
 boolean supportsDirectoryCopy()
          This wagon supports directory copying
 
Methods inherited from class org.apache.maven.wagon.shared.http.AbstractHttpClientWagon
cleanupGetTransfer, closeConnection, execute, fillInputData, fillOutputData, getClient, getHttpConfiguration, getHttpHeaders, openConnectionInternal, put, putFromStream, resourceExists, setConnectionManager, setHeaders, setHttpConfiguration, setHttpHeaders, setParameters
 
Methods inherited from class org.apache.maven.wagon.StreamWagon
checkInputStream, checkOutputStream, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStream, putFromStream
 
Methods inherited from class org.apache.maven.wagon.AbstractWagon
addSessionListener, addTransferListener, cleanupPutTransfer, connect, connect, connect, connect, connect, connect, createParentDirectories, disconnect, finishGetTransfer, finishPutTransfer, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDebug, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, getPath, getPermissionsOverride, getProxyInfo, getProxyInfo, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setSessionEventSupport, setTimeout, setTransferEventSupport, transfer, transfer, transfer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.wagon.Wagon
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, removeSessionListener, removeTransferListener, setInteractive, setTimeout
 

Constructor Detail

WebDavWagon

public WebDavWagon()
Method Detail

supportsDirectoryCopy

public boolean supportsDirectoryCopy()
This wagon supports directory copying

Specified by:
supportsDirectoryCopy in interface Wagon
Overrides:
supportsDirectoryCopy in class AbstractWagon
Returns:
true always

mkdirs

protected void mkdirs(java.lang.String dir)
               throws org.apache.commons.httpclient.HttpException,
                      java.io.IOException
Create directories in server as needed. They are created one at a time until the whole path exists.

Overrides:
mkdirs in class AbstractHttpClientWagon
Parameters:
dir - path to be created in server from repository basedir
Throws:
java.io.IOException
org.apache.commons.httpclient.HttpException
TransferFailedException

putDirectory

public void putDirectory(java.io.File sourceDirectory,
                         java.lang.String destinationDirectory)
                  throws TransferFailedException,
                         ResourceDoesNotExistException,
                         AuthorizationException
Copy a directory from local system to remote webdav server

Specified by:
putDirectory in interface Wagon
Overrides:
putDirectory in class AbstractWagon
Parameters:
sourceDirectory - the local directory
destinationDirectory - the remote destination
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

getFileList

public java.util.List getFileList(java.lang.String destinationDirectory)
                           throws TransferFailedException,
                                  ResourceDoesNotExistException,
                                  AuthorizationException
Description copied from interface: Wagon

Returns a List of strings naming the files and directories in the directory denoted by this abstract pathname.

If this abstract pathname does not denote a directory, or does not exist, then this method throws ResourceDoesNotExistException. Otherwise a List of strings is returned, one for each file or directory in the directory. Names denoting the directory itself and the directory's parent directory are not included in the result. Each string is a file name rather than a complete path.

There is no guarantee that the name strings in the resulting list will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

Specified by:
getFileList in interface Wagon
Overrides:
getFileList in class AbstractWagon
Parameters:
destinationDirectory - directory to list contents of
Returns:
A List of strings naming the files and directories in the directory denoted by this abstract pathname. The List will be empty if the directory is empty.
Throws:
TransferFailedException - if there's an error trying to access the remote side
ResourceDoesNotExistException - if destinationDirectory does not exist or is not a directory
AuthorizationException - if not authorized to list the contents of the directory

getURL

public java.lang.String getURL(Repository repository)
Description copied from class: AbstractHttpClientWagon
getUrl Implementors can override this to remove unwanted parts of the url such as role-hints

Overrides:
getURL in class AbstractHttpClientWagon
Returns:


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.