org.codehaus.mojo.versions.api
Class ArtifactVersions

java.lang.Object
  extended by org.codehaus.mojo.versions.api.AbstractVersionDetails
      extended by org.codehaus.mojo.versions.api.ArtifactVersions
All Implemented Interfaces:
VersionDetails

public class ArtifactVersions
extends AbstractVersionDetails

Holds the results of a search for versions of an artifact.

Since:
1.0-alpha-3
Author:
Stephen Connolly

Constructor Summary
ArtifactVersions(org.apache.maven.artifact.Artifact artifact, List versions, VersionComparator versionComparator)
          Creates a new ArtifactVersions instance.
 
Method Summary
 org.apache.maven.artifact.Artifact getArtifact()
          Returns the artifact who's version information we are holding.
 String getArtifactId()
          Returns the artifactId of the artifact who's versions we are holding.
 String getGroupId()
          Returns the groupId of the artifact who's versions we are holding.
 VersionComparator getVersionComparator()
          Gets the rule for version comparison of this artifact.
 org.apache.maven.artifact.versioning.ArtifactVersion[] getVersions(boolean includeSnapshots)
          Returns all available versions in increasing order.
 
Methods inherited from class org.codehaus.mojo.versions.api.AbstractVersionDetails
containsVersion, getAllUpdates, getAllUpdates, getAllUpdates, getAllUpdates, getAllUpdates, getAllUpdates, getAllUpdates, getAllUpdates, getCurrentVersion, getNewerVersions, getNewestUpdate, getNewestUpdate, getNewestUpdate, getNewestUpdate, getNewestUpdate, getNewestUpdate, getNewestUpdate, getNewestUpdate, getNewestVersion, getNewestVersion, getNewestVersion, getNewestVersion, getNewestVersion, getOldestUpdate, getOldestUpdate, getOldestUpdate, getOldestUpdate, getOldestUpdate, getOldestUpdate, getOldestUpdate, getOldestUpdate, getOldestVersion, getOldestVersion, getOldestVersion, getOldestVersion, getOldestVersion, getVersions, getVersions, getVersions, getVersions, getVersions, getVersions, isCurrentVersionDefined, isIncludeSnapshots, setCurrentVersion, setCurrentVersion, setIncludeSnapshots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactVersions

public ArtifactVersions(org.apache.maven.artifact.Artifact artifact,
                        List versions,
                        VersionComparator versionComparator)
Creates a new ArtifactVersions instance.

Parameters:
artifact - The artifact.
versions - The versions.
versionComparator - The version comparison rule.
Since:
1.0-alpha-3
Method Detail

getArtifact

public org.apache.maven.artifact.Artifact getArtifact()
Returns the artifact who's version information we are holding.

Returns:
the artifact who's version information we are holding.
Since:
1.0-alpha-3

getGroupId

public String getGroupId()
Returns the groupId of the artifact who's versions we are holding.

Returns:
the groupId.
Since:
1.0-alpha-3

getArtifactId

public String getArtifactId()
Returns the artifactId of the artifact who's versions we are holding.

Returns:
the artifactId.
Since:
1.0-alpha-3

getVersions

public org.apache.maven.artifact.versioning.ArtifactVersion[] getVersions(boolean includeSnapshots)
Description copied from interface: VersionDetails
Returns all available versions in increasing order.

Specified by:
getVersions in interface VersionDetails
Specified by:
getVersions in class AbstractVersionDetails
Parameters:
includeSnapshots - true if snapshots are to be included.
Returns:
all available versions in increasing order.

getVersionComparator

public VersionComparator getVersionComparator()
Description copied from interface: VersionDetails
Gets the rule for version comparison of this artifact.

Returns:
the rule for version comparison of this artifact.


Copyright © 2008-2011 Codehaus. All Rights Reserved.