org.apache.maven.artifact.resolver
Class TestFileWagon

java.lang.Object
  extended by org.apache.maven.wagon.AbstractWagon
      extended by org.apache.maven.wagon.StreamWagon
          extended by org.apache.maven.wagon.providers.file.FileWagon
              extended by org.apache.maven.artifact.resolver.TestFileWagon
All Implemented Interfaces:
StreamingWagon, Wagon

public class TestFileWagon
extends FileWagon

Wagon used for test cases that annotates some methods. Note that this is not a thread-safe implementation.


Field Summary
 
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
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE
 
Constructor Summary
TestFileWagon()
           
 
Method Summary
 void addTransferListener(TransferListener listener)
           
 void get(String resourceName, File destination)
           
 boolean getIfNewer(String resourceName, File destination, long timestamp)
           
protected  void getTransfer(Resource resource, File destination, InputStream input, boolean closeInput, int maxSize)
           
 
Methods inherited from class org.apache.maven.wagon.providers.file.FileWagon
closeConnection, fillInputData, fillOutputData, getFileList, openConnectionInternal, putDirectory, resourceExists, supportsDirectoryCopy
 
Methods inherited from class org.apache.maven.wagon.StreamWagon
checkInputStream, checkOutputStream, getIfNewerToStream, getInputStream, getOutputStream, getToStream, put, putFromStream, putFromStream, putFromStream
 
Methods inherited from class org.apache.maven.wagon.AbstractWagon
addSessionListener, cleanupGetTransfer, 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, getReadTimeout, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setReadTimeout, 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, connect, connect, connect, connect, connect, connect, disconnect, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, removeSessionListener, removeTransferListener, setInteractive, setReadTimeout, setTimeout
 

Constructor Detail

TestFileWagon

public TestFileWagon()
Method Detail

getTransfer

protected void getTransfer(Resource resource,
                           File destination,
                           InputStream input,
                           boolean closeInput,
                           int maxSize)
                    throws TransferFailedException
Overrides:
getTransfer in class AbstractWagon
Throws:
TransferFailedException

get

public void get(String resourceName,
                File destination)
         throws TransferFailedException,
                ResourceDoesNotExistException,
                AuthorizationException
Specified by:
get in interface Wagon
Overrides:
get in class StreamWagon
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

getIfNewer

public boolean getIfNewer(String resourceName,
                          File destination,
                          long timestamp)
                   throws TransferFailedException,
                          ResourceDoesNotExistException,
                          AuthorizationException
Specified by:
getIfNewer in interface Wagon
Overrides:
getIfNewer in class StreamWagon
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

addTransferListener

public void addTransferListener(TransferListener listener)
Specified by:
addTransferListener in interface Wagon
Overrides:
addTransferListener in class AbstractWagon


Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.