19 package org.sleuthkit.autopsy.integrationtesting;
21 import java.util.ArrayList;
22 import java.util.List;
24 import java.util.stream.Collectors;
25 import org.apache.commons.collections.CollectionUtils;
26 import org.apache.commons.lang.StringUtils;
67 if (StringUtils.isNotBlank(context) && context.indexOf(
'.') > 0) {
68 context = context.substring(0, context.indexOf(
'.'));
73 .collect(Collectors.toMap(t -> t.getModuleFactory().getClass().getCanonicalName(), t -> t, (t1, t2) -> t1));
76 Map<String, IngestModuleFactory> allFactories = ingestModuleFactories.
getFactories().stream()
77 .collect(Collectors.toMap(f -> f.getClass().getCanonicalName(), f -> f, (f1, f2) -> f1));
80 List<IngestModuleTemplate> newTemplates =
new ArrayList<>(curTemplates.values());
83 if (parameters != null && !CollectionUtils.isEmpty(parameters.getModules())) {
84 List<IngestModuleTemplate> templatesToAdd = parameters.getModules().stream()
88 .map((className) -> curTemplates.containsKey(className) ? null : allFactories.get(className))
90 .filter((factory) -> factory != null)
93 .collect(Collectors.toList());
95 newTemplates.addAll(templatesToAdd);
final List< String > modules
IngestJobSettings configure(IngestJobSettings curSettings, IngestModuleSetupManager.ConfigArgs parameters)
List< IngestModuleTemplate > getEnabledIngestModuleTemplates()
String getExecutionContext()
List< String > getModules()
ConfigArgs(List< String > modules)
List< IngestModuleFactory > getFactories()
static final IngestModuleFactoryService ingestModuleFactories