Package com.ibm.dbb.metadata
Interface Attachment
-
public interface AttachmentThe attachment to attach to the build result
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetChecksum()Return the checksum of the attachmentjava.io.InputStreamgetContent()Returns an input stream of the datajava.lang.StringgetContentType()Return the content type of the attachmentjava.lang.StringgetName()Return the name of the attachmentlonggetSize()Return the size of the attachment in bytesvoidsetChecksum(long checksum)Sets the checksum of the attachment.voidsetContent(java.io.InputStream content)Sets the contents of the attachment as an input streamvoidsetContentType(java.lang.String type)Set the content type of the attachmentvoidsetName(java.lang.String name)Set the name of the attachmentvoidsetSize(long size)Sets the size of the attachment in bytes.com.google.gson.JsonObjecttoJSON()Output the attributes of the repository object in JSON formatjava.lang.StringtoString()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 BuildExceptionReturns 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 BuildExceptionSets 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:
toStringin classjava.lang.Object- Returns:
- the string representation of the repository object
-
-