Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
639fea77
Commit
639fea77
authored
3 years ago
by
Richard Cordovano
Browse files
Options
Downloads
Patches
Plain Diff
7673 Allow helpers to call correct Blackboard.postArtifacts() API
parent
31763c72
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/java/src/org/sleuthkit/datamodel/blackboardutils/ArtifactHelperBase.java
+9
-10
9 additions, 10 deletions
...euthkit/datamodel/blackboardutils/ArtifactHelperBase.java
with
9 additions
and
10 deletions
bindings/java/src/org/sleuthkit/datamodel/blackboardutils/ArtifactHelperBase.java
+
9
−
10
View file @
639fea77
...
...
@@ -89,14 +89,13 @@ Optional<Long> getIngestJobId() {
}
/**
* Creates an
d adds a string-valued
attribute of a specified type
to the
* given list
, if the attribute value is not empty or null
.
* Creates an attribute of a specified type
with a string value and adds it
*
to a
given list
of attributes
.
*
* @param attributeType The attribute type.
* @param attrValue The attribute value, may not be the empty string or
* null.
* @param attributes The list of attributes to which the new attribute
* will be added.
* @param attributes The list of attributes.
*/
void
addAttributeIfNotNull
(
BlackboardAttribute
.
ATTRIBUTE_TYPE
attributeType
,
String
attrValue
,
Collection
<
BlackboardAttribute
>
attributes
)
{
if
(!
StringUtils
.
isEmpty
(
attrValue
))
{
...
...
@@ -105,13 +104,12 @@ void addAttributeIfNotNull(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, Str
}
/**
* Creates an
d adds a long-valued
attribute of a specified type
to the given
*
list, if the attribute value is greater than zero
.
* Creates an attribute of a specified type
with a long value and adds it to
*
a given list of attributes
.
*
* @param attributeType The attribute type.
* @param attrValue The attribute value, must be greater than zero.
* @param attributes The list of attributes to which the new attribute
* will be added.
* @param attributes The list of attributes.
*/
void
addAttributeIfNotZero
(
BlackboardAttribute
.
ATTRIBUTE_TYPE
attributeType
,
long
attrValue
,
Collection
<
BlackboardAttribute
>
attributes
)
{
if
(
attrValue
>
0
)
{
...
...
@@ -120,8 +118,8 @@ void addAttributeIfNotZero(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, lon
}
/**
* Creates an
d adds an integer-valued
attribute of a specified type
to the
* given list
, if the attribute value is greater than zero
.
* Creates an attribute of a specified type
with an integer value and adds
*
it to a
given list
of attributes
.
*
* @param attributeType The attribute type.
* @param attrValue The attribute value, must be greater than zero.
...
...
@@ -133,4 +131,5 @@ void addAttributeIfNotZero(BlackboardAttribute.ATTRIBUTE_TYPE attributeType, int
attributes
.
add
(
new
BlackboardAttribute
(
attributeType
,
getModuleName
(),
attrValue
));
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment