| org.apache.ivy.plugins.repository.Repository
All known Subclasses: org.apache.ivy.plugins.repository.AbstractRepository,
Repository | public interface Repository (Code) | | Represents a collection of resources available to Ivy. Ivy uses one or more repositories as both
a source of resources for Ivy enabled build systems and as a distribution center for resources
generated by Ivy enabled build systems.
A repository supports the following fundamental operations
- retrieving a resource from the repository.
- transfering a resource to the repository.
- retrieving a listing of resources.
Resource Retrieval
Repository.get retrieves a resource specified by a provided identifier creating a new file .
resource Publication
Repository.put transfers a file to the repository.
resource Listing
Repository.list returns a listing of file like objects belonging to a specified parent directory.
|
addTransferListener | void addTransferListener(TransferListener listener)(Code) | | Add a listener to the repository.
Parameters: listener - The listener to attach to the repository. |
get | void get(String source, File destination) throws IOException(Code) | | Fetch a resource from the repository.
Parameters: source - A string identifying the resource to be fetched. Parameters: destination - Where to place the fetched resource. throws: IOException - On retrieval failure. |
getFileSeparator | String getFileSeparator()(Code) | | Get the repository's file separator string.
The repository's file separator delimiter |
getName | String getName()(Code) | | Return the name of the repository
|
getResource | Resource getResource(String source) throws IOException(Code) | | Return the resource associated with a specified identifier. If the resource does not exist,
it should return a Resource with exists() returning false. An IOException should only be
thrown when a real IO problem occurs, like the impossibility to connect to a server.
Parameters: source - A string identifying the resource. The resource associated with the resource identifier. throws: IOException - On error whle trying to get resource. |
hasTransferListener | boolean hasTransferListener(TransferListener listener)(Code) | | Determine if a given listener is attached to the repository.
Parameters: listener - The listener being quireied true if the provided listener is attached to the repository,false if not. |
list | List list(String parent) throws IOException(Code) | | Return a listing of resources names
Parameters: parent - The parent directory from which to generate the listing. A listing of the parent directory's file content, as a List of String. throws: IOException - On listing failure. |
put | void put(Artifact artifact, File source, String destination, boolean overwrite) throws IOException(Code) | | Transfer a resource to the repository
Parameters: artifact - The artifact to be transferred. Parameters: source - The local file to be transferred. Parameters: destination - Where to transfer the resource. Parameters: overwrite - Whether the transfer should overwrite an existing resource. throws: IOException - On publication failure. |
removeTransferListener | void removeTransferListener(TransferListener listener)(Code) | | Remove a listener on the repository
Parameters: listener - The listener to remove |
standardize | String standardize(String source)(Code) | | Normalize a string.
Parameters: source - The string to normalize. The normalized string. |
|
|