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 theBuildGroup
helper methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BuildResult.QueryParms
Query parameters are used to do a generic query for build results.
-
Field Summary
Fields Modifier and Type Field Description static int
ABANDONED
static int
CLEAN
static int
COMPLETE
static int
ERROR
static int
NEW
static int
PREVIEW
static int
PROCESSING
static int
WARNING
-
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 void
addAttachment(java.lang.String name, java.io.InputStream contents)
Add an attachment to the build resultvoid
addAttachment(java.lang.String name, java.lang.String contentType, java.io.InputStream contents)
Add an attachment to the build resultvoid
addProperty(java.lang.String name, java.lang.String value)
Add a property to the build resultvoid
addProperty(java.lang.String name, java.util.List<java.lang.String> values)
Add a property to the build resultvoid
deleteAttachment(java.lang.String name)
Delete an existing attachment(s) with the provided namevoid
deleteProperty(java.lang.String name)
Delete a property on the build result.void
deleteProperty(java.lang.String name, java.lang.String value)
Delete a property/value pair on the build result.Attachment
getAttachment(java.lang.String name)
Retrieve an attachment from the build resultjava.util.List<Attachment>
getAttachments()
Get all attachments stored in this build resultAttachment
getBuildReport()
Return the build report HTML for display purposeAttachment
getBuildReportData()
Return the build report JSON datajava.lang.String
getGroup()
Return the group the build belongs tojava.lang.String
getLabel()
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.String
getProperty(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 resultint
getState()
Returns the current state of the build resultint
getStatus()
Returns the current status of the build resultvoid
setBuildReport(java.io.InputStream contents)
Set the content of the build report HTMLvoid
setBuildReportData(java.io.InputStream contents)
Set the content of the build report JSON datavoid
setLabel(java.lang.String label)
Sets the BuildResult labelvoid
setProperty(java.lang.String name, java.lang.String value)
Replace a property in the build resultvoid
setProperty(java.lang.String name, java.util.List<java.lang.String> values)
Replace a property in the build resultvoid
setState(int value)
Update the current state of the build resultvoid
setStatus(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 BuildException
Sets the BuildResult label- Parameters:
label
- the label- Throws:
BuildException
-
getState
int getState() throws BuildException
Returns the current state of the build result- Returns:
- the state
- Throws:
BuildException
-
setState
void setState(int value) throws BuildException
Update the current state of the build result- Parameters:
value
- new state of the build result- Throws:
BuildException
- an exception occurred
-
getStatus
int getStatus() throws BuildException
Returns the current status of the build result- Returns:
- the status
- Throws:
BuildException
-
setStatus
void setStatus(int value) throws BuildException
Update 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 BuildException
Set 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 BuildException
Set 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 BuildException
return 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 BuildException
returns 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 BuildException
returns 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 BuildException
Replace 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 BuildException
Replace 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 BuildException
Add 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 BuildException
Add 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 BuildException
Delete 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 BuildException
Delete 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 BuildException
Add 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 BuildException
Add 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 BuildException
Delete 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
-
-