org.apache.ivy.plugins.repository
public interface Repository
A repository supports the following fundamental operations
Repository retrieves a resource specified by a provided identifier creating a new file .
Repository transfers a file to the repository.
Repository returns a listing of file like objects belonging to a specified parent directory.
Method Summary | |
---|---|
void | addTransferListener(TransferListener listener)
Add a listener to the repository.
|
void | get(String source, File destination)
Fetch a resource from the repository.
|
String | getFileSeparator()
Get the repository's file separator string.
|
String | getName()
Return the name of the repository |
Resource | getResource(String source)
Return the resource associated with a specified identifier. |
boolean | hasTransferListener(TransferListener listener)
Determine if a given listener is attached to the repository.
|
List | list(String parent)
Return a listing of resources names
|
void | put(Artifact artifact, File source, String destination, boolean overwrite)
Transfer a resource to the repository
|
void | removeTransferListener(TransferListener listener)
Remove a listener on the repository
|
String | standardize(String source)
Normalize a string.
|
Parameters: listener The listener to attach to the repository.
Parameters: source A string identifying the resource to be fetched. destination Where to place the fetched resource.
Throws: IOException On retrieval failure.
Returns: The repository's file separator delimiter
Parameters: source A string identifying the resource.
Returns: The resource associated with the resource identifier.
Throws: IOException On error while trying to get resource.
Parameters: listener The listener being queried
Returns: true
if the provided listener is attached to the repository,
false
if not.
Parameters: parent The parent directory from which to generate the listing.
Returns: A listing of the parent directory's file content, as a List of String.
Throws: IOException On listing failure.
Parameters: artifact The artifact to be transferred. source The local file to be transferred. destination Where to transfer the resource. overwrite Whether the transfer should overwrite an existing resource.
Throws: IOException On publication failure.
Parameters: listener The listener to remove
Parameters: source The string to normalize.
Returns: The normalized string.