mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 01:37:43 +00:00
2197 fixed formatting in all files which were modified
This commit is contained in:
parent
4cefd75345
commit
b42b4c128c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2017 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@ -799,7 +799,8 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
|||||||
* Set the selected node using a path to a previously selected node.
|
* Set the selected node using a path to a previously selected node.
|
||||||
*
|
*
|
||||||
* @param previouslySelectedNodePath Path to a previously selected node.
|
* @param previouslySelectedNodePath Path to a previously selected node.
|
||||||
* @param rootNodeName Name of the root node to match, may be null.
|
* @param rootNodeName Name of the root node to match, may be
|
||||||
|
* null.
|
||||||
*/
|
*/
|
||||||
private void setSelectedNode(final String[] previouslySelectedNodePath, final String rootNodeName) {
|
private void setSelectedNode(final String[] previouslySelectedNodePath, final String rootNodeName) {
|
||||||
if (previouslySelectedNodePath == null) {
|
if (previouslySelectedNodePath == null) {
|
||||||
|
@ -432,7 +432,13 @@ public class IngestJobSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the ENABLED_MODULES_KEY
|
* 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) {
|
static HashSet<String> getEnabledModules(String context, String defaultSetting) {
|
||||||
return getModulesNamesFromSetting(context, ENABLED_MODULES_KEY, defaultSetting);
|
return getModulesNamesFromSetting(context, ENABLED_MODULES_KEY, defaultSetting);
|
||||||
|
@ -22,8 +22,8 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Map;
|
import java.util.ArrayList;
|
||||||
import java.util.TreeMap;
|
import java.util.List;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.openide.util.Exceptions;
|
import org.openide.util.Exceptions;
|
||||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||||
@ -38,7 +38,7 @@ public final class IngestProfiles {
|
|||||||
private static final String PROFILE_NAME_KEY = "Profile_Name";
|
private static final String PROFILE_NAME_KEY = "Profile_Name";
|
||||||
private static final String PROFILE_DESC_KEY = "Profile_Description";
|
private static final String PROFILE_DESC_KEY = "Profile_Description";
|
||||||
private static final String PROFILE_FILTER_KEY = "Profile_Filter";
|
private static final String PROFILE_FILTER_KEY = "Profile_Filter";
|
||||||
private Map<String, IngestProfile> profileMap = null;
|
private List<IngestProfile> profileList = null;
|
||||||
private static final Object PROFILE_LOCK = new Object();
|
private static final Object PROFILE_LOCK = new Object();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,11 +46,11 @@ public final class IngestProfiles {
|
|||||||
*
|
*
|
||||||
* @return profileList
|
* @return profileList
|
||||||
*/
|
*/
|
||||||
public Map<String, IngestProfile> getIngestProfileMap() {
|
public List<IngestProfile> getIngestProfiles() {
|
||||||
if (profileMap == null) {
|
if (profileList == null) {
|
||||||
loadProfileList();
|
loadProfileList();
|
||||||
}
|
}
|
||||||
return profileMap;
|
return profileList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,14 +61,14 @@ public final class IngestProfiles {
|
|||||||
File dir = Paths.get(PlatformUtil.getUserConfigDirectory(), PROFILE_FOLDER).toFile();
|
File dir = Paths.get(PlatformUtil.getUserConfigDirectory(), PROFILE_FOLDER).toFile();
|
||||||
File[] directoryListing = dir.listFiles();
|
File[] directoryListing = dir.listFiles();
|
||||||
|
|
||||||
profileMap = new TreeMap<>();
|
profileList = new ArrayList<>();
|
||||||
if (directoryListing != null) {
|
if (directoryListing != null) {
|
||||||
for (File child : directoryListing) {
|
for (File child : directoryListing) {
|
||||||
String name = child.getName().split("\\.")[0];
|
String name = child.getName().split("\\.")[0];
|
||||||
String context = PROFILE_FOLDER + File.separator + name;
|
String context = PROFILE_FOLDER + File.separator + name;
|
||||||
String desc = ModuleSettings.getConfigSetting(context, PROFILE_DESC_KEY);
|
String desc = ModuleSettings.getConfigSetting(context, PROFILE_DESC_KEY);
|
||||||
String fileIngestFilter = ModuleSettings.getConfigSetting(context, PROFILE_FILTER_KEY);
|
String fileIngestFilter = ModuleSettings.getConfigSetting(context, PROFILE_FILTER_KEY);
|
||||||
profileMap.put(name, new IngestProfile(name, desc, fileIngestFilter));
|
profileList.add(new IngestProfile(name, desc, fileIngestFilter));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ public final class IngestProfiles {
|
|||||||
*/
|
*/
|
||||||
void saveProfileList() {
|
void saveProfileList() {
|
||||||
//save last used profile
|
//save last used profile
|
||||||
for (IngestProfile profile : getIngestProfileMap().values()) {
|
for (IngestProfile profile : getIngestProfiles()) {
|
||||||
IngestProfile.saveProfile(profile);
|
IngestProfile.saveProfile(profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,9 +386,10 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op
|
|||||||
public void load() {
|
public void load() {
|
||||||
int currentIndex = this.profileList.getSelectedIndex();
|
int currentIndex = this.profileList.getSelectedIndex();
|
||||||
this.profilesListModel.clear();
|
this.profilesListModel.clear();
|
||||||
this.profiles = (TreeMap<String, IngestProfile>) new IngestProfiles().getIngestProfileMap();
|
this.profiles = new TreeMap<String, IngestProfile>();
|
||||||
for (IngestProfile profile : this.profiles.values()) {
|
for (IngestProfile profile : new IngestProfiles().getIngestProfiles()) {
|
||||||
profilesListModel.addElement(profile);
|
profilesListModel.addElement(profile);
|
||||||
|
profiles.put(profile.getName(), profile);
|
||||||
}
|
}
|
||||||
if (currentIndex < 0 || currentIndex >= profilesListModel.getSize()) {
|
if (currentIndex < 0 || currentIndex >= profilesListModel.getSize()) {
|
||||||
currentIndex = 0;
|
currentIndex = 0;
|
||||||
|
@ -1003,7 +1003,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
|
|||||||
private void deleteSetButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteSetButtonActionPerformed
|
private void deleteSetButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteSetButtonActionPerformed
|
||||||
FilesSet selectedSet = this.setsList.getSelectedValue();
|
FilesSet selectedSet = this.setsList.getSelectedValue();
|
||||||
if (panelType == PANEL_TYPE.FILE_INGEST_FILTERS) {
|
if (panelType == PANEL_TYPE.FILE_INGEST_FILTERS) {
|
||||||
for (IngestProfile profile : new IngestProfiles().getIngestProfileMap().values()) {
|
for (IngestProfile profile : new IngestProfiles().getIngestProfiles()) {
|
||||||
if (profile.getFileIngestFilter().equals(selectedSet.getName())) {
|
if (profile.getFileIngestFilter().equals(selectedSet.getName())) {
|
||||||
MessageNotifyUtil.Message.error(NbBundle.getMessage(this.getClass(),
|
MessageNotifyUtil.Message.error(NbBundle.getMessage(this.getClass(),
|
||||||
"FilesSetDefsPanel.ingest.fileFilterInUseError",
|
"FilesSetDefsPanel.ingest.fileFilterInUseError",
|
||||||
|
@ -18,10 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.report.testfixtures;
|
package org.sleuthkit.autopsy.report.testfixtures;
|
||||||
|
|
||||||
import org.openide.util.lookup.ServiceProvider;
|
|
||||||
import org.sleuthkit.autopsy.coreutils.Version;
|
import org.sleuthkit.autopsy.coreutils.Version;
|
||||||
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
||||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
|
||||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||||
|
|
||||||
|
@ -127,7 +127,8 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel {
|
|||||||
if (inStartup) {
|
if (inStartup) {
|
||||||
AutoIngestUserPreferences.SelectedMode storedMode = AutoIngestUserPreferences.getMode();
|
AutoIngestUserPreferences.SelectedMode storedMode = AutoIngestUserPreferences.getMode();
|
||||||
inputPathTextField.requestFocusInWindow();
|
inputPathTextField.requestFocusInWindow();
|
||||||
if (null != storedMode) switch (storedMode) {
|
if (null != storedMode) {
|
||||||
|
switch (storedMode) {
|
||||||
case REVIEW:
|
case REVIEW:
|
||||||
jRadioButtonReview.setSelected(true);
|
jRadioButtonReview.setSelected(true);
|
||||||
enableOptionsBasedOnMode(OptionsUiMode.REVIEW);
|
enableOptionsBasedOnMode(OptionsUiMode.REVIEW);
|
||||||
@ -142,6 +143,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String images = AutoIngestUserPreferences.getAutoModeImageFolder();
|
String images = AutoIngestUserPreferences.getAutoModeImageFolder();
|
||||||
if (images != null) {
|
if (images != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user