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

org.apache.maven.archiva.reporting.artifact
Class DuplicateArtifactsConsumer

Package class diagram package DuplicateArtifactsConsumer
java.lang.Object
  extended by org.apache.maven.archiva.consumers.AbstractMonitoredConsumer
      extended by org.apache.maven.archiva.reporting.artifact.DuplicateArtifactsConsumer
All Implemented Interfaces:
Consumer, ArchivaArtifactConsumer, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.registry.RegistryListener

public class DuplicateArtifactsConsumer
extends AbstractMonitoredConsumer
implements ArchivaArtifactConsumer, org.codehaus.plexus.registry.RegistryListener, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable

Search the database of known SHA1 Checksums for potential duplicate artifacts.


Constructor Summary
DuplicateArtifactsConsumer()
           
 
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)
           
 void beginScan()
           Event that triggers at the beginning of a scan.
 void completeScan()
           Event that triggers on the completion of a scan.
 java.lang.String getDescription()
          The human readable description for this consumer.
 java.lang.String getId()
          This is the id for the consumer.
 java.util.List<java.lang.String> getIncludedTypes()
          Get the list of included file patterns for this consumer.
 void initialize()
           
 boolean isPermanent()
          Flag indicating permanance of consumer.
 void processArchivaArtifact(ArchivaArtifact artifact)
           Event indicating an ArchivaArtifact is to be processed by this consumer.
 
Methods inherited from class org.apache.maven.archiva.consumers.AbstractMonitoredConsumer
addConsumerMonitor, getDefaultArtifactExclusions, isProcessUnmodified, removeConsumerMonitor, triggerConsumerError, triggerConsumerInfo, triggerConsumerWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.archiva.consumers.Consumer
addConsumerMonitor, removeConsumerMonitor
 

Constructor Detail

DuplicateArtifactsConsumer

public DuplicateArtifactsConsumer()
Method Detail

getId

public java.lang.String getId()
Description copied from interface: Consumer
This is the id for the consumer.

Specified by:
getId in interface Consumer
Returns:
the consumer id.

getDescription

public java.lang.String getDescription()
Description copied from interface: Consumer
The human readable description for this consumer.

Specified by:
getDescription in interface Consumer
Returns:
the human readable description for this consumer.

isPermanent

public boolean isPermanent()
Description copied from interface: Consumer
Flag indicating permanance of consumer. (if it can be disabled or not)

Specified by:
isPermanent in interface Consumer
Returns:
true indicating that consumer is permanent and cannot be disabled.

beginScan

public void beginScan()
Description copied from interface: ArchivaArtifactConsumer

Event 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.

Specified by:
beginScan in interface ArchivaArtifactConsumer

completeScan

public void completeScan()
Description copied from interface: ArchivaArtifactConsumer

Event that triggers on the completion of a scan.

NOTE: If the consumer opted to batch up processing requests in the ArchivaArtifactConsumer.processArchivaArtifact(ArchivaArtifact) event this would be the last opportunity to drain any processing queue's.

Specified by:
completeScan in interface ArchivaArtifactConsumer

getIncludedTypes

public java.util.List<java.lang.String> getIncludedTypes()
Description copied from interface: ArchivaArtifactConsumer
Get the list of included file patterns for this consumer.

Specified by:
getIncludedTypes in interface ArchivaArtifactConsumer
Returns:
the list of (String) artifact types to process.

processArchivaArtifact

public void processArchivaArtifact(ArchivaArtifact artifact)
                            throws ConsumerException
Description copied from interface: ArchivaArtifactConsumer

Event indicating an ArchivaArtifact is to be processed by this consumer.

NOTE: The consumer does not need to process the artifact immediately, can can opt to queue and/or track the artifact to be processed in batch. Just be sure to complete the processing by the ArchivaArtifactConsumer.completeScan() event.

Specified by:
processArchivaArtifact in interface ArchivaArtifactConsumer
Throws:
ConsumerException - if there was a problem processing this file.

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