|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Repository
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
get(java.lang.String, java.io.File)
retrieves a resource specified by a provided identifier creating a new file .
put(org.apache.ivy.core.module.descriptor.Artifact, java.io.File, java.lang.String, boolean)
transfers a file to the repository.
list(java.lang.String)
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(java.lang.String source,
java.io.File destination)
Fetch a resource from the repository. |
java.lang.String |
getFileSeparator()
Get the repository's file separator string. |
java.lang.String |
getName()
Return the name of the repository |
Resource |
getResource(java.lang.String source)
Return the resource associated with a specified identifier. |
boolean |
hasTransferListener(TransferListener listener)
Determine if a given listener is attached to the repository. |
java.util.List |
list(java.lang.String parent)
Return a listing of resources names |
void |
put(Artifact artifact,
java.io.File source,
java.lang.String destination,
boolean overwrite)
Transfer a resource to the repository |
void |
removeTransferListener(TransferListener listener)
Remove a listener on the repository |
java.lang.String |
standardize(java.lang.String source)
Normalize a string. |
Method Detail |
---|
Resource getResource(java.lang.String source) throws java.io.IOException
source
- A string identifying the resource.
java.io.IOException
- On error whle trying to get resource.void get(java.lang.String source, java.io.File destination) throws java.io.IOException
source
- A string identifying the resource to be fetched.destination
- Where to place the fetched resource.
java.io.IOException
- On retrieval failure.void put(Artifact artifact, java.io.File source, java.lang.String destination, boolean overwrite) throws java.io.IOException
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.
java.io.IOException
- On publication failure.java.util.List list(java.lang.String parent) throws java.io.IOException
parent
- The parent directory from which to generate the listing.
java.io.IOException
- On listing failure.void addTransferListener(TransferListener listener)
listener
- The listener to attach to the repository.void removeTransferListener(TransferListener listener)
listener
- The listener to removeboolean hasTransferListener(TransferListener listener)
listener
- The listener being quireied
true
if the provided listener is attached to the repository,
false
if not.java.lang.String getFileSeparator()
java.lang.String standardize(java.lang.String source)
source
- The string to normalize.
java.lang.String getName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |