This project has retired. For details please refer to its Attic page.
DefaultRepositoryProxyConnectors

org.apache.maven.archiva.proxy
Class DefaultRepositoryProxyConnectors

Package class diagram package DefaultRepositoryProxyConnectors
java.lang.Object
  extended by org.apache.maven.archiva.proxy.DefaultRepositoryProxyConnectors
All Implemented Interfaces:
RepositoryProxyConnectors, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.registry.RegistryListener

public class DefaultRepositoryProxyConnectors
extends java.lang.Object
implements RepositoryProxyConnectors, org.codehaus.plexus.registry.RegistryListener, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable

DefaultRepositoryProxyConnectors


Constructor Summary
DefaultRepositoryProxyConnectors()
           
 
Method Summary
 void afterConfigurationChange(org.codehaus.plexus.registry.Registry registry, java.lang.String propertyName, java.lang.Object propertyValue)
           
 void beforeConfigurationChange(org.codehaus.plexus.registry.Registry registry, java.lang.String propertyName, java.lang.Object propertyValue)
           
 java.io.File fetchFromProxies(ManagedRepositoryContent repository, org.apache.maven.archiva.model.ArtifactReference artifact)
          Performs the artifact fetch operation against the target repositories of the provided source repository.
 java.io.File fetchFromProxies(ManagedRepositoryContent repository, java.lang.String path)
          Performs the fetch operation against the target repositories of the provided source repository.
 java.io.File fetchMetatadaFromProxies(ManagedRepositoryContent repository, java.lang.String logicalPath)
          Performs the metadata fetch operation against the target repositories of the provided source repository.
 java.util.List<ProxyConnector> getProxyConnectors(ManagedRepositoryContent repository)
          TODO: Ensure that list is correctly ordered based on configuration.
 boolean hasProxies(ManagedRepositoryContent repository)
          Test if the provided ManagedRepositoryContent has any proxies configured for it.
 void initialize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRepositoryProxyConnectors

public DefaultRepositoryProxyConnectors()
Method Detail

fetchFromProxies

public java.io.File fetchFromProxies(ManagedRepositoryContent repository,
                                     org.apache.maven.archiva.model.ArtifactReference artifact)
                              throws ProxyDownloadException
Description copied from interface: RepositoryProxyConnectors
Performs the artifact fetch operation against the target repositories of the provided source repository. If the artifact is found, it is downloaded and placed into the source repository filesystem.

Specified by:
fetchFromProxies in interface RepositoryProxyConnectors
Parameters:
repository - the source repository to use. (must be a managed repository)
artifact - the artifact to fetch.
Returns:
the file that was obtained, or null if no content was obtained
Throws:
ProxyDownloadException - if there was a problem fetching the content from the target repositories.

fetchFromProxies

public java.io.File fetchFromProxies(ManagedRepositoryContent repository,
                                     java.lang.String path)
Description copied from interface: RepositoryProxyConnectors
Performs the fetch operation against the target repositories of the provided source repository.

Specified by:
fetchFromProxies in interface RepositoryProxyConnectors
path - the path of the resource to fetch
Returns:
the file that was obtained, or null if no content was obtained

fetchMetatadaFromProxies

public java.io.File fetchMetatadaFromProxies(ManagedRepositoryContent repository,
                                             java.lang.String logicalPath)
Description copied from interface: RepositoryProxyConnectors
Performs the metadata fetch operation against the target repositories of the provided source repository. If the metadata is found, it is downloaded and placed into the source repository filesystem.

Specified by:
fetchMetatadaFromProxies in interface RepositoryProxyConnectors
Parameters:
repository - the source repository to use. (must be a managed repository)
Returns:
the file that was obtained, or null if no content was obtained

hasProxies

public boolean hasProxies(ManagedRepositoryContent repository)
Test if the provided ManagedRepositoryContent has any proxies configured for it.

Specified by:
hasProxies in interface RepositoryProxyConnectors
Parameters:
repository - the source repository to look for.
Returns:
true if there are proxy connectors that use the provided repository as a source repository.

getProxyConnectors

public java.util.List<ProxyConnector> getProxyConnectors(ManagedRepositoryContent repository)
TODO: Ensure that list is correctly ordered based on configuration. See MRM-477

Specified by:
getProxyConnectors in interface RepositoryProxyConnectors
Parameters:
repository - the source repository to look for.
Returns:
the List of ProxyConnector objects.

afterConfigurationChange

public void afterConfigurationChange(org.codehaus.plexus.registry.Registry registry,
                                     java.lang.String propertyName,
                                     java.lang.Object propertyValue)
Specified by:
afterConfigurationChange in interface org.codehaus.plexus.registry.RegistryListener

beforeConfigurationChange

public void beforeConfigurationChange(org.codehaus.plexus.registry.Registry registry,
                                      java.lang.String propertyName,
                                      java.lang.Object propertyValue)
Specified by:
beforeConfigurationChange in interface org.codehaus.plexus.registry.RegistryListener

initialize

public void initialize()
                throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException