Skip to content

Commit 16d1658

Browse files
committed
Added some more comments
1 parent 7d77fc2 commit 16d1658

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Java/src/main/java/com/nuix/superutilities/misc/ProfileDigester.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@ public ItemSet addItemsToItemSet(Case nuixCase, String itemSetName, String dedup
138138
logInfo("Using existing ItemSet with name "+itemSetName);
139139
}
140140

141+
// Build settings Map for call to addItems which includes:
142+
// - Our custom expression which internally generates the custom MD5 for each item using provided metadata profile
143+
// - Progress callback which will in turn call fireProgressUpdate
141144
Map<String,Object> settings = new HashMap<String,Object>();
145+
146+
// Define custom expression
142147
settings.put("expression", new ItemExpression<String>() {
143148
@Override
144149
public String evaluate(Item item) {
@@ -152,13 +157,15 @@ public String evaluate(Item item) {
152157
}
153158
});
154159

160+
// Define progress callback which will in turn push out progress updates to callback on this instance
155161
settings.put("progress", new ItemEventCallback() {
156162
@Override
157163
public void itemProcessed(ItemEventInfo info) {
158164
fireProgressUpdate((int)info.getStageCount(),items.size());
159165
}
160166
});
161167

168+
// Add the items to the item set
162169
targetItemSet.addItems(items, settings);
163170

164171
// Provide back item set we used/created

0 commit comments

Comments
 (0)