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

public abstract class AbstractRepository extends Object implements Repository
  • Constructor Details

    • AbstractRepository

      public AbstractRepository()
    • AbstractRepository

      protected AbstractRepository(TimeoutConstraint timeoutConstraint)
  • Method Details

    • addTransferListener

      public void addTransferListener(TransferListener listener)
      Description copied from interface: Repository
      Add a listener to the repository.
      Specified by:
      addTransferListener in interface Repository
      Parameters:
      listener - The listener to attach to the repository.
    • removeTransferListener

      public void removeTransferListener(TransferListener listener)
      Description copied from interface: Repository
      Remove a listener on the repository
      Specified by:
      removeTransferListener in interface Repository
      Parameters:
      listener - The listener to remove
    • hasTransferListener

      public boolean hasTransferListener(TransferListener listener)
      Description copied from interface: Repository
      Determine if a given listener is attached to the repository.
      Specified by:
      hasTransferListener in interface Repository
      Parameters:
      listener - The listener being queried
      Returns:
      true if the provided listener is attached to the repository, false if not.
    • fireTransferInitiated

      protected void fireTransferInitiated(Resource res, int requestType)
    • 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

      protected void fireTransferError(Exception ex)
    • fireTransferEvent

      protected void fireTransferEvent(TransferEvent evt)
    • getFileSeparator

      public String getFileSeparator()
      Description copied from interface: Repository
      Get the repository's file separator string.
      Specified by:
      getFileSeparator in interface Repository
      Returns:
      The repository's file separator delimiter
    • standardize

      public String standardize(String source)
      Description copied from interface: Repository
      Normalize a string.
      Specified by:
      standardize in interface Repository
      Parameters:
      source - The string to normalize.
      Returns:
      The normalized string.
    • getName

      public String getName()
      Description copied from interface: Repository
      Return the name of the repository
      Specified by:
      getName in interface Repository
      Returns:
      String name
    • setName

      public void setName(String name)
    • getTimeoutConstraint

      public TimeoutConstraint getTimeoutConstraint()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • put

      public void put(Artifact artifact, File source, String destination, boolean overwrite) throws IOException
      Description copied from interface: Repository
      Transfer a resource to the repository
      Specified by:
      put in interface Repository
      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

      protected void put(File source, String destination, boolean overwrite) throws IOException
      Throws:
      IOException