
org.hudsonci.maven.plugin.dependencymonitor.ProjectArtifactCache Maven / Gradle / Ivy
The newest version!
/*******************************************************************************
*
* Copyright (c) 2010-2011 Sonatype, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*
*
*
*
*******************************************************************************/
package org.hudsonci.maven.plugin.dependencymonitor;
import com.google.inject.ImplementedBy;
import org.hudsonci.maven.plugin.dependencymonitor.internal.ProjectArtifactCacheImpl;
import org.hudsonci.maven.model.MavenCoordinatesDTO;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import java.util.Collection;
/**
* Provides caching of project produced and consumed artifacts.
*
* @author Jason Dillon
* @since 2.1.0
*/
@ImplementedBy(ProjectArtifactCacheImpl.class)
public interface ProjectArtifactCache
{
/**
* Clear the cache.
*/
void clear();
/**
* Rebuild the cache.
*/
void rebuild();
/**
* Update the cache for artifacts in the given build.
*/
boolean updateArtifacts(AbstractBuild build);
/**
* Update the cache for a projects artifacts.
*/
boolean updateArtifacts(AbstractProject project, ArtifactsPair artifacts);
/**
* Get the artifacts pair for a given project.
*/
ArtifactsPair getArtifacts(AbstractProject project);
/**
* Purge all artifacts for the given project.
*/
void purgeArtifacts(AbstractProject project);
/**
* Get artifacts produced by the given project.
*/
Collection getProducedArtifacts(AbstractProject project);
/**
* Get artifacts consumed by the given project.
*/
Collection getConsumedArtifacts(AbstractProject project);
/**
* Get all artifact producing projects.
*/
Collection getArtifactProducers();
/**
* Get all artifact consuming projects.
*/
Collection getArtifactConsumers();
/**
* Get the projects which produce the given artifact.
*/
Collection getProducersOf(MavenCoordinatesDTO artifact);
/**
* Get the projects which consume the given artifact.
*/
Collection getConsumersOf(MavenCoordinatesDTO artifact);
/**
* Check if the given artifact is produced by any projects.
*/
boolean isProduced(MavenCoordinatesDTO artifact);
/**
* Check if the given artifact is consumed by any projects.
*/
boolean isConsumed(MavenCoordinatesDTO artifact);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy