Skip to content
Snippets Groups Projects
Commit 639fea77 authored by Richard Cordovano's avatar Richard Cordovano
Browse files

7673 Allow helpers to call correct Blackboard.postArtifacts() API

parent 31763c72
No related branches found
No related tags found
No related merge requests found
...@@ -89,14 +89,13 @@ Optional<Long> getIngestJobId() { ...@@ -89,14 +89,13 @@ Optional<Long> getIngestJobId() {
} }
/** /**
* Creates and adds a string-valued attribute of a specified type to the * Creates an attribute of a specified type with a string value and adds it
* given list, if the attribute value is not empty or null. * to a given list of attributes.
* *
* @param attributeType The attribute type. * @param attributeType The attribute type.
* @param attrValue The attribute value, may not be the empty string or * @param attrValue The attribute value, may not be the empty string or
* null. * null.
* @param attributes The list of attributes to which the new attribute * @param attributes The list of attributes.
* will be added.
*/ */
void addAttributeIfNotNull(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, String attrValue, Collection<BlackboardAttribute> attributes) { void addAttributeIfNotNull(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, String attrValue, Collection<BlackboardAttribute> attributes) {
if (!StringUtils.isEmpty(attrValue)) { if (!StringUtils.isEmpty(attrValue)) {
...@@ -105,13 +104,12 @@ void addAttributeIfNotNull(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, Str ...@@ -105,13 +104,12 @@ void addAttributeIfNotNull(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, Str
} }
/** /**
* Creates and adds a long-valued attribute of a specified type to the given * Creates an attribute of a specified type with a long value and adds it to
* list, if the attribute value is greater than zero. * a given list of attributes.
* *
* @param attributeType The attribute type. * @param attributeType The attribute type.
* @param attrValue The attribute value, must be greater than zero. * @param attrValue The attribute value, must be greater than zero.
* @param attributes The list of attributes to which the new attribute * @param attributes The list of attributes.
* will be added.
*/ */
void addAttributeIfNotZero(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, long attrValue, Collection<BlackboardAttribute> attributes) { void addAttributeIfNotZero(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, long attrValue, Collection<BlackboardAttribute> attributes) {
if (attrValue > 0) { if (attrValue > 0) {
...@@ -120,8 +118,8 @@ void addAttributeIfNotZero(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, lon ...@@ -120,8 +118,8 @@ void addAttributeIfNotZero(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, lon
} }
/** /**
* Creates and adds an integer-valued attribute of a specified type to the * Creates an attribute of a specified type with an integer value and adds
* given list, if the attribute value is greater than zero. * it to a given list of attributes.
* *
* @param attributeType The attribute type. * @param attributeType The attribute type.
* @param attrValue The attribute value, must be greater than zero. * @param attrValue The attribute value, must be greater than zero.
...@@ -133,4 +131,5 @@ void addAttributeIfNotZero(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, int ...@@ -133,4 +131,5 @@ void addAttributeIfNotZero(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, int
attributes.add(new BlackboardAttribute(attributeType, getModuleName(), attrValue)); attributes.add(new BlackboardAttribute(attributeType, getModuleName(), attrValue));
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment