Class ArtifactAndData
- java.lang.Object
-
- com.xebialabs.deployit.engine.api.dto.AbstractDto
-
- com.xebialabs.deployit.engine.api.dto.ArtifactAndData
-
public class ArtifactAndData extends AbstractDto
The parameter object for certain REST API and it represents both the artifact CI and its data. Artifacts are uploaded to the XL Deploy Server as a multipart HTTP request. It consists of the following parts:- configurationItem
- The property data of the artifact in XML. See
Artifact
for details. - Content-type: application/xml
- filename
- The file name of the uploaded artifact.
- Content-type: application/xml
- fileData
- The artifact data.
- Content-type: application/octet-stream
-
-
Constructor Summary
Constructors Constructor Description ArtifactAndData()
ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, byte[] data)
ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, java.io.File file)
ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, java.io.InputStream data)
ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, java.lang.String filename, byte[] data)
ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, java.lang.String filename, java.io.InputStream data)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.xebialabs.deployit.plugin.api.udm.artifact.Artifact
getArtifact()
byte[]
getData()
Deprecated.Use com.xebialabs.deployit.engine.api.dto.ArtifactAndData#getDataInputStream()java.io.InputStream
getDataInputStream()
java.lang.String
getFilename()
void
setArtifact(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact)
void
setData(byte[] data)
Deprecated.Use com.xebialabs.deployit.engine.api.dto.ArtifactAndData#setDataInputStream(java.io.InputStream)void
setDataInputStream(java.io.InputStream data)
void
setFilename(java.lang.String filename)
-
Methods inherited from class com.xebialabs.deployit.engine.api.dto.AbstractDto
toString
-
-
-
-
Constructor Detail
-
ArtifactAndData
public ArtifactAndData()
-
ArtifactAndData
public ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, java.io.File file)
- Parameters:
artifact
- The CI representing the artifact.file
- The artifact itself as an file.
-
ArtifactAndData
@Deprecated public ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, java.lang.String filename, java.io.InputStream data)
Deprecated.- Parameters:
artifact
- The CI representing the artifact.filename
- The file name of the uploaded artifact.data
- The artifact itself as an input stream.
-
ArtifactAndData
@Deprecated public ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, java.lang.String filename, byte[] data)
Deprecated.- Parameters:
artifact
- The CI representing the artifact.filename
- The file name of the uploaded artifact.data
- The artifact itself as an array of bytes.
-
ArtifactAndData
@Deprecated public ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, java.io.InputStream data)
Deprecated.- Parameters:
artifact
- The CI representing the artifact.data
- The artifact itself as an input stream.
-
ArtifactAndData
@Deprecated public ArtifactAndData(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact, byte[] data)
Deprecated.- Parameters:
artifact
- The CI representing the artifact.data
- The artifact itself as an array of bytes.
-
-
Method Detail
-
getArtifact
public com.xebialabs.deployit.plugin.api.udm.artifact.Artifact getArtifact()
- Returns:
- The CI representing the artifact.
-
setArtifact
public void setArtifact(com.xebialabs.deployit.plugin.api.udm.artifact.Artifact artifact)
- Parameters:
artifact
- The CI representing the artifact.
-
getDataInputStream
public java.io.InputStream getDataInputStream()
- Returns:
- The artifact data as an input stream.
-
setDataInputStream
public void setDataInputStream(java.io.InputStream data)
- Parameters:
data
- The artifact data as an input stream.
-
getData
@Deprecated public byte[] getData()
Deprecated.Use com.xebialabs.deployit.engine.api.dto.ArtifactAndData#getDataInputStream()- Returns:
- The artifact data as an array of bytes.
-
setData
@Deprecated public void setData(byte[] data)
Deprecated.Use com.xebialabs.deployit.engine.api.dto.ArtifactAndData#setDataInputStream(java.io.InputStream)- Parameters:
data
- The artifact data as an array of bytes.
-
getFilename
public java.lang.String getFilename()
- Returns:
- The file name of the uploaded artifact.
-
setFilename
public void setFilename(java.lang.String filename)
- Parameters:
filename
- The file name of the uploaded artifact.
-
-