Package org.sonar.updatecenter.common
Class Artifact
- java.lang.Object
-
- org.sonar.updatecenter.common.Artifact
-
- All Implemented Interfaces:
Comparable<Artifact>
public abstract class Artifact extends Object implements Comparable<Artifact>
-
-
Method Summary
-
-
-
Constructor Detail
-
Artifact
protected Artifact(String key)
-
-
Method Detail
-
getKey
public final String getKey()
-
getDevRelease
public Release getDevRelease()
-
getRelease
public final Release getRelease(Version version)
- Throws:
NoSuchElementException- if release could not be found
-
doesContainVersion
public boolean doesContainVersion(Version version)
-
getRelease
public Release getRelease(String versionOrAliases)
- Parameters:
versionOrAliases- Any version or keywords "DEV" or "LATEST_RELEASE"- Throws:
NoSuchElementException- if release could not be found
-
getReleasesGreaterThan
public final SortedSet<Release> getReleasesGreaterThan(String version)
Shortcut for Ruby code
-
getVersions
public final SortedSet<Version> getVersions()
- Returns:
- both public and private versions but not archived versions
-
getLastRelease
@CheckForNull public final Release getLastRelease()
-
getLastCompatibleRelease
@CheckForNull public final Release getLastCompatibleRelease(Version sqVersion)
- Returns:
- Greatest plugin release version that is compatible with provided SQ version
-
getLastCompatible
@CheckForNull public final Release getLastCompatible(Version sonarVersion)
Same asgetLastCompatibleRelease(Version)but includedevReleaseif available
-
getFirstCompatible
@CheckForNull public final Release getFirstCompatible(Version sonarVersion)
Lowest plugin version (including dev) that is compatible with provided SQ version
-
getMinimalRelease
@CheckForNull public final Release getMinimalRelease(Version minimalVersion)
-
getLastCompatibleReleaseIfUpgrade
@CheckForNull public final Release getLastCompatibleReleaseIfUpgrade(Version sonarVersion)
-
getAllReleases
public SortedSet<Release> getAllReleases()
Return the concatenation of releases and dev release
-
getMajorReleases
public SortedSet<Release> getMajorReleases()
Keep only latest patch version. For example for 3.7, 3.7.1, 3.7.2 we keep only 3.7.2
-
compareTo
public final int compareTo(Artifact other)
- Specified by:
compareToin interfaceComparable<Artifact>
-
-