Class Versioning
- java.lang.Object
-
- org.apache.maven.artifact.repository.metadata.Versioning
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class Versioning extends java.lang.Object implements java.io.Serializable, java.lang.CloneableVersioning information for an artifact (un-versioned or snapshot).- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringlastUpdatedWhen the metadata was last updated.private java.lang.StringlatestWhat the latest version in the directory is, including snapshots.private java.lang.StringreleaseWhat the latest version in the directory is, of the releases only.private SnapshotsnapshotThe current snapshot data in use for this version (artifact snapshots only).private java.util.List<SnapshotVersion>snapshotVersionsField snapshotVersions.private java.util.List<java.lang.String>versionsField versions.
-
Constructor Summary
Constructors Constructor Description Versioning()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSnapshotVersion(SnapshotVersion snapshotVersion)Method addSnapshotVersion.voidaddVersion(java.lang.String string)Method addVersion.Versioningclone()Method clone.java.lang.StringgetLastUpdated()Get when the metadata was last updated.java.lang.StringgetLatest()Get what the latest version in the directory is, including snapshots.java.lang.StringgetRelease()Get what the latest version in the directory is, of the releases only.SnapshotgetSnapshot()Get the current snapshot data in use for this version (artifact snapshots only).java.util.List<SnapshotVersion>getSnapshotVersions()Method getSnapshotVersions.java.util.List<java.lang.String>getVersions()Method getVersions.voidremoveSnapshotVersion(SnapshotVersion snapshotVersion)Method removeSnapshotVersion.voidremoveVersion(java.lang.String string)Method removeVersion.voidsetLastUpdated(java.lang.String lastUpdated)Set when the metadata was last updated.voidsetLastUpdatedTimestamp(java.util.Date date)voidsetLatest(java.lang.String latest)Set what the latest version in the directory is, including snapshots.voidsetRelease(java.lang.String release)Set what the latest version in the directory is, of the releases only.voidsetSnapshot(Snapshot snapshot)Set the current snapshot data in use for this version (artifact snapshots only).voidsetSnapshotVersions(java.util.List<SnapshotVersion> snapshotVersions)Set information for each sub-artifact available in this artifact snapshot.voidsetVersions(java.util.List<java.lang.String> versions)Set versions available of the artifact (both releases and snapshots).voidupdateTimestamp()
-
-
-
Field Detail
-
latest
private java.lang.String latest
What the latest version in the directory is, including snapshots.
-
release
private java.lang.String release
What the latest version in the directory is, of the releases only.
-
snapshot
private Snapshot snapshot
The current snapshot data in use for this version (artifact snapshots only).
-
versions
private java.util.List<java.lang.String> versions
Field versions.
-
lastUpdated
private java.lang.String lastUpdated
When the metadata was last updated.
-
snapshotVersions
private java.util.List<SnapshotVersion> snapshotVersions
Field snapshotVersions.
-
-
Method Detail
-
addSnapshotVersion
public void addSnapshotVersion(SnapshotVersion snapshotVersion)
Method addSnapshotVersion.- Parameters:
snapshotVersion-
-
addVersion
public void addVersion(java.lang.String string)
Method addVersion.- Parameters:
string-
-
clone
public Versioning clone()
Method clone.- Overrides:
clonein classjava.lang.Object- Returns:
- Versioning
-
getLastUpdated
public java.lang.String getLastUpdated()
Get when the metadata was last updated.- Returns:
- String
-
getLatest
public java.lang.String getLatest()
Get what the latest version in the directory is, including snapshots.- Returns:
- String
-
getRelease
public java.lang.String getRelease()
Get what the latest version in the directory is, of the releases only.- Returns:
- String
-
getSnapshot
public Snapshot getSnapshot()
Get the current snapshot data in use for this version (artifact snapshots only).- Returns:
- Snapshot
-
getSnapshotVersions
public java.util.List<SnapshotVersion> getSnapshotVersions()
Method getSnapshotVersions.- Returns:
- List
-
getVersions
public java.util.List<java.lang.String> getVersions()
Method getVersions.- Returns:
- List
-
removeSnapshotVersion
public void removeSnapshotVersion(SnapshotVersion snapshotVersion)
Method removeSnapshotVersion.- Parameters:
snapshotVersion-
-
removeVersion
public void removeVersion(java.lang.String string)
Method removeVersion.- Parameters:
string-
-
setLastUpdated
public void setLastUpdated(java.lang.String lastUpdated)
Set when the metadata was last updated.- Parameters:
lastUpdated-
-
setLatest
public void setLatest(java.lang.String latest)
Set what the latest version in the directory is, including snapshots.- Parameters:
latest-
-
setRelease
public void setRelease(java.lang.String release)
Set what the latest version in the directory is, of the releases only.- Parameters:
release-
-
setSnapshot
public void setSnapshot(Snapshot snapshot)
Set the current snapshot data in use for this version (artifact snapshots only).- Parameters:
snapshot-
-
setSnapshotVersions
public void setSnapshotVersions(java.util.List<SnapshotVersion> snapshotVersions)
Set information for each sub-artifact available in this artifact snapshot.- Parameters:
snapshotVersions-
-
setVersions
public void setVersions(java.util.List<java.lang.String> versions)
Set versions available of the artifact (both releases and snapshots).- Parameters:
versions-
-
updateTimestamp
public void updateTimestamp()
-
setLastUpdatedTimestamp
public void setLastUpdatedTimestamp(java.util.Date date)
-
-