Merge branch '2197-ProfileOptionsPanel' of https://github.com/wschaeferB/autopsy into 2198-RunIngestModulesWizard

This commit is contained in:
William Schaefer 2017-02-14 19:11:03 -05:00
commit 9702a52007
3 changed files with 7 additions and 10 deletions

View File

@ -398,7 +398,7 @@ public class IngestJobSettings {
*
* @return The list of module names associated with the key.
*/
static HashSet<String> getModulesNamesFromSetting(String context, String key, String defaultSetting) {
private static HashSet<String> getModulesNamesFromSetting(String context, String key, String defaultSetting) {
if (ModuleSettings.settingExists(context, key) == false) {
ModuleSettings.setConfigSetting(context, key, defaultSetting);
}
@ -435,13 +435,12 @@ public class IngestJobSettings {
* Get a set which contains all the names of enabled modules for the
* specified context.
*
* @param defaultSetting - The default list of module names.
* @param context -the execution context (profile name) to check
*
* @return the names of the enabled modules
*/
static HashSet<String> getEnabledModules(String context, String defaultSetting) {
return getModulesNamesFromSetting(context, ENABLED_MODULES_KEY, defaultSetting);
static List<String> getEnabledModules(String context) {
return new ArrayList<>(getModulesNamesFromSetting(context, ENABLED_MODULES_KEY, ""));
}
/**

View File

@ -39,9 +39,8 @@ public class IngestOptionsPanel extends IngestModuleGlobalSettingsPanel implemen
"IngestOptionsPanel.fileFiltersTab.text=File Filters",
"IngestOptionsPanel.fileFiltersTab.toolTipText=Settings for creating and editing ingest file filters.",
"IngestOptionsPanel.profilesTab.text=Profiles",
"IngestOptionsPanel.profilesTab.toolTipText=Settings for creating and editing profiles.",
"IngestOptionsPanel.title.text=Ingest"
})
"IngestOptionsPanel.profilesTab.toolTipText=Settings for creating and editing profiles."})
private FilesSetDefsPanel filterPanel;
private IngestSettingsPanel settingsPanel;
private ProfileSettingsPanel profilePanel;
@ -59,7 +58,6 @@ public class IngestOptionsPanel extends IngestModuleGlobalSettingsPanel implemen
}
private void customizeComponents() {
setName(NbBundle.getMessage(IngestOptionsPanel.class, "IngestOptionsPanel.title.text"));
filterPanel = new FilesSetDefsPanel(PANEL_TYPE.FILE_INGEST_FILTERS);
settingsPanel = new IngestSettingsPanel();
profilePanel = new ProfileSettingsPanel();

View File

@ -429,7 +429,7 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op
filterDescArea.setText(NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.messages.filterLoadFailed"));
}
selectedModulesArea.setText("");
for (String moduleName : IngestJobSettings.getEnabledModules(selectedProfile.getName(), "")) {
for (String moduleName : IngestJobSettings.getEnabledModules(selectedProfile.getName())) {
selectedModulesArea.append(moduleName + "\n");
}