Skip to content
Snippets Groups Projects
Commit 7e2ac8e1 authored by millmanorama's avatar millmanorama
Browse files

remove unused methods and dependency on solr 4.9.1

parent 1b46a77f
No related branches found
No related tags found
No related merge requests found
...@@ -4,19 +4,25 @@ ...@@ -4,19 +4,25 @@
*/nbproject/private/* */nbproject/private/*
/nbproject/private/* /nbproject/private/*
/Core/release/
/Core/src/org/sleuthkit/autopsy/coreutils/Version.properties /Core/src/org/sleuthkit/autopsy/coreutils/Version.properties
/Core/src/org/sleuthkit/autopsy/casemodule/docs/QuickStart.html
/Core/src/org/sleuthkit/autopsy/casemodule/docs/screenshot.png
/Core/src/org/sleuthkit/autopsy/datamodel/ranges.csv
/Core/build/ /Core/build/
/Core/dist/ /Core/dist/
/Core/nbproject/* /Core/nbproject/*
!/Core/nbproject/project.xml !/Core/nbproject/project.xml
!/Core/nbproject/project.properties !/Core/nbproject/project.properties
/CoreLibs/release/
/CoreLibs/build/ /CoreLibs/build/
/CoreLibs/dist/ /CoreLibs/dist/
/CoreLibs/nbproject/* /CoreLibs/nbproject/*
!/CoreLibs/nbproject/project.xml !/CoreLibs/nbproject/project.xml
!/CoreLibs/nbproject/project.properties !/CoreLibs/nbproject/project.properties
/KeywordSearch/release/
/KeywordSearch/build/ /KeywordSearch/build/
/KeywordSearch/dist/ /KeywordSearch/dist/
/KeywordSearch/nbproject/* /KeywordSearch/nbproject/*
...@@ -25,6 +31,7 @@ ...@@ -25,6 +31,7 @@
*/genfiles.properties */genfiles.properties
genfiles.properties genfiles.properties
/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties /branding/core/core.jar/org/netbeans/core/startup/Bundle.properties
/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties /branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties
/branding/build/ /branding/build/
...@@ -32,6 +39,7 @@ genfiles.properties ...@@ -32,6 +39,7 @@ genfiles.properties
/branding/nbproject/* /branding/nbproject/*
!/branding/nbproject/project.xml !/branding/nbproject/project.xml
!/branding/nbproject/project.properties !/branding/nbproject/project.properties
/test/input/* /test/input/*
!/test/input/notablehashes.txt-md5.idx !/test/input/notablehashes.txt-md5.idx
!/test/input/notablekeywords.xml !/test/input/notablekeywords.xml
...@@ -46,6 +54,8 @@ genfiles.properties ...@@ -46,6 +54,8 @@ genfiles.properties
/test/script/DBDump.txt /test/script/DBDump.txt
/test/script/SortedData-Diff.txt /test/script/SortedData-Diff.txt
/test/script/SortedData.txt /test/script/SortedData.txt
/test/script/myconfig.xml
/test/script/*/*.xml
/test/build/ /test/build/
/test/dist/ /test/dist/
/test/nbproject/* /test/nbproject/*
...@@ -59,19 +69,10 @@ genfiles.properties ...@@ -59,19 +69,10 @@ genfiles.properties
/jdiff-logs/* /jdiff-logs/*
/gen_version.txt /gen_version.txt
hs_err_pid*.log hs_err_pid*.log
Core/src/org/sleuthkit/autopsy/casemodule/docs/QuickStart.html
Core/src/org/sleuthkit/autopsy/casemodule/docs/screenshot.png
Core/src/org/sleuthkit/autopsy/datamodel/ranges.csv
/test/script/myconfig.xml
/test/script/*/*.xml
.DS_Store .DS_Store
.*.swp .*.swp
/Experimental/release/
/ImageGallery/release/
/thunderbirdparser/release/
Core/release/
CoreLibs/release/
Experimental/release/
ImageGallery/release/
KeywordSearch/release/
thunderbirdparser/release/
...@@ -6,17 +6,19 @@ ...@@ -6,17 +6,19 @@
<description>Builds, tests, and runs the project org.sleuthkit.autopsy.experimental.</description> <description>Builds, tests, and runs the project org.sleuthkit.autopsy.experimental.</description>
<import file="nbproject/build-impl.xml"/> <import file="nbproject/build-impl.xml"/>
<import file="../BootstrapIvy.xml"/> <import file="../BootstrapIvy.xml"/>
<target name="init" depends="basic-init,files-init,build-init,-javac-init,init-ivy">
<target name="get-deps" depends="init-ivy">
<ivy:settings file="ivysettings.xml" /> <ivy:settings file="ivysettings.xml" />
<ivy:resolve/> <ivy:resolve/>
<ivy:retrieve sync="false" pattern="${basedir}/release/modules/ext/[artifact]-[revision](-[classifier]).[ext]" /> <ivy:retrieve conf="experimental" pattern="${basedir}/release/modules/ext/[artifact]-[revision](-[classifier]).[ext]" />
</target> </target>
<target name="init" depends="get-deps, harness.init" />
<target name="clean" depends="projectized-common.clean"> <target name="clean" depends="projectized-common.clean">
<!--Override clean to delete jars, etc downloaded with Ivy <!--Override clean to delete jars, etc downloaded with Ivy
or copied in from thirdparty folder. This way we don't end up with or copied in from thirdparty folder. This way we don't end up with
out-of-date/unneeded stuff in the installer--> out-of-date/unneeded stuff in the installer-->
<mkdir dir="${basedir}/release"/>
<delete dir="${basedir}/release"/> <delete dir="${basedir}/release"/>
</target> </target>
</project> </project>
...@@ -7,16 +7,10 @@ ...@@ -7,16 +7,10 @@
</configurations> </configurations>
<dependencies> <dependencies>
<dependency conf="experimental->default" org="com.github.lgooddatepicker" name="LGoodDatePicker" rev="4.3.1"/> <dependency conf="experimental->default" org="com.github.lgooddatepicker" name="LGoodDatePicker" rev="4.3.1"/>
<dependency conf="experimental->default" org="org.apache.solr" name="solr-solrj" rev="4.9.1"/>
<dependency conf="experimental->default" org="org.apache.tika" name="tika-core" rev="1.5"/> <dependency conf="experimental->default" org="org.apache.tika" name="tika-core" rev="1.5"/>
<dependency conf="experimental->default" org="org.postgresql" name="postgresql" rev="9.4-1201-jdbc41"/> <dependency conf="experimental->default" org="org.postgresql" name="postgresql" rev="9.4-1201-jdbc41"/>
<dependency conf="experimental->default" org="com.mchange" name="c3p0" rev="0.9.5"/> <dependency conf="experimental->default" org="com.mchange" name="c3p0" rev="0.9.5"/>
<dependency conf="experimental->default" org="com.fasterxml.jackson.core" name="jackson-core" rev="2.7.0"/> <dependency conf="experimental->default" org="com.fasterxml.jackson.core" name="jackson-core" rev="2.7.0"/>
<dependency conf="experimental->default" org="org.swinglabs.swingx" name="swingx-all" rev="1.6.4"/> <dependency conf="experimental->default" org="org.swinglabs.swingx" name="swingx-all" rev="1.6.4"/>
<exclude artifact="commons-io"/>
<exclude artifact="slf4j-api"/>
<exclude artifact="wstx-asl"/>
<exclude artifact="zookeeper"/>
</dependencies> </dependencies>
</ivy-module> </ivy-module>
...@@ -2,11 +2,9 @@ file.reference.c3p0-0.9.5.jar=release/modules/ext/c3p0-0.9.5.jar ...@@ -2,11 +2,9 @@ file.reference.c3p0-0.9.5.jar=release/modules/ext/c3p0-0.9.5.jar
file.reference.jackson-core-2.7.0.jar=release/modules/ext/jackson-core-2.7.0.jar file.reference.jackson-core-2.7.0.jar=release/modules/ext/jackson-core-2.7.0.jar
file.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1.jar file.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1.jar
file.reference.mchange-commons-java-0.2.9.jar=release/modules/ext/mchange-commons-java-0.2.9.jar file.reference.mchange-commons-java-0.2.9.jar=release/modules/ext/mchange-commons-java-0.2.9.jar
file.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1.jar file.reference.postgresql-9.4-1201-jdbc41.jar=release/modules/ext/postgresql-9.4-1201-jdbc41.jar
file.reference.tika-core-1.5.jar=release/modules/ext/tika-core-1.5.jar file.reference.tika-core-1.5.jar=release/modules/ext/tika-core-1.5.jar
javac.source=1.8 javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial javac.compilerargs=-Xlint -Xlint:-serial
javadoc.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1-javadoc.jar javadoc.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1-javadoc.jar
javadoc.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1-javadoc.jar
source.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1-sources.jar source.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1-sources.jar
source.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1-sources.jar
...@@ -119,6 +119,10 @@ ...@@ -119,6 +119,10 @@
<package>org.sleuthkit.autopsy.experimental.autoingest</package> <package>org.sleuthkit.autopsy.experimental.autoingest</package>
<package>org.sleuthkit.autopsy.experimental.configuration</package> <package>org.sleuthkit.autopsy.experimental.configuration</package>
</public-packages> </public-packages>
<class-path-extension>
<runtime-relative-path>ext/postgresql-9.4-1201-jdbc41.jar</runtime-relative-path>
<binary-origin>release/modules/ext/postgresql-9.4-1201-jdbc41.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/mchange-commons-java-0.2.9.jar</runtime-relative-path> <runtime-relative-path>ext/mchange-commons-java-0.2.9.jar</runtime-relative-path>
<binary-origin>release/modules/ext/mchange-commons-java-0.2.9.jar</binary-origin> <binary-origin>release/modules/ext/mchange-commons-java-0.2.9.jar</binary-origin>
...@@ -139,30 +143,6 @@ ...@@ -139,30 +143,6 @@
<runtime-relative-path>ext/c3p0-0.9.5.jar</runtime-relative-path> <runtime-relative-path>ext/c3p0-0.9.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/c3p0-0.9.5.jar</binary-origin> <binary-origin>release/modules/ext/c3p0-0.9.5.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/solr-solrj-4.9.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/solr-solrj-4.9.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/httpclient-4.3.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/httpclient-4.3.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/httpmime-4.3.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/httpmime-4.3.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/httpcore-4.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/httpcore-4.3.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/noggit-0.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/noggit-0.5.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/postgresql-9.4-1201-jdbc41.jar</runtime-relative-path>
<binary-origin>release/modules/ext/postgresql-9.4-1201-jdbc41.jar</binary-origin>
</class-path-extension>
</data> </data>
</configuration> </configuration>
</project> </project>
...@@ -32,10 +32,7 @@ ...@@ -32,10 +32,7 @@
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.BasicFileAttributes;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -64,7 +61,6 @@ ...@@ -64,7 +61,6 @@
import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.GuardedBy;
import javax.annotation.concurrent.Immutable; import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.ThreadSafe; import javax.annotation.concurrent.ThreadSafe;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.openide.util.Lookup; import org.openide.util.Lookup;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.Case.CaseType; import org.sleuthkit.autopsy.casemodule.Case.CaseType;
...@@ -77,7 +73,6 @@ ...@@ -77,7 +73,6 @@
import org.sleuthkit.autopsy.core.RuntimeProperties; import org.sleuthkit.autopsy.core.RuntimeProperties;
import org.sleuthkit.autopsy.core.ServicesMonitor; import org.sleuthkit.autopsy.core.ServicesMonitor;
import org.sleuthkit.autopsy.core.ServicesMonitor.ServicesMonitorException; import org.sleuthkit.autopsy.core.ServicesMonitor.ServicesMonitorException;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.core.UserPreferencesException; import org.sleuthkit.autopsy.core.UserPreferencesException;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback.DataSourceProcessorResult; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback.DataSourceProcessorResult;
...@@ -106,7 +101,6 @@ ...@@ -106,7 +101,6 @@
import org.sleuthkit.autopsy.ingest.IngestJobStartResult; import org.sleuthkit.autopsy.ingest.IngestJobStartResult;
import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestManager;
import org.sleuthkit.autopsy.ingest.IngestModuleError; import org.sleuthkit.autopsy.ingest.IngestModuleError;
import org.sleuthkit.datamodel.CaseDbConnectionInfo;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
/** /**
...@@ -781,44 +775,7 @@ JobsSnapshot getCurrentJobsSnapshot() { ...@@ -781,44 +775,7 @@ JobsSnapshot getCurrentJobsSnapshot() {
} }
} }
/**
* Tries to unload the Solr core for a case.
*
* @param caseName The case name.
* @param coreName The name of the core to unload.
*
* @throws Exception if there is a problem unloading the core or it has
* already been unloaded (e.g., by the server due to
* resource constraints), or there is a problem deleting
* files associated with the core
*/
private void unloadSolrCore(String coreName) throws Exception {
/*
* Send a core unload request to the Solr server, with the parameters
* that request deleting the index and the instance directory
* (deleteInstanceDir removes everything related to the core, the index
* directory, the configuration files, etc.) set to true.
*/
String url = "http://" + UserPreferences.getIndexingServerHost() + ":" + UserPreferences.getIndexingServerPort() + "/solr";
HttpSolrServer solrServer = new HttpSolrServer(url);
org.apache.solr.client.solrj.request.CoreAdminRequest.unloadCore(coreName, true, true, solrServer);
}
/**
* Tries to delete the case database for a case.
*
* @param caseFolderPath The case name.
* @param caseDatbaseName The case database name.
*/
private void deleteCaseDatabase(String caseDatbaseName) throws UserPreferencesException, ClassNotFoundException, SQLException {
CaseDbConnectionInfo db = UserPreferences.getDatabaseConnectionInfo();
Class.forName("org.postgresql.Driver"); //NON-NLS
try (Connection connection = DriverManager.getConnection("jdbc:postgresql://" + db.getHost() + ":" + db.getPort() + "/postgres", db.getUserName(), db.getPassword()); //NON-NLS
Statement statement = connection.createStatement();) {
String deleteCommand = "DROP DATABASE \"" + caseDatbaseName + "\""; //NON-NLS
statement.execute(deleteCommand);
}
}
/** /**
* Removes a set of auto ingest jobs from a collection of jobs. * Removes a set of auto ingest jobs from a collection of jobs.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment