org.apache.maven.shared.dependency.tree
Class ArtifactMetadataSourceStub

java.lang.Object
  extended by org.apache.maven.shared.dependency.tree.ArtifactMetadataSourceStub
All Implemented Interfaces:
ArtifactMetadataSource

public class ArtifactMetadataSourceStub
extends Object
implements ArtifactMetadataSource

Provides a stub to simulate an artifact metadata source.

Version:
$Id: ArtifactMetadataSourceStub.java 1100703 2011-05-08 08:27:33Z hboutemy $
Author:
Mark Hobson

Field Summary
 
Fields inherited from interface org.apache.maven.artifact.metadata.ArtifactMetadataSource
ROLE
 
Constructor Summary
ArtifactMetadataSourceStub()
          Creates a new artifact metadata source stub.
 
Method Summary
 void addArtifactMetadata(Artifact artifact, Set<Artifact> dependencyArtifacts)
          Adds the specified dependency artifacts for the specified artifact to this artifact metadata source stub.
 void addAvailableVersions(Artifact artifact, List<org.apache.maven.artifact.versioning.ArtifactVersion> versions)
          Adds versions for the specified artifact to this artifact metadata source stub.
 ResolutionGroup retrieve(Artifact artifact, ArtifactRepository localRepository, List remoteRepositories)
          
 List retrieveAvailableVersions(Artifact artifact, ArtifactRepository localRepository, List remoteRepositories)
          
 Artifact retrieveRelocatedArtifact(Artifact artifact, ArtifactRepository localRepository, List remoteRepositories)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactMetadataSourceStub

public ArtifactMetadataSourceStub()
Creates a new artifact metadata source stub.

Method Detail

retrieve

public ResolutionGroup retrieve(Artifact artifact,
                                ArtifactRepository localRepository,
                                List remoteRepositories)
                         throws ArtifactMetadataRetrievalException

Specified by:
retrieve in interface ArtifactMetadataSource
Throws:
ArtifactMetadataRetrievalException

retrieveAvailableVersions

public List retrieveAvailableVersions(Artifact artifact,
                                      ArtifactRepository localRepository,
                                      List remoteRepositories)
                               throws ArtifactMetadataRetrievalException

Specified by:
retrieveAvailableVersions in interface ArtifactMetadataSource
Throws:
ArtifactMetadataRetrievalException

addArtifactMetadata

public void addArtifactMetadata(Artifact artifact,
                                Set<Artifact> dependencyArtifacts)
Adds the specified dependency artifacts for the specified artifact to this artifact metadata source stub.

Parameters:
artifact - the artifact to add metadata to
dependencyArtifacts - the set of artifacts to register as dependencies of the specified artifact

addAvailableVersions

public void addAvailableVersions(Artifact artifact,
                                 List<org.apache.maven.artifact.versioning.ArtifactVersion> versions)
Adds versions for the specified artifact to this artifact metadata source stub.

Parameters:
artifact - the artifact to add metadata to
versions - the list of versions to register as available for the specified artifact

retrieveRelocatedArtifact

public Artifact retrieveRelocatedArtifact(Artifact artifact,
                                          ArtifactRepository localRepository,
                                          List remoteRepositories)
                                   throws ArtifactMetadataRetrievalException
Specified by:
retrieveRelocatedArtifact in interface ArtifactMetadataSource
Throws:
ArtifactMetadataRetrievalException


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