public final class DownloadedArtifactImpl extends ArtifactImpl implements DownloadedArtifact
Artifact to represent artifact downloaded from the
Comet by LoggedArtifact.download(Path, AssetOverwriteStrategy) method.| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getAliases() |
String |
getArtifactId()
Returns unique identifier of the artifact.
|
String |
getArtifactType()
Returns type of the artifact.
|
String |
getFullName()
Returns the fully qualified name of the artifact in form 'workspace/name:version'.
|
Map<String,Object> |
getMetadata() |
String |
getName()
Returns name of the artifact.
|
String |
getVersion()
Returns the version of this artifact represented in semantic version format.
|
Set<String> |
getVersionTags() |
String |
getWorkspace()
Returns workspace name where artifact was logged.
|
String |
incrementMajorVersion()
Allows bumping artifact version to the next major version.
|
String |
incrementMinorVersion()
Allows bumping artifact version to the next minor version.
|
String |
incrementPatchVersion()
Allows bumping artifact version to the next patch version.
|
boolean |
setVersion(String version)
Sets new version for this artifact.
|
addAsset, addAsset, addAsset, addAsset, addAsset, addAsset, addAsset, addAssetFolder, addAssetFolder, addAssetFolder, addAssetFolder, addRemoteAsset, addRemoteAsset, addRemoteAsset, builder, getAssetsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAliases, getMetadata, getVersionTags, setAliases, setVersionTagsaddAsset, addAsset, addAsset, addAsset, addAsset, addAsset, addAsset, addAssetFolder, addAssetFolder, addAssetFolder, addAssetFolder, addRemoteAsset, addRemoteAsset, addRemoteAsset, getAssets, newArtifactpublic String getArtifactId()
DownloadedArtifactgetArtifactId in interface DownloadedArtifactpublic String getName()
DownloadedArtifactgetName in interface DownloadedArtifactpublic String getFullName()
DownloadedArtifactgetFullName in interface DownloadedArtifactpublic String getArtifactType()
DownloadedArtifactgetArtifactType in interface DownloadedArtifactpublic String getWorkspace()
DownloadedArtifactgetWorkspace in interface DownloadedArtifactpublic String getVersion()
DownloadedArtifactgetVersion in interface DownloadedArtifactpublic boolean setVersion(String version)
DownloadedArtifactfalse will be returned. The Comet may accept version lower than current if it
was not logged before. Thus, in general, it is safer to always log the greater version or check value returned
but this method.
The version string should follow the semantic versioning rules and be in the form:
1.2.3-beta.4+sha899d8g79f87.
See ArtifactBuilder.withVersion(String) for details about version format.
setVersion in interface DownloadedArtifactversion - the new version of the artifact.true if new version is valid, i.e., greater than current. The returned value can be used for
quick check of the new version. If true returned then new version will be accepted by Comet backend.
Otherwise, it may depend on backend already having provided artifact version logged.public String incrementMinorVersion()
DownloadedArtifactSee ArtifactBuilder.withVersion(String) for details about version format.
incrementMinorVersion in interface DownloadedArtifactpublic String incrementMajorVersion()
DownloadedArtifactSee ArtifactBuilder.withVersion(String) for details about version format.
incrementMajorVersion in interface DownloadedArtifactpublic String incrementPatchVersion()
DownloadedArtifactSee ArtifactBuilder.withVersion(String) for details about version format.
incrementPatchVersion in interface DownloadedArtifactCopyright © 2022. All rights reserved.