@Service(value="knownRepositoryContentConsumer#duplicate-artifacts") @Scope(value="prototype") public class DuplicateArtifactsConsumer extends AbstractMonitoredConsumer implements KnownRepositoryContentConsumer, org.apache.archiva.components.registry.RegistryListener
TODO: no need for this to be a scanner - we can just query the database / content repository to get a full list
logger| Constructor and Description | 
|---|
| DuplicateArtifactsConsumer() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterConfigurationChange(org.apache.archiva.components.registry.Registry registry,
                        String propertyName,
                        Object propertyValue) | 
| void | beforeConfigurationChange(org.apache.archiva.components.registry.Registry registry,
                         String propertyName,
                         Object propertyValue) | 
| void | beginScan(ManagedRepository repo,
         Date whenGathered)
 Event that triggers at the beginning of a scan. | 
| void | beginScan(ManagedRepository repo,
         Date whenGathered,
         boolean executeOnEntireRepo)
 Event that triggers at the beginning of a scan, where you can also indicate whether the consumers will be
 executed on an entire repository or on a specific resource. | 
| void | completeScan()
 Event that triggers on the completion of a scan. | 
| void | completeScan(boolean executeOnEntireRepo) | 
| String | getDescription()The human readable description for this consumer. | 
| List<String> | getExcludes()Get the list of excluded file patterns for this consumer. | 
| String | getId()This is the id for the consumer. | 
| List<String> | getIncludes()Get the list of included file patterns for this consumer. | 
| RepositorySessionFactory | getRepositorySessionFactory() | 
| void | initialize() | 
| void | processFile(String path)
 Event indicating a file is to be processed by this consumer. | 
| void | processFile(String path,
           boolean executeOnEntireRepo) | 
| void | setRepositorySessionFactory(RepositorySessionFactory repositorySessionFactory) | 
addConsumerMonitor, getDefaultArtifactExclusions, isProcessUnmodified, removeConsumerMonitor, triggerConsumerError, triggerConsumerInfo, triggerConsumerWarningclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisProcessUnmodifiedaddConsumerMonitor, removeConsumerMonitorpublic DuplicateArtifactsConsumer()
public String getId()
Consumerpublic String getDescription()
ConsumergetDescription in interface Consumerpublic List<String> getIncludes()
RepositoryContentConsumergetIncludes in interface RepositoryContentConsumerString patterns. (example: "**/*.pom")public List<String> getExcludes()
RepositoryContentConsumergetExcludes in interface RepositoryContentConsumerString patterns. (example: "**/*.pom") - (can be null for no exclusions)public void beginScan(ManagedRepository repo, Date whenGathered) throws ConsumerException
RepositoryContentConsumerEvent that triggers at the beginning of a scan.
NOTE: This would be a good place to initialize the consumer, to lock any resources, and to generally start tracking the scan as a whole.
beginScan in interface RepositoryContentConsumerrepo - the repository that this consumer is being used for.whenGathered - the start of the repository scanConsumerException - if there was a problem with using the provided repository with the consumer.public void beginScan(ManagedRepository repo, Date whenGathered, boolean executeOnEntireRepo) throws ConsumerException
RepositoryContentConsumerEvent that triggers at the beginning of a scan, where you can also indicate whether the consumers will be executed on an entire repository or on a specific resource.
beginScan in interface RepositoryContentConsumerrepo - the repository that this consumer is being used for.whenGathered - the start of the repository scanexecuteOnEntireRepo - flags whether the consumer will be executed on an entire repository or just on a specific resourceConsumerException - if there was a problem with using the provided repository with the consumer.RepositoryContentConsumer.beginScan(ManagedRepository, java.util.Date)public void processFile(String path) throws ConsumerException
RepositoryContentConsumerEvent indicating a file is to be processed by this consumer.
 NOTE: The consumer does not need to process the file immediately, can can opt to queue and/or track
 the files to be processed in batch.  Just be sure to complete the processing by the RepositoryContentConsumer.completeScan()
 event.
 
processFile in interface RepositoryContentConsumerpath - the relative file path (in the repository) to process.ConsumerException - if there was a problem processing this file.public void processFile(String path, boolean executeOnEntireRepo) throws ConsumerException
processFile in interface RepositoryContentConsumerpath - the relative file path (in the repository) to process.executeOnEntireRepo - flags whether the consumer will be executed on an entire repository or just on a specific resourceConsumerExceptionpublic void completeScan()
RepositoryContentConsumerEvent that triggers on the completion of a scan.
 NOTE: If the consumer opted to batch up processing requests in the RepositoryContentConsumer.processFile(String) event
 this would be the last opportunity to drain any processing queue's.
 
completeScan in interface RepositoryContentConsumerpublic void completeScan(boolean executeOnEntireRepo)
completeScan in interface RepositoryContentConsumerexecuteOnEntireRepo - flags whether the consumer will be executed on an entire repository or just on a specific resourcepublic void afterConfigurationChange(org.apache.archiva.components.registry.Registry registry, String propertyName, Object propertyValue)
afterConfigurationChange in interface org.apache.archiva.components.registry.RegistryListenerpublic void beforeConfigurationChange(org.apache.archiva.components.registry.Registry registry, String propertyName, Object propertyValue)
beforeConfigurationChange in interface org.apache.archiva.components.registry.RegistryListener@PostConstruct public void initialize()
public RepositorySessionFactory getRepositorySessionFactory()
public void setRepositorySessionFactory(RepositorySessionFactory repositorySessionFactory)
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.