Package 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 Description long
getChecksum()
Return the checksum of the attachmentjava.io.InputStream
getContent()
Returns an input stream of the datajava.lang.String
getContentType()
Return the content type of the attachmentjava.lang.String
getName()
Return the name of the attachmentlong
getSize()
Return the size of the attachment in bytesvoid
setChecksum(long checksum)
Sets the checksum of the attachment.void
setContent(java.io.InputStream content)
Sets the contents of the attachment as an input streamvoid
setContentType(java.lang.String type)
Set the content type of the attachmentvoid
setName(java.lang.String name)
Set the name of the attachmentvoid
setSize(long size)
Sets the size of the attachment in bytes.com.google.gson.JsonObject
toJSON()
Output the attributes of the repository object in JSON formatjava.lang.String
toString()
Output the attributes of the repository object injava.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.google.gson.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 injava.lang.String
- Overrides:
toString
in classjava.lang.Object
- Returns:
- the string representation of the repository object
-
-