diff --git a/CentralRepository/build.xml b/CentralRepository/build.xml deleted file mode 100644 index 4e8c2ff783ae403993f2b6f9e6c9cf6e62737be0..0000000000000000000000000000000000000000 --- a/CentralRepository/build.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See harness/README in the NetBeans platform --> -<!-- for some information on what you could do (e.g. targets to override). --> -<!-- If you delete this file and reopen the project it will be recreated. --> -<project name="org.sleuthkit.autopsy.centralrepository" default="netbeans" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant"> - <description>Builds, tests, and runs the project org.sleuthkit.autopsy.centralrepository.</description> - <import file="nbproject/build-impl.xml"/> - <import file="../BootstrapIvy.xml"/> - - <property name="thirdparty.dir" value="${basedir}/../thirdparty" /> - <property name="modules.dir" value="${basedir}/release/modules/" /> - <property name="ext.dir" value="${modules.dir}/ext" /> - - <target name="resolve"> - <ivy:settings file="ivysettings.xml" /> - <ivy:resolve file="ivy.xml" conf="central-repository"/> - </target> - - <target name="retrieve" depends="resolve"> - <ivy:retrieve conf="central-repository" pattern="${basedir}/release/modules/ext/[artifact]-[revision](-[classifier]).[ext]" /> - </target> - - <target name="init" depends="retrieve, harness.init" /> - - <target name="clean" depends="projectized-common.clean"> - <!--Override clean to delete jars, etc downloaded with Ivy - or copied in from thirdparty folder. This way we don't end up with - out-of-date/unneeded stuff in the installer--> - <delete dir="${basedir}/release"/> - </target> -</project> diff --git a/CentralRepository/manifest.mf b/CentralRepository/manifest.mf deleted file mode 100644 index b798470437a66784c49570e9ffd64ff5210db734..0000000000000000000000000000000000000000 --- a/CentralRepository/manifest.mf +++ /dev/null @@ -1,6 +0,0 @@ -Manifest-Version: 1.0 -AutoUpdate-Show-In-Client: true -OpenIDE-Module: org.sleuthkit.autopsy.centralrepository -OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/centralrepository/Bundle.properties -OpenIDE-Module-Specification-Version: 1.0 -OpenIDE-Module-Install: org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.class diff --git a/CentralRepository/nbproject/build-impl.xml b/CentralRepository/nbproject/build-impl.xml deleted file mode 100644 index 60467ca5c3a0f0f767c67c9319d5be9e276d6407..0000000000000000000000000000000000000000 --- a/CentralRepository/nbproject/build-impl.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** ---> -<project name="org.sleuthkit.autopsy.centralrepository-impl" basedir=".."> - <fail message="Please build using Ant 1.7.1 or higher."> - <condition> - <not> - <antversion atleast="1.7.1"/> - </not> - </condition> - </fail> - <property file="nbproject/private/suite-private.properties"/> - <property file="nbproject/suite.properties"/> - <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail> - <property file="${suite.dir}/nbproject/private/platform-private.properties"/> - <property file="${suite.dir}/nbproject/platform.properties"/> - <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2"> - <attribute name="property"/> - <attribute name="value"/> - <sequential> - <property name="@{property}" value="@{value}"/> - </sequential> - </macrodef> - <property file="${user.properties.file}"/> - <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness)."> - <condition> - <not> - <contains string="${cluster.path.evaluated}" substring="platform"/> - </not> - </condition> - </fail> - <import file="${harness.dir}/build.xml"/> -</project> diff --git a/CentralRepository/nbproject/project.properties b/CentralRepository/nbproject/project.properties deleted file mode 100644 index efcb9ba609d0e144deea9645c26b7088dd6f60b2..0000000000000000000000000000000000000000 --- a/CentralRepository/nbproject/project.properties +++ /dev/null @@ -1,9 +0,0 @@ -file.reference.commons-dbcp2-2.1.1.jar=release/modules/ext/commons-dbcp2-2.1.1.jar -file.reference.commons-logging-1.2.jar=release/modules/ext/commons-logging-1.2.jar -file.reference.commons-pool2-2.4.2.jar=release/modules/ext/commons-pool2-2.4.2.jar -file.reference.postgresql-42.1.1.jar=release/modules/ext/postgresql-42.1.1.jar -file.reference.sqlite-jdbc-3.16.1.jar=release/modules/ext/sqlite-jdbc-3.16.1.jar -javac.source=1.8 -javac.compilerargs=-Xlint -Xlint:-serial -license.file=../LICENSE-2.0.txt -nbm.homepage=http://www.sleuthkit.org/autopsy/ diff --git a/CentralRepository/nbproject/project.xml b/CentralRepository/nbproject/project.xml deleted file mode 100644 index 1c66ca32ff484902bc129a6035d12137daa1f435..0000000000000000000000000000000000000000 --- a/CentralRepository/nbproject/project.xml +++ /dev/null @@ -1,116 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.apisupport.project</type> - <configuration> - <data xmlns="http://www.netbeans.org/ns/nb-module-project/3"> - <code-name-base>org.sleuthkit.autopsy.centralrepository</code-name-base> - <suite-component/> - <module-dependencies> - <dependency> - <code-name-base>org.netbeans.api.progress</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>1.47.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.options.api</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>1.45.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.awt</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>7.67.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.modules</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>7.48.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.nodes</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>7.45.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.util</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>9.7.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.util.lookup</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>8.33.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.util.ui</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>9.6.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.windows</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>6.75.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.sleuthkit.autopsy.core</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>10</release-version> - <specification-version>10.8</specification-version> - </run-dependency> - </dependency> - </module-dependencies> - <public-packages/> - <class-path-extension> - <runtime-relative-path>ext/sqlite-jdbc-3.16.1.jar</runtime-relative-path> - <binary-origin>release\modules\ext\sqlite-jdbc-3.16.1.jar</binary-origin> - </class-path-extension> - <class-path-extension> - <runtime-relative-path>ext/commons-dbcp2-2.1.1.jar</runtime-relative-path> - <binary-origin>release\modules\ext\commons-dbcp2-2.1.1.jar</binary-origin> - </class-path-extension> - <class-path-extension> - <runtime-relative-path>ext/postgresql-42.1.1.jar</runtime-relative-path> - <binary-origin>release\modules\ext\postgresql-42.1.1.jar</binary-origin> - </class-path-extension> - <class-path-extension> - <runtime-relative-path>ext/commons-pool2-2.4.2.jar</runtime-relative-path> - <binary-origin>release\modules\ext\commons-pool2-2.4.2.jar</binary-origin> - </class-path-extension> - <class-path-extension> - <runtime-relative-path>ext/commons-logging-1.2.jar</runtime-relative-path> - <binary-origin>release\modules\ext\commons-logging-1.2.jar</binary-origin> - </class-path-extension> - </data> - </configuration> -</project> diff --git a/CentralRepository/nbproject/suite.properties b/CentralRepository/nbproject/suite.properties deleted file mode 100644 index 29d7cc9bd6fdd81453543cdf1bcf1dab301e3a92..0000000000000000000000000000000000000000 --- a/CentralRepository/nbproject/suite.properties +++ /dev/null @@ -1 +0,0 @@ -suite.dir=${basedir}/.. diff --git a/Core/ivy.xml b/Core/ivy.xml index d40831b7736fce028d20fed2b8984837ec091b4e..b6cfe4a5682459b700e0e41ebb136350747f49e0 100644 --- a/Core/ivy.xml +++ b/Core/ivy.xml @@ -19,5 +19,7 @@ <dependency conf="core->default" org="com.adobe.xmp" name="xmpcore" rev="5.1.2"/> <dependency conf="core->default" org="org.apache.zookeeper" name="zookeeper" rev="3.4.6"/> + <dependency conf="core->default" org="org.apache.commons" name="commons-dbcp2" rev="2.1.1"/> + <dependency conf="core->default" org="org.apache.commons" name="commons-pool2" rev="2.4.2"/> </dependencies> </ivy-module> diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index eb4739d209bc1c76858bb4596b132513956f4255..0fa567cf007141947e940ec0b34b9e1ba8a56930 100644 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -362,6 +362,14 @@ <runtime-relative-path>ext/curator-framework-2.8.0.jar</runtime-relative-path> <binary-origin>release/modules/ext/curator-framework-2.8.0.jar</binary-origin> </class-path-extension> + <class-path-extension> + <runtime-relative-path>ext/commons-dbcp2-2.1.1.jar</runtime-relative-path> + <binary-origin>release\modules\ext\commons-dbcp2-2.1.1.jar</binary-origin> + </class-path-extension> +<class-path-extension> + <runtime-relative-path>ext/commons-pool2-2.4.2.jar</runtime-relative-path> + <binary-origin>release\modules\ext\commons-pool2-2.4.2.jar</binary-origin> + </class-path-extension> </data> </configuration> </project> diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/Bundle.properties similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/Bundle.properties rename to Core/src/org/sleuthkit/autopsy/centralrepository/Bundle.properties diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/README-POSTGRES-TESTING.md b/Core/src/org/sleuthkit/autopsy/centralrepository/README-POSTGRES-TESTING.md similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/README-POSTGRES-TESTING.md rename to Core/src/org/sleuthkit/autopsy/centralrepository/README-POSTGRES-TESTING.md diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/README_MONGODB_TESTING.md b/Core/src/org/sleuthkit/autopsy/centralrepository/README_MONGODB_TESTING.md similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/README_MONGODB_TESTING.md rename to Core/src/org/sleuthkit/autopsy/centralrepository/README_MONGODB_TESTING.md diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/actions/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/actions/Bundle.properties similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/actions/Bundle.properties rename to Core/src/org/sleuthkit/autopsy/centralrepository/actions/Bundle.properties diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.form similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.form rename to Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.form diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/actions/EamEditCaseInfoAction.java b/Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamEditCaseInfoAction.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/actions/EamEditCaseInfoAction.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamEditCaseInfoAction.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties rename to Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form rename to Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableCellRenderer.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableCellRenderer.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableCellRenderer.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableCellRenderer.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifact.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifact.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifact.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifact.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactInstance.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactInstance.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactInstance.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactInstance.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamCase.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamCase.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamCase.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamCase.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDataSource.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDataSource.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDataSource.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDataSource.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbException.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbException.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbException.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbException.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbPlatformEnum.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbPlatformEnum.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbPlatformEnum.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbPlatformEnum.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbUtil.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbUtil.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDbUtil.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamGlobalFileInstance.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamGlobalFileInstance.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamGlobalFileInstance.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamGlobalFileInstance.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamGlobalSet.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamGlobalSet.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamGlobalSet.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamGlobalSet.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamOrganization.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamOrganization.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamOrganization.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamOrganization.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDb.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDb.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDb.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDbSettings.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDbSettings.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDbSettings.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDbSettings.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDbSettings.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDbSettings.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDbSettings.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDbSettings.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/BadFileTagRunner.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/BadFileTagRunner.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/BadFileTagRunner.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/BadFileTagRunner.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java similarity index 88% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java index a0a78786053b0f70c121ec3092878f5463fbfa70..d2b1beebbb230f17d4844bf1a99c262046882330 100644 --- a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java @@ -35,6 +35,20 @@ public class Installer extends ModuleInstall { private final PropertyChangeListener pcl = new CaseEventListener(); private final IngestEventsListener ieListener = new IngestEventsListener(); + private static Installer instance; + + public synchronized static Installer getDefault() { + if (instance == null) { + instance = new Installer(); + } + return instance; + } + + private Installer() { + super(); + } + + @Override public void restored() { Case.addPropertyChangeListener(pcl); diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/NewArtifactsRunner.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/NewArtifactsRunner.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/NewArtifactsRunner.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/NewArtifactsRunner.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/images/bad.png b/Core/src/org/sleuthkit/autopsy/centralrepository/images/bad.png similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/images/bad.png rename to Core/src/org/sleuthkit/autopsy/centralrepository/images/bad.png diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/images/good.png b/Core/src/org/sleuthkit/autopsy/centralrepository/images/good.png similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/images/good.png rename to Core/src/org/sleuthkit/autopsy/centralrepository/images/good.png diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/images/import16.png b/Core/src/org/sleuthkit/autopsy/centralrepository/images/import16.png similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/images/import16.png rename to Core/src/org/sleuthkit/autopsy/centralrepository/images/import16.png diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/images/options-icon.png b/Core/src/org/sleuthkit/autopsy/centralrepository/images/options-icon.png similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/images/options-icon.png rename to Core/src/org/sleuthkit/autopsy/centralrepository/images/options-icon.png diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModuleFactory.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModuleFactory.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModuleFactory.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModuleFactory.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/license-centralrepository.txt b/Core/src/org/sleuthkit/autopsy/centralrepository/license-centralrepository.txt similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/license-centralrepository.txt rename to Core/src/org/sleuthkit/autopsy/centralrepository/license-centralrepository.txt diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/AddNewOrganizationDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/AddNewOrganizationDialog.form similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/AddNewOrganizationDialog.form rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/AddNewOrganizationDialog.form diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/AddNewOrganizationDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/AddNewOrganizationDialog.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/AddNewOrganizationDialog.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/AddNewOrganizationDialog.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamOptionsPanelController.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamOptionsPanelController.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamOptionsPanelController.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamOptionsPanelController.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.form similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.form rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.form diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.form similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.form rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.form diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form diff --git a/CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java similarity index 100% rename from CentralRepository/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index 748870d7832de6ba8228eb89ac7fb89d442ead44..0b660acd2a3d535fd790ca399692671fed57420e 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -212,6 +212,7 @@ public Installer() { packageInstallers.add(org.sleuthkit.autopsy.corecomponents.Installer.getDefault()); packageInstallers.add(org.sleuthkit.autopsy.datamodel.Installer.getDefault()); packageInstallers.add(org.sleuthkit.autopsy.ingest.Installer.getDefault()); + packageInstallers.add(org.sleuthkit.autopsy.centralrepository.eventlisteners.Installer.getDefault()); } /** diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties b/Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties index a712c1bdb74c41660d045c174a69e0dc851b83ed..964b2df827f4010d4c78f2c5ddc905408e06926e 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties @@ -80,17 +80,6 @@ DataSourcesNode.name=Data Sources DataSourcesNode.createSheet.name.name=Name DataSourcesNode.createSheet.name.displayName=Name DataSourcesNode.createSheet.name.desc=no description -DeletedContent.fsDelFilter.text=File System -DeletedContent.allDelFilter.text=All -DeletedContent.deletedContentsNode.name=Deleted Files -DeletedContent.createSheet.name.name=Name -DeletedContent.createSheet.name.displayName=Name -DeletedContent.createSheet.name.desc=no description -DeletedContent.createSheet.filterType.name=Type -DeletedContent.createSheet.filterType.displayName=Type -DeletedContent.createSheet.filterType.desc=no description -DeletedContent.createKeys.maxObjects.msg=There are more Deleted Files than can be displayed. Only the first {0} Deleted Files will be shown. -DeletedContent.createNodeForKey.typeNotSupported.msg=Not supported for this type of Displayable Item\: {0} DirectoryNode.parFolder.text=[parent folder] DirectoryNode.curFolder.text=[current folder] DirectoryNode.getActions.viewFileInDir.text=View File in Directory diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java index 589dfc4c86d2c52b33383fb1fb4cee10e212c6c2..28921410663022e02c53708a21992b6ddabbf4f8 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java @@ -1,15 +1,20 @@ /* * Autopsy Forensic Browser +<<<<<<< HEAD * * Copyright 2013-2017 Basis Technology Corp. +======= + * + * Copyright 2011-2017 Basis Technology Corp. +>>>>>>> upstream/rc-2.8.3 * Contact: carrier <at> sleuthkit <dot> org - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,6 +44,7 @@ import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.coreutils.Logger; +import static org.sleuthkit.autopsy.datamodel.Bundle.*; import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; @@ -58,14 +64,15 @@ public class DeletedContent implements AutopsyVisitableItem { private SleuthkitCase skCase; + @NbBundle.Messages({"DeletedContent.fsDelFilter.text=File System", + "DeletedContent.allDelFilter.text=All"}) public enum DeletedContentFilter implements AutopsyVisitableItem { - FS_DELETED_FILTER(0, - "FS_DELETED_FILTER", //NON-NLS - NbBundle.getMessage(DeletedContent.class, "DeletedContent.fsDelFilter.text")), - ALL_DELETED_FILTER(1, - "ALL_DELETED_FILTER", //NON-NLS - NbBundle.getMessage(DeletedContent.class, "DeletedContent.allDelFilter.text")); + FS_DELETED_FILTER(0, "FS_DELETED_FILTER", //NON-NLS + Bundle.DeletedContent_fsDelFilter_text()), + ALL_DELETED_FILTER(1, "ALL_DELETED_FILTER", //NON-NLS + Bundle.DeletedContent_allDelFilter_text()); + private int id; private String name; private String displayName; @@ -110,15 +117,13 @@ public SleuthkitCase getSleuthkitCase() { public static class DeletedContentsNode extends DisplayableItemNode { - private static final String NAME = NbBundle.getMessage(DeletedContent.class, - "DeletedContent.deletedContentsNode.name"); - private SleuthkitCase skCase; + @NbBundle.Messages("DeletedContent.deletedContentsNode.name=Deleted Files") + private static final String NAME = Bundle.DeletedContent_deletedContentsNode_name(); DeletedContentsNode(SleuthkitCase skCase) { super(Children.create(new DeletedContentsChildren(skCase), true), Lookups.singleton(NAME)); super.setName(NAME); super.setDisplayName(NAME); - this.skCase = skCase; this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); //NON-NLS } @@ -133,6 +138,9 @@ public <T> T accept(DisplayableItemNodeVisitor<T> v) { } @Override + @NbBundle.Messages({ + "DeletedContent.createSheet.name.displayName=Name", + "DeletedContent.createSheet.name.desc=no description"}) protected Sheet createSheet() { Sheet s = super.createSheet(); Sheet.Set ss = s.get(Sheet.PROPERTIES); @@ -141,9 +149,9 @@ protected Sheet createSheet() { s.put(ss); } - ss.put(new NodeProperty<>(NbBundle.getMessage(this.getClass(), "DeletedContent.createSheet.name.name"), - NbBundle.getMessage(this.getClass(), "DeletedContent.createSheet.name.displayName"), - NbBundle.getMessage(this.getClass(), "DeletedContent.createSheet.name.desc"), + ss.put(new NodeProperty<>("Name", //NON-NLS + Bundle.DeletedContent_createSheet_name_displayName(), + Bundle.DeletedContent_createSheet_name_desc(), NAME)); return s; } @@ -303,6 +311,9 @@ public <T> T accept(DisplayableItemNodeVisitor<T> v) { } @Override + @NbBundle.Messages({ + "DeletedContent.createSheet.filterType.displayName=Type", + "DeletedContent.createSheet.filterType.desc=no description"}) protected Sheet createSheet() { Sheet s = super.createSheet(); Sheet.Set ss = s.get(Sheet.PROPERTIES); @@ -311,10 +322,9 @@ protected Sheet createSheet() { s.put(ss); } - ss.put(new NodeProperty<>( - NbBundle.getMessage(this.getClass(), "DeletedContent.createSheet.filterType.name"), - NbBundle.getMessage(this.getClass(), "DeletedContent.createSheet.filterType.displayName"), - NbBundle.getMessage(this.getClass(), "DeletedContent.createSheet.filterType.desc"), + ss.put(new NodeProperty<>("Type", //NON_NLS + Bundle.DeletedContent_createSheet_filterType_displayName(), + Bundle.DeletedContent_createSheet_filterType_desc(), filter.getDisplayName())); return s; @@ -334,7 +344,7 @@ public String getItemType() { return DisplayableItemNode.FILE_PARENT_NODE_KEY; } } - + static class DeletedContentChildren extends ChildFactory.Detachable<AbstractFile> { private final SleuthkitCase skCase; @@ -375,6 +385,9 @@ protected void removeNotify() { } @Override + @NbBundle.Messages("DeletedContent.createKeys.maxObjects.msg=" + + "There are more Deleted Files than can be displayed." + + " Only the first {0} Deleted Files will be shown.") protected boolean createKeys(List<AbstractFile> list) { List<AbstractFile> queryList = runFsQuery(); if (queryList.size() == MAX_OBJECTS) { @@ -385,9 +398,8 @@ protected boolean createKeys(List<AbstractFile> list) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), NbBundle.getMessage(this.getClass(), - "DeletedContent.createKeys.maxObjects.msg", - MAX_OBJECTS - 1)); + JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), + DeletedContent_createKeys_maxObjects_msg(MAX_OBJECTS - 1)); } }); } @@ -435,7 +447,11 @@ static private String makeQuery(DeletedContent.DeletedContentFilter filter) { } query += " LIMIT " + MAX_OBJECTS; //NON-NLS +<<<<<<< HEAD +======= + +>>>>>>> upstream/rc-2.8.3 return query; } @@ -456,6 +472,9 @@ private List<AbstractFile> runFsQuery() { /** * Get children count without actually loading all nodes * + * @param sleuthkitCase + * @param filter + * * @return */ static long calculateItems(SleuthkitCase sleuthkitCase, DeletedContent.DeletedContentFilter filter) { @@ -468,6 +487,7 @@ static long calculateItems(SleuthkitCase sleuthkitCase, DeletedContent.DeletedCo } @Override + @NbBundle.Messages("DeletedContent.createNodeForKey.typeNotSupported.msg=Not supported for this type of Displayable Item: {0}") protected Node createNodeForKey(AbstractFile key) { return key.accept(new ContentVisitor.Default<AbstractNode>() { public FileNode visit(AbstractFile f) { @@ -495,9 +515,7 @@ public FileNode visit(Directory f) { @Override protected AbstractNode defaultVisit(Content di) { - throw new UnsupportedOperationException(NbBundle.getMessage(this.getClass(), - "DeletedContent.createNodeForKey.typeNotSupported.msg", - di.toString())); + throw new UnsupportedOperationException(Bundle.DeletedContent_createNodeForKey_typeNotSupported_msg(di.toString())); } }); } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java index 6d37ca2a26a479e0e03f34ad7e83c71be0e630c6..ff474230307a8b288d62fd909ebe7573d22e1e63 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2015 Basis Technology Corp. + * Copyright 2015-2017 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -39,7 +39,7 @@ class AutoIngestCase implements Comparable<AutoIngestCase> { private final String caseName; private final Path metadataFilePath; private final Date createDate; - private Date lastModfiedDate; + private final Date lastAccessedDate; /** * Constructs a representation of case created by automated ingest. @@ -58,10 +58,10 @@ class AutoIngestCase implements Comparable<AutoIngestCase> { } if (null != fileAttrs) { createDate = new Date(fileAttrs.creationTime().toMillis()); - lastModfiedDate = new Date(fileAttrs.lastModifiedTime().toMillis()); + lastAccessedDate = new Date(fileAttrs.lastAccessTime().toMillis()); } else { createDate = new Date(); - lastModfiedDate = new Date(); + lastAccessedDate = new Date(); } } @@ -94,19 +94,13 @@ Date getCreationDate() { } /** - * Gets the last accessed date for the case, defined as the last modified + * Gets the last accessed date for the case, defined as the last accessed * time of the case metadata file. * * @return The last accessed date. */ Date getLastAccessedDate() { - try { - BasicFileAttributes fileAttrs = Files.readAttributes(metadataFilePath, BasicFileAttributes.class); - lastModfiedDate = new Date(fileAttrs.lastModifiedTime().toMillis()); - } catch (IOException ex) { - logger.log(Level.SEVERE, String.format("Error reading file attributes of case metadata file in %s, lastModfiedDate time not updated", caseDirectoryPath), ex); - } - return lastModfiedDate; + return this.lastAccessedDate; } /** @@ -162,7 +156,7 @@ public int hashCode() { */ @Override public int compareTo(AutoIngestCase other) { - return -this.lastModfiedDate.compareTo(other.getLastAccessedDate()); + return -this.lastAccessedDate.compareTo(other.getLastAccessedDate()); } /** diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.form index 0c22854c9a257fcdb7260c5e90e2a975616c5b07..cb0f27580926db1724b41c06792d4fdb73ffa683 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.form @@ -27,44 +27,53 @@ <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> <Component id="bnOpen" min="-2" pref="80" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="bnRefresh" min="-2" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> <Component id="bnShowLog" min="-2" max="-2" attributes="0"/> <EmptySpace max="32767" attributes="0"/> - <Component id="panelFilter" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> - </Group> - <Group type="102" attributes="0"> - <Component id="scrollPaneTable" pref="1007" max="32767" attributes="0"/> + <Component id="rbGroupLabel" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> + <Component id="rbDays" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="rbWeeks" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="rbMonths" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> + <Component id="panelFilter" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="bnRefresh" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> </Group> + <Component id="scrollPaneTable" pref="1007" max="32767" attributes="0"/> </Group> + <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <EmptySpace min="-2" pref="43" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> <Component id="scrollPaneTable" min="-2" pref="450" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="32767" attributes="0"/> - <Group type="103" groupAlignment="1" attributes="0"> - <Group type="102" alignment="1" attributes="0"> - <Component id="panelFilter" min="-2" pref="130" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="bnOpen" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="bnShowLog" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <Group type="102" alignment="1" attributes="0"> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="bnOpen" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="bnRefresh" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="bnShowLog" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="bnRefresh" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="103" alignment="1" groupAlignment="3" attributes="0"> + <Component id="rbDays" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="rbWeeks" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="rbMonths" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="rbGroupLabel" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + <Component id="panelFilter" min="-2" max="-2" attributes="0"/> </Group> </Group> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -122,32 +131,16 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="rbGroupLabel" min="-2" max="-2" attributes="0"/> - <Component id="rbAllCases" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="rbMonths" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="rbWeeks" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="rbDays" alignment="0" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace pref="34" max="32767" attributes="0"/> + <Component id="rbAllCases" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="1" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="rbGroupLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> - <Component id="rbDays" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="rbWeeks" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="rbMonths" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> <Component id="rbAllCases" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -167,56 +160,6 @@ <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="rbAllCasesItemStateChanged"/> </Events> </Component> - <Component class="javax.swing.JRadioButton" name="rbMonths"> - <Properties> - <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> - <ComponentRef name="rbGroupHistoryLength"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties" key="AutoIngestCasePanel.rbMonths.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - <Events> - <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="rbMonthsItemStateChanged"/> - </Events> - </Component> - <Component class="javax.swing.JRadioButton" name="rbWeeks"> - <Properties> - <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> - <ComponentRef name="rbGroupHistoryLength"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties" key="AutoIngestCasePanel.rbWeeks.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - <Events> - <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="rbWeeksItemStateChanged"/> - </Events> - </Component> - <Component class="javax.swing.JRadioButton" name="rbDays"> - <Properties> - <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> - <ComponentRef name="rbGroupHistoryLength"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties" key="AutoIngestCasePanel.rbDays.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="name" type="java.lang.String" value="" noResource="true"/> - </Properties> - <Events> - <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="rbDaysItemStateChanged"/> - </Events> - </Component> - <Component class="javax.swing.JLabel" name="rbGroupLabel"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Tahoma" size="12" style="0"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties" key="AutoIngestCasePanel.rbGroupLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - </Component> </SubComponents> </Container> <Component class="javax.swing.JButton" name="bnShowLog"> @@ -233,5 +176,55 @@ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnShowLogActionPerformed"/> </Events> </Component> + <Component class="javax.swing.JRadioButton" name="rbDays"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="rbGroupHistoryLength"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties" key="AutoIngestCasePanel.rbDays.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="name" type="java.lang.String" value="" noResource="true"/> + </Properties> + <Events> + <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="rbDaysItemStateChanged"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="rbWeeks"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="rbGroupHistoryLength"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties" key="AutoIngestCasePanel.rbWeeks.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + <Events> + <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="rbWeeksItemStateChanged"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="rbMonths"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="rbGroupHistoryLength"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties" key="AutoIngestCasePanel.rbMonths.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + <Events> + <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="rbMonthsItemStateChanged"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="rbGroupLabel"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties" key="AutoIngestCasePanel.rbGroupLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> </SubComponents> </Form> diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.java index ea98faea18522168bf006641da32c09d7b007392..9b6b3ddefaad64f4d95a36efe152cfba7950073b 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.java @@ -63,7 +63,7 @@ public final class AutoIngestCasePanel extends JPanel { private static final int STATUS_COL_MAX_WIDTH = 250; private static final int STATUS_COL_PREFERRED_WIDTH = 60; private static final int MILLIS_TO_WAIT_BEFORE_STARTING = 500; - private static final int MILLIS_TO_WAIT_BETWEEN_UPDATES = 30000; + private static final int MILLIS_TO_WAIT_BETWEEN_UPDATES = 300000; private ScheduledThreadPoolExecutor casesTableRefreshExecutor; /* @@ -105,6 +105,14 @@ public AutoIngestCasePanel(JDialog parent) { public boolean isCellEditable(int row, int column) { return false; } + @Override + public Class<?> getColumnClass(int col) { + if (this.getColumnName(col).equals(CREATEDTIME_HEADER) || this.getColumnName(col).equals(COMPLETEDTIME_HEADER)) { + return Date.class; + } else { + return super.getColumnClass(col); + } + } }; initComponents(); @@ -384,11 +392,11 @@ private void initComponents() { bnRefresh = new javax.swing.JButton(); panelFilter = new javax.swing.JPanel(); rbAllCases = new javax.swing.JRadioButton(); - rbMonths = new javax.swing.JRadioButton(); - rbWeeks = new javax.swing.JRadioButton(); + bnShowLog = new javax.swing.JButton(); rbDays = new javax.swing.JRadioButton(); + rbWeeks = new javax.swing.JRadioButton(); + rbMonths = new javax.swing.JRadioButton(); rbGroupLabel = new javax.swing.JLabel(); - bnShowLog = new javax.swing.JButton(); setName("Completed Cases"); // NOI18N @@ -428,62 +436,19 @@ public void itemStateChanged(java.awt.event.ItemEvent evt) { } }); - rbGroupHistoryLength.add(rbMonths); - org.openide.awt.Mnemonics.setLocalizedText(rbMonths, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbMonths.text")); // NOI18N - rbMonths.addItemListener(new java.awt.event.ItemListener() { - public void itemStateChanged(java.awt.event.ItemEvent evt) { - rbMonthsItemStateChanged(evt); - } - }); - - rbGroupHistoryLength.add(rbWeeks); - org.openide.awt.Mnemonics.setLocalizedText(rbWeeks, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbWeeks.text")); // NOI18N - rbWeeks.addItemListener(new java.awt.event.ItemListener() { - public void itemStateChanged(java.awt.event.ItemEvent evt) { - rbWeeksItemStateChanged(evt); - } - }); - - rbGroupHistoryLength.add(rbDays); - org.openide.awt.Mnemonics.setLocalizedText(rbDays, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbDays.text")); // NOI18N - rbDays.setName(""); // NOI18N - rbDays.addItemListener(new java.awt.event.ItemListener() { - public void itemStateChanged(java.awt.event.ItemEvent evt) { - rbDaysItemStateChanged(evt); - } - }); - - rbGroupLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(rbGroupLabel, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbGroupLabel.text")); // NOI18N - javax.swing.GroupLayout panelFilterLayout = new javax.swing.GroupLayout(panelFilter); panelFilter.setLayout(panelFilterLayout); panelFilterLayout.setHorizontalGroup( panelFilterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelFilterLayout.createSequentialGroup() - .addContainerGap() - .addGroup(panelFilterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(rbGroupLabel) - .addComponent(rbAllCases) - .addComponent(rbMonths) - .addComponent(rbWeeks) - .addComponent(rbDays)) - .addContainerGap(34, Short.MAX_VALUE)) + .addComponent(rbAllCases) + .addGap(0, 0, Short.MAX_VALUE)) ); panelFilterLayout.setVerticalGroup( panelFilterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelFilterLayout.createSequentialGroup() - .addContainerGap() - .addComponent(rbGroupLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(rbDays) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(rbWeeks) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(rbMonths) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(rbAllCases) - .addContainerGap()) + .addGap(0, 0, 0) + .addComponent(rbAllCases)) ); org.openide.awt.Mnemonics.setLocalizedText(bnShowLog, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.bnShowLog.text")); // NOI18N @@ -495,6 +460,34 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + rbGroupHistoryLength.add(rbDays); + org.openide.awt.Mnemonics.setLocalizedText(rbDays, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbDays.text")); // NOI18N + rbDays.setName(""); // NOI18N + rbDays.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + rbDaysItemStateChanged(evt); + } + }); + + rbGroupHistoryLength.add(rbWeeks); + org.openide.awt.Mnemonics.setLocalizedText(rbWeeks, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbWeeks.text")); // NOI18N + rbWeeks.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + rbWeeksItemStateChanged(evt); + } + }); + + rbGroupHistoryLength.add(rbMonths); + org.openide.awt.Mnemonics.setLocalizedText(rbMonths, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbMonths.text")); // NOI18N + rbMonths.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + rbMonthsItemStateChanged(evt); + } + }); + + rbGroupLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(rbGroupLabel, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbGroupLabel.text")); // NOI18N + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -503,35 +496,45 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(13, 13, 13) + .addGap(4, 4, 4) .addComponent(bnOpen, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(bnRefresh) - .addGap(18, 18, 18) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(bnShowLog) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(rbGroupLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(rbDays) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(rbWeeks) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(rbMonths) + .addGap(0, 0, 0) .addComponent(panelFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(20, 20, 20)) - .addGroup(layout.createSequentialGroup() - .addComponent(scrollPaneTable, javax.swing.GroupLayout.DEFAULT_SIZE, 1007, Short.MAX_VALUE) - .addContainerGap()))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(bnRefresh) + .addGap(4, 4, 4)) + .addComponent(scrollPaneTable, javax.swing.GroupLayout.DEFAULT_SIZE, 1007, Short.MAX_VALUE)) + .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(43, 43, 43) + .addGap(6, 6, 6) .addComponent(scrollPaneTable, javax.swing.GroupLayout.PREFERRED_SIZE, 450, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(layout.createSequentialGroup() - .addComponent(panelFilter, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - .addGroup(layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bnOpen) + .addComponent(bnShowLog)) + .addComponent(bnRefresh) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bnOpen) - .addComponent(bnRefresh) - .addComponent(bnShowLog)) - .addGap(36, 36, 36)))) + .addComponent(rbDays) + .addComponent(rbWeeks) + .addComponent(rbMonths) + .addComponent(rbGroupLabel)) + .addComponent(panelFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(0, 0, 0)) ); }// </editor-fold>//GEN-END:initComponents diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties index cddf2ed8609923e0c853573628215ba8bde41c1f..a659557b1759c0bcbf731fc09afe8c01770eb62d 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties @@ -297,4 +297,4 @@ AutoIngestCasePanel.bnRefresh.text=&Refresh AutoIngestCasePanel.bnOpen.text=&Open AutoIngestCasePanel.bnShowLog.toolTipText=Display case log file for selected case AutoIngestCasePanel.bnShowLog.text=&Show Log -AutoIngestCasePanel.rbGroupLabel.text=Show Last 10: +AutoIngestCasePanel.rbGroupLabel.text=Show cases accessed in the last 10: diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java index 983433256714560a863adf3720c140a4f1fec68e..45205b0ca725f548849e3a565656307c17c2f712 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java @@ -206,8 +206,8 @@ public QueryResults performQuery() throws NoOpenCoreException { for (KeywordHit hit : keywordHits) { hitsMultiMap.put(new Keyword(hit.getHit(), true, true, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), hit); } - } catch (TskException ex) { - // + } catch (TskCoreException ex) { + LOGGER.log(Level.SEVERE, "Error creating keyword hits", ex); //NON-NLS } } @@ -228,7 +228,7 @@ public QueryResults performQuery() throws NoOpenCoreException { return results; } - private List<KeywordHit> createKeywordHits(SolrDocument solrDoc) throws TskException { + private List<KeywordHit> createKeywordHits(SolrDocument solrDoc) throws TskCoreException { List<KeywordHit> hits = new ArrayList<>(); final String docId = solrDoc.getFieldValue(Server.Schema.ID.toString()).toString(); @@ -237,83 +237,93 @@ private List<KeywordHit> createKeywordHits(SolrDocument solrDoc) throws TskExcep final Collection<Object> content_str = solrDoc.getFieldValues(Server.Schema.CONTENT_STR.toString()); final Pattern pattern = Pattern.compile(keywordString); - for (Object content_obj : content_str) { - String content = (String) content_obj; - Matcher hitMatcher = pattern.matcher(content); - int offset = 0; - - while (hitMatcher.find(offset)) { - StringBuilder snippet = new StringBuilder(); - - // If the location of the hit is beyond this chunk (i.e. it - // exists in the overlap region), we skip the hit. It will - // show up again as a hit in the chunk following this one. - if (chunkSize != null && hitMatcher.start() >= chunkSize) { - break; - } + try { + for (Object content_obj : content_str) { + String content = (String) content_obj; + Matcher hitMatcher = pattern.matcher(content); + int offset = 0; + + while (hitMatcher.find(offset)) { + StringBuilder snippet = new StringBuilder(); + + // If the location of the hit is beyond this chunk (i.e. it + // exists in the overlap region), we skip the hit. It will + // show up again as a hit in the chunk following this one. + if (chunkSize != null && hitMatcher.start() >= chunkSize) { + break; + } - String hit = hitMatcher.group(); - - offset = hitMatcher.end(); - - // We attempt to reduce false positives for phone numbers and IP address hits - // by querying Solr for hits delimited by a set of known boundary characters. - // See KeywordSearchList.PHONE_NUMBER_REGEX for an example. - // Because of this the hits may contain an extra character at the beginning or end that - // needs to be chopped off, unless the user has supplied their own wildcard suffix - // as part of the regex. - if (!queryStringContainsWildcardSuffix - && (originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER - || originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IP_ADDRESS)) { - if (originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER) { - // For phone numbers replace all non numeric characters (except "(") at the start of the hit. - hit = hit.replaceAll("^[^0-9\\(]", ""); - } else { - // Replace all non numeric characters at the start of the hit. - hit = hit.replaceAll("^[^0-9]", ""); + String hit = hitMatcher.group(); + + offset = hitMatcher.end(); + + // We attempt to reduce false positives for phone numbers and IP address hits + // by querying Solr for hits delimited by a set of known boundary characters. + // See KeywordSearchList.PHONE_NUMBER_REGEX for an example. + // Because of this the hits may contain an extra character at the beginning or end that + // needs to be chopped off, unless the user has supplied their own wildcard suffix + // as part of the regex. + if (!queryStringContainsWildcardSuffix + && (originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER + || originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IP_ADDRESS)) { + if (originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER) { + // For phone numbers replace all non numeric characters (except "(") at the start of the hit. + hit = hit.replaceAll("^[^0-9\\(]", ""); + } else { + // Replace all non numeric characters at the start of the hit. + hit = hit.replaceAll("^[^0-9]", ""); + } + // Replace all non numeric at the end of the hit. + hit = hit.replaceAll("[^0-9]$", ""); } - // Replace all non numeric at the end of the hit. - hit = hit.replaceAll("[^0-9]$", ""); - } - if (originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL) { - // Reduce false positives by eliminating email address hits that are either - // too short or are not for valid top level domains. - if (hit.length() < MIN_EMAIL_ADDR_LENGTH - || !DomainValidator.getInstance(true).isValidTld(hit.substring(hit.lastIndexOf('.')))) { - continue; + if (originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL) { + // Reduce false positives by eliminating email address hits that are either + // too short or are not for valid top level domains. + if (hit.length() < MIN_EMAIL_ADDR_LENGTH + || !DomainValidator.getInstance(true).isValidTld(hit.substring(hit.lastIndexOf('.')))) { + continue; + } } - } - /* + /* * If searching for credit card account numbers, do a Luhn check * on the term and discard it if it does not pass. - */ - if (originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_CARD_NUMBER) { - Matcher ccnMatcher = CREDIT_CARD_NUM_PATTERN.matcher(hit); - if (ccnMatcher.find()) { - final String ccn = CharMatcher.anyOf(" -").removeFrom(ccnMatcher.group("ccn")); - if (false == TermsComponentQuery.CREDIT_CARD_NUM_LUHN_CHECK.isValid(ccn)) { + */ + if (originalKeyword.getArtifactAttributeType() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_CARD_NUMBER) { + Matcher ccnMatcher = CREDIT_CARD_NUM_PATTERN.matcher(hit); + if (ccnMatcher.find()) { + final String ccn = CharMatcher.anyOf(" -").removeFrom(ccnMatcher.group("ccn")); + if (false == TermsComponentQuery.CREDIT_CARD_NUM_LUHN_CHECK.isValid(ccn)) { + continue; + } + } else { continue; } - } else { - continue; } - } - /** - * Get the snippet from the document if keyword search is - * configured to use snippets. - */ - int maxIndex = content.length() - 1; - snippet.append(content.substring(Integer.max(0, hitMatcher.start() - 20), Integer.max(0, hitMatcher.start()))); - snippet.appendCodePoint(171); - snippet.append(hit); - snippet.appendCodePoint(171); - snippet.append(content.substring(Integer.min(maxIndex, hitMatcher.end()), Integer.min(maxIndex, hitMatcher.end() + 20))); - - hits.add(new KeywordHit(docId, snippet.toString(), hit)); + /** + * Get the snippet from the document if keyword search is + * configured to use snippets. + */ + int maxIndex = content.length() - 1; + snippet.append(content.substring(Integer.max(0, hitMatcher.start() - 20), Integer.max(0, hitMatcher.start()))); + snippet.appendCodePoint(171); + snippet.append(hit); + snippet.appendCodePoint(171); + snippet.append(content.substring(Integer.min(maxIndex, hitMatcher.end()), Integer.min(maxIndex, hitMatcher.end() + 20))); + + hits.add(new KeywordHit(docId, snippet.toString(), hit)); + } } + } catch (TskCoreException ex) { + throw ex; + } catch (Throwable error) { + /* NOTE: Matcher.find() is known to throw StackOverflowError in rare cases (see JIRA-2700). + StackOverflowError is an error, not an exception, and therefore needs to be caught + as a Throwable. When this occurs we should re-throw the error as TskCoreException so that it is + logged by the calling method and move on to the next Solr document. */ + throw new TskCoreException("Failed to create keyword hits for Solr document id " + docId + " due to " + error.getMessage()); } return hits; } diff --git a/nbproject/project.properties b/nbproject/project.properties index 03d618afe67b9cb72bc2b772e0c9b5dd8338ffd1..8df7ff47a0eaaef8387722ecfa784a43575068bb 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -10,7 +10,6 @@ app.version=4.4.1 build.type=DEVELOPMENT project.org.netbeans.progress=org-netbeans-api-progress -project.org.sleuthkit.autopsy.centralrepository=CentralRepository project.org.sleuthkit.autopsy.experimental=Experimental project.org.sleuthkit.autopsy.imagegallery=ImageGallery update_versions=false @@ -32,8 +31,7 @@ modules=\ ${project.org.sleuthkit.autopsy.core}:\ ${project.org.sleuthkit.autopsy.corelibs}:\ ${project.org.sleuthkit.autopsy.imagegallery}:\ - ${project.org.sleuthkit.autopsy.experimental}:\ - ${project.org.sleuthkit.autopsy.centralrepository} + ${project.org.sleuthkit.autopsy.experimental} project.org.sleuthkit.autopsy.core=Core project.org.sleuthkit.autopsy.corelibs=CoreLibs project.org.sleuthkit.autopsy.keywordsearch=KeywordSearch