Merge remote-tracking branch 'upstream/release-4.11.0' into improved-case-deletion-part2

This commit is contained in:
Richard Cordovano 2019-03-28 11:20:20 -04:00
commit 3cd0fee13f
19 changed files with 59 additions and 39 deletions

View File

@ -2018,6 +2018,8 @@ public class Case {
* Updates the node data for the case directory lock coordination service * Updates the node data for the case directory lock coordination service
* node. * node.
* *
* @param progressIndicator A progress indicator.
*
* @throws CaseActionException If there is a problem completing the * @throws CaseActionException If there is a problem completing the
* operation. The exception will have a * operation. The exception will have a
* user-friendly message and may be a wrapper * user-friendly message and may be a wrapper
@ -2030,15 +2032,29 @@ public class Case {
private void updateCaseNodeData(ProgressIndicator progressIndicator) throws CaseActionException { private void updateCaseNodeData(ProgressIndicator progressIndicator) throws CaseActionException {
if (getCaseType() == CaseType.MULTI_USER_CASE) { if (getCaseType() == CaseType.MULTI_USER_CASE) {
progressIndicator.progress(Bundle.Case_progressMessage_updatingCaseNodeData()); progressIndicator.progress(Bundle.Case_progressMessage_updatingCaseNodeData());
if (getCaseType() == CaseType.MULTI_USER_CASE) { try {
try { CaseNodeData nodeData;
CoordinationService coordinationService = CoordinationService.getInstance(); CoordinationService coordinationService = CoordinationService.getInstance();
CaseNodeData nodeData = new CaseNodeData(coordinationService.getNodeData(CategoryNode.CASES, metadata.getCaseDirectory())); byte[] nodeBytes = coordinationService.getNodeData(CategoryNode.CASES, metadata.getCaseDirectory());
if (nodeBytes != null && nodeBytes.length > 0) {
/*
* Update the last access date in the coordination service
* node data for the case.
*/
nodeData = new CaseNodeData(nodeBytes);
nodeData.setLastAccessDate(new Date()); nodeData.setLastAccessDate(new Date());
coordinationService.setNodeData(CategoryNode.CASES, metadata.getCaseDirectory(), nodeData.toArray()); } else {
} catch (CoordinationServiceException | InterruptedException | IOException ex) { /*
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotUpdateCaseNodeData(ex.getLocalizedMessage()), ex); * This is a "legacy" case with no data stored in its case
* directory coordination service node yet, or the node is
* empty due to some error, so create the coordination
* service node data from the case metadata.
*/
nodeData = new CaseNodeData(metadata);
} }
coordinationService.setNodeData(CategoryNode.CASES, metadata.getCaseDirectory(), nodeData.toArray());
} catch (CoordinationServiceException | InterruptedException | ParseException | IOException ex) {
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotUpdateCaseNodeData(ex.getLocalizedMessage()), ex);
} }
} }
} }

View File

@ -93,7 +93,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
private static final Logger LOGGER = Logger.getLogger(DataContentViewerOtherCases.class.getName()); private static final Logger LOGGER = Logger.getLogger(DataContentViewerOtherCases.class.getName());
private static final CorrelationCaseWrapper NO_ARTIFACTS_CASE = new CorrelationCaseWrapper(Bundle.DataContentViewerOtherCases_table_noArtifacts()); private static final CorrelationCaseWrapper NO_ARTIFACTS_CASE = new CorrelationCaseWrapper(Bundle.DataContentViewerOtherCases_table_noArtifacts());
private static final CorrelationCaseWrapper NO_RESULTS_CASE = new CorrelationCaseWrapper(Bundle.DataContentViewerOtherCases_table_noArtifacts()); private static final CorrelationCaseWrapper NO_RESULTS_CASE = new CorrelationCaseWrapper(Bundle.DataContentViewerOtherCases_table_noResultsFound());
private static final int DEFAULT_MIN_CELL_WIDTH = 15; private static final int DEFAULT_MIN_CELL_WIDTH = 15;
private final OtherOccurrencesFilesTableModel tableModel; private final OtherOccurrencesFilesTableModel tableModel;

View File

@ -149,7 +149,7 @@ public class CommandLineIngestManager {
// read options panel configuration // read options panel configuration
String rootOutputDir = UserPreferences.getCommandLineModeResultsFolder(); String rootOutputDir = UserPreferences.getCommandLineModeResultsFolder();
LOGGER.log(Level.INFO, "Output directory = {0}", rootOutputDir); //NON-NLS LOGGER.log(Level.INFO, "Output directory = {0}", rootOutputDir); //NON-NLS
System.out.println("Output directoryh = " + rootOutputDir); System.out.println("Output directory = " + rootOutputDir);
if (rootOutputDir.isEmpty()) { if (rootOutputDir.isEmpty()) {
LOGGER.log(Level.SEVERE, "Output directory not specified, please configure Command Line Options Panel (in Tools -> Options)"); LOGGER.log(Level.SEVERE, "Output directory not specified, please configure Command Line Options Panel (in Tools -> Options)");
@ -264,6 +264,7 @@ public class CommandLineIngestManager {
* Passes the data source for the current job through a data source * Passes the data source for the current job through a data source
* processor that adds it to the case database. * processor that adds it to the case database.
* *
* @param caseForJob The case
* @param dataSource The data source. * @param dataSource The data source.
* *
* @throws * @throws

View File

@ -56,22 +56,22 @@ public class CommandLineOptionProcessor extends OptionProcessor {
@Override @Override
protected void process(Env env, Map<Option, String[]> values) throws CommandException { protected void process(Env env, Map<Option, String[]> values) throws CommandException {
logger.log(Level.INFO, "Processing Autopsy command line options"); //NON-NLS logger.log(Level.INFO, "Processing Autopsy command line options"); //NON-NLS
System.out.println("Processing Autopsy command line options using CommandLineOptionProcessor"); System.out.println("Processing Autopsy command line options");
if (values.containsKey(pathToDataSourceOption) && values.containsKey(caseNameOption) && values.containsKey(runFromCommandLineOption)) { if (values.containsKey(pathToDataSourceOption) && values.containsKey(caseNameOption) && values.containsKey(runFromCommandLineOption)) {
// parse input parameters // parse input parameters
String inputPath; String inputPath;
String inputCaseName; String inputCaseName;
String modeString; String modeString;
if (values.size() < 3) { if (values.size() < 3) {
logger.log(Level.SEVERE, "Insufficient number of input arguments. Exiting"); logger.log(Level.SEVERE, "Insufficient number of input arguments to run command line ingest");
System.out.println("Insufficient number of input arguments. Exiting"); System.out.println("Insufficient number of input arguments to run command line ingest");
this.runFromCommandLine = false; this.runFromCommandLine = false;
return; return;
} else { } else {
String[] argDirs = values.get(pathToDataSourceOption); String[] argDirs = values.get(pathToDataSourceOption);
if (argDirs.length < 1) { if (argDirs.length < 1) {
logger.log(Level.SEVERE, "Missing argument 'inputPath'. Exiting"); logger.log(Level.SEVERE, "Missing argument 'inputPath'");
System.out.println("Missing argument 'inputPath'. Exiting"); System.out.println("Missing argument 'inputPath'");
this.runFromCommandLine = false; this.runFromCommandLine = false;
return; return;
} }
@ -79,8 +79,8 @@ public class CommandLineOptionProcessor extends OptionProcessor {
argDirs = values.get(caseNameOption); argDirs = values.get(caseNameOption);
if (argDirs.length < 1) { if (argDirs.length < 1) {
logger.log(Level.SEVERE, "Missing argument 'caseName'. Exiting"); logger.log(Level.SEVERE, "Missing argument 'caseName'");
System.out.println("Missing argument 'caseName'. Exiting"); System.out.println("Missing argument 'caseName'");
this.runFromCommandLine = false; this.runFromCommandLine = false;
return; return;
} }
@ -88,8 +88,8 @@ public class CommandLineOptionProcessor extends OptionProcessor {
argDirs = values.get(runFromCommandLineOption); argDirs = values.get(runFromCommandLineOption);
if (argDirs.length < 1) { if (argDirs.length < 1) {
logger.log(Level.SEVERE, "Missing argument 'runFromCommandLine'. Exiting"); logger.log(Level.SEVERE, "Missing argument 'runFromCommandLine'");
System.out.println("Missing argument 'runFromCommandLine'. Exiting"); System.out.println("Missing argument 'runFromCommandLine'");
this.runFromCommandLine = false; this.runFromCommandLine = false;
return; return;
} }
@ -111,15 +111,15 @@ public class CommandLineOptionProcessor extends OptionProcessor {
// verify inputs // verify inputs
if (inputPath == null || inputPath.isEmpty() || !(new File(inputPath).exists())) { if (inputPath == null || inputPath.isEmpty() || !(new File(inputPath).exists())) {
logger.log(Level.SEVERE, "Input file {0} doesn''t exist. Exiting", inputPath); logger.log(Level.SEVERE, "Input file {0} doesn''t exist", inputPath);
System.out.println("Input file " + inputPath + " doesn't exist. Exiting"); System.out.println("Input file " + inputPath + " doesn't exist");
this.runFromCommandLine = false; this.runFromCommandLine = false;
return; return;
} }
if (inputCaseName == null || inputCaseName.isEmpty()) { if (inputCaseName == null || inputCaseName.isEmpty()) {
logger.log(Level.SEVERE, "Case name argument is empty. Exiting"); logger.log(Level.SEVERE, "Case name argument is empty");
System.out.println("Case name argument is empty. Exiting"); System.out.println("Case name argument is empty");
this.runFromCommandLine = false; this.runFromCommandLine = false;
return; return;
} }
@ -134,8 +134,8 @@ public class CommandLineOptionProcessor extends OptionProcessor {
System.out.println("Case name = " + this.baseCaseName); System.out.println("Case name = " + this.baseCaseName);
System.out.println("runFromCommandLine = " + this.runFromCommandLine); System.out.println("runFromCommandLine = " + this.runFromCommandLine);
} else { } else {
System.out.println("Missing input arguments for CommandLineOptionProcessor. Exiting"); System.out.println("Missing input arguments to run command line ingest");
logger.log(Level.SEVERE, "Missing input arguments. Exiting"); logger.log(Level.SEVERE, "Missing input arguments to run command line ingest");
} }
} }

View File

@ -50,6 +50,7 @@ public class CommonAttributeValueNode extends DisplayableItemNode {
* Create a Match node whose children will all have this object in common. * Create a Match node whose children will all have this object in common.
* *
* @param data the common feature, and the children * @param data the common feature, and the children
* @param type the data type
*/ */
public CommonAttributeValueNode(CommonAttributeValue data, CorrelationAttributeInstance.Type type) { public CommonAttributeValueNode(CommonAttributeValue data, CorrelationAttributeInstance.Type type) {
super(Children.create( super(Children.create(

View File

@ -52,8 +52,9 @@ public final class InstanceCountNode extends DisplayableItemNode {
* Create a node with the given number of instances, and the given selection * Create a node with the given number of instances, and the given selection
* of metadata. * of metadata.
* *
* @param instanceCount * @param instanceCount the number of instances
* @param attributeValues * @param attributeValues the attribute list
* @param type the data type
*/ */
@NbBundle.Messages({ @NbBundle.Messages({
"InstanceCountNode.displayName=Exists in %s data sources (%s)" "InstanceCountNode.displayName=Exists in %s data sources (%s)"

View File

@ -59,6 +59,7 @@ public class CommSnapShotReportWriter extends UiSnapShotReportWriter {
* @param reportName The name of the report. * @param reportName The name of the report.
* @param generationDate The generation Date of the report. * @param generationDate The generation Date of the report.
* @param snapshot A snapshot of the view to include in the report. * @param snapshot A snapshot of the view to include in the report.
* @param filter The communications filter
*/ */
public CommSnapShotReportWriter(Case currentCase, Path reportFolderPath, String reportName, Date generationDate, BufferedImage snapshot, CommunicationsFilter filter) { public CommSnapShotReportWriter(Case currentCase, Path reportFolderPath, String reportName, Date generationDate, BufferedImage snapshot, CommunicationsFilter filter) {

View File

@ -47,6 +47,7 @@ public class AddDataSourceCallback extends DataSourceProcessorCallback {
* @param caseForJob The case for the current job. * @param caseForJob The case for the current job.
* @param dataSourceInfo The data source * @param dataSourceInfo The data source
* @param taskId The task id to associate with ingest job events. * @param taskId The task id to associate with ingest job events.
* @param lock The DSP lock
*/ */
public AddDataSourceCallback(Case caseForJob, AutoIngestDataSource dataSourceInfo, UUID taskId, Object lock) { public AddDataSourceCallback(Case caseForJob, AutoIngestDataSource dataSourceInfo, UUID taskId, Object lock) {
this.caseForJob = caseForJob; this.caseForJob = caseForJob;

View File

@ -41,6 +41,8 @@ public class DataSourceProcessorUtility {
* AutoIngestDataSourceProcessor interface are used. * AutoIngestDataSourceProcessor interface are used.
* *
* @param dataSourcePath Full path to the data source * @param dataSourcePath Full path to the data source
* @param processorCandidates Possible DSPs that can handle the data source
*
* @return Hash map of all DSPs that can process the data source along with * @return Hash map of all DSPs that can process the data source along with
* their confidence score * their confidence score
* @throws * @throws

View File

@ -518,7 +518,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
* Get the artifact type ID in the portable case and create new artifact type if needed. * Get the artifact type ID in the portable case and create new artifact type if needed.
* For built-in artifacts this will be the same as the original. * For built-in artifacts this will be the same as the original.
* *
* @param oldArtifactTypeId The artifact type ID in the current case * @param oldArtifact The artifact in the current case
* *
* @return The corresponding artifact type ID in the portable case * @return The corresponding artifact type ID in the portable case
*/ */
@ -541,7 +541,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
* Get the attribute type ID in the portable case and create new attribute type if needed. * Get the attribute type ID in the portable case and create new attribute type if needed.
* For built-in attributes this will be the same as the original. * For built-in attributes this will be the same as the original.
* *
* @param oldAttributeTypeId The attribute type ID in the current case * @param oldAttribute The attribute in the current case
* *
* @return The corresponding attribute type in the portable case * @return The corresponding attribute type in the portable case
*/ */

View File

@ -248,7 +248,7 @@ public final class CaseUcoFormatExporter {
* @param selectedDataSourceId Object ID of the data source * @param selectedDataSourceId Object ID of the data source
* @param caseTraceId CASE-UCO trace ID object for the Autopsy case entry * @param caseTraceId CASE-UCO trace ID object for the Autopsy case entry
* @param skCase SleuthkitCase object * @param skCase SleuthkitCase object
* @param catalog JsonGenerator object * @param jsonGenerator JsonGenerator object
* @return * @return
* @throws TskCoreException * @throws TskCoreException
* @throws SQLException * @throws SQLException

View File

@ -62,8 +62,6 @@ public abstract class UiSnapShotReportWriter {
* report. * report.
* @param reportName The name of the report. * @param reportName The name of the report.
* @param generationDate The generation Date of the report. * @param generationDate The generation Date of the report.
* @param snapshot A snapshot of the view to include in the
* report.
*/ */
protected UiSnapShotReportWriter(Case currentCase, Path reportFolderPath, String reportName, Date generationDate) { protected UiSnapShotReportWriter(Case currentCase, Path reportFolderPath, String reportName, Date generationDate) {
this.currentCase = currentCase; this.currentCase = currentCase;

View File

@ -29,7 +29,7 @@ import org.sleuthkit.datamodel.Report;
/** /**
* Factory for creating TextExtractors given a Content instance * Factory for creating TextExtractors given a Content instance
* *
* See {@link org.sleuthkit.autopsy.textextractors.textextractorconfigs} for * See {@link org.sleuthkit.autopsy.textextractors.configs} for
* available extractor configuration options. * available extractor configuration options.
* *
* @see org.openide.util.Lookup * @see org.openide.util.Lookup
@ -40,7 +40,7 @@ public class TextExtractorFactory {
* Returns a TextExtractor containing the Content text. Configuration files * Returns a TextExtractor containing the Content text. Configuration files
* can be added to the Lookup. * can be added to the Lookup.
* *
* See {@link org.sleuthkit.autopsy.textextractors.textextractorconfigs} for * See {@link org.sleuthkit.autopsy.textextractors.configs} for
* available extractor configuration options. * available extractor configuration options.
* *
* @param content Content source that will be read from * @param content Content source that will be read from
@ -124,7 +124,7 @@ public class TextExtractorFactory {
* getExtractor(Content, Lookup). * getExtractor(Content, Lookup).
* *
* Configure this extractor with the StringsConfig in * Configure this extractor with the StringsConfig in
* {@link org.sleuthkit.autopsy.textextractors.textextractorconfigs} * {@link org.sleuthkit.autopsy.textextractors.configs}
* *
* @param content Content source to read from * @param content Content source to read from
* @param context Contains extraction configurations for certain file types * @param context Contains extraction configurations for certain file types

View File

@ -23,7 +23,6 @@ file.reference.controlsfx-8.40.11.jar=release/modules/ext/controlsfx-8.40.11.jar
file.reference.dom4j-1.6.1.jar=release/modules/ext/dom4j-1.6.1.jar file.reference.dom4j-1.6.1.jar=release/modules/ext/dom4j-1.6.1.jar
file.reference.geronimo-jms_1.1_spec-1.0.jar=release/modules/ext/geronimo-jms_1.1_spec-1.0.jar file.reference.geronimo-jms_1.1_spec-1.0.jar=release/modules/ext/geronimo-jms_1.1_spec-1.0.jar
file.reference.gson-2.8.1.jar=release/modules/ext/gson-2.8.1.jar file.reference.gson-2.8.1.jar=release/modules/ext/gson-2.8.1.jar
file.reference.gstreamer-java-1.5.jar=release/modules/ext/gstreamer-java-1.5.jar
file.reference.gst1-java-core-0.9.3.jar=release/modules/ext/gst1-java-core-0.9.3.jar file.reference.gst1-java-core-0.9.3.jar=release/modules/ext/gst1-java-core-0.9.3.jar
file.reference.jna-3.4.0.jar=release/modules/ext/jna-3.4.0.jar file.reference.jna-3.4.0.jar=release/modules/ext/jna-3.4.0.jar
file.reference.guava-19.0.jar=release/modules/ext/guava-19.0.jar file.reference.guava-19.0.jar=release/modules/ext/guava-19.0.jar

View File

@ -815,8 +815,8 @@ final class MultiCaseKeywordSearchPanel extends javax.swing.JPanel implements Ex
/** /**
* Constructs a thread that performs a keyword search of cases * Constructs a thread that performs a keyword search of cases
* *
* @param caseNames The names of the cases to search. * @param caseNodes The cases to search.
* @param query The keyword search query to perform. * @param searchQuery The keyword search query to perform.
*/ */
private SearchThread(Collection<CaseNodeData> caseNodes, SearchQuery searchQuery) { private SearchThread(Collection<CaseNodeData> caseNodes, SearchQuery searchQuery) {
this.caseNodes = caseNodes; this.caseNodes = caseNodes;

View File

@ -70,7 +70,7 @@ public final class BinaryCookieReader implements Iterable<Cookie> {
* the file is a binarycookie file. This function does not keep the file * the file is a binarycookie file. This function does not keep the file
* open. * open.
* *
* @param file binarycookie file * @param cookieFile binarycookie file
* @return An instance of the reader * @return An instance of the reader
* @throws FileNotFoundException * @throws FileNotFoundException
* @throws IOException * @throws IOException

View File

@ -292,7 +292,7 @@ final class ExtractZoneIdentifier extends Extract {
/** /**
* Wrapper class for information in the :ZoneIdentifier file. The * Wrapper class for information in the :ZoneIdentifier file. The
* Zone.Identifier file has a simple format of <i>key<i>=<i>value<i>. There * Zone.Identifier file has a simple format of \<i\>key\<i\>=\<i\>value\<i\>. There
* are four known keys: ZoneId, ReferrerUrl, HostUrl, and * are four known keys: ZoneId, ReferrerUrl, HostUrl, and
* LastWriterPackageFamilyName. Not all browsers will put all values in the * LastWriterPackageFamilyName. Not all browsers will put all values in the
* file, in fact most will only supply the ZoneId. Only Edge supplies the * file, in fact most will only supply the ZoneId. Only Edge supplies the

Binary file not shown.

Binary file not shown.