com.ibm.dbb.metadata

Interface Attachment



  • public interface Attachment
    The attachment to attach to the build result
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      long getChecksum()
      Return the checksum of the attachment
      java.io.InputStream getContent()
      Returns an input stream of the data
      java.lang.String getContentType()
      Return the content type of the attachment
      java.lang.String getName()
      Return the name of the attachment
      long getSize()
      Return the size of the attachment in bytes
      void setChecksum(long checksum)
      Sets the checksum of the attachment.
      void setContent(java.io.InputStream content)
      Sets the contents of the attachment as an input stream
      void setContentType(java.lang.String type)
      Set the content type of the attachment
      void setName(java.lang.String name)
      Set the name of the attachment
      void setSize(long size)
      Sets the size of the attachment in bytes.
      com.ibm.json.java.JSONObject toJSON()
      Output the attributes of the repository object in JSON format
      java.lang.String toString()
      Output the attributes of the repository object in java.lang.String
    • Method Detail

      • getName

        java.lang.String getName()
        Return the name of the attachment
        Returns:
        the name of the attachment
      • setName

        void setName(java.lang.String name)
        Set the name of the attachment
        Parameters:
        name -
      • getContentType

        java.lang.String getContentType()
        Return the content type of the attachment
        Returns:
        the content type
      • setContentType

        void setContentType(java.lang.String type)
        Set the content type of the attachment
        Parameters:
        type - the content type
      • getSize

        long getSize()
        Return the size of the attachment in bytes
        Returns:
        the size of the attachment
      • setSize

        void setSize(long size)
        Sets the size of the attachment in bytes. It is the responsibility of the caller to calculate and the size of the provided content.
        Parameters:
        the - size of the attachment
      • getChecksum

        long getChecksum()
        Return the checksum of the attachment
        Returns:
        the checksum of the attachment
      • setChecksum

        void setChecksum(long checksum)
        Sets the checksum of the attachment. It is the responsibility of the caller to calculate and the checksum of the provided content.
        Parameters:
        the - checksum of the attachment
      • getContent

        java.io.InputStream getContent()
                                throws BuildException
        Returns an input stream of the data
        Returns:
        the content of the attachment
        Throws:
        BuildException - an exception occurred
      • setContent

        void setContent(java.io.InputStream content)
                 throws BuildException
        Sets the contents of the attachment as an input stream
        Parameters:
        content - Input stream of the attachment data
        Throws:
        BuildException - an exception occurred
      • toJSON

        com.ibm.json.java.JSONObject toJSON()
        Output the attributes of the repository object in JSON format
        Returns:
        the JSON format
      • toString

        java.lang.String toString()
        Output the attributes of the repository object in java.lang.String
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string representation of the repository object

<IBM Copyright © 2018 IBM Corp. All Rights Reserved.