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
* node.
*
* @param progressIndicator A progress indicator.
*
* @throws CaseActionException If there is a problem completing the
* operation. The exception will have a
* user-friendly message and may be a wrapper
@ -2030,15 +2032,29 @@ public class Case {
private void updateCaseNodeData(ProgressIndicator progressIndicator) throws CaseActionException {
if (getCaseType() == CaseType.MULTI_USER_CASE) {
progressIndicator.progress(Bundle.Case_progressMessage_updatingCaseNodeData());
if (getCaseType() == CaseType.MULTI_USER_CASE) {
try {
CoordinationService coordinationService = CoordinationService.getInstance();
CaseNodeData nodeData = new CaseNodeData(coordinationService.getNodeData(CategoryNode.CASES, metadata.getCaseDirectory()));
try {
CaseNodeData nodeData;
CoordinationService coordinationService = CoordinationService.getInstance();
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());
coordinationService.setNodeData(CategoryNode.CASES, metadata.getCaseDirectory(), nodeData.toArray());
} catch (CoordinationServiceException | InterruptedException | IOException ex) {
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotUpdateCaseNodeData(ex.getLocalizedMessage()), ex);
} else {
/*
* 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 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 final OtherOccurrencesFilesTableModel tableModel;

View File

@ -149,7 +149,7 @@ public class CommandLineIngestManager {
// read options panel configuration
String rootOutputDir = UserPreferences.getCommandLineModeResultsFolder();
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()) {
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
* processor that adds it to the case database.
*
* @param caseForJob The case
* @param dataSource The data source.
*
* @throws

View File

@ -56,22 +56,22 @@ public class CommandLineOptionProcessor extends OptionProcessor {
@Override
protected void process(Env env, Map<Option, String[]> values) throws CommandException {
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)) {
// parse input parameters
String inputPath;
String inputCaseName;
String modeString;
if (values.size() < 3) {
logger.log(Level.SEVERE, "Insufficient number of input arguments. Exiting");
System.out.println("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 to run command line ingest");
this.runFromCommandLine = false;
return;
} else {
String[] argDirs = values.get(pathToDataSourceOption);
if (argDirs.length < 1) {
logger.log(Level.SEVERE, "Missing argument 'inputPath'. Exiting");
System.out.println("Missing argument 'inputPath'. Exiting");
logger.log(Level.SEVERE, "Missing argument 'inputPath'");
System.out.println("Missing argument 'inputPath'");
this.runFromCommandLine = false;
return;
}
@ -79,8 +79,8 @@ public class CommandLineOptionProcessor extends OptionProcessor {
argDirs = values.get(caseNameOption);
if (argDirs.length < 1) {
logger.log(Level.SEVERE, "Missing argument 'caseName'. Exiting");
System.out.println("Missing argument 'caseName'. Exiting");
logger.log(Level.SEVERE, "Missing argument 'caseName'");
System.out.println("Missing argument 'caseName'");
this.runFromCommandLine = false;
return;
}
@ -88,8 +88,8 @@ public class CommandLineOptionProcessor extends OptionProcessor {
argDirs = values.get(runFromCommandLineOption);
if (argDirs.length < 1) {
logger.log(Level.SEVERE, "Missing argument 'runFromCommandLine'. Exiting");
System.out.println("Missing argument 'runFromCommandLine'. Exiting");
logger.log(Level.SEVERE, "Missing argument 'runFromCommandLine'");
System.out.println("Missing argument 'runFromCommandLine'");
this.runFromCommandLine = false;
return;
}
@ -111,15 +111,15 @@ public class CommandLineOptionProcessor extends OptionProcessor {
// verify inputs
if (inputPath == null || inputPath.isEmpty() || !(new File(inputPath).exists())) {
logger.log(Level.SEVERE, "Input file {0} doesn''t exist. Exiting", inputPath);
System.out.println("Input file " + inputPath + " doesn't exist. Exiting");
logger.log(Level.SEVERE, "Input file {0} doesn''t exist", inputPath);
System.out.println("Input file " + inputPath + " doesn't exist");
this.runFromCommandLine = false;
return;
}
if (inputCaseName == null || inputCaseName.isEmpty()) {
logger.log(Level.SEVERE, "Case name argument is empty. Exiting");
System.out.println("Case name argument is empty. Exiting");
logger.log(Level.SEVERE, "Case name argument is empty");
System.out.println("Case name argument is empty");
this.runFromCommandLine = false;
return;
}
@ -134,8 +134,8 @@ public class CommandLineOptionProcessor extends OptionProcessor {
System.out.println("Case name = " + this.baseCaseName);
System.out.println("runFromCommandLine = " + this.runFromCommandLine);
} else {
System.out.println("Missing input arguments for CommandLineOptionProcessor. Exiting");
logger.log(Level.SEVERE, "Missing input arguments. Exiting");
System.out.println("Missing input arguments to run command line ingest");
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.
*
* @param data the common feature, and the children
* @param type the data type
*/
public CommonAttributeValueNode(CommonAttributeValue data, CorrelationAttributeInstance.Type type) {
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
* of metadata.
*
* @param instanceCount
* @param attributeValues
* @param instanceCount the number of instances
* @param attributeValues the attribute list
* @param type the data type
*/
@NbBundle.Messages({
"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 generationDate The generation Date of 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) {

View File

@ -47,6 +47,7 @@ public class AddDataSourceCallback extends DataSourceProcessorCallback {
* @param caseForJob The case for the current job.
* @param dataSourceInfo The data source
* @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) {
this.caseForJob = caseForJob;

View File

@ -41,6 +41,8 @@ public class DataSourceProcessorUtility {
* AutoIngestDataSourceProcessor interface are used.
*
* @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
* their confidence score
* @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.
* 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
*/
@ -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.
* 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
*/

View File

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

View File

@ -62,8 +62,6 @@ public abstract class UiSnapShotReportWriter {
* report.
* @param reportName The name 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) {
this.currentCase = currentCase;

View File

@ -29,7 +29,7 @@ import org.sleuthkit.datamodel.Report;
/**
* 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.
*
* @see org.openide.util.Lookup
@ -40,7 +40,7 @@ public class TextExtractorFactory {
* Returns a TextExtractor containing the Content text. Configuration files
* 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.
*
* @param content Content source that will be read from
@ -124,7 +124,7 @@ public class TextExtractorFactory {
* getExtractor(Content, Lookup).
*
* 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 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.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.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.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

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
*
* @param caseNames The names of the cases to search.
* @param query The keyword search query to perform.
* @param caseNodes The cases to search.
* @param searchQuery The keyword search query to perform.
*/
private SearchThread(Collection<CaseNodeData> caseNodes, SearchQuery searchQuery) {
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
* open.
*
* @param file binarycookie file
* @param cookieFile binarycookie file
* @return An instance of the reader
* @throws FileNotFoundException
* @throws IOException

View File

@ -292,7 +292,7 @@ final class ExtractZoneIdentifier extends Extract {
/**
* 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
* LastWriterPackageFamilyName. Not all browsers will put all values in the
* file, in fact most will only supply the ZoneId. Only Edge supplies the

Binary file not shown.

Binary file not shown.