org.apache.archiva.proxy
Class DefaultRepositoryProxyConnectors

java.lang.Object
  extended by org.apache.archiva.proxy.DefaultRepositoryProxyConnectors
All Implemented Interfaces:
RepositoryProxyConnectors, org.apache.archiva.redback.components.registry.RegistryListener

@Service(value="repositoryProxyConnectors#default")
public class DefaultRepositoryProxyConnectors
extends Object
implements RepositoryProxyConnectors, org.apache.archiva.redback.components.registry.RegistryListener

DefaultRepositoryProxyConnectors


Constructor Summary
DefaultRepositoryProxyConnectors()
           
 
Method Summary
 void afterConfigurationChange(org.apache.archiva.redback.components.registry.Registry registry, String propertyName, Object propertyValue)
           
 void beforeConfigurationChange(org.apache.archiva.redback.components.registry.Registry registry, String propertyName, Object propertyValue)
           
 File fetchFromProxies(org.apache.archiva.repository.ManagedRepositoryContent repository, org.apache.archiva.model.ArtifactReference artifact)
          Performs the artifact fetch operation against the target repositories of the provided source repository.
 File fetchFromProxies(org.apache.archiva.repository.ManagedRepositoryContent repository, String path)
          Performs the fetch operation against the target repositories of the provided source repository.
 File fetchMetatadaFromProxies(org.apache.archiva.repository.ManagedRepositoryContent repository, String logicalPath)
          Performs the metadata fetch operation against the target repositories of the provided source repository.
 org.apache.archiva.configuration.ArchivaConfiguration getArchivaConfiguration()
           
 Map<String,org.apache.archiva.policies.DownloadErrorPolicy> getDownloadErrorPolicies()
           
 org.apache.archiva.repository.metadata.MetadataTools getMetadataTools()
           
 Map<String,org.apache.archiva.policies.PostDownloadPolicy> getPostDownloadPolicies()
           
 Map<String,org.apache.archiva.policies.PreDownloadPolicy> getPreDownloadPolicies()
           
 List<ProxyConnector> getProxyConnectors(org.apache.archiva.repository.ManagedRepositoryContent repository)
          TODO: Ensure that list is correctly ordered based on configuration.
 org.apache.archiva.repository.RepositoryContentFactory getRepositoryFactory()
           
 org.apache.archiva.policies.urlcache.UrlFailureCache getUrlFailureCache()
           
 org.apache.archiva.proxy.common.WagonFactory getWagonFactory()
           
 boolean hasProxies(org.apache.archiva.repository.ManagedRepositoryContent repository)
          Test if the provided ManagedRepositoryContent has any proxies configured for it.
 void initialize()
           
 void setArchivaConfiguration(org.apache.archiva.configuration.ArchivaConfiguration archivaConfiguration)
           
 void setDownloadErrorPolicies(Map<String,org.apache.archiva.policies.DownloadErrorPolicy> downloadErrorPolicies)
           
 void setMetadataTools(org.apache.archiva.repository.metadata.MetadataTools metadataTools)
           
 void setPostDownloadPolicies(Map<String,org.apache.archiva.policies.PostDownloadPolicy> postDownloadPolicies)
           
 void setPreDownloadPolicies(Map<String,org.apache.archiva.policies.PreDownloadPolicy> preDownloadPolicies)
           
 void setRepositoryFactory(org.apache.archiva.repository.RepositoryContentFactory repositoryFactory)
           
 void setUrlFailureCache(org.apache.archiva.policies.urlcache.UrlFailureCache urlFailureCache)
           
 void setWagonFactory(org.apache.archiva.proxy.common.WagonFactory wagonFactory)
           
 
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

initialize

@PostConstruct
public void initialize()

fetchFromProxies

public File fetchFromProxies(org.apache.archiva.repository.ManagedRepositoryContent repository,
                             org.apache.archiva.model.ArtifactReference artifact)
                      throws org.apache.archiva.policies.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:
org.apache.archiva.policies.ProxyDownloadException - if there was a problem fetching the content from the target repositories.

fetchFromProxies

public File fetchFromProxies(org.apache.archiva.repository.ManagedRepositoryContent repository,
                             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 File fetchMetatadaFromProxies(org.apache.archiva.repository.ManagedRepositoryContent repository,
                                     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(org.apache.archiva.repository.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 List<ProxyConnector> getProxyConnectors(org.apache.archiva.repository.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.apache.archiva.redback.components.registry.Registry registry,
                                     String propertyName,
                                     Object propertyValue)
Specified by:
afterConfigurationChange in interface org.apache.archiva.redback.components.registry.RegistryListener

beforeConfigurationChange

public void beforeConfigurationChange(org.apache.archiva.redback.components.registry.Registry registry,
                                      String propertyName,
                                      Object propertyValue)
Specified by:
beforeConfigurationChange in interface org.apache.archiva.redback.components.registry.RegistryListener

getArchivaConfiguration

public org.apache.archiva.configuration.ArchivaConfiguration getArchivaConfiguration()

setArchivaConfiguration

public void setArchivaConfiguration(org.apache.archiva.configuration.ArchivaConfiguration archivaConfiguration)

getRepositoryFactory

public org.apache.archiva.repository.RepositoryContentFactory getRepositoryFactory()

setRepositoryFactory

public void setRepositoryFactory(org.apache.archiva.repository.RepositoryContentFactory repositoryFactory)

getMetadataTools

public org.apache.archiva.repository.metadata.MetadataTools getMetadataTools()

setMetadataTools

public void setMetadataTools(org.apache.archiva.repository.metadata.MetadataTools metadataTools)

getUrlFailureCache

public org.apache.archiva.policies.urlcache.UrlFailureCache getUrlFailureCache()

setUrlFailureCache

public void setUrlFailureCache(org.apache.archiva.policies.urlcache.UrlFailureCache urlFailureCache)

getWagonFactory

public org.apache.archiva.proxy.common.WagonFactory getWagonFactory()

setWagonFactory

public void setWagonFactory(org.apache.archiva.proxy.common.WagonFactory wagonFactory)

getPreDownloadPolicies

public Map<String,org.apache.archiva.policies.PreDownloadPolicy> getPreDownloadPolicies()

setPreDownloadPolicies

public void setPreDownloadPolicies(Map<String,org.apache.archiva.policies.PreDownloadPolicy> preDownloadPolicies)

getPostDownloadPolicies

public Map<String,org.apache.archiva.policies.PostDownloadPolicy> getPostDownloadPolicies()

setPostDownloadPolicies

public void setPostDownloadPolicies(Map<String,org.apache.archiva.policies.PostDownloadPolicy> postDownloadPolicies)

getDownloadErrorPolicies

public Map<String,org.apache.archiva.policies.DownloadErrorPolicy> getDownloadErrorPolicies()

setDownloadErrorPolicies

public void setDownloadErrorPolicies(Map<String,org.apache.archiva.policies.DownloadErrorPolicy> downloadErrorPolicies)


Copyright © 2006-2012 The Apache Software Foundation. All Rights Reserved.