public class ArtifactImpl extends Object implements Artifact
Artifact.| Modifier and Type | Method and Description |
|---|---|
void |
addAsset(byte[] data,
String logicalPath) |
void |
addAsset(byte[] data,
String logicalPath,
boolean overwrite) |
void |
addAsset(byte[] data,
String logicalPath,
boolean overwrite,
@NonNull Map<String,Object> metadata)
Adds a local asset data to the current pending artifact object.
|
void |
addAsset(@NonNull File file,
boolean overwrite) |
void |
addAsset(@NonNull File file,
boolean overwrite,
@NonNull Map<String,Object> metadata) |
void |
addAsset(File file,
String logicalPath,
boolean overwrite) |
void |
addAsset(@NonNull File file,
@NonNull String logicalPath,
boolean overwrite,
Map<String,Object> metadata)
Adds a local asset file to the current pending artifact object.
|
void |
addAssetFolder(@NonNull File folder) |
void |
addAssetFolder(@NonNull File folder,
boolean logFilePath) |
void |
addAssetFolder(@NonNull File folder,
boolean logFilePath,
boolean recursive) |
void |
addAssetFolder(@NonNull File folder,
boolean logFilePath,
boolean recursive,
@NonNull Map<String,Object> metadata)
Adds all asset files located in the given folder to this artifact.
|
void |
addRemoteAsset(@NonNull URI uri,
@NonNull String logicalPath) |
void |
addRemoteAsset(@NonNull URI uri,
@NonNull String logicalPath,
boolean overwrite) |
void |
addRemoteAsset(@NonNull URI uri,
@NonNull String logicalPath,
boolean overwrite,
@NonNull Map<String,Object> metadata)
Adds remote asses to the current pending artifact object.
|
static ArtifactBuilder |
builder(@NonNull String name,
@NonNull String type)
Returns
ArtifactBuilder instance which can be used to create Artifact instances. |
Set<String> |
getAliases() |
Collection<ArtifactAsset> |
getAssets()
Returns assets associated with this artifact.
|
Map<String,Object> |
getMetadata() |
Set<String> |
getVersionTags() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewArtifactpublic Collection<ArtifactAsset> getAssets()
Artifactpublic void addAsset(@NonNull
@NonNull File file,
@NonNull
@NonNull String logicalPath,
boolean overwrite,
Map<String,Object> metadata)
ArtifactaddAsset in interface Artifactfile - the path to the file asset.logicalPath - the custom asset's file name to be displayed. If not
provided the filename from the file argument will be used.overwrite - if true will overwrite all existing assets with the same name.metadata - Some additional data to attach to the asset. Must be a map with JSON-encodable values.public void addAsset(@NonNull
@NonNull File file,
boolean overwrite,
@NonNull
@NonNull Map<String,Object> metadata)
public void addAsset(File file, String logicalPath, boolean overwrite) throws ConflictingArtifactAssetNameException
addAsset in interface ArtifactConflictingArtifactAssetNameExceptionpublic void addAsset(@NonNull
@NonNull File file,
boolean overwrite)
public void addAsset(byte[] data,
String logicalPath,
boolean overwrite,
@NonNull
@NonNull Map<String,Object> metadata)
ArtifactaddAsset in interface Artifactdata - the data of the asset.logicalPath - the custom asset's file name to be displayed.overwrite - if true will overwrite all existing assets with the same name.metadata - some additional data to attach to the asset. Must be a map with JSON-encodable values.public void addAsset(byte[] data,
String logicalPath,
boolean overwrite)
public void addAsset(byte[] data,
String logicalPath)
throws ConflictingArtifactAssetNameException
addAsset in interface ArtifactConflictingArtifactAssetNameExceptionpublic void addRemoteAsset(@NonNull
@NonNull URI uri,
@NonNull
@NonNull String logicalPath,
boolean overwrite,
@NonNull
@NonNull Map<String,Object> metadata)
ArtifactaddRemoteAsset in interface Artifacturi - the URI pointing to the location of the remote asset.logicalPath - the "name" of the remote asset, could be a dataset name, a model file name.overwrite - if true will overwrite all existing assets with the same name.metadata - some additional data to attach to the asset. Must be a map with JSON-encodable values.public void addRemoteAsset(@NonNull
@NonNull URI uri,
@NonNull
@NonNull String logicalPath,
boolean overwrite)
addRemoteAsset in interface Artifactpublic void addRemoteAsset(@NonNull
@NonNull URI uri,
@NonNull
@NonNull String logicalPath)
addRemoteAsset in interface Artifactpublic void addAssetFolder(@NonNull
@NonNull File folder,
boolean logFilePath,
boolean recursive,
@NonNull
@NonNull Map<String,Object> metadata)
throws ConflictingArtifactAssetNameException,
IOException
ArtifactaddAssetFolder in interface Artifactfolder - the folder you want to log.logFilePath - if true, logs the relative file path of each file.recursive - if true, recurse the folder.metadata - some additional data to attach to the asset. Must be a map with JSON-encodable values.ConflictingArtifactAssetNameException - is name of some asset is not unique within this artifact.IOException - if an I/O exception occurred when walking through the folder.public void addAssetFolder(@NonNull
@NonNull File folder,
boolean logFilePath,
boolean recursive)
throws ConflictingArtifactAssetNameException,
IOException
addAssetFolder in interface ArtifactConflictingArtifactAssetNameExceptionIOExceptionpublic void addAssetFolder(@NonNull
@NonNull File folder,
boolean logFilePath)
throws ConflictingArtifactAssetNameException,
IOException
addAssetFolder in interface ArtifactConflictingArtifactAssetNameExceptionIOExceptionpublic void addAssetFolder(@NonNull
@NonNull File folder)
throws ConflictingArtifactAssetNameException,
IOException
addAssetFolder in interface ArtifactConflictingArtifactAssetNameExceptionIOExceptionpublic static ArtifactBuilder builder(@NonNull @NonNull String name, @NonNull @NonNull String type)
ArtifactBuilder instance which can be used to create Artifact instances.name - the name of the artifact.type - the type of the artifact.ArtifactBuilder instance to create properly initialized instances of the Artifact.Copyright © 2022. All rights reserved.