Implementation of common facilties for Wagon providers.
createZip
public void createZip(List files,
File zipName,
File basedir)
throws IOException
fireGetCompleted
protected void fireGetCompleted(Resource resource,
File localFile)
fireGetInitiated
protected void fireGetInitiated(Resource resource,
File localFile)
fireGetStarted
protected void fireGetStarted(Resource resource,
File localFile)
firePutCompleted
protected void firePutCompleted(Resource resource,
File localFile)
firePutInitiated
protected void firePutInitiated(Resource resource,
File localFile)
firePutStarted
protected void firePutStarted(Resource resource,
File localFile)
fireSessionConnectionRefused
protected void fireSessionConnectionRefused()
fireSessionDebug
protected void fireSessionDebug(String message)
fireSessionDisconnected
protected void fireSessionDisconnected()
fireSessionDisconnecting
protected void fireSessionDisconnecting()
fireSessionError
protected void fireSessionError(Exception exception)
fireSessionLoggedIn
protected void fireSessionLoggedIn()
fireSessionLoggedOff
protected void fireSessionLoggedOff()
fireSessionOpened
protected void fireSessionOpened()
fireSessionOpening
protected void fireSessionOpening()
fireTransferDebug
protected void fireTransferDebug(String message)
fireTransferError
protected void fireTransferError(Resource resource,
Exception e,
int requestType)
fireTransferProgress
protected void fireTransferProgress(TransferEvent transferEvent,
byte[] buffer,
int n)
getFileList
public List getFileList(String destinationDirectory)
throws TransferFailedException,
ResourceDoesNotExistException,
AuthorizationException
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.
- getFileList in interface Wagon
destinationDirectory
- directory to list contents of
- 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.
getPath
protected static String getPath(String basedir,
String dir)
getTransfer
protected void getTransfer(Resource resource,
File destination,
InputStream input,
boolean closeInput,
int maxSize)
throws TransferFailedException
postProcessListeners
protected void postProcessListeners(Resource resource,
File source,
int requestType)
throws TransferFailedException
This method is used if you are not streaming the transfer, to make sure any listeners dependent on state
(eg checksum observers) succeed.
setSessionEventSupport
public void setSessionEventSupport(SessionEventSupport sessionEventSupport)
setTransferEventSupport
public void setTransferEventSupport(TransferEventSupport transferEventSupport)
supportsDirectoryCopy
public boolean supportsDirectoryCopy()
- supportsDirectoryCopy in interface Wagon
- whether if this wagon supports directory operations
transfer
protected void transfer(Resource resource,
File source,
OutputStream output,
boolean closeOutput)
throws TransferFailedException
Write from File
to OutputStream
resource
- resource to transfersource
- file to read fromoutput
- output streamcloseOutput
- whether the output stream should be closed or not
transfer
protected void transfer(Resource resource,
InputStream input,
OutputStream output,
int requestType)
throws IOException
transfer
protected void transfer(Resource resource,
InputStream input,
OutputStream output,
int requestType,
int maxSize)
throws IOException