public class Artifact extends Object
This class provide an abstraction level for the concept "artifact" in carbon.
An artifact can be considered as a thing to deploy in carbon. Eg: webapp, service, jaggery-app, proxy-service, sequence, spi, endpoint
Each artifact is associated with a deployer, which can process and deploy it to the relevant runtime configuration.
An artifact will have a unique identifier (key), which can be used for artifact identification within a runtime.
An artifact can have custom properties that are needed for relevant runtime environment.| Constructor and Description |
|---|
Artifact(File file)
Default constructor which takes the associated file with this artifact instance.
|
| Modifier and Type | Method and Description |
|---|---|
File |
getFile()
The file associated with the artifact.
|
Object |
getKey()
A key is used to uniquely identify an Artifact within a runtime.
|
long |
getLastModifiedTime()
This will return the last modified time of this artifact.
|
String |
getName()
Returns a meaningful name for this artifact.
|
String |
getPath()
Path of the file associated with this artifact.
|
Map<String,Object> |
getProperties()
This will return the Map of custom properties for this artifact.
|
ArtifactType |
getType()
ArtifactType of the artifact.
|
String |
getVersion()
Version of the artifact.
|
void |
setKey(Object key)
Sets a given key to this artifact instance.
|
void |
setLastModifiedTime(long lastModifiedTime)
Sets the last modified time of this artifact.
|
void |
setProperties(Map<String,Object> properties)
This method allows to set custom properties which are needed for this Artifact.
|
void |
setType(ArtifactType type)
Sets the given directory for this artifact instance.
|
void |
setVersion(String version)
Sets a given version to this artifact instance.
|
public Artifact(File file)
file - the associated filepublic String getName()
public Object getKey()
public void setKey(Object key)
key - keypublic String getPath()
public File getFile()
public String getVersion()
public void setVersion(String version)
version - version to be setpublic ArtifactType getType()
public void setType(ArtifactType type)
type - directory of the artifact to be setpublic long getLastModifiedTime()
public void setLastModifiedTime(long lastModifiedTime)
lastModifiedTime - lastModifiedTimepublic Map<String,Object> getProperties()
Copyright © 2019 WSO2. All rights reserved.