org.hudsonci.maven.plugin.dependencymonitor.internal
Class ProjectArtifactCacheImpl

java.lang.Object
  extended by org.hudsonci.maven.plugin.dependencymonitor.internal.ProjectArtifactCacheImpl
All Implemented Interfaces:
ProjectArtifactCache

@Singleton
public class ProjectArtifactCacheImpl
extends Object
implements ProjectArtifactCache

Default implementation of ProjectArtifactCache.

Since:
2.1.0
Author:
Jason Dillon

Constructor Summary
ProjectArtifactCacheImpl(ProjectService projectService, ArtifactsExtractor artifactsExtractor)
           
 
Method Summary
 void clear()
          Clear the cache.
 Collection<AbstractProject> getArtifactConsumers()
          Get all artifact consuming projects.
 Collection<AbstractProject> getArtifactProducers()
          Get all artifact producing projects.
 ArtifactsPair getArtifacts(AbstractProject project)
          Get the artifacts pair for a given project.
 Collection<MavenCoordinatesDTO> getConsumedArtifacts(AbstractProject project)
          Get artifacts consumed by the given project.
 Collection<AbstractProject> getConsumersOf(MavenCoordinatesDTO artifact)
          Get the projects which consume the given artifact.
 Collection<MavenCoordinatesDTO> getProducedArtifacts(AbstractProject project)
          Get artifacts produced by the given project.
 Collection<AbstractProject> getProducersOf(MavenCoordinatesDTO artifact)
          Get the projects which produce the given artifact.
 boolean isConsumed(MavenCoordinatesDTO artifact)
          Check if the given artifact is consumed by any projects.
 boolean isProduced(MavenCoordinatesDTO artifact)
          Check if the given artifact is produced by any projects.
 void purgeArtifacts(AbstractProject project)
          Purge all artifacts for the given project.
 void rebuild()
          Rebuild the cache.
 boolean updateArtifacts(AbstractBuild build)
          Update the cache for artifacts in the given build.
 boolean updateArtifacts(AbstractProject project, ArtifactsPair artifacts)
          Update the cache for a projects artifacts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectArtifactCacheImpl

@Inject
public ProjectArtifactCacheImpl(ProjectService projectService,
                                       ArtifactsExtractor artifactsExtractor)
Method Detail

getArtifacts

public ArtifactsPair getArtifacts(AbstractProject project)
Description copied from interface: ProjectArtifactCache
Get the artifacts pair for a given project.

Specified by:
getArtifacts in interface ProjectArtifactCache

getProducedArtifacts

public Collection<MavenCoordinatesDTO> getProducedArtifacts(AbstractProject project)
Description copied from interface: ProjectArtifactCache
Get artifacts produced by the given project.

Specified by:
getProducedArtifacts in interface ProjectArtifactCache

getConsumedArtifacts

public Collection<MavenCoordinatesDTO> getConsumedArtifacts(AbstractProject project)
Description copied from interface: ProjectArtifactCache
Get artifacts consumed by the given project.

Specified by:
getConsumedArtifacts in interface ProjectArtifactCache

getArtifactProducers

public Collection<AbstractProject> getArtifactProducers()
Description copied from interface: ProjectArtifactCache
Get all artifact producing projects.

Specified by:
getArtifactProducers in interface ProjectArtifactCache

getArtifactConsumers

public Collection<AbstractProject> getArtifactConsumers()
Description copied from interface: ProjectArtifactCache
Get all artifact consuming projects.

Specified by:
getArtifactConsumers in interface ProjectArtifactCache

getProducersOf

public Collection<AbstractProject> getProducersOf(MavenCoordinatesDTO artifact)
Description copied from interface: ProjectArtifactCache
Get the projects which produce the given artifact.

Specified by:
getProducersOf in interface ProjectArtifactCache

getConsumersOf

public Collection<AbstractProject> getConsumersOf(MavenCoordinatesDTO artifact)
Description copied from interface: ProjectArtifactCache
Get the projects which consume the given artifact.

Specified by:
getConsumersOf in interface ProjectArtifactCache

clear

public void clear()
Description copied from interface: ProjectArtifactCache
Clear the cache.

Specified by:
clear in interface ProjectArtifactCache

rebuild

public void rebuild()
Description copied from interface: ProjectArtifactCache
Rebuild the cache.

Specified by:
rebuild in interface ProjectArtifactCache

updateArtifacts

public boolean updateArtifacts(AbstractBuild build)
Description copied from interface: ProjectArtifactCache
Update the cache for artifacts in the given build.

Specified by:
updateArtifacts in interface ProjectArtifactCache

updateArtifacts

public boolean updateArtifacts(AbstractProject project,
                               ArtifactsPair artifacts)
Description copied from interface: ProjectArtifactCache
Update the cache for a projects artifacts.

Specified by:
updateArtifacts in interface ProjectArtifactCache

purgeArtifacts

public void purgeArtifacts(AbstractProject project)
Description copied from interface: ProjectArtifactCache
Purge all artifacts for the given project.

Specified by:
purgeArtifacts in interface ProjectArtifactCache

isProduced

public boolean isProduced(MavenCoordinatesDTO artifact)
Description copied from interface: ProjectArtifactCache
Check if the given artifact is produced by any projects.

Specified by:
isProduced in interface ProjectArtifactCache

isConsumed

public boolean isConsumed(MavenCoordinatesDTO artifact)
Description copied from interface: ProjectArtifactCache
Check if the given artifact is consumed by any projects.

Specified by:
isConsumed in interface ProjectArtifactCache


Copyright © 2004-2011 Hudson. All Rights Reserved.