Class 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 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)
        Parameters:
        artifact - The CI representing the artifact.
        filename - The file name of the uploaded artifact.
        data - The artifact itself as an input stream.
    • 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.