Class AbstractRepository
java.lang.Object
org.apache.ivy.plugins.repository.AbstractRepository
- All Implemented Interfaces:
Repository
- Direct Known Subclasses:
AbstractSshBasedRepository, ChainedRepository, FileRepository, JarRepository, URLRepository, VfsRepository, VsftpRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTransferListener(TransferListener listener) Add a listener to the repository.protected voidprotected voidfireTransferCompleted(long totalLength) protected voidprotected voidprotected voidprotected voidfireTransferInitiated(Resource res, int requestType) protected voidfireTransferProgress(long length) protected voidprotected voidfireTransferStarted(long totalLength) Get the repository's file separator string.getName()Return the name of the repositorybooleanhasTransferListener(TransferListener listener) Determine if a given listener is attached to the repository.protected voidvoidTransfer a resource to the repositoryvoidremoveTransferListener(TransferListener listener) Remove a listener on the repositoryvoidstandardize(String source) Normalize a string.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Repository
get, getResource, list
-
Constructor Details
-
AbstractRepository
public AbstractRepository() -
AbstractRepository
-
-
Method Details
-
addTransferListener
Description copied from interface:RepositoryAdd a listener to the repository.- Specified by:
addTransferListenerin interfaceRepository- Parameters:
listener- The listener to attach to the repository.
-
removeTransferListener
Description copied from interface:RepositoryRemove a listener on the repository- Specified by:
removeTransferListenerin interfaceRepository- Parameters:
listener- The listener to remove
-
hasTransferListener
Description copied from interface:RepositoryDetermine if a given listener is attached to the repository.- Specified by:
hasTransferListenerin interfaceRepository- Parameters:
listener- The listener being queried- Returns:
trueif the provided listener is attached to the repository,falseif not.
-
fireTransferInitiated
-
fireTransferStarted
protected void fireTransferStarted() -
fireTransferStarted
protected void fireTransferStarted(long totalLength) -
fireTransferProgress
protected void fireTransferProgress(long length) -
fireTransferCompleted
protected void fireTransferCompleted() -
fireTransferCompleted
protected void fireTransferCompleted(long totalLength) -
fireTransferError
protected void fireTransferError() -
fireTransferError
-
fireTransferEvent
-
getFileSeparator
Description copied from interface:RepositoryGet the repository's file separator string.- Specified by:
getFileSeparatorin interfaceRepository- Returns:
- The repository's file separator delimiter
-
standardize
Description copied from interface:RepositoryNormalize a string.- Specified by:
standardizein interfaceRepository- Parameters:
source- The string to normalize.- Returns:
- The normalized string.
-
getName
Description copied from interface:RepositoryReturn the name of the repository- Specified by:
getNamein interfaceRepository- Returns:
- String name
-
setName
-
getTimeoutConstraint
-
toString
-
put
public void put(Artifact artifact, File source, String destination, boolean overwrite) throws IOException Description copied from interface:RepositoryTransfer a resource to the repository- Specified by:
putin interfaceRepository- 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.
-
put
- Throws:
IOException
-