fr.jayasoft.ivy.repository.file
Class FileRepository

java.lang.Object
  extended byfr.jayasoft.ivy.repository.AbstractRepository
      extended byfr.jayasoft.ivy.repository.file.FileRepository
All Implemented Interfaces:
Repository

public class FileRepository
extends AbstractRepository


Constructor Summary
FileRepository()
           
FileRepository(java.io.File basedir)
           
 
Method Summary
 void get(java.lang.String source, java.io.File destination)
          Fetch a resource from the repository.
 Resource getResource(java.lang.String source)
          Return the resource associated with a specified identifier.
 java.util.List list(java.lang.String parent)
          Return a listing of resources
 void put(java.io.File source, java.lang.String destination, boolean overwrite)
          Transfer a resource to the repository
 
Methods inherited from class fr.jayasoft.ivy.repository.AbstractRepository
addTransferListener, fireTransferCompleted, fireTransferCompleted, fireTransferError, fireTransferError, fireTransferEvent, fireTransferInitiated, fireTransferProgress, fireTransferStarted, fireTransferStarted, getFileSeparator, getName, hasTransferListener, removeTransferListener, setName, standardize, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileRepository

public FileRepository()

FileRepository

public FileRepository(java.io.File basedir)
Method Detail

getResource

public Resource getResource(java.lang.String source)
                     throws java.io.IOException
Description copied from interface: Repository
Return the resource associated with a specified identifier.

Parameters:
source - A string identifying the resource.
Returns:
The resource associated with the resource identifier.
Throws:
java.io.IOException - On failure to get resource.

get

public void get(java.lang.String source,
                java.io.File destination)
         throws java.io.IOException
Description copied from interface: Repository
Fetch a resource from the repository.

Parameters:
source - A string identifying the resource to be fetched.
destination - Where to place the fetched resource.
Throws:
java.io.IOException - On retrieval failure.

put

public void put(java.io.File source,
                java.lang.String destination,
                boolean overwrite)
         throws java.io.IOException
Description copied from interface: Repository
Transfer a resource to the repository

Parameters:
source - The local file to be transferred.
destination - Where to transfer the resource.
overwrite - Whether the transfer should overwrite an existing resource.
Throws:
java.io.IOException - On publication failure.

list

public java.util.List list(java.lang.String parent)
                    throws java.io.IOException
Description copied from interface: Repository
Return a listing of resources

Parameters:
parent - The parent directory from which to generate the listing.
Returns:
A listing of the parent directory's file content.
Throws:
java.io.IOException - On listing failure.