Package com.ibm.dbb.metadata
Interface BuildResult
-
- All Superinterfaces:
ManagedObject,MetadataObject,com.ibm.dbb.metadata.common.MetadataStoreConstants
public interface BuildResult extends ManagedObject
The build result is a metadata object which stores information about a DBB build. This metadata consists of the state, status, and other properties related to the build. The build result also contains any relevant attachments from the build, including the DBB build report in JSON and rendered HTML formats.Build results are contained within a
BuildGroup. To create and delete build results use theBuildGrouphelper methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBuildResult.QueryParmsQuery parameters are used to do a generic query for build results.
-
Field Summary
Fields Modifier and Type Field Description static intABANDONEDstatic intCLEANstatic intCOMPLETEstatic intERRORstatic intNEWstatic intPREVIEWstatic intPROCESSINGstatic intWARNING-
Fields inherited from interface com.ibm.dbb.metadata.common.MetadataStoreConstants
AMPERSAND, AND, APPLICATION_JSON, ARTIFACT, ASC, ATTACHMENT, ATTACHMENTS, BASIC_AUTHENTICATION, BRANCH, BUILD, BUILD_REPORT, BUILD_REPORT_DATA, BUILD_RESULT, CATEGORY, CICS, COLLECTION, COMMA, CONTENT, CONTENT_TYPE, CREATED, CREATED_BY, DATASET, DATE, DEFAULT_SSL_PROTOCOLS, DEPLOY_TYPE, DESC, DLI, EQUALS, FILE, FORM_AUTHENTICATION, GROUP, GROUPS, ID, IMPACT_FILES, LABEL, LABELS, LANGUAGE, LAST_UPDATED, LAST_UPDATED_BY, LD_PREFIX, LIBRARY, LNAME, LOG, LOGICAL_DEPENDENCIES, LOGICAL_FILE, MEMBER, MINIMAL, MQ, NAME, ORDER, ORDER_BY, OWNER, PATH, PERMISSION, PROPERTIES, PROPERTY, QUESTION_MARK, QUOTE, REST, SELF, SIZE, SLASH, SOURCE, SPACE, SQL, STATE, STATUS, TEAM, TEXT_HTML, TYPE, VALUE, VERSION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAttachment(java.lang.String name, java.io.InputStream contents)Add an attachment to the build resultvoidaddAttachment(java.lang.String name, java.lang.String contentType, java.io.InputStream contents)Add an attachment to the build resultvoidaddProperty(java.lang.String name, java.lang.String value)Add a property to the build resultvoidaddProperty(java.lang.String name, java.util.List<java.lang.String> values)Add a property to the build resultvoiddeleteAttachment(java.lang.String name)Delete an existing attachment(s) with the provided namevoiddeleteProperty(java.lang.String name)Delete a property on the build result.voiddeleteProperty(java.lang.String name, java.lang.String value)Delete a property/value pair on the build result.AttachmentgetAttachment(java.lang.String name)Retrieve an attachment from the build resultjava.util.List<Attachment>getAttachments()Get all attachments stored in this build resultAttachmentgetBuildReport()Return the build report HTML for display purposeAttachmentgetBuildReportData()Return the build report JSON datajava.lang.StringgetGroup()Return the group the build belongs tojava.lang.StringgetLabel()Returns the label of the build resultjava.util.List<java.lang.String>getProperties(java.lang.String name)returns all of the values of the named property in the build resultjava.lang.StringgetProperty(java.lang.String name)return the value of the property in the build result.java.util.List<java.lang.String>getPropertyNames()returns a list of property names in the build resultintgetState()Returns the current state of the build resultintgetStatus()Returns the current status of the build resultvoidsetBuildReport(java.io.InputStream contents)Set the content of the build report HTMLvoidsetBuildReportData(java.io.InputStream contents)Set the content of the build report JSON datavoidsetLabel(java.lang.String label)Sets the BuildResult labelvoidsetProperty(java.lang.String name, java.lang.String value)Replace a property in the build resultvoidsetProperty(java.lang.String name, java.util.List<java.lang.String> values)Replace a property in the build resultvoidsetState(int value)Update the current state of the build resultvoidsetStatus(int value)Update the current status of the build result-
Methods inherited from interface com.ibm.dbb.metadata.ManagedObject
getOwner, getPermission, getTeam, setOwner, setPermission, setTeam
-
Methods inherited from interface com.ibm.dbb.metadata.MetadataObject
getCreated, getCreatedBy, getLastUpdated, getLastUpdatedBy, toJSON, toString
-
-
-
-
Field Detail
-
NEW
static final int NEW
- See Also:
- Constant Field Values
-
PROCESSING
static final int PROCESSING
- See Also:
- Constant Field Values
-
COMPLETE
static final int COMPLETE
- See Also:
- Constant Field Values
-
ABANDONED
static final int ABANDONED
- See Also:
- Constant Field Values
-
CLEAN
static final int CLEAN
- See Also:
- Constant Field Values
-
ERROR
static final int ERROR
- See Also:
- Constant Field Values
-
WARNING
static final int WARNING
- See Also:
- Constant Field Values
-
PREVIEW
static final int PREVIEW
- See Also:
- Constant Field Values
-
-
Method Detail
-
getGroup
java.lang.String getGroup()
Return the group the build belongs to- Returns:
- the group
-
getLabel
java.lang.String getLabel()
Returns the label of the build result- Returns:
- the label
-
setLabel
void setLabel(java.lang.String label) throws BuildExceptionSets the BuildResult label- Parameters:
label- the label- Throws:
BuildException
-
getState
int getState() throws BuildExceptionReturns the current state of the build result- Returns:
- the state
- Throws:
BuildException
-
setState
void setState(int value) throws BuildExceptionUpdate the current state of the build result- Parameters:
value- new state of the build result- Throws:
BuildException- an exception occurred
-
getStatus
int getStatus() throws BuildExceptionReturns the current status of the build result- Returns:
- the status
- Throws:
BuildException
-
setStatus
void setStatus(int value) throws BuildExceptionUpdate the current status of the build result- Parameters:
value- new status of the build result- Throws:
BuildException- an exception occurred
-
getBuildReport
Attachment getBuildReport() throws BuildException
Return the build report HTML for display purpose- Returns:
- the content of the build report HTML
- Throws:
BuildException- an exception occurred
-
setBuildReport
void setBuildReport(java.io.InputStream contents) throws BuildExceptionSet the content of the build report HTML- Parameters:
contents- the input steam of the contents of the HTML build report. If parameter is null, the current build report will be removed.- Throws:
BuildException- an exception occurred
-
getBuildReportData
Attachment getBuildReportData() throws BuildException
Return the build report JSON data- Returns:
- the attachment containing the JSON data
- Throws:
BuildException- an exception occurred
-
setBuildReportData
void setBuildReportData(java.io.InputStream contents) throws BuildExceptionSet the content of the build report JSON data- Parameters:
contents- the input stream of the contents of the build report JSON data. If parameter is null, the current build report JSON data will be removed.- Throws:
BuildException- an exception occurred
-
getProperty
java.lang.String getProperty(java.lang.String name) throws BuildExceptionreturn the value of the property in the build result. Note that if there are multiple values for the property, it is undefined which property value will be returned.- Parameters:
name- the name of the property to retrieve- Returns:
- the value of the property
- Throws:
BuildException
-
getProperties
java.util.List<java.lang.String> getProperties(java.lang.String name) throws BuildExceptionreturns all of the values of the named property in the build result- Parameters:
name- the name of the property to retrieve- Returns:
- the values of the property
- Throws:
BuildException
-
getPropertyNames
java.util.List<java.lang.String> getPropertyNames() throws BuildExceptionreturns a list of property names in the build result- Returns:
- property names
- Throws:
BuildException
-
setProperty
void setProperty(java.lang.String name, java.lang.String value) throws BuildExceptionReplace a property in the build result- Parameters:
name- the name of the property. If property name already exists, the value will be replaced.value- the value of the property. If null, current property, if exists, will be deleted.- Throws:
BuildException
-
setProperty
void setProperty(java.lang.String name, java.util.List<java.lang.String> values) throws BuildExceptionReplace a property in the build result- Parameters:
name- the name of the property. If property name already exists, the values will be replaced.values- the value of the property. If null, current property, if exists, will be deleted.- Throws:
BuildException
-
addProperty
void addProperty(java.lang.String name, java.lang.String value) throws BuildExceptionAdd a property to the build result- Parameters:
name- the name of the property. If property name already exists, the value will be added.value- the value of the property.- Throws:
BuildException
-
addProperty
void addProperty(java.lang.String name, java.util.List<java.lang.String> values) throws BuildExceptionAdd a property to the build result- Parameters:
name- the name of the property. If property name already exists, the values will be added.values- the value of the property.- Throws:
BuildException
-
deleteProperty
void deleteProperty(java.lang.String name) throws BuildExceptionDelete a property on the build result. If the property has multiple values, all will be deleted.- Parameters:
name- the name of the property- Throws:
BuildException
-
deleteProperty
void deleteProperty(java.lang.String name, java.lang.String value) throws BuildExceptionDelete a property/value pair on the build result.- Parameters:
name- the name of the propertyvalue- the value of the property- Throws:
BuildException
-
addAttachment
void addAttachment(java.lang.String name, java.io.InputStream contents) throws BuildExceptionAdd an attachment to the build result- Parameters:
name- the filename of the attachment to add to the buildResultcontents- the input stream of the contents of the attachment- Throws:
BuildException- an exception occurred
-
addAttachment
void addAttachment(java.lang.String name, java.lang.String contentType, java.io.InputStream contents) throws BuildExceptionAdd an attachment to the build result- Parameters:
name- the filename of the attachment to add to the buildResultcontentType- the content type of the attachmentcontents- the input stream of the contents of the attachment- Throws:
BuildException- an exception occurred
-
getAttachment
Attachment getAttachment(java.lang.String name) throws BuildException
Retrieve an attachment from the build result- Parameters:
name- the filename of the attachment- Returns:
- the attachment
- Throws:
BuildException
-
deleteAttachment
void deleteAttachment(java.lang.String name) throws BuildExceptionDelete an existing attachment(s) with the provided name- Parameters:
name- the name of the attachment(s)- Throws:
BuildException- an exception occurred
-
getAttachments
java.util.List<Attachment> getAttachments() throws BuildException
Get all attachments stored in this build result- Returns:
- the attachments
- Throws:
BuildException
-
-