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.Cloneable
Versioning information for "groupId/artifactId" or "groupId/artifactId/version" SNAPSHOT.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
lastUpdated
When the metadata was last updated (both "groupId/artifactId" and "groupId/artifactId/version" directories).private java.lang.String
latest
What the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only).private java.lang.String
release
What the last version added to the directory is, for the releases only ("groupId/artifactId" directory only).private Snapshot
snapshot
The current snapshot data in use for this version ("groupId/artifactId/version" only).private java.util.List<SnapshotVersion>
snapshotVersions
Field snapshotVersions.private java.util.List<java.lang.String>
versions
Field versions.
-
Constructor Summary
Constructors Constructor Description Versioning()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSnapshotVersion(SnapshotVersion snapshotVersion)
Method addSnapshotVersion.void
addVersion(java.lang.String string)
Method addVersion.Versioning
clone()
Method clone.java.lang.String
getLastUpdated()
Get when the metadata was last updated (both "groupId/artifactId" and "groupId/artifactId/version" directories).java.lang.String
getLatest()
Get what the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only).java.lang.String
getRelease()
Get what the last version added to the directory is, for the releases only ("groupId/artifactId" directory only).Snapshot
getSnapshot()
Get the current snapshot data in use for this version ("groupId/artifactId/version" only).java.util.List<SnapshotVersion>
getSnapshotVersions()
Method getSnapshotVersions.java.util.List<java.lang.String>
getVersions()
Method getVersions.void
removeSnapshotVersion(SnapshotVersion snapshotVersion)
Method removeSnapshotVersion.void
removeVersion(java.lang.String string)
Method removeVersion.void
setLastUpdated(java.lang.String lastUpdated)
Set when the metadata was last updated (both "groupId/artifactId" and "groupId/artifactId/version" directories).void
setLastUpdatedTimestamp(java.util.Date date)
void
setLatest(java.lang.String latest)
Set what the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only).void
setRelease(java.lang.String release)
Set what the last version added to the directory is, for the releases only ("groupId/artifactId" directory only).void
setSnapshot(Snapshot snapshot)
Set the current snapshot data in use for this version ("groupId/artifactId/version" only).void
setSnapshotVersions(java.util.List<SnapshotVersion> snapshotVersions)
Set information for each sub-artifact available in this artifact snapshot.void
setVersions(java.util.List<java.lang.String> versions)
Set versions available of the artifact (both releases and snapshots) ("groupId/artifactId" directory only).void
updateTimestamp()
-
-
-
Field Detail
-
latest
private java.lang.String latest
What the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only).
-
release
private java.lang.String release
What the last version added to the directory is, for the releases only ("groupId/artifactId" directory only).
-
versions
private java.util.List<java.lang.String> versions
Field versions.
-
lastUpdated
private java.lang.String lastUpdated
When the metadata was last updated (both "groupId/artifactId" and "groupId/artifactId/version" directories). The timestamp is expressed using UTC in the format yyyyMMddHHmmss.
-
snapshot
private Snapshot snapshot
The current snapshot data in use for this version ("groupId/artifactId/version" only).
-
snapshotVersions
private java.util.List<SnapshotVersion> snapshotVersions
Field snapshotVersions.
-
-
Method Detail
-
addSnapshotVersion
public void addSnapshotVersion(SnapshotVersion snapshotVersion)
Method addSnapshotVersion.- Parameters:
snapshotVersion
- a snapshotVersion object.
-
addVersion
public void addVersion(java.lang.String string)
Method addVersion.- Parameters:
string
- a string object.
-
clone
public Versioning clone()
Method clone.- Overrides:
clone
in classjava.lang.Object
- Returns:
- Versioning
-
getLastUpdated
public java.lang.String getLastUpdated()
Get when the metadata was last updated (both "groupId/artifactId" and "groupId/artifactId/version" directories). The timestamp is expressed using UTC in the format yyyyMMddHHmmss.- Returns:
- String
-
getLatest
public java.lang.String getLatest()
Get what the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only).- Returns:
- String
-
getRelease
public java.lang.String getRelease()
Get what the last version added to the directory is, for the releases only ("groupId/artifactId" directory only).- Returns:
- String
-
getSnapshot
public Snapshot getSnapshot()
Get the current snapshot data in use for this version ("groupId/artifactId/version" 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
- a snapshotVersion object.
-
removeVersion
public void removeVersion(java.lang.String string)
Method removeVersion.- Parameters:
string
- a string object.
-
setLastUpdated
public void setLastUpdated(java.lang.String lastUpdated)
Set when the metadata was last updated (both "groupId/artifactId" and "groupId/artifactId/version" directories). The timestamp is expressed using UTC in the format yyyyMMddHHmmss.- Parameters:
lastUpdated
- a lastUpdated object.
-
setLatest
public void setLatest(java.lang.String latest)
Set what the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only).- Parameters:
latest
- a latest object.
-
setRelease
public void setRelease(java.lang.String release)
Set what the last version added to the directory is, for the releases only ("groupId/artifactId" directory only).- Parameters:
release
- a release object.
-
setSnapshot
public void setSnapshot(Snapshot snapshot)
Set the current snapshot data in use for this version ("groupId/artifactId/version" only).- Parameters:
snapshot
- a snapshot object.
-
setSnapshotVersions
public void setSnapshotVersions(java.util.List<SnapshotVersion> snapshotVersions)
Set information for each sub-artifact available in this artifact snapshot. This is only the most recent SNAPSHOT for each unique extension/classifier combination.- Parameters:
snapshotVersions
- a snapshotVersions object.
-
setVersions
public void setVersions(java.util.List<java.lang.String> versions)
Set versions available of the artifact (both releases and snapshots) ("groupId/artifactId" directory only).- Parameters:
versions
- a versions object.
-
updateTimestamp
public void updateTimestamp()
-
setLastUpdatedTimestamp
public void setLastUpdatedTimestamp(java.util.Date date)
-
-