org.apache.archiva.repository.scanner
Class RepositoryContentConsumers

java.lang.Object
  extended by org.apache.archiva.repository.scanner.RepositoryContentConsumers
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Service(value="repositoryContentConsumers")
public class RepositoryContentConsumers
extends Object
implements org.springframework.context.ApplicationContextAware

RepositoryContentConsumerUtil


Field Summary
private  org.springframework.context.ApplicationContext applicationContext
           
private  ArchivaAdministration archivaAdministration
           
private  List<InvalidRepositoryContentConsumer> selectedInvalidConsumers
           
private  List<KnownRepositoryContentConsumer> selectedKnownConsumers
           
 
Constructor Summary
RepositoryContentConsumers(ArchivaAdministration archivaAdministration)
           
 
Method Summary
 void executeConsumers(ManagedRepository repository, File localFile, boolean updateRelatedArtifacts)
          A convienence method to execute all of the active selected consumers for a particular arbitrary file.
 List<InvalidRepositoryContentConsumer> getAvailableInvalidConsumers()
          Get the list of InvalidRepositoryContentConsumer objects that are available and present in the classpath and as components in the IoC.
 List<KnownRepositoryContentConsumer> getAvailableKnownConsumers()
          Get the list of KnownRepositoryContentConsumer objects that are available and present in the classpath and as components in the IoC.
 List<String> getSelectedInvalidConsumerIds()
           Get the list of Ids associated with those InvalidRepositoryContentConsumer that have been selected in the configuration to execute.
 List<InvalidRepositoryContentConsumer> getSelectedInvalidConsumers()
          Get the list of InvalidRepositoryContentConsumer objects that are selected according to the active configuration.
 Map<String,InvalidRepositoryContentConsumer> getSelectedInvalidConsumersMap()
          Get the map of String ids to InvalidRepositoryContentConsumer implementations, for those consumers that have been selected according to the active configuration.
 List<String> getSelectedKnownConsumerIds()
           Get the list of Ids associated with those KnownRepositoryContentConsumer that have been selected in the configuration to execute.
 List<KnownRepositoryContentConsumer> getSelectedKnownConsumers()
          Get the list of KnownRepositoryContentConsumer objects that are selected according to the active configuration.
 Map<String,KnownRepositoryContentConsumer> getSelectedKnownConsumersMap()
          Get the map of String ids to KnownRepositoryContentConsumer implementations, for those consumers that have been selected according to the active configuration.
protected  Date getStartTime()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setArchivaAdministration(ArchivaAdministration archivaAdministration)
           
 void setSelectedInvalidConsumers(List<InvalidRepositoryContentConsumer> selectedInvalidConsumers)
           
 void setSelectedKnownConsumers(List<KnownRepositoryContentConsumer> selectedKnownConsumers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applicationContext

@Inject
private org.springframework.context.ApplicationContext applicationContext

archivaAdministration

private ArchivaAdministration archivaAdministration

selectedKnownConsumers

private List<KnownRepositoryContentConsumer> selectedKnownConsumers

selectedInvalidConsumers

private List<InvalidRepositoryContentConsumer> selectedInvalidConsumers
Constructor Detail

RepositoryContentConsumers

@Inject
public RepositoryContentConsumers(ArchivaAdministration archivaAdministration)
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getSelectedKnownConsumerIds

public List<String> getSelectedKnownConsumerIds()
                                         throws RepositoryAdminException

Get the list of Ids associated with those KnownRepositoryContentConsumer that have been selected in the configuration to execute.

NOTE: This list can be larger and contain entries that might not exist or be available in the classpath, or as a component.

Returns:
the list of consumer ids that have been selected by the configuration.
Throws:
RepositoryAdminException

getSelectedInvalidConsumerIds

public List<String> getSelectedInvalidConsumerIds()
                                           throws RepositoryAdminException

Get the list of Ids associated with those InvalidRepositoryContentConsumer that have been selected in the configuration to execute.

NOTE: This list can be larger and contain entries that might not exist or be available in the classpath, or as a component.

Returns:
the list of consumer ids that have been selected by the configuration.
Throws:
RepositoryAdminException

getSelectedKnownConsumersMap

public Map<String,KnownRepositoryContentConsumer> getSelectedKnownConsumersMap()
                                                                        throws RepositoryAdminException
Get the map of String ids to KnownRepositoryContentConsumer implementations, for those consumers that have been selected according to the active configuration.

Returns:
the map of String ids to KnownRepositoryContentConsumer objects.
Throws:
RepositoryAdminException

getSelectedInvalidConsumersMap

public Map<String,InvalidRepositoryContentConsumer> getSelectedInvalidConsumersMap()
                                                                            throws RepositoryAdminException
Get the map of String ids to InvalidRepositoryContentConsumer implementations, for those consumers that have been selected according to the active configuration.

Returns:
the map of String ids to InvalidRepositoryContentConsumer objects.
Throws:
RepositoryAdminException

getSelectedKnownConsumers

public List<KnownRepositoryContentConsumer> getSelectedKnownConsumers()
                                                               throws RepositoryAdminException
Get the list of KnownRepositoryContentConsumer objects that are selected according to the active configuration.

Returns:
the list of KnownRepositoryContentConsumer that have been selected by the active configuration.
Throws:
RepositoryAdminException

getSelectedInvalidConsumers

public List<InvalidRepositoryContentConsumer> getSelectedInvalidConsumers()
                                                                   throws RepositoryAdminException
Get the list of InvalidRepositoryContentConsumer objects that are selected according to the active configuration.

Returns:
the list of InvalidRepositoryContentConsumer that have been selected by the active configuration.
Throws:
RepositoryAdminException

getAvailableKnownConsumers

public List<KnownRepositoryContentConsumer> getAvailableKnownConsumers()
Get the list of KnownRepositoryContentConsumer objects that are available and present in the classpath and as components in the IoC.

Returns:
the list of all available KnownRepositoryContentConsumer present in the classpath and as a component in the IoC.

getAvailableInvalidConsumers

public List<InvalidRepositoryContentConsumer> getAvailableInvalidConsumers()
Get the list of InvalidRepositoryContentConsumer objects that are available and present in the classpath and as components in the IoC.

Returns:
the list of all available InvalidRepositoryContentConsumer present in the classpath and as a component in the IoC.

executeConsumers

public void executeConsumers(ManagedRepository repository,
                             File localFile,
                             boolean updateRelatedArtifacts)
                      throws RepositoryAdminException
A convienence method to execute all of the active selected consumers for a particular arbitrary file. NOTE: Make sure that there is no repository scanning task executing before invoking this so as to prevent the index writer/reader of the current index-content consumer executing from getting closed. For an example, see ArchivaDavResource#executeConsumers( File ).

Parameters:
repository - the repository configuration to use.
localFile - the local file to execute the consumers against.
updateRelatedArtifacts - TODO
Throws:
RepositoryAdminException

setSelectedKnownConsumers

public void setSelectedKnownConsumers(List<KnownRepositoryContentConsumer> selectedKnownConsumers)

setSelectedInvalidConsumers

public void setSelectedInvalidConsumers(List<InvalidRepositoryContentConsumer> selectedInvalidConsumers)

getStartTime

protected Date getStartTime()

setArchivaAdministration

public void setArchivaAdministration(ArchivaAdministration archivaAdministration)


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