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

org.apache.maven.archiva.converter.legacy
Class LegacyConverterArtifactConsumer

Package class diagram package LegacyConverterArtifactConsumer
java.lang.Object
  extended by org.apache.maven.archiva.consumers.AbstractMonitoredConsumer
      extended by org.apache.maven.archiva.converter.legacy.LegacyConverterArtifactConsumer
All Implemented Interfaces:
Consumer, KnownRepositoryContentConsumer, RepositoryContentConsumer

public class LegacyConverterArtifactConsumer
extends AbstractMonitoredConsumer
implements KnownRepositoryContentConsumer

LegacyConverterArtifactConsumer - convert artifacts as they are found into the destination repository.


Constructor Summary
LegacyConverterArtifactConsumer()
           
 
Method Summary
 void beginScan(org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration repository, java.util.Date whenGathered)
           Event that triggers at the beginning of a scan.
 void beginScan(org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration repository, java.util.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)
           
 java.lang.String getDescription()
          The human readable description for this consumer.
 org.apache.maven.artifact.repository.ArtifactRepository getDestinationRepository()
           
 java.util.List<java.lang.String> getExcludes()
          Get the list of excluded file patterns for this consumer.
 java.lang.String getId()
          This is the id for the consumer.
 java.util.List<java.lang.String> getIncludes()
          Get the list of included file patterns for this consumer.
 boolean isPermanent()
          Flag indicating permanance of consumer.
 void processFile(java.lang.String path)
           Event indicating a file is to be processed by this consumer.
 void processFile(java.lang.String path, boolean executeOnEntireRepo)
           
 void setDestinationRepository(org.apache.maven.artifact.repository.ArtifactRepository destinationRepository)
           
 void setExcludes(java.util.List<java.lang.String> excludes)
           
 void setIncludes(java.util.List<java.lang.String> includes)
           
 
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.RepositoryContentConsumer
isProcessUnmodified
 
Methods inherited from interface org.apache.maven.archiva.consumers.Consumer
addConsumerMonitor, removeConsumerMonitor
 

Constructor Detail

LegacyConverterArtifactConsumer

public LegacyConverterArtifactConsumer()
Method Detail

beginScan

public void beginScan(org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration repository,
                      java.util.Date whenGathered)
               throws ConsumerException
Description copied from interface: RepositoryContentConsumer

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 RepositoryContentConsumer
Parameters:
repository - the repository that this consumer is being used for.
whenGathered - the start of the repository scan
Throws:
ConsumerException - if there was a problem with using the provided repository with the consumer.

beginScan

public void beginScan(org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration repository,
                      java.util.Date whenGathered,
                      boolean executeOnEntireRepo)
               throws ConsumerException
Description copied from interface: RepositoryContentConsumer

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.

Specified by:
beginScan in interface RepositoryContentConsumer
Parameters:
repository - the repository that this consumer is being used for.
whenGathered - the start of the repository scan
executeOnEntireRepo - flags whether the consumer will be executed on an entire repository or just on a specific resource
Throws:
ConsumerException - if there was a problem with using the provided repository with the consumer.
See Also:
RepositoryContentConsumer.beginScan(org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration, java.util.Date )

completeScan

public void completeScan()
Description copied from interface: RepositoryContentConsumer

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

Specified by:
completeScan in interface RepositoryContentConsumer

completeScan

public void completeScan(boolean executeOnEntireRepo)
Specified by:
completeScan in interface RepositoryContentConsumer

getExcludes

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

Specified by:
getExcludes in interface RepositoryContentConsumer
Returns:
the list of String patterns. (example: "**/*.pom") - (can be null for no exclusions)

getIncludes

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

Specified by:
getIncludes in interface RepositoryContentConsumer
Returns:
the list of String patterns. (example: "**/*.pom")

processFile

public void processFile(java.lang.String path)
                 throws ConsumerException
Description copied from interface: RepositoryContentConsumer

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

Specified by:
processFile in interface RepositoryContentConsumer
Parameters:
path - the relative file path (in the repository) to process.
Throws:
ConsumerException - if there was a problem processing this file.

processFile

public void processFile(java.lang.String path,
                        boolean executeOnEntireRepo)
                 throws java.lang.Exception
Specified by:
processFile in interface RepositoryContentConsumer
Throws:
java.lang.Exception

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.

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.

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.

setExcludes

public void setExcludes(java.util.List<java.lang.String> excludes)

setIncludes

public void setIncludes(java.util.List<java.lang.String> includes)

getDestinationRepository

public org.apache.maven.artifact.repository.ArtifactRepository getDestinationRepository()

setDestinationRepository

public void setDestinationRepository(org.apache.maven.artifact.repository.ArtifactRepository destinationRepository)