mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #6512 from esaunders/java11-upgrade
Merging latest develop into Java 11 upgrade branch
This commit is contained in:
commit
dd1f52a95e
@ -123,8 +123,8 @@
|
||||
tofile="${ext.dir}/sleuthkit-${TSK_VERSION}.jar"/>
|
||||
<copy file="${env.TSK_HOME}/bindings/java/lib/sqlite-jdbc-3.25.2.jar"
|
||||
tofile="${ext.dir}/sqlite-jdbc-3.25.2.jar"/>
|
||||
<copy file="${env.TSK_HOME}/bindings/java/lib/postgresql-9.4.1211.jre7.jar"
|
||||
tofile="${ext.dir}/postgresql-9.4.1211.jre7.jar"/>
|
||||
<copy file="${env.TSK_HOME}/bindings/java/lib/postgresql-42.2.18.jar"
|
||||
tofile="${ext.dir}/postgresql-42.2.18.jar"/>
|
||||
<copy file="${env.TSK_HOME}/bindings/java/lib/mchange-commons-java-0.2.9.jar"
|
||||
tofile="${ext.dir}/mchange-commons-java-0.2.9.jar"/>
|
||||
<copy file="${env.TSK_HOME}/bindings/java/lib/c3p0-0.9.5.jar"
|
||||
|
@ -102,7 +102,7 @@ file.reference.opencensus-api-0.19.2.jar=release\\modules\\ext\\opencensus-api-0
|
||||
file.reference.opencensus-contrib-grpc-metrics-0.19.2.jar=release\\modules\\ext\\opencensus-contrib-grpc-metrics-0.19.2.jar
|
||||
file.reference.opencensus-contrib-http-util-0.19.2.jar=release\\modules\\ext\\opencensus-contrib-http-util-0.19.2.jar
|
||||
file.reference.opennlp-tools-1.9.1.jar=release\\modules\\ext\\opennlp-tools-1.9.1.jar
|
||||
file.reference.postgresql-9.4.1211.jre7.jar=release\\modules\\ext\\postgresql-9.4.1211.jre7.jar
|
||||
file.reference.postgresql-42.2.18.jar=release\\modules\\ext\\postgresql-42.2.18.jar
|
||||
file.reference.proto-google-cloud-translate-v3beta1-0.53.0.jar=release\\modules\\ext\\proto-google-cloud-translate-v3beta1-0.53.0.jar
|
||||
file.reference.proto-google-common-protos-1.15.0.jar=release\\modules\\ext\\proto-google-common-protos-1.15.0.jar
|
||||
file.reference.proto-google-iam-v1-0.12.0.jar=release\\modules\\ext\\proto-google-iam-v1-0.12.0.jar
|
||||
@ -121,7 +121,7 @@ file.reference.StixLib.jar=release\\modules\\ext\\StixLib.jar
|
||||
file.reference.threetenbp-1.3.3.jar=release\\modules\\ext\\threetenbp-1.3.3.jar
|
||||
file.reference.webp-imageio-sejda-0.1.0.jar=release\\modules\\ext\\webp-imageio-sejda-0.1.0.jar
|
||||
file.reference.xmpcore-5.1.3.jar=release\\modules\\ext\\xmpcore-5.1.3.jar
|
||||
file.reference.YaraJNIWrapper.jar=release\\modules\\ext\\YaraJNIWrapper.jar
|
||||
file.reference.YaraJNIWrapper.jar=release/modules/ext/YaraJNIWrapper.jar
|
||||
file.reference.zookeeper-3.4.6.jar=release\\modules\\ext\\zookeeper-3.4.6.jar
|
||||
javac.source=11
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
||||
|
@ -436,6 +436,10 @@
|
||||
<runtime-relative-path>ext/commons-codec-1.11.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-codec-1.11.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/postgresql-42.2.18.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\postgresql-42.2.18.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>
|
||||
@ -736,10 +740,6 @@
|
||||
<runtime-relative-path>ext/jai_imageio-1.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jai_imageio-1.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/postgresql-9.4.1211.jre7.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\postgresql-9.4.1211.jre7.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/junit-3.8.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\junit-3.8.1.jar</binary-origin>
|
||||
|
@ -253,3 +253,7 @@ UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel
|
||||
UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to:
|
||||
UnpackagePortableCaseDialog.caseLabel.text=Portable Case:
|
||||
NewCaseVisualPanel1.caseDataStoredLabel.text_1=Case data will be stored in the following directory:
|
||||
SolrNotConfiguredDialog.okButton.text=OK
|
||||
SolrNotConfiguredDialog.title=Solr 8 Server Not Configured
|
||||
SolrNotConfiguredDialog.EmptyKeywordSearchHostName=Solr 8 connection parameters are not configured. Please go to Tools->Options->Multi User.
|
||||
SolrNotConfiguredDialog.messageLabel.text=<html>Multi-User cases are enabled but Solr 8 server has not been configured.<br>\nNew cases can only be created with Solr 8. Please go to Tools->Options->Multi User.\n</html>
|
||||
|
@ -471,3 +471,7 @@ UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel
|
||||
UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to:
|
||||
UnpackagePortableCaseDialog.caseLabel.text=Portable Case:
|
||||
NewCaseVisualPanel1.caseDataStoredLabel.text_1=Case data will be stored in the following directory:
|
||||
SolrNotConfiguredDialog.okButton.text=OK
|
||||
SolrNotConfiguredDialog.title=Solr 8 Server Not Configured
|
||||
SolrNotConfiguredDialog.EmptyKeywordSearchHostName=Solr 8 connection parameters are not configured. Please go to Tools->Options->Multi User.
|
||||
SolrNotConfiguredDialog.messageLabel.text=<html>Multi-User cases are enabled but Solr 8 server has not been configured.<br>\nNew cases can only be created with Solr 8. Please go to Tools->Options->Multi User.\n</html>
|
||||
|
78
Core/src/org/sleuthkit/autopsy/casemodule/SolrNotConfiguredDialog.form
Executable file
78
Core/src/org/sleuthkit/autopsy/casemodule/SolrNotConfiguredDialog.form
Executable file
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/core/Bundle.properties" key="SolrNotConfiguredDialog.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="modal" type="boolean" value="true"/>
|
||||
<Property name="name" type="java.lang.String" value="toolsNotFound" noResource="true"/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="0" pref="15" max="32767" attributes="0"/>
|
||||
<Component id="messageLabel" min="-2" pref="420" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="189" max="-2" attributes="0"/>
|
||||
<Component id="okButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="193" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="messageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="okButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="okButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="SolrNotConfiguredDialog.okButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="okButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="messageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="SolrNotConfiguredDialog.messageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
110
Core/src/org/sleuthkit/autopsy/casemodule/SolrNotConfiguredDialog.java
Executable file
110
Core/src/org/sleuthkit/autopsy/casemodule/SolrNotConfiguredDialog.java
Executable file
@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2020 Basis Technology Corp.
|
||||
* 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.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
import javax.swing.JFrame;
|
||||
import org.openide.util.ImageUtilities;
|
||||
import org.openide.windows.WindowManager;
|
||||
|
||||
/**
|
||||
* A dialog to notify the user on startup when Solr 8 server is not configured.
|
||||
*/
|
||||
class SolrNotConfiguredDialog extends javax.swing.JDialog {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Creates new form SolrNotConfiguredDialog
|
||||
*/
|
||||
SolrNotConfiguredDialog() {
|
||||
super((JFrame) WindowManager.getDefault().getMainWindow(), true);
|
||||
// Center the startup window.
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
int width = getSize().width;
|
||||
int height = getSize().height;
|
||||
setLocation((screenDimension.width - width) / 2, (screenDimension.height - height) / 2);
|
||||
initComponents();
|
||||
setIconImage(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/warning16.png", false));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
okButton = new javax.swing.JButton();
|
||||
messageLabel = new javax.swing.JLabel();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setTitle(org.openide.util.NbBundle.getMessage(SolrNotConfiguredDialog.class, "SolrNotConfiguredDialog.title")); // NOI18N
|
||||
setModal(true);
|
||||
setName("toolsNotFound"); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(okButton, org.openide.util.NbBundle.getMessage(SolrNotConfiguredDialog.class, "SolrNotConfiguredDialog.okButton.text")); // NOI18N
|
||||
okButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
okButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(messageLabel, org.openide.util.NbBundle.getMessage(SolrNotConfiguredDialog.class, "SolrNotConfiguredDialog.messageLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(0, 15, Short.MAX_VALUE)
|
||||
.addComponent(messageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 420, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(189, 189, 189)
|
||||
.addComponent(okButton)
|
||||
.addGap(0, 193, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(messageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(okButton)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
|
||||
this.dispose();
|
||||
}//GEN-LAST:event_okButtonActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel messageLabel;
|
||||
private javax.swing.JButton okButton;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
@ -23,11 +23,15 @@ import java.util.Iterator;
|
||||
import java.util.logging.Level;
|
||||
import org.netbeans.spi.sendopts.OptionProcessor;
|
||||
import org.openide.util.Lookup;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.commandlineingest.CommandLineIngestManager;
|
||||
import org.sleuthkit.autopsy.commandlineingest.CommandLineOpenCaseManager;
|
||||
import org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor;
|
||||
import org.sleuthkit.autopsy.commandlineingest.CommandLineStartupWindow;
|
||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
|
||||
/**
|
||||
* Provides the start up window to rest of the application. It may return the
|
||||
@ -76,6 +80,10 @@ public class StartupWindowProvider implements StartupWindowInterface {
|
||||
}
|
||||
}
|
||||
|
||||
if (RuntimeProperties.runningWithGUI()) {
|
||||
checkSolr();
|
||||
}
|
||||
|
||||
//discover the registered windows
|
||||
Collection<? extends StartupWindowInterface> startupWindows
|
||||
= Lookup.getDefault().lookupAll(StartupWindowInterface.class);
|
||||
@ -115,6 +123,21 @@ public class StartupWindowProvider implements StartupWindowInterface {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkSolr() {
|
||||
|
||||
// if Multi-User settings are enabled and Solr8 server is not configured,
|
||||
// display an error message and a dialog
|
||||
if (UserPreferences.getIsMultiUserModeEnabled() && UserPreferences.getIndexingServerHost().isEmpty()) {
|
||||
// Solr 8 host name is not configured. This could be the first time user
|
||||
// runs Autopsy with Solr 8. Display a message.
|
||||
MessageNotifyUtil.Notify.error(NbBundle.getMessage(CueBannerPanel.class, "SolrNotConfiguredDialog.title"),
|
||||
NbBundle.getMessage(SolrNotConfiguredDialog.class, "SolrNotConfiguredDialog.EmptyKeywordSearchHostName"));
|
||||
|
||||
SolrNotConfiguredDialog dialog = new SolrNotConfiguredDialog();
|
||||
dialog.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether Autopsy is running from command line. There is an
|
||||
* OptionProcessor that is responsible for processing command line inputs.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019-2019 Basis Technology Corp.
|
||||
* Copyright 2020 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -198,11 +198,11 @@ final class PostgresCentralRepo extends RdbmsCentralRepo {
|
||||
if (connectionPool == null) {
|
||||
setupConnectionPool();
|
||||
}
|
||||
}
|
||||
try {
|
||||
return connectionPool.getConnection();
|
||||
} catch (SQLException ex) {
|
||||
throw new CentralRepoException("Error getting connection from connection pool.", Bundle.PostgresEamDb_connectionFailed_message(), ex); // NON-NLS
|
||||
try {
|
||||
return connectionPool.getConnection();
|
||||
} catch (SQLException ex) {
|
||||
throw new CentralRepoException("Error getting connection from connection pool.", Bundle.PostgresEamDb_connectionFailed_message(), ex); // NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ final class CentralRepoIngestModule implements FileIngestModule {
|
||||
|
||||
private static final String MODULE_NAME = CentralRepoIngestModuleFactory.getModuleName();
|
||||
|
||||
static final boolean DEFAULT_FLAG_TAGGED_NOTABLE_ITEMS = true;
|
||||
static final boolean DEFAULT_FLAG_TAGGED_NOTABLE_ITEMS = false;
|
||||
static final boolean DEFAULT_FLAG_PREVIOUS_DEVICES = false;
|
||||
static final boolean DEFAULT_CREATE_CR_PROPERTIES = true;
|
||||
|
||||
|
@ -18,40 +18,14 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.commandlineingest;
|
||||
|
||||
import org.openide.util.NbPreferences;
|
||||
|
||||
/**
|
||||
* Provides convenient access to a UserPreferences node for user preferences
|
||||
* with default values.
|
||||
*/
|
||||
public final class UserPreferences {
|
||||
|
||||
private static final java.util.prefs.Preferences preferences = NbPreferences.forModule(UserPreferences.class);
|
||||
private static final String COMMAND_LINE_MODE_RESULTS_FOLDER = "CommandLineModeResultsFolder"; // NON-NLS
|
||||
private static final String COMMAND_LINE_MODE_CONTEXT_STRING = "CommandLineModeContext"; // NON-NLS
|
||||
|
||||
// Prevent instantiation.
|
||||
private UserPreferences() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get results folder for command line mode from persistent storage.
|
||||
*
|
||||
* @return String Selected output folder.
|
||||
*/
|
||||
public static String getCommandLineModeResultsFolder() {
|
||||
return preferences.get(COMMAND_LINE_MODE_RESULTS_FOLDER, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Set results folder for command line mode from persistent storage.
|
||||
*
|
||||
* @param folder Selected output folder.
|
||||
*/
|
||||
public static void setCommandLineModeResultsFolder(String folder) {
|
||||
preferences.put(COMMAND_LINE_MODE_RESULTS_FOLDER, folder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get context string for command line mode ingest module settings.
|
||||
*
|
||||
|
@ -1,20 +1,3 @@
|
||||
# Copyright 2020 Basis Technology Corp.
|
||||
#
|
||||
# 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. See the License for the specific language
|
||||
# governing permissions and limitations under the License.
|
||||
#
|
||||
|
||||
DefaultArtifactContentViewer.copyMenuItem.text=Copy
|
||||
DefaultArtifactContentViewer.selectAllMenuItem.text=Select All
|
||||
MessageArtifactViewer.ccLabel.text=CC:
|
||||
MessageArtifactViewer.rtfbodyScrollPane.TabConstraints.tabTitle=RTF
|
||||
MessageArtifactViewer.toText.text=to list goes here
|
||||
@ -32,3 +15,19 @@ MessageArtifactViewer.subjectLabel.text=Subject:
|
||||
MessageArtifactViewer.attachmentsPanel.TabConstraints.tabTitle=Attachments
|
||||
MessageArtifactViewer.ccText.text=cc list goes here
|
||||
MessageArtifactViewer.textbodyScrollPane.TabConstraints.tabTitle=Text
|
||||
DefaultTableArtifactContentViewer.selectAllMenuItem.text=Select All
|
||||
# Copyright 2020 Basis Technology Corp.
|
||||
|
||||
# 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. See the License for the specific language
|
||||
# governing permissions and limitations under the License.
|
||||
|
||||
DefaultTableArtifactContentViewer.copyMenuItem.text=Copy
|
||||
|
@ -1,18 +1,3 @@
|
||||
# Copyright 2020 Basis Technology Corp.
|
||||
#
|
||||
# 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. See the License for the specific language
|
||||
# governing permissions and limitations under the License.
|
||||
#
|
||||
|
||||
CalllogArtifactViewer_cr_disabled_message=Enable Central Repository to view, create and edit personas.
|
||||
CallLogArtifactViewer_heading_metadata=Metadata
|
||||
CallLogArtifactViewer_heading_others=Other Attributes
|
||||
@ -56,11 +41,15 @@ ContactArtifactViewer_persona_unknown=Unknown
|
||||
ContactArtifactViewer_phones_header=Phone
|
||||
DataContentViewerArtifact.failedToGetAttributes.message=Failed to get some or all attributes from case database
|
||||
DataContentViewerArtifact.failedToGetSourcePath.message=Failed to get source file path from case database
|
||||
DefaultArtifactContentViewer.attrsTableHeader.sources=Source(s)
|
||||
DefaultArtifactContentViewer.attrsTableHeader.type=Type
|
||||
DefaultArtifactContentViewer.attrsTableHeader.value=Value
|
||||
DefaultArtifactContentViewer.copyMenuItem.text=Copy
|
||||
DefaultArtifactContentViewer.selectAllMenuItem.text=Select All
|
||||
DefaultTableArtifactContentViewer.attrsTableHeader.sources=Source(s)
|
||||
DefaultTableArtifactContentViewer.attrsTableHeader.type=Type
|
||||
DefaultTableArtifactContentViewer.attrsTableHeader.value=Value
|
||||
GeneralPurposeArtifactViewer.details.attrHeader=Attributes
|
||||
GeneralPurposeArtifactViewer.details.dataSource=Data Source
|
||||
GeneralPurposeArtifactViewer.details.file=File
|
||||
GeneralPurposeArtifactViewer.details.sourceHeader=Source
|
||||
GeneralPurposeArtifactViewer.unknown.text=Unknown
|
||||
GeneralPurposeArtifactViewer_menuitem_copy=Copy
|
||||
MessageAccountPanel.account.justification=Account found in Message artifact
|
||||
MessageAccountPanel_button_create_label=Create
|
||||
MessageAccountPanel_button_view_label=View
|
||||
@ -87,6 +76,22 @@ MessageArtifactViewer.subjectLabel.text=Subject:
|
||||
MessageArtifactViewer.attachmentsPanel.TabConstraints.tabTitle=Attachments
|
||||
MessageArtifactViewer.ccText.text=cc list goes here
|
||||
MessageArtifactViewer.textbodyScrollPane.TabConstraints.tabTitle=Text
|
||||
DefaultTableArtifactContentViewer.selectAllMenuItem.text=Select All
|
||||
# Copyright 2020 Basis Technology Corp.
|
||||
|
||||
# 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. See the License for the specific language
|
||||
# governing permissions and limitations under the License.
|
||||
|
||||
DefaultTableArtifactContentViewer.copyMenuItem.text=Copy
|
||||
PersonaAccountFetcher.account.justification=Account found in Call Log artifact
|
||||
# {0} - Persona count
|
||||
PersonaDisplayTask_persona_count_suffix=(1 of {0})
|
||||
|
@ -41,8 +41,6 @@ DataContentViewerArtifact.failedToGetSourcePath.message=\u30b1\u30fc\u30b9\u30fb
|
||||
DefaultArtifactContentViewer.attrsTableHeader.sources=\u30bd\u30fc\u30b9
|
||||
DefaultArtifactContentViewer.attrsTableHeader.type=\u30bf\u30a4\u30d7
|
||||
DefaultArtifactContentViewer.attrsTableHeader.value=\u5024
|
||||
DefaultArtifactContentViewer.copyMenuItem.text=\u30b3\u30d4\u30fc
|
||||
DefaultArtifactContentViewer.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e
|
||||
MessageAccountPanel_button_create_label=\u4f5c\u6210
|
||||
MessageAccountPanel_button_view_label=\u8868\u793a
|
||||
MessageAccountPanel_no_matches=\u4e00\u81f4\u3059\u308b\u3082\u306e\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
|
||||
@ -67,3 +65,5 @@ MessageArtifactViewer.toLabel.text=\u5b9b\u5148\uff1a
|
||||
MessageArtifactViewer.toText.text=\u3053\u3053\u306b\u5b9b\u5148\u30ea\u30b9\u30c8\u3092\u8a18\u5165
|
||||
MessageArtifactViewer.viewInNewWindowButton.text=\u65b0\u3057\u3044\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u8868\u793a
|
||||
PersonaDisplayTask_persona_count_suffix=\uff081/{0}\uff09
|
||||
DefaultTableArtifactContentViewer.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e
|
||||
DefaultTableArtifactContentViewer.copyMenuItem.text=\u30b3\u30d4\u30fc
|
||||
|
@ -44,7 +44,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
|
||||
* A class to help display a communication artifact in a panel using a
|
||||
* gridbaglayout.
|
||||
*/
|
||||
public final class CommunicationArtifactViewerHelper {
|
||||
final class CommunicationArtifactViewerHelper {
|
||||
|
||||
// Number of columns in the gridbag layout.
|
||||
private final static int MAX_COLS = 4;
|
||||
@ -68,7 +68,7 @@ public final class CommunicationArtifactViewerHelper {
|
||||
*
|
||||
* @return JLabel Heading label added.
|
||||
*/
|
||||
public static JLabel addHeader(JPanel panel, GridBagLayout gridbagLayout, GridBagConstraints constraints, String headerString) {
|
||||
static JLabel addHeader(JPanel panel, GridBagLayout gridbagLayout, GridBagConstraints constraints, String headerString) {
|
||||
|
||||
Insets savedInsets = constraints.insets;
|
||||
|
||||
@ -121,7 +121,7 @@ public final class CommunicationArtifactViewerHelper {
|
||||
* @param valueString Value string to display.
|
||||
*
|
||||
*/
|
||||
public static void addNameValueRow(JPanel panel, GridBagLayout gridbagLayout, GridBagConstraints constraints, String keyString, String valueString) {
|
||||
static void addNameValueRow(JPanel panel, GridBagLayout gridbagLayout, GridBagConstraints constraints, String keyString, String valueString) {
|
||||
addKey(panel, gridbagLayout, constraints, keyString);
|
||||
addValue(panel, gridbagLayout, constraints, valueString);
|
||||
}
|
||||
@ -178,7 +178,7 @@ public final class CommunicationArtifactViewerHelper {
|
||||
* @param gridbagLayout Layout to use.
|
||||
* @param constraints Constraints to use.
|
||||
*/
|
||||
public static void addPageEndGlue(JPanel panel, GridBagLayout gridbagLayout, GridBagConstraints constraints) {
|
||||
static void addPageEndGlue(JPanel panel, GridBagLayout gridbagLayout, GridBagConstraints constraints) {
|
||||
|
||||
constraints.gridx = 0;
|
||||
|
||||
|
@ -11,14 +11,14 @@
|
||||
<MenuItem class="javax.swing.JMenuItem" name="copyMenuItem">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/contentviewers/artifactviewers/Bundle.properties" key="DefaultArtifactContentViewer.copyMenuItem.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/contentviewers/artifactviewers/Bundle.properties" key="DefaultTableArtifactContentViewer.copyMenuItem.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</MenuItem>
|
||||
<MenuItem class="javax.swing.JMenuItem" name="selectAllMenuItem">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/contentviewers/artifactviewers/Bundle.properties" key="DefaultArtifactContentViewer.selectAllMenuItem.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/contentviewers/artifactviewers/Bundle.properties" key="DefaultTableArtifactContentViewer.selectAllMenuItem.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</MenuItem>
|
||||
@ -27,7 +27,7 @@
|
||||
</NonVisualComponents>
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 58]"/>
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
@ -59,8 +59,11 @@
|
||||
<Properties>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="32"/>
|
||||
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[620, 34]"/>
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
@ -61,29 +61,29 @@ import org.sleuthkit.autopsy.discovery.ui.AbstractArtifactDetailsPanel;
|
||||
* This class displays a Blackboard artifact as a table of its attributes.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
public class DefaultArtifactContentViewer extends AbstractArtifactDetailsPanel implements ArtifactContentViewer {
|
||||
public class DefaultTableArtifactContentViewer extends AbstractArtifactDetailsPanel implements ArtifactContentViewer {
|
||||
|
||||
@NbBundle.Messages({
|
||||
"DefaultArtifactContentViewer.attrsTableHeader.type=Type",
|
||||
"DefaultArtifactContentViewer.attrsTableHeader.value=Value",
|
||||
"DefaultArtifactContentViewer.attrsTableHeader.sources=Source(s)",
|
||||
"DefaultTableArtifactContentViewer.attrsTableHeader.type=Type",
|
||||
"DefaultTableArtifactContentViewer.attrsTableHeader.value=Value",
|
||||
"DefaultTableArtifactContentViewer.attrsTableHeader.sources=Source(s)",
|
||||
"DataContentViewerArtifact.failedToGetSourcePath.message=Failed to get source file path from case database",
|
||||
"DataContentViewerArtifact.failedToGetAttributes.message=Failed to get some or all attributes from case database"
|
||||
})
|
||||
|
||||
private final static Logger logger = Logger.getLogger(DefaultArtifactContentViewer.class.getName());
|
||||
private final static Logger logger = Logger.getLogger(DefaultTableArtifactContentViewer.class.getName());
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final String[] COLUMN_HEADERS = {
|
||||
Bundle.DefaultArtifactContentViewer_attrsTableHeader_type(),
|
||||
Bundle.DefaultArtifactContentViewer_attrsTableHeader_value(),
|
||||
Bundle.DefaultArtifactContentViewer_attrsTableHeader_sources()};
|
||||
Bundle.DefaultTableArtifactContentViewer_attrsTableHeader_type(),
|
||||
Bundle.DefaultTableArtifactContentViewer_attrsTableHeader_value(),
|
||||
Bundle.DefaultTableArtifactContentViewer_attrsTableHeader_sources()};
|
||||
private static final int[] COLUMN_WIDTHS = {100, 800, 100};
|
||||
private static final int CELL_BOTTOM_MARGIN = 5;
|
||||
private static final int CELL_RIGHT_MARGIN = 1;
|
||||
|
||||
public DefaultArtifactContentViewer() {
|
||||
public DefaultTableArtifactContentViewer() {
|
||||
initResultsTable();
|
||||
initComponents();
|
||||
resultsTableScrollPane.setViewportView(resultsTable);
|
||||
@ -201,17 +201,18 @@ public class DefaultArtifactContentViewer extends AbstractArtifactDetailsPanel i
|
||||
selectAllMenuItem = new javax.swing.JMenuItem();
|
||||
resultsTableScrollPane = new javax.swing.JScrollPane();
|
||||
|
||||
copyMenuItem.setText(org.openide.util.NbBundle.getMessage(DefaultArtifactContentViewer.class, "DefaultArtifactContentViewer.copyMenuItem.text")); // NOI18N
|
||||
copyMenuItem.setText(org.openide.util.NbBundle.getMessage(DefaultTableArtifactContentViewer.class, "DefaultTableArtifactContentViewer.copyMenuItem.text")); // NOI18N
|
||||
rightClickMenu.add(copyMenuItem);
|
||||
|
||||
selectAllMenuItem.setText(org.openide.util.NbBundle.getMessage(DefaultArtifactContentViewer.class, "DefaultArtifactContentViewer.selectAllMenuItem.text")); // NOI18N
|
||||
selectAllMenuItem.setText(org.openide.util.NbBundle.getMessage(DefaultTableArtifactContentViewer.class, "DefaultTableArtifactContentViewer.selectAllMenuItem.text")); // NOI18N
|
||||
rightClickMenu.add(selectAllMenuItem);
|
||||
|
||||
setPreferredSize(new java.awt.Dimension(100, 58));
|
||||
setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
|
||||
resultsTableScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
|
||||
resultsTableScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
||||
resultsTableScrollPane.setPreferredSize(new java.awt.Dimension(620, 34));
|
||||
resultsTableScrollPane.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
resultsTableScrollPane.setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.4" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
@ -0,0 +1,383 @@
|
||||
/*
|
||||
* Autopsy
|
||||
*
|
||||
* Copyright 2020 Basis Technology Corp.
|
||||
* 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.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.contentviewers.artifactviewers;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.datatransfer.StringSelection;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||
import org.sleuthkit.autopsy.discovery.ui.AbstractArtifactDetailsPanel;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
* Panel to display the details for an Artifact.
|
||||
*/
|
||||
@ServiceProvider(service = ArtifactContentViewer.class)
|
||||
public class GeneralPurposeArtifactViewer extends AbstractArtifactDetailsPanel implements ArtifactContentViewer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger logger = Logger.getLogger(GeneralPurposeArtifactViewer.class.getName());
|
||||
// Number of columns in the gridbag layout.
|
||||
private final static int MAX_COLS = 4;
|
||||
private final static Insets ROW_INSETS = new java.awt.Insets(0, 12, 0, 0);
|
||||
private final static Insets HEADER_INSETS = new java.awt.Insets(0, 0, 0, 0);
|
||||
private final static double GLUE_WEIGHT_X = 1.0;
|
||||
private final static double TEXT_WEIGHT_X = 0.0;
|
||||
private final static int LABEL_COLUMN = 0;
|
||||
private final static int VALUE_COLUMN = 1;
|
||||
private final static int VALUE_WIDTH = 2;
|
||||
private final static int LABEL_WIDTH = 1;
|
||||
private static final Integer[] DEFAULT_ORDERING = new Integer[]{BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID(),
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID(),
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_START.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_END.getTypeID(),
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_VALUE.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT.getTypeID(),
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID(),
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_HEADERS.getTypeID()};
|
||||
private final GridBagLayout gridBagLayout = new GridBagLayout();
|
||||
private final GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||||
private final Map<Integer, Integer[]> orderingMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Creates new form GeneralPurposeArtifactViewer.
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
public GeneralPurposeArtifactViewer() {
|
||||
orderingMap.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID(), DEFAULT_ORDERING);
|
||||
orderingMap.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_CACHE.getTypeID(), DEFAULT_ORDERING);
|
||||
orderingMap.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID(), DEFAULT_ORDERING);
|
||||
orderingMap.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY.getTypeID(), DEFAULT_ORDERING);
|
||||
orderingMap.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID(), DEFAULT_ORDERING);
|
||||
orderingMap.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID(), DEFAULT_ORDERING);
|
||||
initComponents();
|
||||
}
|
||||
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
@NbBundle.Messages({"GeneralPurposeArtifactViewer.unknown.text=Unknown"})
|
||||
@Override
|
||||
public void setArtifact(BlackboardArtifact artifact) {
|
||||
resetComponent();
|
||||
if (artifact != null) {
|
||||
String dataSourceName = Bundle.GeneralPurposeArtifactViewer_unknown_text();
|
||||
String sourceFileName = Bundle.GeneralPurposeArtifactViewer_unknown_text();
|
||||
Map<Integer, List<BlackboardAttribute>> attributeMap = new HashMap<>();
|
||||
try {
|
||||
// Get all the attributes and group them by the attributeType
|
||||
for (BlackboardAttribute bba : artifact.getAttributes()) {
|
||||
List<BlackboardAttribute> attrList = attributeMap.get(bba.getAttributeType().getTypeID());
|
||||
if (attrList == null) {
|
||||
attrList = new ArrayList<>();
|
||||
}
|
||||
attrList.add(bba);
|
||||
attributeMap.put(bba.getAttributeType().getTypeID(), attrList);
|
||||
}
|
||||
dataSourceName = artifact.getDataSource().getName();
|
||||
sourceFileName = artifact.getParent().getName();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Unable to get attributes for artifact " + artifact.getArtifactID(), ex);
|
||||
}
|
||||
updateView(artifact.getArtifactTypeID(), attributeMap, dataSourceName, sourceFileName);
|
||||
}
|
||||
this.setLayout(this.gridBagLayout);
|
||||
this.revalidate();
|
||||
this.repaint();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the panel so that it is empty.
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
private void resetComponent() {
|
||||
// clear the panel
|
||||
this.removeAll();
|
||||
gridBagConstraints.anchor = GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.gridx = LABEL_COLUMN;
|
||||
gridBagConstraints.weighty = 0.0;
|
||||
gridBagConstraints.weightx = TEXT_WEIGHT_X; // keep components fixed horizontally.
|
||||
gridBagConstraints.fill = GridBagConstraints.NONE;
|
||||
gridBagConstraints.insets = ROW_INSETS;
|
||||
}
|
||||
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
// Slap a vertical scrollbar on the panel.
|
||||
return new JScrollPane(this, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
}
|
||||
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
@Override
|
||||
public boolean isSupported(BlackboardArtifact artifact) {
|
||||
return (artifact != null)
|
||||
&& (artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID()
|
||||
|| artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY.getTypeID()
|
||||
|| artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()
|
||||
|| artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID());
|
||||
}
|
||||
|
||||
@NbBundle.Messages({"GeneralPurposeArtifactViewer.details.attrHeader=Attributes",
|
||||
"GeneralPurposeArtifactViewer.details.sourceHeader=Source",
|
||||
"GeneralPurposeArtifactViewer.details.dataSource=Data Source",
|
||||
"GeneralPurposeArtifactViewer.details.file=File"})
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 400, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 300, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
/**
|
||||
* Update the view to reflect the current artifact's details.
|
||||
*
|
||||
* @param artifactTypeId The BlackboardArtifact type id for the artifact
|
||||
* being displayed.
|
||||
* @param attributeMap The map of attributes that exist for the artifact.
|
||||
* @param dataSourceName The name of the datasource that caused the creation
|
||||
* of the artifact.
|
||||
* @param sourceFileName The name of the file that caused the creation of
|
||||
* the artifact.
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
private void updateView(Integer artifactTypeId, Map<Integer, List<BlackboardAttribute>> attributeMap, String dataSourceName, String sourceFileName) {
|
||||
if (!(artifactTypeId < 1 || artifactTypeId >= Integer.MAX_VALUE)) {
|
||||
addHeader(Bundle.GeneralPurposeArtifactViewer_details_attrHeader());
|
||||
Integer[] orderingArray = orderingMap.get(artifactTypeId);
|
||||
if (orderingArray == null) {
|
||||
orderingArray = DEFAULT_ORDERING;
|
||||
}
|
||||
for (Integer attrId : orderingArray) {
|
||||
List<BlackboardAttribute> attrList = attributeMap.remove(attrId);
|
||||
if (attrList != null) {
|
||||
for (BlackboardAttribute bba : attrList) {
|
||||
addNameValueRow(bba.getAttributeType().getDisplayName(), bba.getDisplayString());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int key : attributeMap.keySet()) {
|
||||
for (BlackboardAttribute bba : attributeMap.get(key)) {
|
||||
addNameValueRow(bba.getAttributeType().getDisplayName(), bba.getDisplayString());
|
||||
}
|
||||
}
|
||||
addHeader(Bundle.GeneralPurposeArtifactViewer_details_sourceHeader());
|
||||
addNameValueRow(Bundle.GeneralPurposeArtifactViewer_details_dataSource(), dataSourceName);
|
||||
addNameValueRow(Bundle.GeneralPurposeArtifactViewer_details_file(), sourceFileName);
|
||||
// add veritcal glue at the end
|
||||
addPageEndGlue();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new heading to the panel.
|
||||
*
|
||||
* @param headerString Heading string to display.
|
||||
*
|
||||
* @return JLabel Heading label added.
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
private JLabel addHeader(String headerString) {
|
||||
// create label for heading
|
||||
javax.swing.JLabel headingLabel = new javax.swing.JLabel();
|
||||
// add a blank line before the start of new section, unless it's
|
||||
// the first section
|
||||
if (gridBagConstraints.gridy != 0) {
|
||||
gridBagConstraints.gridy++;
|
||||
add(new javax.swing.JLabel(" "), gridBagConstraints);
|
||||
addLineEndGlue();
|
||||
}
|
||||
gridBagConstraints.gridy++;
|
||||
gridBagConstraints.gridx = LABEL_COLUMN;;
|
||||
// let the header span all of the row
|
||||
gridBagConstraints.gridwidth = MAX_COLS;
|
||||
gridBagConstraints.insets = HEADER_INSETS;
|
||||
// set text
|
||||
headingLabel.setText(headerString);
|
||||
// make it large and bold
|
||||
headingLabel.setFont(headingLabel.getFont().deriveFont(Font.BOLD, headingLabel.getFont().getSize() + 2));
|
||||
// add to panel
|
||||
add(headingLabel, gridBagConstraints);
|
||||
// reset constraints to normal
|
||||
gridBagConstraints.gridwidth = LABEL_WIDTH;
|
||||
// add line end glue
|
||||
addLineEndGlue();
|
||||
gridBagConstraints.insets = ROW_INSETS;
|
||||
return headingLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a key value row to the specified panel with the specified layout and
|
||||
* constraints.
|
||||
*
|
||||
* @param keyString Key name to display.
|
||||
* @param valueString Value string to display.
|
||||
*/
|
||||
private void addNameValueRow(String keyString, String valueString) {
|
||||
addKeyAtCol(keyString);
|
||||
addValueAtCol(valueString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a filler/glue at the end of the line to keep the other columns
|
||||
* aligned, in case the panel is resized.
|
||||
*/
|
||||
private void addLineEndGlue() {
|
||||
// Place the filler just past the last column.
|
||||
gridBagConstraints.gridx = MAX_COLS;
|
||||
gridBagConstraints.weightx = GLUE_WEIGHT_X; // take up all the horizontal space
|
||||
gridBagConstraints.fill = GridBagConstraints.BOTH;
|
||||
javax.swing.Box.Filler horizontalFiller = new javax.swing.Box.Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(32767, 0));
|
||||
add(horizontalFiller, gridBagConstraints);
|
||||
// restore fill & weight
|
||||
gridBagConstraints.fill = GridBagConstraints.NONE;
|
||||
gridBagConstraints.weightx = TEXT_WEIGHT_X;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a filler/glue at the bottom of the panel to keep the data rows
|
||||
* aligned, in case the panel is resized.
|
||||
*/
|
||||
private void addPageEndGlue() {
|
||||
gridBagConstraints.weighty = 1.0; // take up all the vertical space
|
||||
gridBagConstraints.fill = GridBagConstraints.VERTICAL;
|
||||
javax.swing.Box.Filler vertFiller = new javax.swing.Box.Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(0, 32767));
|
||||
add(vertFiller, gridBagConstraints);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a label/key to the panel.
|
||||
*
|
||||
* @param keyString Key name to display.
|
||||
*
|
||||
* @return Label added.
|
||||
*/
|
||||
private JLabel addKeyAtCol(String keyString) {
|
||||
// create label
|
||||
javax.swing.JLabel keyLabel = new javax.swing.JLabel();
|
||||
gridBagConstraints.gridy++;
|
||||
gridBagConstraints.gridx = LABEL_COLUMN;
|
||||
gridBagConstraints.gridwidth = LABEL_WIDTH;
|
||||
// set text
|
||||
keyLabel.setText(keyString + ": ");
|
||||
// add to panel
|
||||
add(keyLabel, gridBagConstraints);
|
||||
return keyLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a value string to the panel at specified column.
|
||||
*
|
||||
* @param valueString Value string to display.
|
||||
*
|
||||
* @return Label added.
|
||||
*/
|
||||
private JTextPane addValueAtCol(String valueString) {
|
||||
// create label,
|
||||
JTextPane valueField = new JTextPane();
|
||||
valueField.setEditable(false);
|
||||
valueField.setOpaque(false);
|
||||
gridBagConstraints.gridx = VALUE_COLUMN;
|
||||
GridBagConstraints cloneConstraints = (GridBagConstraints) gridBagConstraints.clone();
|
||||
// let the value span 2 cols
|
||||
cloneConstraints.gridwidth = VALUE_WIDTH;
|
||||
cloneConstraints.fill = GridBagConstraints.BOTH;
|
||||
// set text
|
||||
valueField.setText(valueString);
|
||||
// attach a right click menu with Copy option
|
||||
valueField.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
valueLabelMouseClicked(evt, valueField);
|
||||
}
|
||||
});
|
||||
// add label to panel
|
||||
add(valueField, cloneConstraints);
|
||||
// end the line
|
||||
addLineEndGlue();
|
||||
return valueField;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event handler for mouse click event. Attaches a 'Copy' menu item to right
|
||||
* click.
|
||||
*
|
||||
* @param evt Event to check.
|
||||
* @param valueLabel Label to attach the menu item to.
|
||||
*/
|
||||
@NbBundle.Messages({
|
||||
"GeneralPurposeArtifactViewer_menuitem_copy=Copy"
|
||||
})
|
||||
private void valueLabelMouseClicked(java.awt.event.MouseEvent evt, JTextPane valueLabel) {
|
||||
if (SwingUtilities.isRightMouseButton(evt)) {
|
||||
JPopupMenu popup = new JPopupMenu();
|
||||
JMenuItem copyMenu = new JMenuItem(Bundle.CommunicationArtifactViewerHelper_menuitem_copy()); // NON-NLS
|
||||
copyMenu.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(valueLabel.getText()), null);
|
||||
}
|
||||
});
|
||||
popup.add(copyMenu);
|
||||
popup.show(valueLabel, evt.getX(), evt.getY());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
@ -36,10 +36,9 @@ import org.apache.curator.retry.ExponentialBackoffRetry;
|
||||
import org.apache.zookeeper.CreateMode;
|
||||
import org.apache.zookeeper.KeeperException;
|
||||
import org.apache.zookeeper.KeeperException.NoNodeException;
|
||||
import org.apache.zookeeper.WatchedEvent;
|
||||
import org.apache.zookeeper.ZooDefs;
|
||||
import org.apache.zookeeper.ZooKeeper;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.coordinationservice.utils.CoordinationServiceUtils;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
|
||||
/**
|
||||
@ -52,8 +51,6 @@ public final class CoordinationService {
|
||||
|
||||
private static final int SESSION_TIMEOUT_MILLISECONDS = 300000;
|
||||
private static final int CONNECTION_TIMEOUT_MILLISECONDS = 300000;
|
||||
private static final int ZOOKEEPER_SESSION_TIMEOUT_MILLIS = 3000;
|
||||
private static final int ZOOKEEPER_CONNECTION_TIMEOUT_MILLIS = 15000;
|
||||
private static final int PORT_OFFSET = 1000; // When run in Solr, ZooKeeper defaults to Solr port + 1000
|
||||
private static final String DEFAULT_NAMESPACE_ROOT = "autopsy";
|
||||
@GuardedBy("CoordinationService.class")
|
||||
@ -62,37 +59,6 @@ public final class CoordinationService {
|
||||
@GuardedBy("categoryNodeToPath")
|
||||
private final Map<String, String> categoryNodeToPath;
|
||||
|
||||
/**
|
||||
* Determines if ZooKeeper is accessible with the current settings. Closes
|
||||
* the connection prior to returning.
|
||||
*
|
||||
* @return true if a connection was achieved, false otherwise
|
||||
*
|
||||
* @throws InterruptedException
|
||||
* @throws IOException
|
||||
*/
|
||||
private static boolean isZooKeeperAccessible() throws InterruptedException, IOException {
|
||||
boolean result = false;
|
||||
Object workerThreadWaitNotifyLock = new Object();
|
||||
int zooKeeperServerPort = Integer.valueOf(UserPreferences.getIndexingServerPort()) + PORT_OFFSET;
|
||||
String connectString = UserPreferences.getIndexingServerHost() + ":" + zooKeeperServerPort;
|
||||
ZooKeeper zooKeeper = new ZooKeeper(connectString, ZOOKEEPER_SESSION_TIMEOUT_MILLIS,
|
||||
(WatchedEvent event) -> {
|
||||
synchronized (workerThreadWaitNotifyLock) {
|
||||
workerThreadWaitNotifyLock.notify();
|
||||
}
|
||||
});
|
||||
synchronized (workerThreadWaitNotifyLock) {
|
||||
workerThreadWaitNotifyLock.wait(ZOOKEEPER_CONNECTION_TIMEOUT_MILLIS);
|
||||
}
|
||||
ZooKeeper.States state = zooKeeper.getState();
|
||||
if (state == ZooKeeper.States.CONNECTED || state == ZooKeeper.States.CONNECTEDREADONLY) {
|
||||
result = true;
|
||||
}
|
||||
zooKeeper.close();
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the coordination service for maintaining configuration information
|
||||
* and providing distributed synchronization using a shared hierarchical
|
||||
@ -141,16 +107,26 @@ public final class CoordinationService {
|
||||
*/
|
||||
private CoordinationService(String rootNodeName) throws InterruptedException, IOException, KeeperException, CoordinationServiceException {
|
||||
|
||||
if (false == isZooKeeperAccessible()) {
|
||||
// read ZK connection info
|
||||
String hostName = UserPreferences.getZkServerHost();
|
||||
String port = UserPreferences.getZkServerPort();
|
||||
if (hostName.isEmpty() || port.isEmpty()) {
|
||||
// use defaults for embedded ZK that runs on Solr server
|
||||
hostName = UserPreferences.getIndexingServerHost();
|
||||
int portInt = Integer.valueOf(UserPreferences.getIndexingServerPort()) + PORT_OFFSET;
|
||||
port = Integer.toString(portInt);
|
||||
}
|
||||
if (false == CoordinationServiceUtils.isZooKeeperAccessible(hostName, port)) {
|
||||
throw new CoordinationServiceException("Unable to access ZooKeeper");
|
||||
}
|
||||
|
||||
|
||||
// We are using ZK for all coordination/locking, so ZK connection info cannot be changed.
|
||||
// A reboot is required in order to use a different ZK server for coordination services.
|
||||
/*
|
||||
* Connect to ZooKeeper via Curator.
|
||||
*/
|
||||
RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
|
||||
int zooKeeperServerPort = Integer.valueOf(UserPreferences.getIndexingServerPort()) + PORT_OFFSET;
|
||||
String connectString = UserPreferences.getIndexingServerHost() + ":" + zooKeeperServerPort;
|
||||
String connectString = hostName + ":" + port;
|
||||
curator = CuratorFrameworkFactory.newClient(connectString, SESSION_TIMEOUT_MILLISECONDS, CONNECTION_TIMEOUT_MILLISECONDS, retryPolicy);
|
||||
curator.start();
|
||||
|
||||
|
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* 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.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.coordinationservice.utils;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.zookeeper.WatchedEvent;
|
||||
import org.apache.zookeeper.ZooKeeper;
|
||||
|
||||
/**
|
||||
* A utility class for coordination service and ZooKeeper. This class is in a
|
||||
* separate package to avoid exposing it as public API.
|
||||
*/
|
||||
public final class CoordinationServiceUtils {
|
||||
|
||||
private static final int ZOOKEEPER_SESSION_TIMEOUT_MILLIS = 3000;
|
||||
private static final int ZOOKEEPER_CONNECTION_TIMEOUT_MILLIS = 15000;
|
||||
|
||||
/**
|
||||
* Determines if ZooKeeper is accessible with the current settings. Closes
|
||||
* the connection prior to returning.
|
||||
*
|
||||
* @return true if a connection was achieved, false otherwise
|
||||
*
|
||||
* @throws InterruptedException
|
||||
* @throws IOException
|
||||
*/
|
||||
public static boolean isZooKeeperAccessible(String hostName, String port) throws InterruptedException, IOException {
|
||||
boolean result = false;
|
||||
Object workerThreadWaitNotifyLock = new Object();
|
||||
String connectString = hostName + ":" + port;
|
||||
ZooKeeper zooKeeper = new ZooKeeper(connectString, ZOOKEEPER_SESSION_TIMEOUT_MILLIS,
|
||||
(WatchedEvent event) -> {
|
||||
synchronized (workerThreadWaitNotifyLock) {
|
||||
workerThreadWaitNotifyLock.notify();
|
||||
}
|
||||
});
|
||||
synchronized (workerThreadWaitNotifyLock) {
|
||||
workerThreadWaitNotifyLock.wait(ZOOKEEPER_CONNECTION_TIMEOUT_MILLIS);
|
||||
}
|
||||
ZooKeeper.States state = zooKeeper.getState();
|
||||
if (state == ZooKeeper.States.CONNECTED || state == ZooKeeper.States.CONNECTEDREADONLY) {
|
||||
result = true;
|
||||
}
|
||||
zooKeeper.close();
|
||||
return result;
|
||||
}
|
||||
}
|
@ -21,9 +21,9 @@ ServicesMonitor.statusChange.notify.msg=Status for {0} is {1}
|
||||
ServicesMonitor.nullServiceName.excepton.txt=Requested service name is null
|
||||
ServicesMonitor.unknownServiceName.excepton.txt=Requested service name {0} is unknown
|
||||
ServicesMonitor.KeywordSearchNull=Cannot find Keyword Search service
|
||||
ServicesMonitor.InvalidPortNumber=Invalid port number.
|
||||
ServicesMonitor.InvalidPortNumber=Invalid Solr 8 port number.
|
||||
ServicesMonitor.remoteCaseDatabase.displayName.text=Multi-user case database service
|
||||
ServicesMonitor.remoteKeywordSearch.displayName.text=Multi-user keyword search service
|
||||
ServicesMonitor.messaging.displayName.text=Messaging service
|
||||
ServicesMonitor.databaseConnectionInfo.error.msg=Error accessing case database connection info
|
||||
ServicesMonitor.messagingService.connErr.text=Error accessing messaging service connection info
|
||||
ServicesMonitor.messagingService.connErr.text=Error accessing messaging service connection info
|
||||
|
@ -25,7 +25,7 @@ ServicesMonitor.statusChange.notify.msg=Status for {0} is {1}
|
||||
ServicesMonitor.nullServiceName.excepton.txt=Requested service name is null
|
||||
ServicesMonitor.unknownServiceName.excepton.txt=Requested service name {0} is unknown
|
||||
ServicesMonitor.KeywordSearchNull=Cannot find Keyword Search service
|
||||
ServicesMonitor.InvalidPortNumber=Invalid port number.
|
||||
ServicesMonitor.InvalidPortNumber=Invalid Solr 8 port number.
|
||||
ServicesMonitor.remoteCaseDatabase.displayName.text=Multi-user case database service
|
||||
ServicesMonitor.remoteKeywordSearch.displayName.text=Multi-user keyword search service
|
||||
ServicesMonitor.messaging.displayName.text=Messaging service
|
||||
|
@ -354,20 +354,33 @@ public class ServicesMonitor {
|
||||
KeywordSearchService kwsService = Lookup.getDefault().lookup(KeywordSearchService.class);
|
||||
try {
|
||||
if (kwsService != null) {
|
||||
int port = Integer.parseUnsignedInt(UserPreferences.getIndexingServerPort());
|
||||
kwsService.tryConnect(UserPreferences.getIndexingServerHost(), port);
|
||||
setServiceStatus(Service.REMOTE_KEYWORD_SEARCH.toString(), ServiceStatus.UP.toString(), "");
|
||||
ServiceStatus status = ServiceStatus.DOWN;
|
||||
// check Solr 8
|
||||
String kwsHostName = UserPreferences.getIndexingServerHost();
|
||||
if (!kwsHostName.isEmpty()) {
|
||||
int port = Integer.parseUnsignedInt(UserPreferences.getIndexingServerPort());
|
||||
kwsService.tryConnect(UserPreferences.getIndexingServerHost(), port);
|
||||
status = ServiceStatus.UP;
|
||||
}
|
||||
|
||||
// check Solr 4
|
||||
if (!UserPreferences.getSolr4ServerHost().trim().isEmpty()) {
|
||||
int port = Integer.parseUnsignedInt(UserPreferences.getSolr4ServerPort().trim());
|
||||
kwsService.tryConnect(UserPreferences.getSolr4ServerHost().trim(), port);
|
||||
status = ServiceStatus.UP;
|
||||
}
|
||||
setServiceStatus(Service.REMOTE_KEYWORD_SEARCH.toString(), status.toString(), "");
|
||||
} else {
|
||||
setServiceStatus(Service.REMOTE_KEYWORD_SEARCH.toString(), ServiceStatus.DOWN.toString(),
|
||||
NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.KeywordSearchNull"));
|
||||
}
|
||||
} catch (NumberFormatException ex) {
|
||||
String rootCause = NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.InvalidPortNumber");
|
||||
logger.log(Level.SEVERE, "Unable to connect to messaging server: " + rootCause, ex); //NON-NLS
|
||||
logger.log(Level.SEVERE, "Unable to connect to Keyword Search server: " + rootCause, ex); //NON-NLS
|
||||
setServiceStatus(Service.REMOTE_KEYWORD_SEARCH.toString(), ServiceStatus.DOWN.toString(), rootCause);
|
||||
} catch (KeywordSearchServiceException ex) {
|
||||
String rootCause = ex.getMessage();
|
||||
logger.log(Level.SEVERE, "Unable to connect to messaging server: " + rootCause, ex); //NON-NLS
|
||||
logger.log(Level.SEVERE, "Unable to connect to Keyword Search server: " + rootCause, ex); //NON-NLS
|
||||
setServiceStatus(Service.REMOTE_KEYWORD_SEARCH.toString(), ServiceStatus.DOWN.toString(), rootCause);
|
||||
}
|
||||
}
|
||||
|
@ -55,8 +55,12 @@ public final class UserPreferences {
|
||||
public static final String EXTERNAL_DATABASE_USER = "ExternalDatabaseUsername"; //NON-NLS
|
||||
public static final String EXTERNAL_DATABASE_PASSWORD = "ExternalDatabasePassword"; //NON-NLS
|
||||
public static final String EXTERNAL_DATABASE_TYPE = "ExternalDatabaseType"; //NON-NLS
|
||||
public static final String INDEXING_SERVER_HOST = "IndexingServerHost"; //NON-NLS
|
||||
public static final String INDEXING_SERVER_PORT = "IndexingServerPort"; //NON-NLS
|
||||
private static final String SOLR8_SERVER_HOST = "Solr8ServerHost"; //NON-NLS
|
||||
private static final String SOLR8_SERVER_PORT = "Solr8ServerPort"; //NON-NLS
|
||||
private static final String SOLR4_SERVER_HOST = "IndexingServerHost"; //NON-NLS
|
||||
private static final String SOLR4_SERVER_PORT = "IndexingServerPort"; //NON-NLS
|
||||
private static final String ZK_SERVER_HOST = "ZookeeperServerHost"; //NON-NLS
|
||||
private static final String ZK_SERVER_PORT = "ZookeeperServerPort"; //NON-NLS
|
||||
private static final String MESSAGE_SERVICE_PASSWORD = "MessageServicePassword"; //NON-NLS
|
||||
private static final String MESSAGE_SERVICE_USER = "MessageServiceUser"; //NON-NLS
|
||||
private static final String MESSAGE_SERVICE_HOST = "MessageServiceHost"; //NON-NLS
|
||||
@ -326,21 +330,53 @@ public final class UserPreferences {
|
||||
}
|
||||
|
||||
public static String getIndexingServerHost() {
|
||||
return preferences.get(INDEXING_SERVER_HOST, "");
|
||||
return preferences.get(SOLR8_SERVER_HOST, "");
|
||||
}
|
||||
|
||||
public static void setIndexingServerHost(String hostName) {
|
||||
preferences.put(INDEXING_SERVER_HOST, hostName);
|
||||
preferences.put(SOLR8_SERVER_HOST, hostName);
|
||||
}
|
||||
|
||||
public static String getIndexingServerPort() {
|
||||
return preferences.get(INDEXING_SERVER_PORT, "8983");
|
||||
return preferences.get(SOLR8_SERVER_PORT, "8983");
|
||||
}
|
||||
|
||||
public static void setIndexingServerPort(int port) {
|
||||
preferences.putInt(INDEXING_SERVER_PORT, port);
|
||||
preferences.putInt(SOLR8_SERVER_PORT, port);
|
||||
}
|
||||
|
||||
public static String getSolr4ServerHost() {
|
||||
return preferences.get(SOLR4_SERVER_HOST, "");
|
||||
}
|
||||
|
||||
public static void setSolr4ServerHost(String hostName) {
|
||||
preferences.put(SOLR4_SERVER_HOST, hostName);
|
||||
}
|
||||
|
||||
public static String getSolr4ServerPort() {
|
||||
return preferences.get(SOLR4_SERVER_PORT, "");
|
||||
}
|
||||
|
||||
public static void setSolr4ServerPort(String port) {
|
||||
preferences.put(SOLR4_SERVER_PORT, port);
|
||||
}
|
||||
|
||||
public static String getZkServerHost() {
|
||||
return preferences.get(ZK_SERVER_HOST, "");
|
||||
}
|
||||
|
||||
public static void setZkServerHost(String hostName) {
|
||||
preferences.put(ZK_SERVER_HOST, hostName);
|
||||
}
|
||||
|
||||
public static String getZkServerPort() {
|
||||
return preferences.get(ZK_SERVER_PORT, "9983");
|
||||
}
|
||||
|
||||
public static void setZkServerPort(String port) {
|
||||
preferences.put(ZK_SERVER_PORT, port);
|
||||
}
|
||||
|
||||
public static void setTextTranslatorName(String textTranslatorName) {
|
||||
preferences.put(TEXT_TRANSLATOR_NAME, textTranslatorName);
|
||||
}
|
||||
|
@ -75,14 +75,17 @@ DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails: {0}
|
||||
AboutWindowPanel.actVerboseLogging.text=Activate verbose logging
|
||||
OptionsCategory_Name_Multi_User_Settings=Multi-User
|
||||
OptionsCategory_Keywords_Multi_User_Options=Multi-User Settings
|
||||
MultiUserSettingsPanel.lbSolrSettings.text=Solr Server Settings
|
||||
MultiUserSettingsPanel.cbEnableMultiUser.text=Enable multi-user cases
|
||||
MultiUserSettingsPanel.lbDatabaseSettings.text=Database Server Settings
|
||||
MultiUserSettingsPanel.validationErrMsg.incomplete=Fill in all values
|
||||
MultiUserSettingsPanel.nonWindowsOs.msg=Multi-user cases are only available on Windows platforms
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidDatabasePort=Invalid database port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidMessageServicePort=Invalid message service port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidIndexingServerPort=Invalid Solr server port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidIndexingServerPort=Invalid Solr 8 server port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidSolr4ServerPort=Invalid Solr 4 server port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidZkServerPort=Invalid ZooKeeper server port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidZkServerHostName=ZooKeeper server host name not set
|
||||
MultiUserSettingsPanel.validationErrMsg.solrNotConfigured=Either Solr 8 or/and Solr 4 server needs to be configured
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidMessgeServiceURI=Message service host and/or port not valid
|
||||
DataContentViewerHex.goToOffsetLabel.text=Jump to Offset
|
||||
DataContentViewerHex.goToOffsetTextField.text=
|
||||
@ -101,8 +104,6 @@ MultiUserSettingsPanel.tbDbPassword.toolTipText=Password
|
||||
MultiUserSettingsPanel.tbDbPassword.text=
|
||||
MultiUserSettingsPanel.lbTestSolr.text=
|
||||
MultiUserSettingsPanel.bnTestSolr.text=Test
|
||||
MultiUserSettingsPanel.tbSolrHostname.toolTipText=Hostname or IP Address
|
||||
MultiUserSettingsPanel.tbSolrPort.toolTipText=Port Number
|
||||
MultiUserSettingsPanel.lbTestMessageService.text=
|
||||
MultiUserSettingsPanel.bnTestMessageService.text=Test
|
||||
MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Server Settings
|
||||
@ -118,6 +119,7 @@ MultiUserSettingsPanel.lbTestMessageWarning.text=
|
||||
MultiUserSettingsPanel.lbTestSolrWarning.text=
|
||||
MultiUserSettingsPanel.lbTestDbWarning.text=
|
||||
MultiUserSettingsPanel.KeywordSearchNull=Cannot find keyword search service
|
||||
MultiUserSettingsPanel.UnableToConnectToZK=Unable to connect to ZooKeeper service
|
||||
MultiUserSettingsPanel.InvalidPortNumber=Invalid port number
|
||||
AutopsyOptionsPanel.agencyLogoImageLabel.toolTipText=
|
||||
SortChooserDialog.label=remove
|
||||
@ -175,6 +177,19 @@ DataResultViewerTable.pagesLabel.text=Pages:
|
||||
DataResultViewerTable.pageNumLabel.text=
|
||||
DataResultViewerTable.pageLabel.text=Page:
|
||||
DataResultViewerTable.exportCSVButton.text=Save Table as CSV
|
||||
MultiUserSettingsPanel.tbSolr4Hostname.toolTipText=Solr 4 Hostname or IP Address
|
||||
MultiUserSettingsPanel.tbSolr4Port.toolTipText=Solr 4 Port Number
|
||||
MultiUserSettingsPanel.lbZkSettings.text=ZooKeeper Server Settings
|
||||
MultiUserSettingsPanel.lbSolr4Settings.text=Solr 4 Server Settings
|
||||
MultiUserSettingsPanel.lbSolr8Settings.text=Solr 8 Server Settings
|
||||
MultiUserSettingsPanel.tbZkHostname.toolTipText=ZooKeeper Hostname or IP Address
|
||||
MultiUserSettingsPanel.tbZkPort.toolTipText=ZooKeeper Port Number
|
||||
MultiUserSettingsPanel.tbSolr8Hostname.toolTipText=Solr 8 Hostname or IP Address
|
||||
MultiUserSettingsPanel.tbSolr8Port.toolTipText=Solr 8 Port Number
|
||||
MultiUserSettingsPanel.restartRequiredLabel.text=Application restart required to take effect.
|
||||
MultiUserSettingsPanel.MustRestart=Autopsy must be restarted for new configuration to take effect
|
||||
MultiUserSettingsPanel.lbSolrNote1.text=NOTE: Enter Solr 8 and/or Solr 4 server settings.
|
||||
MultiUserSettingsPanel.lbSolrNote2.text=New cases can only be created with Solr 8.
|
||||
AutopsyOptionsPanel.logoPanel.border.title=Logo
|
||||
AutopsyOptionsPanel.agencyLogoPathFieldValidationLabel.text=
|
||||
AutopsyOptionsPanel.specifyLogoRB.text=Specify a logo
|
||||
@ -223,3 +238,4 @@ ViewPreferencesPanel.useBestViewerRadioButton.toolTipText=For example, change fr
|
||||
ViewPreferencesPanel.useBestViewerRadioButton.text=Change to the most specific file viewer
|
||||
ViewPreferencesPanel.selectFileLabel.text=When selecting a file:
|
||||
ViewPreferencesPanel.globalSettingsPanel.border.title=Global Settings
|
||||
|
||||
|
@ -130,14 +130,17 @@ DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails: {0}
|
||||
AboutWindowPanel.actVerboseLogging.text=Activate verbose logging
|
||||
OptionsCategory_Name_Multi_User_Settings=Multi-User
|
||||
OptionsCategory_Keywords_Multi_User_Options=Multi-User Settings
|
||||
MultiUserSettingsPanel.lbSolrSettings.text=Solr Server Settings
|
||||
MultiUserSettingsPanel.cbEnableMultiUser.text=Enable multi-user cases
|
||||
MultiUserSettingsPanel.lbDatabaseSettings.text=Database Server Settings
|
||||
MultiUserSettingsPanel.validationErrMsg.incomplete=Fill in all values
|
||||
MultiUserSettingsPanel.nonWindowsOs.msg=Multi-user cases are only available on Windows platforms
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidDatabasePort=Invalid database port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidMessageServicePort=Invalid message service port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidIndexingServerPort=Invalid Solr server port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidIndexingServerPort=Invalid Solr 8 server port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidSolr4ServerPort=Invalid Solr 4 server port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidZkServerPort=Invalid ZooKeeper server port number
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidZkServerHostName=ZooKeeper server host name not set
|
||||
MultiUserSettingsPanel.validationErrMsg.solrNotConfigured=Either Solr 8 or/and Solr 4 server needs to be configured
|
||||
MultiUserSettingsPanel.validationErrMsg.invalidMessgeServiceURI=Message service host and/or port not valid
|
||||
DataContentViewerHex.goToOffsetLabel.text=Jump to Offset
|
||||
DataContentViewerHex.goToOffsetTextField.text=
|
||||
@ -156,8 +159,6 @@ MultiUserSettingsPanel.tbDbPassword.toolTipText=Password
|
||||
MultiUserSettingsPanel.tbDbPassword.text=
|
||||
MultiUserSettingsPanel.lbTestSolr.text=
|
||||
MultiUserSettingsPanel.bnTestSolr.text=Test
|
||||
MultiUserSettingsPanel.tbSolrHostname.toolTipText=Hostname or IP Address
|
||||
MultiUserSettingsPanel.tbSolrPort.toolTipText=Port Number
|
||||
MultiUserSettingsPanel.lbTestMessageService.text=
|
||||
MultiUserSettingsPanel.bnTestMessageService.text=Test
|
||||
MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Server Settings
|
||||
@ -173,6 +174,7 @@ MultiUserSettingsPanel.lbTestMessageWarning.text=
|
||||
MultiUserSettingsPanel.lbTestSolrWarning.text=
|
||||
MultiUserSettingsPanel.lbTestDbWarning.text=
|
||||
MultiUserSettingsPanel.KeywordSearchNull=Cannot find keyword search service
|
||||
MultiUserSettingsPanel.UnableToConnectToZK=Unable to connect to ZooKeeper service
|
||||
MultiUserSettingsPanel.InvalidPortNumber=Invalid port number
|
||||
AutopsyOptionsPanel.agencyLogoImageLabel.toolTipText=
|
||||
SortChooserDialog.label=remove
|
||||
@ -232,6 +234,19 @@ DataResultViewerTable.pagesLabel.text=Pages:
|
||||
DataResultViewerTable.pageNumLabel.text=
|
||||
DataResultViewerTable.pageLabel.text=Page:
|
||||
DataResultViewerTable.exportCSVButton.text=Save Table as CSV
|
||||
MultiUserSettingsPanel.tbSolr4Hostname.toolTipText=Solr 4 Hostname or IP Address
|
||||
MultiUserSettingsPanel.tbSolr4Port.toolTipText=Solr 4 Port Number
|
||||
MultiUserSettingsPanel.lbZkSettings.text=ZooKeeper Server Settings
|
||||
MultiUserSettingsPanel.lbSolr4Settings.text=Solr 4 Server Settings
|
||||
MultiUserSettingsPanel.lbSolr8Settings.text=Solr 8 Server Settings
|
||||
MultiUserSettingsPanel.tbZkHostname.toolTipText=ZooKeeper Hostname or IP Address
|
||||
MultiUserSettingsPanel.tbZkPort.toolTipText=ZooKeeper Port Number
|
||||
MultiUserSettingsPanel.tbSolr8Hostname.toolTipText=Solr 8 Hostname or IP Address
|
||||
MultiUserSettingsPanel.tbSolr8Port.toolTipText=Solr 8 Port Number
|
||||
MultiUserSettingsPanel.restartRequiredLabel.text=Application restart required to take effect.
|
||||
MultiUserSettingsPanel.MustRestart=Autopsy must be restarted for new configuration to take effect
|
||||
MultiUserSettingsPanel.lbSolrNote1.text=NOTE: Enter Solr 8 and/or Solr 4 server settings.
|
||||
MultiUserSettingsPanel.lbSolrNote2.text=New cases can only be created with Solr 8.
|
||||
AutopsyOptionsPanel.logoPanel.border.title=Logo
|
||||
AutopsyOptionsPanel.agencyLogoPathFieldValidationLabel.text=
|
||||
AutopsyOptionsPanel.specifyLogoRB.text=Specify a logo
|
||||
@ -280,3 +295,4 @@ ViewPreferencesPanel.useBestViewerRadioButton.toolTipText=For example, change fr
|
||||
ViewPreferencesPanel.useBestViewerRadioButton.text=Change to the most specific file viewer
|
||||
ViewPreferencesPanel.selectFileLabel.text=When selecting a file:
|
||||
ViewPreferencesPanel.globalSettingsPanel.border.title=Global Settings
|
||||
|
||||
|
@ -170,6 +170,59 @@ HINT_DataContentTopComponent=\u3053\u308c\u306fDataContent\u30a6\u30a3\u30f3\u30
|
||||
HINT_NodeTableTopComponent=\u3053\u308c\u306fDataResult\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u3059
|
||||
INDEX_FOR_LOCAL_HELP=/docs/index.html
|
||||
LBL_Close=\u9589\u3058\u308b
|
||||
DataContentViewerHex.copyMenuItem.text=\u30b3\u30d4\u30fc
|
||||
DataContentViewerHex.selectAllMenuItem.text=\u3059\u3079\u3066\u3092\u9078\u629e
|
||||
DataContentViewerArtifact.totalPageLabel.text=100
|
||||
DataContentViewerArtifact.prevPageButton.text=
|
||||
DataContentViewerArtifact.pageLabel2.text=\u7d50\u679c
|
||||
DataContentViewerArtifact.nextPageButton.text=
|
||||
DataContentViewerArtifact.currentPageLabel.text=1
|
||||
DataContentViewerArtifact.ofLabel.text=/
|
||||
DataContentViewerArtifact.pageLabel.text=\u7d50\u679c:
|
||||
AdvancedConfigurationDialog.applyButton.text=OK
|
||||
DataContentViewerHex.goToPageTextField.text=
|
||||
DataContentViewerHex.goToPageLabel.text=\u30da\u30fc\u30b8\u306b\u79fb\u52d5:
|
||||
DataResultViewerThumbnail.pageLabel.text=\u30da\u30fc\u30b8:
|
||||
DataResultViewerThumbnail.pagesLabel.text=\u30da\u30fc\u30b8:
|
||||
DataResultViewerThumbnail.pagePrevButton.text=
|
||||
DataResultViewerThumbnail.pageNextButton.text=
|
||||
DataResultViewerThumbnail.imagesLabel.text=\u30a4\u30e1\u30fc\u30b8:
|
||||
DataResultViewerThumbnail.imagesRangeLabel.text=-
|
||||
DataResultViewerThumbnail.pageNumLabel.text=-
|
||||
DataResultViewerThumbnail.filePathLabel.text=\ \ \
|
||||
DataResultViewerThumbnail.goToPageLabel.text=\u30da\u30fc\u30b8\u306b\u79fb\u52d5:
|
||||
DataResultViewerThumbnail.goToPageField.text=
|
||||
AdvancedConfigurationDialog.cancelButton.text=\u53d6\u308a\u6d88\u3057
|
||||
DataContentViewerArtifact.waitText=\u30c7\u30fc\u30bf\u3092\u691c\u7d22\u3057\u3066\u6e96\u5099\u4e2d\u3067\u3059\u3002\u304a\u5f85\u3061\u304f\u3060\u3055\u3044...
|
||||
DataContentViewerArtifact.errorText=\u7d50\u679c\u306e\u691c\u7d22\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
|
||||
DataContentViewerArtifact.title=\u7d50\u679c
|
||||
DataContentViewerArtifact.toolTip=\u30d5\u30a1\u30a4\u30eb\u3068\u95a2\u9023\u4ed8\u3051\u3089\u308c\u3066\u3044\u308b\u7d50\u679c\u3092\u8868\u793a
|
||||
DataContentViewerHex.goToPageTextField.msgDlg=1 \u304b\u3089 {0} \u307e\u3067\u306e\u6709\u52b9\u306a\u30da\u30fc\u30b8\u756a\u53f7\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044
|
||||
DataContentViewerHex.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u756a\u53f7\u3067\u3059
|
||||
DataContentViewerHex.setDataView.errorText=(\u30aa\u30d5\u30bb\u30c3\u30c8 {0}-{1} \u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f)
|
||||
DataContentViewerHex.title=16\u9032\u6570
|
||||
DataContentViewerHex.toolTip=\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30a4\u30ca\u30ea\u30fc\u30b3\u30f3\u30c6\u30f3\u30c4\u309216\u9032\u6570\u3068\u3057\u3066\u8868\u793a\u3057\u307e\u3059\u3002\u53f3\u5074\u306bASCII\u6587\u5b57\u3068\u3057\u3066\u8868\u793a\u53ef\u80fd\u306a\u30d0\u30a4\u30c8\u304c\u793a\u3055\u308c\u307e\u3059\u3002
|
||||
DataResultPanel.pleasewaitNodeDisplayName=\u304a\u5f85\u3061\u304f\u3060\u3055\u3044...
|
||||
DataResultViewerTable.illegalArgExc.noChildFromParent=\u6307\u5b9a\u3057\u305f\u89aa\u304b\u3089\u5b50\u30ce\u30fc\u30c9\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
|
||||
DataResultViewerTable.illegalArgExc.childWithoutPropertySet=\u5b50\u30ce\u30fc\u30c9\u306b\u306f\u6b63\u898f\u306ePropertySet\u304c\u3042\u308a\u307e\u305b\u3093\u3002
|
||||
DataResultViewerThumbnail.title=\u30b5\u30e0\u30cd\u30a4\u30eb
|
||||
DataResultViewerThumbnail.goToPageTextField.msgDlg=1 \u304b\u3089 {0} \u307e\u3067\u306e\u6709\u52b9\u306a\u30da\u30fc\u30b8\u756a\u53f7\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044
|
||||
DataResultViewerThumbnail.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u756a\u53f7\u3067\u3059
|
||||
DataResultViewerThumbnail.genThumbs=\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u4f5c\u6210\u4e2d\u3067\u3059...
|
||||
DataResultViewerThumbnail.pageNumbers.curOfTotal={0} / {1}
|
||||
GeneralOptionsPanelController.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc
|
||||
GeneralOptionsPanelController.moduleErr.msg=GeneralOptionsPanelController\u66f4\u65b0\u306e\u30ea\u30c3\u30b9\u30f3\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305b\u307e\u3057\u305f\u3002\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5224\u65ad\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u3067\u3042\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002
|
||||
ProductInformationPanel.verbLoggingEnabled.text=\u8a73\u7d30\u30ed\u30ae\u30f3\u30b0\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059
|
||||
ProductInformationPanel.propertyUnknown.text=\u4e0d\u660e
|
||||
ProductInformationPanel.getVMValue.text={0} {1}
|
||||
TableFilterNode.displayName.text=\u540d\u524d
|
||||
DataResultViewerThumbnail.comboBox.smallThumbnails=\u5c0f\u30b5\u30a4\u30ba\u306e\u30b5\u30e0\u30cd\u30a4\u30eb
|
||||
DataResultViewerThumbnail.comboBox.mediumThumbnails=\u4e2d\u30b5\u30a4\u30ba\u306e\u30b5\u30e0\u30cd\u30a4\u30eb
|
||||
DataResultViewerThumbnail.comboBox.largeThumbnails=\u5927\u30b5\u30a4\u30ba\u306e\u30b5\u30e0\u30cd\u30a4\u30eb
|
||||
DataResultViewerThumbnail.switchPage.done.errMsg=\u6b21\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u4f5c\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: {0}
|
||||
AboutWindowPanel.actVerboseLogging.text=\u8a73\u7d30\u30ed\u30ae\u30f3\u30b0\u3092\u30a2\u30af\u30c6\u30a3\u30d6\u5316
|
||||
OptionsCategory_Name_Multi_User_Settings=\u30de\u30eb\u30c1\u30e6\u30fc\u30b6\u30fc
|
||||
OptionsCategory_Keywords_Multi_User_Options=\u30de\u30eb\u30c1\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a
|
||||
LBL_Copyright=<div style \= "font-size\uff1a12pt; font-family\uff1aVerdana\u3001 'Verdana CE'\u3001Arial\u3001 'Arial CE'\u3001 'Lucida Grande CE'\u3001lucida\u3001 'Helvetica CE'\u3001sans-serif;">Autopsy™ \u306f The Sleuth Kit™ \u304a\u3088\u3073\u305d\u306e\u4ed6\u306e\u30c4\u30fc\u30eb\u306b\u57fa\u3065\u304f\u30c7\u30b8\u30bf\u30eb\u79d1\u5b66\u635c\u67fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3002 <br> <ul> <li>\u60c5\u5831\uff1a<a style \= "color\uff1a\uff031E2A60;" href \= "http\://www.sleuthkit.org"> http\://www.sleuthkit.org </a>\u3002</ li> <li>\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\uff1a<a style \= "color\uff1a\uff031E2A60;" href \= "https\://www.autopsy.com/support/training/"> https\://www.autopsy.com/support/training/ </a> </ li> <li>\u30b5\u30dd\u30fc\u30c8\uff1a<a style\="color\: \#1E2A60;" href\="https\://www.sleuthkit.org/support.php">https\://www.sleuthkit.org/support.php</a></li></ul>Copyright © 2003-2020. </div>
|
||||
LBL_Description=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">\n <b>\u88fd\u54c1\u30d0\u30fc\u30b8\u30e7\u30f3\:</b> {0} ({9}) <br><b>Sleuth Kit\u30d0\u30fc\u30b8\u30e7\u30f3\:</b> {7} <br><b>Netbeans RCP\u30d3\u30eb\u30c9\:</b> {8} <br> <b>Java\:</b> {1}; {2}<br> <b>\u30b7\u30b9\u30c6\u30e0\:</b> {3}; {4}; {5}<br><b>Userdir\:</b> {6}</div>
|
||||
MultiUserSettingsPanel.InvalidPortNumber=\u7121\u52b9\u306a\u30dd\u30fc\u30c8\u756a\u53f7\u3067\u3059
|
||||
@ -195,6 +248,14 @@ MultiUserSettingsPanel.tbDbPassword.toolTipText=\u30d1\u30b9\u30ef\u30fc\u30c9
|
||||
MultiUserSettingsPanel.tbDbPort.text=
|
||||
MultiUserSettingsPanel.tbDbPort.toolTipText=\u30dd\u30fc\u30c8\u756a\u53f7
|
||||
MultiUserSettingsPanel.tbDbUsername.text=
|
||||
MultiUserSettingsPanel.tbDbPassword.toolTipText=\u30d1\u30b9\u30ef\u30fc\u30c9
|
||||
MultiUserSettingsPanel.tbDbPassword.text=
|
||||
MultiUserSettingsPanel.lbTestSolr.text=
|
||||
MultiUserSettingsPanel.bnTestSolr.text=\u30c6\u30b9\u30c8
|
||||
MultiUserSettingsPanel.lbTestMessageService.text=
|
||||
MultiUserSettingsPanel.bnTestMessageService.text=\u30c6\u30b9\u30c8
|
||||
MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ\u30e1\u30c3\u30bb\u30fc\u30b8\u30b5\u30fc\u30d3\u30b9\u8a2d\u5b9a
|
||||
MultiUserSettingsPanel.tbMsgPort.toolTipText=\u30dd\u30fc\u30c8\u756a\u53f7
|
||||
MultiUserSettingsPanel.tbDbUsername.toolTipText=\u30e6\u30fc\u30b6\u30fc\u540d
|
||||
MultiUserSettingsPanel.tbMsgHostname.text=
|
||||
MultiUserSettingsPanel.tbMsgHostname.toolTipText=\u30db\u30b9\u30c8\u540d\u307e\u305f\u306fIP\u30a2\u30c9\u30ec\u30b9
|
||||
@ -239,6 +300,18 @@ ViewPreferencesPanel.maxResultsLabel.toolTipText=<html>\n\u3053\u306e\u5024\u309
|
||||
ViewPreferencesPanel.maxResultsLabel.text=\u30c6\u30fc\u30d6\u30eb\u3067\u8868\u793a\u3059\u308b\u6700\u5927\u7d50\u679c\u6570:
|
||||
ViewPreferencesPanel.fileNameTranslationColumnCheckbox.text=\u7d50\u679c\u30d3\u30e5\u30fc\u30ef\u30fc\u306b\u30d5\u30a1\u30a4\u30eb\u540d\u7ffb\u8a33\u7528\u5217\u3092\u8ffd\u52a0
|
||||
ViewPreferencesPanel.scoColumnsWrapAroundText.text=\u975e\u8868\u793a\u306b\u3059\u308b\u3068\u8aad\u8fbc\u307f\u304c\u65e9\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002
|
||||
ViewPreferencesPanel.scoColumnsLabel.text=\u6b21\u306e\u305f\u3081\u306e\u5217\u3092\u8ffd\u52a0\u3057\u306a\u3044:
|
||||
MultiUserSettingsPanel.tbSolr4Port.toolTipText=\u30dd\u30fc\u30c8\u756a\u53f7
|
||||
MultiUserSettingsPanel.lbZkSettings.text=Solr\u8a2d\u5b9a
|
||||
MultiUserSettingsPanel.lbSolr4Settings.text=Solr\u8a2d\u5b9a
|
||||
MultiUserSettingsPanel.lbSolr8Settings.text=Solr\u8a2d\u5b9a
|
||||
MultiUserSettingsPanel.tbZkPort.toolTipText=\u30dd\u30fc\u30c8\u756a\u53f7
|
||||
MultiUserSettingsPanel.tbSolr8Hostname.toolTipText=\u30db\u30b9\u30c8\u540d\u307e\u305f\u306fIP\u30a2\u30c9\u30ec\u30b9
|
||||
MultiUserSettingsPanel.tbSolr8Port.toolTipText=\u30dd\u30fc\u30c8\u756a\u53f7
|
||||
MultiUserSettingsPanel.lbSolrNote1.text=Solr\u8a2d\u5b9a
|
||||
MultiUserSettingsPanel.lbSolrNote2.text=Solr\u8a2d\u5b9a
|
||||
ViewPreferencesPanel.selectFileLabel.text=\u30d5\u30a1\u30a4\u30eb\u9078\u629e\u6642\:
|
||||
ViewPreferencesPanel.translateTextLabel.text=\u30c6\u30ad\u30b9\u30c8\u3092\u7ffb\u8a33\:
|
||||
ViewPreferencesPanel.translateTextLabel.text=\u30c6\u30ad\u30b9\u30c8\u3092\u7ffb\u8a33:
|
||||
ViewPreferencesPanel.scoColumnsCheckbox.text=S(\u30b9\u30b3\u30a2)\u3001C(\u30b3\u30e1\u30f3\u30c8)\u3001O(\u767a\u751f)
|
||||
ViewPreferencesPanel.scoColumnsLabel.text=\u6b21\u306e\u305f\u3081\u306e\u5217\u3092\u8ffd\u52a0\u3057\u306a\u3044:
|
||||
|
@ -41,7 +41,7 @@ import org.sleuthkit.datamodel.TskException;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import org.sleuthkit.autopsy.contentviewers.artifactviewers.ArtifactContentViewer;
|
||||
import org.sleuthkit.autopsy.contentviewers.artifactviewers.DefaultArtifactContentViewer;
|
||||
import org.sleuthkit.autopsy.contentviewers.artifactviewers.DefaultTableArtifactContentViewer;
|
||||
|
||||
/**
|
||||
* Instances of this class display the BlackboardArtifacts associated with the
|
||||
@ -372,7 +372,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
return viewer;
|
||||
}
|
||||
}
|
||||
return new DefaultArtifactContentViewer();
|
||||
return new DefaultTableArtifactContentViewer();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -434,7 +434,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
}
|
||||
|
||||
setColumnWidths();
|
||||
|
||||
|
||||
/*
|
||||
* Load column sorting information from preferences file and apply it to
|
||||
* columns.
|
||||
@ -460,26 +460,27 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
* If one of the child nodes of the root node is to be selected, select
|
||||
* it.
|
||||
*/
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
if (rootNode instanceof TableFilterNode) {
|
||||
NodeSelectionInfo selectedChildInfo = ((TableFilterNode) rootNode).getChildNodeSelectionInfo();
|
||||
if (null != selectedChildInfo) {
|
||||
Node[] childNodes = rootNode.getChildren().getNodes(true);
|
||||
for (int i = 0; i < childNodes.length; ++i) {
|
||||
Node childNode = childNodes[i];
|
||||
if (selectedChildInfo.matches(childNode)) {
|
||||
if (rootNode instanceof TableFilterNode) {
|
||||
NodeSelectionInfo selectedChildInfo = ((TableFilterNode) rootNode).getChildNodeSelectionInfo();
|
||||
if (null != selectedChildInfo) {
|
||||
Node[] childNodes = rootNode.getChildren().getNodes(true);
|
||||
for (int i = 0; i < childNodes.length; ++i) {
|
||||
Node childNode = childNodes[i];
|
||||
if (selectedChildInfo.matches(childNode)) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
try {
|
||||
this.getExplorerManager().setSelectedNodes(new Node[]{childNode});
|
||||
this.getExplorerManager().setExploredContextAndSelection(this.rootNode, new Node[]{childNode});
|
||||
} catch (PropertyVetoException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to select node specified by selected child info", ex);
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
((TableFilterNode) rootNode).setChildNodeSelectionInfo(null);
|
||||
}
|
||||
((TableFilterNode) rootNode).setChildNodeSelectionInfo(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* The table setup is done, so any added/removed events can now be
|
||||
@ -516,7 +517,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
protected void setColumnWidths() {
|
||||
if (rootNode.getChildren().getNodesCount() != 0) {
|
||||
final Graphics graphics = outlineView.getGraphics();
|
||||
|
||||
|
||||
if (graphics != null) {
|
||||
// Current width of the outlineView
|
||||
double outlineViewWidth = outlineView.getSize().getWidth();
|
||||
@ -526,10 +527,10 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
|
||||
int margin = 4;
|
||||
int padding = 8;
|
||||
|
||||
|
||||
int totalColumnWidth = 0;
|
||||
int cntMaxSizeColumns =0;
|
||||
|
||||
int cntMaxSizeColumns = 0;
|
||||
|
||||
// Calulate the width for each column keeping track of the number
|
||||
// of columns that were set to columnwidthLimit.
|
||||
for (int column = 0; column < outline.getModel().getColumnCount(); column++) {
|
||||
@ -552,40 +553,40 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
|
||||
columnWidth = Math.min(columnWidth, columnWidthLimit);
|
||||
columnWidths.add(columnWidth);
|
||||
|
||||
|
||||
totalColumnWidth += columnWidth;
|
||||
|
||||
if( columnWidth == columnWidthLimit) {
|
||||
|
||||
if (columnWidth == columnWidthLimit) {
|
||||
cntMaxSizeColumns++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Figure out how much extra, if any can be given to the columns
|
||||
// so that the table is as wide as outlineViewWidth. If cntMaxSizeColumns
|
||||
// is greater than 0 divide the extra space between the columns
|
||||
// that could use more space. Otherwise divide evenly amoung
|
||||
// all columns.
|
||||
int extraWidth = 0;
|
||||
|
||||
|
||||
if (totalColumnWidth < outlineViewWidth) {
|
||||
if (cntMaxSizeColumns > 0) {
|
||||
extraWidth = (int) ((outlineViewWidth - totalColumnWidth)/cntMaxSizeColumns);
|
||||
if (cntMaxSizeColumns > 0) {
|
||||
extraWidth = (int) ((outlineViewWidth - totalColumnWidth) / cntMaxSizeColumns);
|
||||
} else {
|
||||
extraWidth = (int) ((outlineViewWidth - totalColumnWidth)/columnWidths.size());
|
||||
extraWidth = (int) ((outlineViewWidth - totalColumnWidth) / columnWidths.size());
|
||||
}
|
||||
}
|
||||
|
||||
for(int column = 0; column < columnWidths.size(); column++) {
|
||||
|
||||
for (int column = 0; column < columnWidths.size(); column++) {
|
||||
int columnWidth = columnWidths.get(column);
|
||||
|
||||
if(cntMaxSizeColumns > 0) {
|
||||
if(columnWidth >= ((column == 0) ? 350 : 300)) {
|
||||
|
||||
if (cntMaxSizeColumns > 0) {
|
||||
if (columnWidth >= ((column == 0) ? 350 : 300)) {
|
||||
columnWidth += extraWidth;
|
||||
}
|
||||
} else {
|
||||
columnWidth += extraWidth;
|
||||
}
|
||||
|
||||
|
||||
outline.getColumnModel().getColumn(column).setPreferredWidth(columnWidth);
|
||||
}
|
||||
}
|
||||
|
@ -16,14 +16,14 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPane" alignment="0" pref="555" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane" alignment="0" pref="1191" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane" pref="537" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane" pref="695" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@ -47,11 +47,12 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbOops" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="pnSolrSettings" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnDatabaseSettings" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnMessagingSettings" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pnMessagingSettings" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnSolrSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="39" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -63,12 +64,15 @@
|
||||
<Component id="cbEnableMultiUser" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnDatabaseSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnSolrSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnMessagingSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="39" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="pnDatabaseSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="pnMessagingSettings" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="pnSolrSettings" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="201" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -92,7 +96,7 @@
|
||||
<Component id="tbDbHostname" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="lbDatabaseSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="231" max="32767" attributes="0"/>
|
||||
<Component id="bnTestDatabase" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="lbTestDatabase" min="-2" pref="16" max="-2" attributes="0"/>
|
||||
@ -116,7 +120,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="bnTestDatabase" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbTestDatabase" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseSettings" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseSettings" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="tbDbHostname" min="-2" max="-2" attributes="0"/>
|
||||
@ -252,17 +256,30 @@
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="tbSolrHostname" max="32767" attributes="0"/>
|
||||
<Component id="tbSolr8Hostname" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="lbSolrSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbSolr8Settings" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbSolrNote1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbSolrNote2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="57" max="32767" attributes="0"/>
|
||||
<Component id="bnTestSolr" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="lbTestSolr" min="-2" pref="16" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="tbSolrPort" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="lbTestSolrWarning" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="tbSolr8Port" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbSolr4Hostname" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbSolr4Port" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbZkHostname" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbZkPort" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbTestSolrWarning" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbSolr4Settings" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbZkSettings" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@ -273,19 +290,35 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
|
||||
<Component id="lbSolrNote1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbSolrNote2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="bnTestSolr" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbSolrSettings" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="lbSolr8Settings" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnTestSolr" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="lbTestSolr" alignment="1" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="lbTestSolr" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbSolrHostname" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="tbSolrPort" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="tbSolr8Hostname" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbSolr8Port" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="lbSolr4Settings" min="-2" pref="21" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbSolr4Hostname" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbSolr4Port" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="lbZkSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbZkHostname" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbZkPort" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="lbTestSolrWarning" min="-2" pref="16" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -293,39 +326,39 @@
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lbSolrSettings">
|
||||
<Component class="javax.swing.JLabel" name="lbSolr8Settings">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="lbSolrSettings" property="font" relativeSize="true" size="1"/>
|
||||
<Font component="lbSolr8Settings" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbSolrSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbSolr8Settings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbSolrHostname">
|
||||
<Component class="javax.swing.JTextField" name="tbSolr8Hostname">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="tbSolrHostname" property="font" relativeSize="true" size="1"/>
|
||||
<Font component="tbSolr8Hostname" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbSolrHostname.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbSolr8Hostname.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbSolrPort">
|
||||
<Component class="javax.swing.JTextField" name="tbSolr8Port">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="tbSolrPort" property="font" relativeSize="true" size="1"/>
|
||||
<Font component="tbSolr8Port" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbSolrPort.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbSolr8Port.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -356,6 +389,107 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbSolr4Hostname">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="tbSolr4Hostname" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbSolr4Hostname.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbSolr4Port">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="tbSolr4Port" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbSolr4Port.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbSolr4Port.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbSolr4Settings">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="lbSolr4Settings" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbSolr4Settings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbZkSettings">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="lbZkSettings" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbZkSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbZkHostname">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="tbZkHostname" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbZkHostname.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbZkPort">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="tbZkPort" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbZkPort.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbSolrNote1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="lbSolrNote1" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbSolrNote1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbSolrNote2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="lbSolrNote2" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbSolrNote2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="pnMessagingSettings">
|
||||
@ -376,7 +510,7 @@
|
||||
<Component id="tbMsgHostname" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="lbMessageServiceSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="229" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="bnTestMessageService" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="lbTestMessageService" min="-2" pref="16" max="-2" attributes="0"/>
|
||||
@ -398,9 +532,9 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="bnTestMessageService" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbMessageServiceSettings" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="1" groupAlignment="3" attributes="0">
|
||||
<Component id="bnTestMessageService" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbMessageServiceSettings" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="lbTestMessageService" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
|
@ -32,10 +32,14 @@ import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.events.MessageServiceConnectionInfo;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import java.awt.Cursor;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import org.openide.util.ImageUtilities;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.coordinationservice.utils.CoordinationServiceUtils;
|
||||
import org.sleuthkit.autopsy.core.UserPreferencesException;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.events.MessageServiceException;
|
||||
@ -60,6 +64,17 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
private static final String INVALID_DB_PORT_MSG = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.validationErrMsg.invalidDatabasePort");
|
||||
private static final String INVALID_MESSAGE_SERVICE_PORT_MSG = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.validationErrMsg.invalidMessageServicePort");
|
||||
private static final String INVALID_INDEXING_SERVER_PORT_MSG = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.validationErrMsg.invalidIndexingServerPort");
|
||||
private static final String INVALID_SOLR4_SERVER_PORT_MSG = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.validationErrMsg.invalidSolr4ServerPort");
|
||||
private static final String SOLR_SERVER_NOT_CONFIGURED_MSG = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.validationErrMsg.solrNotConfigured");
|
||||
private static final String INVALID_ZK_SERVER_HOST_MSG = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.validationErrMsg.invalidZkServerHostName");
|
||||
private static final String INVALID_ZK_SERVER_PORT_MSG = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.validationErrMsg.invalidZkServerPort");
|
||||
private static final String SOLR8_HOST_NAME_OR_IP_PROMPT = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolr8Hostname.toolTipText");
|
||||
private static final String SOLR8_PORT_PROMPT = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolr8Port.toolTipText");
|
||||
private static final String SOLR4_HOST_NAME_OR_IP_PROMPT = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolr4Hostname.toolTipText");
|
||||
private static final String SOLR4_PORT_PROMPT = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolr4Port.toolTipText");
|
||||
private static final String ZK_HOST_NAME_OR_IP_PROMPT = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbZkHostname.toolTipText");
|
||||
private static final String ZK_PORT_PROMPT = NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbZkPort.toolTipText");
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final MultiUserSettingsPanelController controller;
|
||||
private final Collection<JTextField> textBoxes = new ArrayList<>();
|
||||
@ -91,8 +106,12 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
textPrompts.add(new TextPrompt(PORT_PROMPT, tbMsgPort));
|
||||
textPrompts.add(new TextPrompt(USER_NAME_PROMPT_OPT, tbMsgUsername));
|
||||
textPrompts.add(new TextPrompt(PASSWORD_PROMPT_OPT, tbMsgPassword));
|
||||
textPrompts.add(new TextPrompt(HOST_NAME_OR_IP_PROMPT, tbSolrHostname));
|
||||
textPrompts.add(new TextPrompt(PORT_PROMPT, tbSolrPort));
|
||||
textPrompts.add(new TextPrompt(SOLR8_HOST_NAME_OR_IP_PROMPT, tbSolr8Hostname));
|
||||
textPrompts.add(new TextPrompt(SOLR8_PORT_PROMPT, tbSolr8Port));
|
||||
textPrompts.add(new TextPrompt(SOLR4_HOST_NAME_OR_IP_PROMPT, tbSolr4Hostname));
|
||||
textPrompts.add(new TextPrompt(SOLR4_PORT_PROMPT, tbSolr4Port));
|
||||
textPrompts.add(new TextPrompt(ZK_HOST_NAME_OR_IP_PROMPT, tbZkHostname));
|
||||
textPrompts.add(new TextPrompt(ZK_PORT_PROMPT, tbZkPort));
|
||||
configureTextPrompts(textPrompts);
|
||||
|
||||
/*
|
||||
@ -104,8 +123,12 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
tbDbUsername.getDocument().putProperty("statusIcon", lbTestDatabase);
|
||||
tbDbPassword.getDocument().putProperty("statusIcon", lbTestDatabase);
|
||||
|
||||
tbSolrHostname.getDocument().putProperty("statusIcon", lbTestSolr);
|
||||
tbSolrPort.getDocument().putProperty("statusIcon", lbTestSolr);
|
||||
tbSolr8Hostname.getDocument().putProperty("statusIcon", lbTestSolr);
|
||||
tbSolr8Port.getDocument().putProperty("statusIcon", lbTestSolr);
|
||||
tbSolr4Hostname.getDocument().putProperty("statusIcon", lbTestSolr);
|
||||
tbSolr4Port.getDocument().putProperty("statusIcon", lbTestSolr);
|
||||
tbZkHostname.getDocument().putProperty("statusIcon", lbTestSolr);
|
||||
tbZkPort.getDocument().putProperty("statusIcon", lbTestSolr);
|
||||
|
||||
tbMsgHostname.getDocument().putProperty("statusIcon", lbTestMessageService);
|
||||
tbMsgPort.getDocument().putProperty("statusIcon", lbTestMessageService);
|
||||
@ -122,8 +145,15 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
textBoxes.add(tbMsgPort);
|
||||
textBoxes.add(tbMsgUsername);
|
||||
textBoxes.add(tbMsgPassword);
|
||||
textBoxes.add(tbSolrHostname);
|
||||
textBoxes.add(tbSolrPort);
|
||||
textBoxes.add(tbSolr8Hostname);
|
||||
textBoxes.add(tbSolr8Port);
|
||||
textBoxes.add(tbSolr4Hostname);
|
||||
textBoxes.add(tbSolr4Port);
|
||||
textBoxes.add(tbZkHostname);
|
||||
textBoxes.add(tbZkPort);
|
||||
|
||||
// as the user enters Solr 8 settings, we fill in the ZK settings with the embedded Solr 8 ZK connection info.
|
||||
tbSolr8Hostname.getDocument().addDocumentListener(new MyDocumentListener());
|
||||
|
||||
addDocumentListeners(textBoxes, textBoxChangedListener);
|
||||
goodIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/good.png", false));
|
||||
@ -178,12 +208,20 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
lbTestDatabase = new javax.swing.JLabel();
|
||||
lbTestDbWarning = new javax.swing.JLabel();
|
||||
pnSolrSettings = new javax.swing.JPanel();
|
||||
lbSolrSettings = new javax.swing.JLabel();
|
||||
tbSolrHostname = new javax.swing.JTextField();
|
||||
tbSolrPort = new javax.swing.JTextField();
|
||||
lbSolr8Settings = new javax.swing.JLabel();
|
||||
tbSolr8Hostname = new javax.swing.JTextField();
|
||||
tbSolr8Port = new javax.swing.JTextField();
|
||||
bnTestSolr = new javax.swing.JButton();
|
||||
lbTestSolr = new javax.swing.JLabel();
|
||||
lbTestSolrWarning = new javax.swing.JLabel();
|
||||
tbSolr4Hostname = new javax.swing.JTextField();
|
||||
tbSolr4Port = new javax.swing.JTextField();
|
||||
lbSolr4Settings = new javax.swing.JLabel();
|
||||
lbZkSettings = new javax.swing.JLabel();
|
||||
tbZkHostname = new javax.swing.JTextField();
|
||||
tbZkPort = new javax.swing.JTextField();
|
||||
lbSolrNote1 = new javax.swing.JLabel();
|
||||
lbSolrNote2 = new javax.swing.JLabel();
|
||||
pnMessagingSettings = new javax.swing.JPanel();
|
||||
lbMessageServiceSettings = new javax.swing.JLabel();
|
||||
tbMsgHostname = new javax.swing.JTextField();
|
||||
@ -241,7 +279,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
.addComponent(tbDbHostname)
|
||||
.addGroup(pnDatabaseSettingsLayout.createSequentialGroup()
|
||||
.addComponent(lbDatabaseSettings)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 231, Short.MAX_VALUE)
|
||||
.addComponent(bnTestDatabase)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(lbTestDatabase, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
@ -260,7 +298,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
.addGroup(pnDatabaseSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(bnTestDatabase)
|
||||
.addComponent(lbTestDatabase, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbDatabaseSettings))
|
||||
.addComponent(lbDatabaseSettings, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(tbDbHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
@ -276,14 +314,14 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
|
||||
pnSolrSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
lbSolrSettings.setFont(lbSolrSettings.getFont().deriveFont(lbSolrSettings.getFont().getSize()+1f));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbSolrSettings, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbSolrSettings.text")); // NOI18N
|
||||
lbSolr8Settings.setFont(lbSolr8Settings.getFont().deriveFont(lbSolr8Settings.getFont().getSize()+1f));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbSolr8Settings, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbSolr8Settings.text")); // NOI18N
|
||||
|
||||
tbSolrHostname.setFont(tbSolrHostname.getFont().deriveFont(tbSolrHostname.getFont().getSize()+1f));
|
||||
tbSolrHostname.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolrHostname.toolTipText")); // NOI18N
|
||||
tbSolr8Hostname.setFont(tbSolr8Hostname.getFont().deriveFont(tbSolr8Hostname.getFont().getSize()+1f));
|
||||
tbSolr8Hostname.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolr8Hostname.toolTipText")); // NOI18N
|
||||
|
||||
tbSolrPort.setFont(tbSolrPort.getFont().deriveFont(tbSolrPort.getFont().getSize()+1f));
|
||||
tbSolrPort.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolrPort.toolTipText")); // NOI18N
|
||||
tbSolr8Port.setFont(tbSolr8Port.getFont().deriveFont(tbSolr8Port.getFont().getSize()+1f));
|
||||
tbSolr8Port.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolr8Port.toolTipText")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnTestSolr, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.bnTestSolr.text")); // NOI18N
|
||||
bnTestSolr.addActionListener(new java.awt.event.ActionListener() {
|
||||
@ -297,6 +335,30 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
lbTestSolrWarning.setForeground(new java.awt.Color(255, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbTestSolrWarning, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbTestSolrWarning.text")); // NOI18N
|
||||
|
||||
tbSolr4Hostname.setFont(tbSolr4Hostname.getFont().deriveFont(tbSolr4Hostname.getFont().getSize()+1f));
|
||||
tbSolr4Hostname.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolr4Hostname.toolTipText")); // NOI18N
|
||||
|
||||
tbSolr4Port.setFont(tbSolr4Port.getFont().deriveFont(tbSolr4Port.getFont().getSize()+1f));
|
||||
tbSolr4Port.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolr4Port.toolTipText")); // NOI18N
|
||||
|
||||
lbSolr4Settings.setFont(lbSolr4Settings.getFont().deriveFont(lbSolr4Settings.getFont().getSize()+1f));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbSolr4Settings, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbSolr4Settings.text")); // NOI18N
|
||||
|
||||
lbZkSettings.setFont(lbZkSettings.getFont().deriveFont(lbZkSettings.getFont().getSize()+1f));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbZkSettings, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbZkSettings.text")); // NOI18N
|
||||
|
||||
tbZkHostname.setFont(tbZkHostname.getFont().deriveFont(tbZkHostname.getFont().getSize()+1f));
|
||||
tbZkHostname.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbZkHostname.toolTipText")); // NOI18N
|
||||
|
||||
tbZkPort.setFont(tbZkPort.getFont().deriveFont(tbZkPort.getFont().getSize()+1f));
|
||||
tbZkPort.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbZkPort.toolTipText")); // NOI18N
|
||||
|
||||
lbSolrNote1.setFont(lbSolrNote1.getFont().deriveFont(lbSolrNote1.getFont().getSize()+1f));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbSolrNote1, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbSolrNote1.text")); // NOI18N
|
||||
|
||||
lbSolrNote2.setFont(lbSolrNote2.getFont().deriveFont(lbSolrNote2.getFont().getSize()+1f));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbSolrNote2, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbSolrNote2.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout pnSolrSettingsLayout = new javax.swing.GroupLayout(pnSolrSettings);
|
||||
pnSolrSettings.setLayout(pnSolrSettingsLayout);
|
||||
pnSolrSettingsLayout.setHorizontalGroup(
|
||||
@ -304,37 +366,66 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
.addGroup(pnSolrSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(pnSolrSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(tbSolrHostname)
|
||||
.addComponent(tbSolr8Hostname)
|
||||
.addGroup(pnSolrSettingsLayout.createSequentialGroup()
|
||||
.addComponent(lbSolrSettings)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(pnSolrSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbSolr8Settings)
|
||||
.addComponent(lbSolrNote1)
|
||||
.addComponent(lbSolrNote2))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 57, Short.MAX_VALUE)
|
||||
.addComponent(bnTestSolr)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(lbTestSolr, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(tbSolrPort)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(lbTestSolr, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(3, 3, 3))
|
||||
.addComponent(tbSolr8Port)
|
||||
.addComponent(tbSolr4Hostname)
|
||||
.addComponent(tbSolr4Port)
|
||||
.addComponent(tbZkHostname)
|
||||
.addComponent(tbZkPort)
|
||||
.addGroup(pnSolrSettingsLayout.createSequentialGroup()
|
||||
.addComponent(lbTestSolrWarning)
|
||||
.addGroup(pnSolrSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbTestSolrWarning)
|
||||
.addComponent(lbSolr4Settings)
|
||||
.addComponent(lbZkSettings))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
pnSolrSettingsLayout.setVerticalGroup(
|
||||
pnSolrSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSolrSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGap(8, 8, 8)
|
||||
.addComponent(lbSolrNote1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lbSolrNote2)
|
||||
.addGap(20, 20, 20)
|
||||
.addGroup(pnSolrSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSolrSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(bnTestSolr, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(lbSolrSettings))
|
||||
.addComponent(lbTestSolr, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(pnSolrSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(lbSolr8Settings)
|
||||
.addComponent(bnTestSolr))
|
||||
.addComponent(lbTestSolr, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbSolrHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(tbSolr8Hostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbSolr8Port, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(lbSolr4Settings, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbSolr4Hostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbSolr4Port, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(lbZkSettings)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbZkHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbZkPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(tbSolrPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lbTestSolrWarning, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
tbSolr4Port.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbSolr4Port.toolTipText")); // NOI18N
|
||||
|
||||
pnMessagingSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
lbMessageServiceSettings.setFont(lbMessageServiceSettings.getFont().deriveFont((float)12));
|
||||
@ -378,7 +469,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
.addComponent(tbMsgHostname)
|
||||
.addGroup(pnMessagingSettingsLayout.createSequentialGroup()
|
||||
.addComponent(lbMessageServiceSettings)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 229, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(bnTestMessageService)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(lbTestMessageService, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
@ -395,8 +486,8 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
.addGroup(pnMessagingSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(pnMessagingSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(pnMessagingSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(bnTestMessageService, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(pnMessagingSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(bnTestMessageService)
|
||||
.addComponent(lbMessageServiceSettings))
|
||||
.addComponent(lbTestMessageService, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
@ -436,10 +527,11 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
.addComponent(cbEnableMultiUser)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbOops))
|
||||
.addComponent(pnSolrSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnDatabaseSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnMessagingSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap())
|
||||
.addComponent(pnMessagingSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnSolrSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(39, 39, 39))
|
||||
);
|
||||
pnOverallPanelLayout.setVerticalGroup(
|
||||
pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -448,12 +540,13 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
.addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(cbEnableMultiUser))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnDatabaseSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnSolrSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnMessagingSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(39, Short.MAX_VALUE))
|
||||
.addGroup(pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(pnOverallPanelLayout.createSequentialGroup()
|
||||
.addComponent(pnDatabaseSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(pnMessagingSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(pnSolrSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(201, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jScrollPane.setViewportView(pnOverallPanel);
|
||||
@ -462,13 +555,13 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 1191, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 537, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 695, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
@ -477,7 +570,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
* Enables/disables the multi-user settings, based upon input provided
|
||||
*
|
||||
* @param textFields The text fields to enable/disable.
|
||||
* @param enabled True means enable, false means disable.
|
||||
* @param enabled True means enable, false means disable.
|
||||
*/
|
||||
private static void enableMultiUserComponents(Collection<JTextField> textFields, boolean enabled) {
|
||||
for (JTextField textField : textFields) {
|
||||
@ -570,8 +663,31 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
KeywordSearchService kwsService = Lookup.getDefault().lookup(KeywordSearchService.class);
|
||||
try {
|
||||
if (kwsService != null) {
|
||||
int port = Integer.parseInt(tbSolrPort.getText().trim());
|
||||
kwsService.tryConnect(tbSolrHostname.getText().trim(), port);
|
||||
// test Solr 8 connectivity
|
||||
if (!tbSolr8Port.getText().trim().isEmpty() && !tbSolr8Hostname.getText().trim().isEmpty()) {
|
||||
int port = Integer.parseInt(tbSolr8Port.getText().trim());
|
||||
kwsService.tryConnect(tbSolr8Hostname.getText().trim(), port);
|
||||
}
|
||||
|
||||
// test Solr 4 conenctivity
|
||||
if (!tbSolr4Port.getText().trim().isEmpty() && !tbSolr4Hostname.getText().trim().isEmpty()) {
|
||||
int port = Integer.parseInt(tbSolr4Port.getText().trim());
|
||||
kwsService.tryConnect(tbSolr4Hostname.getText().trim(), port);
|
||||
}
|
||||
|
||||
// test ZooKeeper connectivity (ZK settings are mandatory)
|
||||
if (tbZkPort.getText().trim().isEmpty() || tbZkHostname.getText().trim().isEmpty()) {
|
||||
lbTestSolr.setIcon(badIcon);
|
||||
lbTestSolrWarning.setText(NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.UnableToConnectToZK"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (false == CoordinationServiceUtils.isZooKeeperAccessible(tbZkHostname.getText().trim(), tbZkPort.getText().trim())) {
|
||||
lbTestSolr.setIcon(badIcon);
|
||||
lbTestSolrWarning.setText(NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.UnableToConnectToZK"));
|
||||
return;
|
||||
}
|
||||
|
||||
lbTestSolr.setIcon(goodIcon);
|
||||
lbTestSolrWarning.setText("");
|
||||
} else {
|
||||
@ -584,6 +700,10 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
} catch (KeywordSearchServiceException ex) {
|
||||
lbTestSolr.setIcon(badIcon);
|
||||
lbTestSolrWarning.setText(ex.getMessage());
|
||||
} catch (InterruptedException | IOException ex) {
|
||||
// ZK exceptions
|
||||
lbTestSolr.setIcon(badIcon);
|
||||
lbTestSolrWarning.setText(ex.getMessage());
|
||||
} finally {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
@ -617,14 +737,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS
|
||||
}
|
||||
|
||||
String indexingServerHost = UserPreferences.getIndexingServerHost().trim();
|
||||
if (!indexingServerHost.isEmpty()) {
|
||||
tbSolrHostname.setText(indexingServerHost);
|
||||
}
|
||||
String indexingServerPort = UserPreferences.getIndexingServerPort().trim();
|
||||
if (portNumberIsValid(indexingServerPort)) {
|
||||
tbSolrPort.setText(indexingServerPort);
|
||||
}
|
||||
populateSolrAndZkSettings();
|
||||
|
||||
lbTestDatabase.setIcon(null);
|
||||
lbTestSolr.setIcon(null);
|
||||
@ -638,6 +751,54 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
this.valid(); // trigger validation to enable buttons based on current settings
|
||||
}
|
||||
|
||||
private void populateSolrAndZkSettings() {
|
||||
|
||||
String indexingServerHost = UserPreferences.getIndexingServerHost().trim();
|
||||
if (!indexingServerHost.isEmpty()) {
|
||||
tbSolr8Hostname.setText(indexingServerHost);
|
||||
}
|
||||
String indexingServerPort = UserPreferences.getIndexingServerPort().trim();
|
||||
if (portNumberIsValid(indexingServerPort)) {
|
||||
tbSolr8Port.setText(indexingServerPort);
|
||||
}
|
||||
|
||||
String solr4ServerHost = UserPreferences.getSolr4ServerHost().trim();
|
||||
if (!solr4ServerHost.isEmpty()) {
|
||||
tbSolr4Hostname.setText(solr4ServerHost);
|
||||
}
|
||||
String solr4ServerPort = UserPreferences.getSolr4ServerPort().trim();
|
||||
if (portNumberIsValid(solr4ServerPort)) {
|
||||
tbSolr4Port.setText(solr4ServerPort);
|
||||
}
|
||||
|
||||
// if there are existing valid ZK settings, use those
|
||||
String zkServerPort = UserPreferences.getZkServerPort().trim();
|
||||
if (portNumberIsValid(zkServerPort)) {
|
||||
tbZkPort.setText(zkServerPort); // gets default ZK port, which is Solr port number + 1000
|
||||
}
|
||||
String zkServerHost = UserPreferences.getZkServerHost().trim();
|
||||
if (!zkServerHost.isEmpty()) {
|
||||
tbZkHostname.setText(zkServerHost);
|
||||
return;
|
||||
}
|
||||
|
||||
// If there are no previous Solr 4 settings, use Solr 8 settings
|
||||
// to fill in the ZK settings with the embedded Solr 8 ZK connection info.
|
||||
if (solr4ServerHost.isEmpty() && !indexingServerHost.isEmpty()) {
|
||||
tbZkHostname.setText(indexingServerHost);
|
||||
tbZkPort.setText(zkServerPort); // gets default ZK port, which is Solr port number + 1000
|
||||
return;
|
||||
}
|
||||
|
||||
// If there are existing Solr 4 settings and no Solr 8 settings,
|
||||
// pre-populate the ZK settings with the Solr 4 embedded ZK settings.
|
||||
if (!solr4ServerHost.isEmpty() && indexingServerHost.isEmpty()) {
|
||||
tbZkHostname.setText(solr4ServerHost);
|
||||
tbZkPort.setText(zkServerPort); // gets default ZK port, which is Solr port number + 1000
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests whether or not values have been entered in all of the database
|
||||
* settings text fields.
|
||||
@ -652,14 +813,31 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests whether or not values have been entered in all of the Solr settings
|
||||
* text fields.
|
||||
* Tests whether or not values have been entered in all of the mandatory
|
||||
* Solr settings text fields. Test optional settings for completeness.
|
||||
*
|
||||
* @return True or false.
|
||||
*/
|
||||
private boolean solrFieldsArePopulated() {
|
||||
return !tbSolrHostname.getText().trim().isEmpty()
|
||||
&& !tbSolrPort.getText().trim().isEmpty();
|
||||
|
||||
// either Solr 8 or/and Solr 4 seetings must be specified
|
||||
boolean solrConfigured = false;
|
||||
|
||||
// check if Solr 8 settings are set
|
||||
if (!tbSolr8Hostname.getText().trim().isEmpty()
|
||||
&& !tbSolr8Port.getText().trim().isEmpty()) {
|
||||
solrConfigured = true;
|
||||
}
|
||||
|
||||
// check if Solr 4 settings are set
|
||||
if (!tbSolr4Hostname.getText().trim().isEmpty()
|
||||
&& !tbSolr4Port.getText().trim().isEmpty()) {
|
||||
solrConfigured = true;
|
||||
}
|
||||
|
||||
// ZK settings are mandatory
|
||||
return (solrConfigured && !tbZkHostname.getText().trim().isEmpty()
|
||||
&& !tbZkPort.getText().trim().isEmpty());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -680,8 +858,6 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
boolean isPwSet = (tbMsgPassword.getPassword().length != 0);
|
||||
return (isUserSet == isPwSet);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void store() {
|
||||
boolean prevSelected = UserPreferences.getIsMultiUserModeEnabled();
|
||||
@ -694,11 +870,18 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
|
||||
boolean multiUserCasesEnabled = cbEnableMultiUser.isSelected();
|
||||
UserPreferences.setIsMultiUserModeEnabled(multiUserCasesEnabled);
|
||||
|
||||
|
||||
CaseDbConnectionInfo info = null;
|
||||
|
||||
|
||||
if (multiUserCasesEnabled == true) {
|
||||
|
||||
// Check if aplication restart is required.
|
||||
boolean needsRestart = false;
|
||||
// don't check if entring multi user data for the first time
|
||||
if (prevSelected == true) {
|
||||
needsRestart = isRestartRequired();
|
||||
}
|
||||
|
||||
/*
|
||||
* Currently only supporting multi-user cases with PostgreSQL case
|
||||
* databases.
|
||||
@ -735,37 +918,63 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
logger.log(Level.SEVERE, "Error saving messaging service connection info", ex); //NON-NLS
|
||||
}
|
||||
|
||||
UserPreferences.setIndexingServerHost(tbSolrHostname.getText().trim());
|
||||
UserPreferences.setIndexingServerPort(Integer.parseInt(tbSolrPort.getText().trim()));
|
||||
UserPreferences.setIndexingServerHost(tbSolr8Hostname.getText().trim());
|
||||
String solr8port = tbSolr8Port.getText().trim();
|
||||
if (!solr8port.isEmpty()) {
|
||||
UserPreferences.setIndexingServerPort(Integer.parseInt(solr8port));
|
||||
}
|
||||
UserPreferences.setSolr4ServerHost(tbSolr4Hostname.getText().trim());
|
||||
UserPreferences.setSolr4ServerPort(tbSolr4Port.getText().trim());
|
||||
UserPreferences.setZkServerHost(tbZkHostname.getText().trim());
|
||||
UserPreferences.setZkServerPort(tbZkPort.getText().trim());
|
||||
|
||||
if (needsRestart) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.MustRestart"),
|
||||
NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.restartRequiredLabel.text"),
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// trigger changes to whether or not user can use multi user settings for central repository
|
||||
if (prevSelected != multiUserCasesEnabled || !areCaseDbConnectionEqual(prevConn, info))
|
||||
if (prevSelected != multiUserCasesEnabled || !areCaseDbConnectionEqual(prevConn, info)) {
|
||||
GlobalSettingsPanel.onMultiUserChange(this, prevSelected, multiUserCasesEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isRestartRequired() {
|
||||
// if ZK was previously configured
|
||||
if (!UserPreferences.getZkServerHost().isEmpty()) {
|
||||
// Restart is required any time ZK info has changed
|
||||
if (!(tbZkHostname.getText().trim().equalsIgnoreCase(UserPreferences.getZkServerHost()))
|
||||
|| !(tbZkPort.getText().trim().equals(UserPreferences.getZkServerPort()))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean arePropsEqual(Object a, Object b) {
|
||||
if (a == null || b == null) {
|
||||
return (a == null && b == null);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return a.equals(b);
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean areCaseDbConnectionEqual(CaseDbConnectionInfo a, CaseDbConnectionInfo b) {
|
||||
|
||||
private static boolean areCaseDbConnectionEqual(CaseDbConnectionInfo a, CaseDbConnectionInfo b) {
|
||||
if (a == null || b == null) {
|
||||
return (a == null && b == null);
|
||||
}
|
||||
|
||||
return
|
||||
arePropsEqual(a.getDbType(), b.getDbType()) &&
|
||||
arePropsEqual(a.getHost(), b.getHost()) &&
|
||||
arePropsEqual(a.getPassword(), b.getPassword()) &&
|
||||
arePropsEqual(a.getPort(), b.getPort()) &&
|
||||
arePropsEqual(a.getUserName(), b.getUserName());
|
||||
}
|
||||
|
||||
return arePropsEqual(a.getDbType(), b.getDbType())
|
||||
&& arePropsEqual(a.getHost(), b.getHost())
|
||||
&& arePropsEqual(a.getPassword(), b.getPassword())
|
||||
&& arePropsEqual(a.getPort(), b.getPort())
|
||||
&& arePropsEqual(a.getUserName(), b.getUserName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates that the form is filled out correctly for our usage.
|
||||
@ -849,11 +1058,55 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
* @return True or false.
|
||||
*/
|
||||
boolean indexingServerSettingsAreValid() {
|
||||
if (!portNumberIsValid(tbSolrPort.getText().trim())) {
|
||||
|
||||
String solr8Port = tbSolr8Port.getText().trim();
|
||||
if (!solr8Port.isEmpty() && !portNumberIsValid(solr8Port)) {
|
||||
// if the port is specified, it has to be valid
|
||||
tbOops.setText(INVALID_INDEXING_SERVER_PORT_MSG);
|
||||
return false;
|
||||
}
|
||||
|
||||
String solr4Port = tbSolr4Port.getText().trim();
|
||||
if (!solr4Port.isEmpty() && !portNumberIsValid(solr4Port)) {
|
||||
// if the port is specified, it has to be valid
|
||||
tbOops.setText(INVALID_SOLR4_SERVER_PORT_MSG);
|
||||
return false;
|
||||
}
|
||||
|
||||
// either Solr 8 or/and Solr 4 seetings must be specified
|
||||
boolean solrConfigured = false;
|
||||
|
||||
// check if Solr 8 settings are set
|
||||
if (!tbSolr8Hostname.getText().trim().isEmpty()
|
||||
&& !tbSolr8Port.getText().trim().isEmpty()) {
|
||||
solrConfigured = true;
|
||||
}
|
||||
|
||||
// check if Solr 4 settings are set
|
||||
if (!tbSolr4Hostname.getText().trim().isEmpty()
|
||||
&& !tbSolr4Port.getText().trim().isEmpty()) {
|
||||
solrConfigured = true;
|
||||
}
|
||||
|
||||
if (!solrConfigured) {
|
||||
tbOops.setText(SOLR_SERVER_NOT_CONFIGURED_MSG);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ZK settings are mandatory
|
||||
if (tbZkHostname.getText().trim().isEmpty()) {
|
||||
tbOops.setText(INVALID_ZK_SERVER_HOST_MSG);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ZK settings are mandatory
|
||||
String zkPort = tbZkPort.getText().trim();
|
||||
if (zkPort.isEmpty() || !portNumberIsValid(zkPort)) {
|
||||
// if the port is specified, it has to be valid
|
||||
tbOops.setText(INVALID_ZK_SERVER_PORT_MSG);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -885,13 +1138,17 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
private javax.swing.JScrollPane jScrollPane;
|
||||
private javax.swing.JLabel lbDatabaseSettings;
|
||||
private javax.swing.JLabel lbMessageServiceSettings;
|
||||
private javax.swing.JLabel lbSolrSettings;
|
||||
private javax.swing.JLabel lbSolr4Settings;
|
||||
private javax.swing.JLabel lbSolr8Settings;
|
||||
private javax.swing.JLabel lbSolrNote1;
|
||||
private javax.swing.JLabel lbSolrNote2;
|
||||
private javax.swing.JLabel lbTestDatabase;
|
||||
private javax.swing.JLabel lbTestDbWarning;
|
||||
private javax.swing.JLabel lbTestMessageService;
|
||||
private javax.swing.JLabel lbTestMessageWarning;
|
||||
private javax.swing.JLabel lbTestSolr;
|
||||
private javax.swing.JLabel lbTestSolrWarning;
|
||||
private javax.swing.JLabel lbZkSettings;
|
||||
private javax.swing.JPanel pnDatabaseSettings;
|
||||
private javax.swing.JPanel pnMessagingSettings;
|
||||
private javax.swing.JPanel pnOverallPanel;
|
||||
@ -905,8 +1162,12 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
private javax.swing.JTextField tbMsgPort;
|
||||
private javax.swing.JTextField tbMsgUsername;
|
||||
private javax.swing.JTextField tbOops;
|
||||
private javax.swing.JTextField tbSolrHostname;
|
||||
private javax.swing.JTextField tbSolrPort;
|
||||
private javax.swing.JTextField tbSolr4Hostname;
|
||||
private javax.swing.JTextField tbSolr4Port;
|
||||
private javax.swing.JTextField tbSolr8Hostname;
|
||||
private javax.swing.JTextField tbSolr8Port;
|
||||
private javax.swing.JTextField tbZkHostname;
|
||||
private javax.swing.JTextField tbZkPort;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
@ -942,4 +1203,22 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
controller.changed();
|
||||
}
|
||||
}
|
||||
|
||||
private class MyDocumentListener implements DocumentListener {
|
||||
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
tbZkHostname.setText(tbSolr8Hostname.getText().trim());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
tbZkHostname.setText(tbSolr8Hostname.getText().trim());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
tbZkHostname.setText(tbSolr8Hostname.getText().trim());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -170,6 +170,7 @@ public class PlatformUtil {
|
||||
return javaPath;
|
||||
}
|
||||
|
||||
// by default, use Java that came with Autopsy
|
||||
File jrePath = new File(getInstallPath() + File.separator + "jre");
|
||||
if (jrePath.exists() && jrePath.isDirectory()) {
|
||||
System.out.println(
|
||||
@ -177,10 +178,12 @@ public class PlatformUtil {
|
||||
"PlatformUtil.jrePath.jreDir.msg",
|
||||
jrePath.getAbsolutePath()));
|
||||
javaPath = jrePath.getAbsolutePath() + File.separator + "bin" + File.separator + "java"; //NON-NLS
|
||||
} else if (System.getProperty("java.home") != null && !(System.getProperty("java.home").isEmpty())) {
|
||||
// if OS knows where Java is located
|
||||
return System.getProperty("java.home") + File.separator + "bin" + File.separator + "java"; //NON-NLS
|
||||
} else {
|
||||
//else use system installed java in PATH env variable
|
||||
javaPath = "java"; //NON-NLS
|
||||
|
||||
}
|
||||
|
||||
System.out.println(NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.jrePath.usingJavaPath.msg", javaPath));
|
||||
|
@ -71,12 +71,19 @@ public class TextUtil {
|
||||
* have chosen to ignore the extended planes above Unicode BMP for the time
|
||||
* being. The net result of this is some non-BMP characters may be
|
||||
* interspersed with '^' characters in Autopsy.
|
||||
*
|
||||
* Strip all non-characters
|
||||
* http://unicode.org/cldr/utility/list-unicodeset.jsp?a=[:Noncharacter_Code_Point=True:]
|
||||
* and non-printable control characters except tabulator, new line and carriage return
|
||||
*
|
||||
* @param ch the character to test
|
||||
*
|
||||
* @return Returns true if the character is valid UTF-8, false if not.
|
||||
*/
|
||||
public static boolean isValidSolrUTF8(char ch) {
|
||||
return ((ch <= 0xFDD0 || ch >= 0xFDEF) && (ch > 0x1F || ch == 0x9 || ch == 0xA || ch == 0xD) && (ch != 0xFFFF) && (ch != 0xFFFE));
|
||||
return ((ch <= 0xFDD0 || ch >= 0xFDEF) // 0xfdd0 - 0xfdef
|
||||
&& (ch > 0x1F || ch == 0x9 || ch == 0xA || ch == 0xD)
|
||||
&& (ch % 0x10000 != 0xFFFF) // 0xffff - 0x10ffff range step 0x10000
|
||||
&& (ch % 0x10000 != 0xFFFE)); // 0xfffe - 0x10fffe range
|
||||
}
|
||||
}
|
||||
|
@ -982,7 +982,21 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
||||
}
|
||||
map.put(attribute.getAttributeType().getDisplayName(), value);
|
||||
} else {
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getDisplayString());
|
||||
switch(attribute.getAttributeType().getValueType()) {
|
||||
case INTEGER:
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueInt());
|
||||
break;
|
||||
case DOUBLE:
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueDouble());
|
||||
break;
|
||||
case LONG:
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueLong());
|
||||
break;
|
||||
default:
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getDisplayString());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
|
@ -3,6 +3,9 @@
|
||||
<Form version="1.6" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
@ -34,6 +37,12 @@
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
|
@ -52,7 +52,7 @@ class ArtifactsListPanel extends JPanel {
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
ArtifactsListPanel(BlackboardArtifact.ARTIFACT_TYPE artifactType) {
|
||||
tableModel = new DomainArtifactTableModel(artifactType);
|
||||
initComponents();
|
||||
initComponents();
|
||||
jTable1.getRowSorter().toggleSortOrder(0);
|
||||
jTable1.getRowSorter().toggleSortOrder(0);
|
||||
}
|
||||
@ -153,8 +153,11 @@ class ArtifactsListPanel extends JPanel {
|
||||
jTable1 = new javax.swing.JTable();
|
||||
|
||||
setOpaque(false);
|
||||
setPreferredSize(new java.awt.Dimension(300, 0));
|
||||
|
||||
jScrollPane1.setBorder(null);
|
||||
jScrollPane1.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jScrollPane1.setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
|
||||
jTable1.setAutoCreateRowSorter(true);
|
||||
jTable1.setModel(tableModel);
|
||||
@ -311,6 +314,10 @@ class ArtifactsListPanel extends JPanel {
|
||||
return bba.getDisplayString();
|
||||
} else if (columnIndex == 1 && bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL.getTypeID() && !StringUtils.isBlank(bba.getDisplayString())) {
|
||||
return bba.getDisplayString();
|
||||
} else if (columnIndex == 1 && bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID() && !StringUtils.isBlank(bba.getDisplayString())) {
|
||||
return bba.getDisplayString();
|
||||
} else if (columnIndex == 1 && bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT.getTypeID() && !StringUtils.isBlank(bba.getDisplayString())) {
|
||||
return bba.getDisplayString();
|
||||
}
|
||||
}
|
||||
return Bundle.ArtifactsListPanel_value_noValue();
|
||||
@ -339,7 +346,6 @@ class ArtifactsListPanel extends JPanel {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JTable jTable1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
@ -76,5 +76,4 @@ class ArtifactsWorker extends SwingWorker<List<BlackboardArtifact>, Void> {
|
||||
}
|
||||
DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.ArtifactSearchResultEvent(artifactType, listOfArtifacts));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -151,7 +151,3 @@ VideoThumbnailPanel.nameLabel.more.text=\ and {0} more
|
||||
# {1} - units
|
||||
VideoThumbnailPanel.sizeLabel.text=Size: {0} {1}
|
||||
VideoThumbnailPanel.terraBytes.text=TB
|
||||
WebHistoryDetailsPanel.details.attrHeader=Attributes
|
||||
WebHistoryDetailsPanel.details.dataSource=Data Source
|
||||
WebHistoryDetailsPanel.details.file=File
|
||||
WebHistoryDetailsPanel.details.sourceHeader=Source
|
||||
|
@ -118,10 +118,7 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent event) {
|
||||
if (event.getStateChange() == ItemEvent.SELECTED) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
getSelectedFilterPanel().setLastGroupingAttributeType(groupByCombobox.getItemAt(groupByCombobox.getSelectedIndex()));
|
||||
});
|
||||
|
||||
getSelectedFilterPanel().setLastGroupingAttributeType(groupByCombobox.getItemAt(groupByCombobox.getSelectedIndex()));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -129,9 +126,7 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent event) {
|
||||
if (event.getStateChange() == ItemEvent.SELECTED) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
getSelectedFilterPanel().setLastSortingMethod(orderByCombobox.getItemAt(orderByCombobox.getSelectedIndex()));
|
||||
});
|
||||
getSelectedFilterPanel().setLastSortingMethod(orderByCombobox.getItemAt(orderByCombobox.getSelectedIndex()));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -139,9 +134,7 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent event) {
|
||||
if (event.getStateChange() == ItemEvent.SELECTED) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
getSelectedFilterPanel().setLastGroupSortingAlg(groupSortingComboBox.getItemAt(groupSortingComboBox.getSelectedIndex()));
|
||||
});
|
||||
getSelectedFilterPanel().setLastGroupSortingAlg(groupSortingComboBox.getItemAt(groupSortingComboBox.getSelectedIndex()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -56,12 +56,12 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final String PREFERRED_ID = "DiscoveryTc"; // NON-NLS
|
||||
private static final int ANIMATION_INCREMENT = 30;
|
||||
private volatile static int resultsAreaSize = 250;
|
||||
private volatile static int previousDividerLocation = 250;
|
||||
private final GroupListPanel groupListPanel;
|
||||
private final ResultsPanel resultsPanel;
|
||||
private String selectedDomainTabName;
|
||||
private Type searchType;
|
||||
private int dividerLocation = -1;
|
||||
private int dividerLocation = JSplitPane.UNDEFINED_CONDITION;
|
||||
private SwingAnimator animator = null;
|
||||
|
||||
/**
|
||||
@ -87,9 +87,13 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
if (evt.getPropertyName().equalsIgnoreCase(JSplitPane.DIVIDER_LOCATION_PROPERTY)) {
|
||||
//Only change the saved location when it was a manual change by the user and not the animation or the window opening initially
|
||||
if ((animator == null || !animator.isRunning()) && evt.getNewValue() instanceof Integer
|
||||
&& ((int) evt.getNewValue() + 5) < (rightSplitPane.getHeight() - rightSplitPane.getDividerSize())) {
|
||||
resultsAreaSize = (int) evt.getNewValue();
|
||||
if ((animator == null || !animator.isRunning())
|
||||
&& evt.getNewValue() instanceof Integer
|
||||
&& evt.getOldValue() instanceof Integer
|
||||
&& ((int) evt.getNewValue() + 5) < (rightSplitPane.getHeight() - rightSplitPane.getDividerSize())
|
||||
&& (JSplitPane.UNDEFINED_CONDITION != (int) evt.getNewValue())
|
||||
&& ((int) evt.getOldValue() != JSplitPane.UNDEFINED_CONDITION)) {
|
||||
previousDividerLocation = (int) evt.getNewValue();
|
||||
|
||||
}
|
||||
}
|
||||
@ -160,6 +164,7 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
if (rightSplitPane.getBottomComponent() instanceof DomainDetailsPanel) {
|
||||
selectedDomainTabName = ((DomainDetailsPanel) rightSplitPane.getBottomComponent()).getSelectedTabName();
|
||||
}
|
||||
rightSplitPane.setDividerLocation(JSplitPane.UNDEFINED_CONDITION);
|
||||
super.componentClosed();
|
||||
}
|
||||
|
||||
@ -350,6 +355,7 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
private String validateLastSelectedType(DiscoveryEventUtils.SearchCompleteEvent searchCompleteEvent) {
|
||||
String typeFilteredOn = selectedDomainTabName;
|
||||
|
||||
for (AbstractFilter filter : searchCompleteEvent.getFilters()) {
|
||||
if (filter instanceof ArtifactTypeFilter) {
|
||||
for (ARTIFACT_TYPE type : ((ArtifactTypeFilter) filter).getTypes()) {
|
||||
@ -396,8 +402,8 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
@Override
|
||||
public boolean hasTerminated() {
|
||||
if (dividerLocation != JSplitPane.UNDEFINED_CONDITION && dividerLocation < resultsAreaSize) {
|
||||
dividerLocation = resultsAreaSize;
|
||||
if (dividerLocation != JSplitPane.UNDEFINED_CONDITION && dividerLocation < previousDividerLocation) {
|
||||
dividerLocation = previousDividerLocation;
|
||||
animator = null;
|
||||
return true;
|
||||
}
|
||||
@ -448,7 +454,7 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
@Override
|
||||
public void paintComponent(Graphics g) {
|
||||
if (animator != null && animator.isRunning() && (dividerLocation == JSplitPane.UNDEFINED_CONDITION
|
||||
|| (dividerLocation <= getHeight() && dividerLocation >= resultsAreaSize))) {
|
||||
|| (dividerLocation <= getHeight() && dividerLocation >= previousDividerLocation))) {
|
||||
setDividerLocation(dividerLocation);
|
||||
}
|
||||
super.paintComponent(g);
|
||||
|
@ -1,6 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.4" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
@ -17,6 +25,14 @@
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JSplitPane" name="jSplitPane1">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.discovery.ui;
|
||||
|
||||
import org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JPanel;
|
||||
@ -25,7 +26,7 @@ import javax.swing.JScrollPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import org.sleuthkit.autopsy.contentviewers.artifactviewers.DefaultArtifactContentViewer;
|
||||
import org.sleuthkit.autopsy.contentviewers.artifactviewers.DefaultTableArtifactContentViewer;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||
import org.sleuthkit.autopsy.discovery.search.DiscoveryEventUtils;
|
||||
@ -75,19 +76,17 @@ final class DomainArtifactsTabPanel extends JPanel {
|
||||
private void setRightComponent() {
|
||||
switch (artifactType) {
|
||||
case TSK_WEB_HISTORY:
|
||||
rightPanel = new WebHistoryDetailsPanel();
|
||||
break;
|
||||
case TSK_WEB_COOKIE:
|
||||
case TSK_WEB_SEARCH_QUERY:
|
||||
case TSK_WEB_BOOKMARK:
|
||||
rightPanel = new DefaultArtifactContentViewer();
|
||||
rightPanel = new GeneralPurposeArtifactViewer();
|
||||
break;
|
||||
case TSK_WEB_DOWNLOAD:
|
||||
case TSK_WEB_CACHE:
|
||||
rightPanel = new ContentViewerDetailsPanel();
|
||||
break;
|
||||
default:
|
||||
rightPanel = new DefaultArtifactContentViewer();
|
||||
rightPanel = new DefaultTableArtifactContentViewer();
|
||||
break;
|
||||
}
|
||||
if (rightPanel != null) {
|
||||
@ -98,7 +97,7 @@ final class DomainArtifactsTabPanel extends JPanel {
|
||||
/**
|
||||
* Get the status of the panel which indicates if it is populated.
|
||||
*
|
||||
* @return The ArtifactRetrievalStatuss of the panel.
|
||||
* @return The ArtifactRetrievalStatus of the panel.
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
ArtifactRetrievalStatus getStatus() {
|
||||
@ -126,24 +125,24 @@ final class DomainArtifactsTabPanel extends JPanel {
|
||||
*/
|
||||
@Subscribe
|
||||
void handleArtifactSearchResultEvent(DiscoveryEventUtils.ArtifactSearchResultEvent artifactresultEvent) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
if (artifactType == artifactresultEvent.getArtifactType()) {
|
||||
if (artifactType == artifactresultEvent.getArtifactType()) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
listPanel.removeListSelectionListener(listener);
|
||||
listPanel.addArtifacts(artifactresultEvent.getListOfArtifacts());
|
||||
status = ArtifactRetrievalStatus.POPULATED;
|
||||
setEnabled(!listPanel.isEmpty());
|
||||
listPanel.addSelectionListener(listener);
|
||||
listPanel.selectFirst();
|
||||
revalidate();
|
||||
repaint();
|
||||
try {
|
||||
DiscoveryEventUtils.getDiscoveryEventBus().unregister(this);
|
||||
} catch (IllegalArgumentException notRegistered) {
|
||||
logger.log(Level.INFO, "Attempting to unregister tab which was not registered");
|
||||
// attempting to remove a tab that was never registered
|
||||
}
|
||||
status = ArtifactRetrievalStatus.POPULATED;
|
||||
setEnabled(!listPanel.isEmpty());
|
||||
validate();
|
||||
repaint();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -167,7 +166,12 @@ final class DomainArtifactsTabPanel extends JPanel {
|
||||
|
||||
jSplitPane1 = new javax.swing.JSplitPane();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jSplitPane1.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jSplitPane1.setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
add(jSplitPane1, java.awt.BorderLayout.CENTER);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
@ -3,6 +3,12 @@
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
@ -20,6 +26,14 @@
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JTabbedPane" name="jTabbedPane1">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
|
@ -96,22 +96,21 @@ final class DomainDetailsPanel extends JPanel {
|
||||
* Run the worker which retrieves the list of artifacts for the domain to
|
||||
* populate the details area.
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
private void runDomainWorker() {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
Component selectedComponent = jTabbedPane1.getSelectedComponent();
|
||||
if (selectedComponent instanceof DomainArtifactsTabPanel) {
|
||||
if (detailsWorker != null && !detailsWorker.isDone()) {
|
||||
detailsWorker.cancel(true);
|
||||
}
|
||||
DomainArtifactsTabPanel selectedTab = (DomainArtifactsTabPanel) selectedComponent;
|
||||
if (selectedTab.getStatus() == DomainArtifactsTabPanel.ArtifactRetrievalStatus.UNPOPULATED) {
|
||||
selectedTab.setStatus(DomainArtifactsTabPanel.ArtifactRetrievalStatus.POPULATING);
|
||||
DiscoveryEventUtils.getDiscoveryEventBus().register(selectedTab);
|
||||
detailsWorker = new ArtifactsWorker(selectedTab.getArtifactType(), domain);
|
||||
detailsWorker.execute();
|
||||
}
|
||||
Component selectedComponent = jTabbedPane1.getSelectedComponent();
|
||||
if (selectedComponent instanceof DomainArtifactsTabPanel) {
|
||||
if (detailsWorker != null && !detailsWorker.isDone()) {
|
||||
detailsWorker.cancel(true);
|
||||
}
|
||||
});
|
||||
DomainArtifactsTabPanel selectedTab = (DomainArtifactsTabPanel) selectedComponent;
|
||||
if (selectedTab.getStatus() == DomainArtifactsTabPanel.ArtifactRetrievalStatus.UNPOPULATED) {
|
||||
DiscoveryEventUtils.getDiscoveryEventBus().register(selectedTab);
|
||||
selectedTab.setStatus(DomainArtifactsTabPanel.ArtifactRetrievalStatus.POPULATING);
|
||||
detailsWorker = new ArtifactsWorker(selectedTab.getArtifactType(), domain);
|
||||
detailsWorker.execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -122,8 +121,8 @@ final class DomainDetailsPanel extends JPanel {
|
||||
*/
|
||||
@Subscribe
|
||||
void handlePopulateDomainTabsEvent(DiscoveryEventUtils.PopulateDomainTabsEvent populateEvent) {
|
||||
domain = populateEvent.getDomain();
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
domain = populateEvent.getDomain();
|
||||
resetTabsStatus();
|
||||
selectTab();
|
||||
runDomainWorker();
|
||||
@ -172,7 +171,12 @@ final class DomainDetailsPanel extends JPanel {
|
||||
jTabbedPane1 = new javax.swing.JTabbedPane();
|
||||
|
||||
setEnabled(false);
|
||||
setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jTabbedPane1.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jTabbedPane1.setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
add(jTabbedPane1, java.awt.BorderLayout.CENTER);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
@ -70,20 +70,18 @@ final class FileDetailsPanel extends javax.swing.JPanel {
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
if (SwingUtilities.isRightMouseButton(e)) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
instancesList.setSelectedIndex(instancesList.locationToIndex(e.getPoint()));
|
||||
Set<AbstractFile> files = new HashSet<>();
|
||||
files.add(instancesList.getSelectedValue());
|
||||
JPopupMenu menu = new JPopupMenu();
|
||||
menu.add(new ViewContextAction(Bundle.ResultsPanel_viewFileInDir_name(), instancesList.getSelectedValue()));
|
||||
menu.add(new ExternalViewerAction(Bundle.ResultsPanel_openInExternalViewer_name(), new FileNode(instancesList.getSelectedValue())));
|
||||
menu.add(ViewFileInTimelineAction.createViewFileAction(instancesList.getSelectedValue()));
|
||||
menu.add(new DiscoveryExtractAction(files));
|
||||
menu.add(AddContentTagAction.getInstance().getMenuForContent(files));
|
||||
menu.add(DeleteFileContentTagAction.getInstance().getMenuForFiles(files));
|
||||
menu.add(AddContentToHashDbAction.getInstance().getMenuForFiles(files));
|
||||
menu.show(instancesList, e.getPoint().x, e.getPoint().y);
|
||||
});
|
||||
instancesList.setSelectedIndex(instancesList.locationToIndex(e.getPoint()));
|
||||
Set<AbstractFile> files = new HashSet<>();
|
||||
files.add(instancesList.getSelectedValue());
|
||||
JPopupMenu menu = new JPopupMenu();
|
||||
menu.add(new ViewContextAction(Bundle.ResultsPanel_viewFileInDir_name(), instancesList.getSelectedValue()));
|
||||
menu.add(new ExternalViewerAction(Bundle.ResultsPanel_openInExternalViewer_name(), new FileNode(instancesList.getSelectedValue())));
|
||||
menu.add(ViewFileInTimelineAction.createViewFileAction(instancesList.getSelectedValue()));
|
||||
menu.add(new DiscoveryExtractAction(files));
|
||||
menu.add(AddContentTagAction.getInstance().getMenuForContent(files));
|
||||
menu.add(DeleteFileContentTagAction.getInstance().getMenuForFiles(files));
|
||||
menu.add(AddContentToHashDbAction.getInstance().getMenuForFiles(files));
|
||||
menu.show(instancesList, e.getPoint().x, e.getPoint().y);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -91,14 +89,12 @@ final class FileDetailsPanel extends javax.swing.JPanel {
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
if (!e.getValueIsAdjusting()) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
AbstractFile file = getSelectedFile();
|
||||
if (file != null) {
|
||||
dataContentPanel.setNode(new TableFilterNode(new FileNode(file), false));
|
||||
} else {
|
||||
dataContentPanel.setNode(null);
|
||||
}
|
||||
});
|
||||
AbstractFile file = getSelectedFile();
|
||||
if (file != null) {
|
||||
dataContentPanel.setNode(new TableFilterNode(new FileNode(file), false));
|
||||
} else {
|
||||
dataContentPanel.setNode(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -127,8 +123,8 @@ final class FileDetailsPanel extends javax.swing.JPanel {
|
||||
*/
|
||||
@Subscribe
|
||||
void handlePopulateInstancesListEvent(DiscoveryEventUtils.PopulateInstancesListEvent populateEvent) {
|
||||
List<AbstractFile> files = populateEvent.getInstances();
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
List<AbstractFile> files = populateEvent.getInstances();
|
||||
if (files.isEmpty()) {
|
||||
//if there are no files currently remove the current items without removing listener to cause content viewer to reset
|
||||
instancesListModel.removeAllElements();
|
||||
|
@ -69,10 +69,8 @@ final class GroupListPanel extends javax.swing.JPanel {
|
||||
*/
|
||||
@Subscribe
|
||||
void handleSearchStartedEvent(DiscoveryEventUtils.SearchStartedEvent searchStartedEvent) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
type = searchStartedEvent.getType();
|
||||
groupKeyList.setListData(new GroupKey[0]);
|
||||
});
|
||||
type = searchStartedEvent.getType();
|
||||
groupKeyList.setListData(new GroupKey[0]);
|
||||
}
|
||||
|
||||
@Messages({"GroupsListPanel.noFileResults.message.text=No files were found for the selected filters.\n\n"
|
||||
@ -94,29 +92,27 @@ final class GroupListPanel extends javax.swing.JPanel {
|
||||
*/
|
||||
@Subscribe
|
||||
void handleSearchCompleteEvent(DiscoveryEventUtils.SearchCompleteEvent searchCompleteEvent) {
|
||||
groupMap = searchCompleteEvent.getGroupMap();
|
||||
searchfilters = searchCompleteEvent.getFilters();
|
||||
groupingAttribute = searchCompleteEvent.getGroupingAttr();
|
||||
groupSort = searchCompleteEvent.getGroupSort();
|
||||
resultSortMethod = searchCompleteEvent.getResultSort();
|
||||
groupKeyList.setListData(groupMap.keySet().toArray(new GroupKey[groupMap.keySet().size()]));
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
groupMap = searchCompleteEvent.getGroupMap();
|
||||
searchfilters = searchCompleteEvent.getFilters();
|
||||
groupingAttribute = searchCompleteEvent.getGroupingAttr();
|
||||
groupSort = searchCompleteEvent.getGroupSort();
|
||||
resultSortMethod = searchCompleteEvent.getResultSort();
|
||||
groupKeyList.setListData(groupMap.keySet().toArray(new GroupKey[groupMap.keySet().size()]));
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
if (groupKeyList.getModel().getSize() > 0) {
|
||||
groupKeyList.setSelectedIndex(0);
|
||||
} else if (type == DOMAIN) {
|
||||
JOptionPane.showMessageDialog(DiscoveryTopComponent.getTopComponent(),
|
||||
Bundle.GroupsListPanel_noDomainResults_message_text(),
|
||||
Bundle.GroupsListPanel_noResults_title_text(),
|
||||
JOptionPane.PLAIN_MESSAGE);
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(DiscoveryTopComponent.getTopComponent(),
|
||||
Bundle.GroupsListPanel_noFileResults_message_text(),
|
||||
Bundle.GroupsListPanel_noResults_title_text(),
|
||||
JOptionPane.PLAIN_MESSAGE);
|
||||
}
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
});
|
||||
if (groupKeyList.getModel().getSize() > 0) {
|
||||
groupKeyList.setSelectedIndex(0);
|
||||
} else if (type == DOMAIN) {
|
||||
JOptionPane.showMessageDialog(DiscoveryTopComponent.getTopComponent(),
|
||||
Bundle.GroupsListPanel_noDomainResults_message_text(),
|
||||
Bundle.GroupsListPanel_noResults_title_text(),
|
||||
JOptionPane.PLAIN_MESSAGE);
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(DiscoveryTopComponent.getTopComponent(),
|
||||
Bundle.GroupsListPanel_noFileResults_message_text(),
|
||||
Bundle.GroupsListPanel_noResults_title_text(),
|
||||
JOptionPane.PLAIN_MESSAGE);
|
||||
}
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -182,12 +182,12 @@ final class ResultsPanel extends javax.swing.JPanel {
|
||||
*/
|
||||
@Subscribe
|
||||
void handlePageRetrievedEvent(DiscoveryEventUtils.PageRetrievedEvent pageRetrievedEvent) {
|
||||
//send populateMesage
|
||||
if (pageRetrievedEvent.getType() != DOMAIN) {
|
||||
DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.PopulateInstancesListEvent(getInstancesForSelected()));
|
||||
}
|
||||
currentPage = pageRetrievedEvent.getPageNumber();
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
//send populateMesage
|
||||
if (pageRetrievedEvent.getType() != DOMAIN) {
|
||||
DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.PopulateInstancesListEvent(getInstancesForSelected()));
|
||||
}
|
||||
currentPage = pageRetrievedEvent.getPageNumber();
|
||||
updateControls();
|
||||
resetResultViewer();
|
||||
if (null != pageRetrievedEvent.getType()) {
|
||||
@ -214,20 +214,17 @@ final class ResultsPanel extends javax.swing.JPanel {
|
||||
}
|
||||
resultsViewerPanel.revalidate();
|
||||
resultsViewerPanel.repaint();
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
void handleCancelBackgroundTasksEvent(DiscoveryEventUtils.CancelBackgroundTasksEvent cancelEvent) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
for (SwingWorker<Void, Void> thumbWorker : resultContentWorkers) {
|
||||
if (!thumbWorker.isDone()) {
|
||||
thumbWorker.cancel(true);
|
||||
}
|
||||
for (SwingWorker<Void, Void> thumbWorker : resultContentWorkers) {
|
||||
if (!thumbWorker.isDone()) {
|
||||
thumbWorker.cancel(true);
|
||||
}
|
||||
resultContentWorkers.clear();
|
||||
});
|
||||
}
|
||||
resultContentWorkers.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -336,14 +333,14 @@ final class ResultsPanel extends javax.swing.JPanel {
|
||||
*/
|
||||
@Subscribe
|
||||
void handleGroupSelectedEvent(DiscoveryEventUtils.GroupSelectedEvent groupSelectedEvent) {
|
||||
searchFilters = groupSelectedEvent.getFilters();
|
||||
groupingAttribute = groupSelectedEvent.getGroupingAttr();
|
||||
groupSort = groupSelectedEvent.getGroupSort();
|
||||
fileSortMethod = groupSelectedEvent.getResultSort();
|
||||
selectedGroupKey = groupSelectedEvent.getGroupKey();
|
||||
resultType = groupSelectedEvent.getResultType();
|
||||
groupSize = groupSelectedEvent.getGroupSize();
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
searchFilters = groupSelectedEvent.getFilters();
|
||||
groupingAttribute = groupSelectedEvent.getGroupingAttr();
|
||||
groupSort = groupSelectedEvent.getGroupSort();
|
||||
fileSortMethod = groupSelectedEvent.getResultSort();
|
||||
selectedGroupKey = groupSelectedEvent.getGroupKey();
|
||||
resultType = groupSelectedEvent.getResultType();
|
||||
groupSize = groupSelectedEvent.getGroupSize();
|
||||
resetResultViewer();
|
||||
setPage(0);
|
||||
});
|
||||
@ -357,9 +354,9 @@ final class ResultsPanel extends javax.swing.JPanel {
|
||||
*/
|
||||
@Subscribe
|
||||
void handleNoResultsEvent(DiscoveryEventUtils.NoResultsEvent noResultsEvent) {
|
||||
groupSize = 0;
|
||||
currentPage = 0;
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
groupSize = 0;
|
||||
currentPage = 0;
|
||||
updateControls();
|
||||
videoThumbnailViewer.clearViewer();
|
||||
imageThumbnailViewer.clearViewer();
|
||||
|
@ -1,222 +0,0 @@
|
||||
/*
|
||||
* Autopsy
|
||||
*
|
||||
* Copyright 2020 Basis Technology Corp.
|
||||
* 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.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.discovery.ui;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JScrollPane;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.contentviewers.artifactviewers.ArtifactContentViewer;
|
||||
import org.sleuthkit.autopsy.contentviewers.artifactviewers.CommunicationArtifactViewerHelper;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
* Panel to display the details for a Web History Artifact.
|
||||
*/
|
||||
@ServiceProvider(service = ArtifactContentViewer.class)
|
||||
public class WebHistoryDetailsPanel extends AbstractArtifactDetailsPanel implements ArtifactContentViewer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger logger = Logger.getLogger(WebHistoryDetailsPanel.class.getName());
|
||||
private BlackboardArtifact webHistoryArtifact;
|
||||
private final GridBagLayout gridBagLayout = new GridBagLayout();
|
||||
private final List<BlackboardAttribute> urlList = new ArrayList<>();
|
||||
private final List<BlackboardAttribute> dateAccessedList = new ArrayList<>();
|
||||
private final List<BlackboardAttribute> referrerUrlList = new ArrayList<>();
|
||||
private final List<BlackboardAttribute> titleList = new ArrayList<>();
|
||||
private final List<BlackboardAttribute> programNameList = new ArrayList<>();
|
||||
private final List<BlackboardAttribute> domainList = new ArrayList<>();
|
||||
private final List<BlackboardAttribute> otherList = new ArrayList<>();
|
||||
private final GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||||
private String dataSourceName;
|
||||
private String sourceFileName;
|
||||
|
||||
/**
|
||||
* Creates new form WebHistoryDetailsPanel.
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
public WebHistoryDetailsPanel() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
@Override
|
||||
public void setArtifact(BlackboardArtifact artifact) {
|
||||
resetComponent();
|
||||
if (artifact != null) {
|
||||
try {
|
||||
extractArtifactData(artifact);
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Unable to get attributes for artifact " + artifact.getArtifactID(), ex);
|
||||
}
|
||||
updateView();
|
||||
}
|
||||
this.setLayout(this.gridBagLayout);
|
||||
this.revalidate();
|
||||
this.repaint();
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts data from the artifact to be displayed in the panel.
|
||||
*
|
||||
* @param artifact Artifact to show.
|
||||
*
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
private void extractArtifactData(BlackboardArtifact artifact) throws TskCoreException {
|
||||
|
||||
webHistoryArtifact = artifact;
|
||||
// Get all the attributes and group them by the section panels they go in
|
||||
for (BlackboardAttribute bba : webHistoryArtifact.getAttributes()) {
|
||||
if (bba.getAttributeType().getTypeName().startsWith("TSK_URL")) {
|
||||
urlList.add(bba);
|
||||
} else if (bba.getAttributeType().getTypeName().startsWith("TSK_PROG_NAME")) {
|
||||
programNameList.add(bba);
|
||||
} else if (bba.getAttributeType().getTypeName().startsWith("TSK_DOMAIN")) {
|
||||
domainList.add(bba);
|
||||
} else if (bba.getAttributeType().getTypeName().startsWith("TSK_REFERRER")) {
|
||||
referrerUrlList.add(bba);
|
||||
} else if (bba.getAttributeType().getTypeName().startsWith("TSK_DATETIME_ACCESSED")) {
|
||||
dateAccessedList.add(bba);
|
||||
} else if (bba.getAttributeType().getTypeName().startsWith("TSK_TITLE")) {
|
||||
titleList.add(bba);
|
||||
} else {
|
||||
otherList.add(bba);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dataSourceName = webHistoryArtifact.getDataSource().getName();
|
||||
sourceFileName = webHistoryArtifact.getParent().getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the panel so that it is empty.
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
private void resetComponent() {
|
||||
// clear the panel
|
||||
this.removeAll();
|
||||
gridBagConstraints.anchor = GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.weighty = 0.0;
|
||||
gridBagConstraints.weightx = 0.0; // keep components fixed horizontally.
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 12, 0, 0);
|
||||
gridBagConstraints.fill = GridBagConstraints.NONE;
|
||||
webHistoryArtifact = null;
|
||||
dataSourceName = null;
|
||||
sourceFileName = null;
|
||||
urlList.clear();
|
||||
dateAccessedList.clear();
|
||||
referrerUrlList.clear();
|
||||
titleList.clear();
|
||||
programNameList.clear();
|
||||
domainList.clear();
|
||||
otherList.clear();
|
||||
}
|
||||
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
// Slap a vertical scrollbar on the panel.
|
||||
return new JScrollPane(this, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
}
|
||||
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
@Override
|
||||
public boolean isSupported(BlackboardArtifact artifact) {
|
||||
return (artifact != null)
|
||||
&& (artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID());
|
||||
}
|
||||
|
||||
@NbBundle.Messages({"WebHistoryDetailsPanel.details.attrHeader=Attributes",
|
||||
"WebHistoryDetailsPanel.details.sourceHeader=Source",
|
||||
"WebHistoryDetailsPanel.details.dataSource=Data Source",
|
||||
"WebHistoryDetailsPanel.details.file=File"})
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 400, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 300, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
/**
|
||||
* Update the view to reflect the current artifact's details.
|
||||
*/
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
private void updateView() {
|
||||
CommunicationArtifactViewerHelper.addHeader(this, gridBagLayout, gridBagConstraints, Bundle.WebHistoryDetailsPanel_details_attrHeader());
|
||||
|
||||
for (BlackboardAttribute bba : this.titleList) {
|
||||
CommunicationArtifactViewerHelper.addNameValueRow(this, gridBagLayout, gridBagConstraints, bba.getAttributeType().getDisplayName(), bba.getDisplayString());
|
||||
}
|
||||
for (BlackboardAttribute bba : dateAccessedList) {
|
||||
CommunicationArtifactViewerHelper.addNameValueRow(this, gridBagLayout, gridBagConstraints, bba.getAttributeType().getDisplayName(), bba.getDisplayString());
|
||||
}
|
||||
for (BlackboardAttribute bba : domainList) {
|
||||
CommunicationArtifactViewerHelper.addNameValueRow(this, gridBagLayout, gridBagConstraints, bba.getAttributeType().getDisplayName(), bba.getDisplayString());
|
||||
}
|
||||
for (BlackboardAttribute bba : urlList) {
|
||||
CommunicationArtifactViewerHelper.addNameValueRow(this, gridBagLayout, gridBagConstraints, bba.getAttributeType().getDisplayName(), bba.getDisplayString());
|
||||
}
|
||||
for (BlackboardAttribute bba : referrerUrlList) {
|
||||
CommunicationArtifactViewerHelper.addNameValueRow(this, gridBagLayout, gridBagConstraints, bba.getAttributeType().getDisplayName(), bba.getDisplayString());
|
||||
}
|
||||
for (BlackboardAttribute bba : programNameList) {
|
||||
CommunicationArtifactViewerHelper.addNameValueRow(this, gridBagLayout, gridBagConstraints, bba.getAttributeType().getDisplayName(), bba.getDisplayString());
|
||||
}
|
||||
for (BlackboardAttribute bba : otherList) {
|
||||
CommunicationArtifactViewerHelper.addNameValueRow(this, gridBagLayout, gridBagConstraints, bba.getAttributeType().getDisplayName(), bba.getDisplayString());
|
||||
}
|
||||
CommunicationArtifactViewerHelper.addHeader(this, gridBagLayout, gridBagConstraints, Bundle.WebHistoryDetailsPanel_details_sourceHeader());
|
||||
CommunicationArtifactViewerHelper.addNameValueRow(this, gridBagLayout, gridBagConstraints, Bundle.WebHistoryDetailsPanel_details_dataSource(), dataSourceName);
|
||||
CommunicationArtifactViewerHelper.addNameValueRow(this, gridBagLayout, gridBagConstraints, Bundle.WebHistoryDetailsPanel_details_file(), sourceFileName);
|
||||
// add veritcal glue at the end
|
||||
CommunicationArtifactViewerHelper.addPageEndGlue(this, gridBagLayout, this.gridBagConstraints);
|
||||
}
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
Yara_Module_Description=With the YARA ingest module you use YARA rule files to search files for textual or binary patterns.
|
||||
Yara_Module_Name=YARA
|
||||
Yara_Module_Description=The YARA Analyzer uses YARA to search files for textual or binary patterns.
|
||||
Yara_Module_Name=YARA Analyzer
|
||||
YaraIngestModule_no_ruleSets=Unable to run YARA ingest, list of YARA rule sets was empty.
|
||||
YaraIngestModule_windows_error_msg=The YARA ingest module is only available on 64bit Windows.
|
||||
YaraIngestModule_yarac_not_found=Unable to compile YARA rules files. Unable to find executable at.
|
||||
|
@ -227,9 +227,12 @@ final class YaraIngestHelper {
|
||||
|
||||
ProcessBuilder builder = new ProcessBuilder(commandList);
|
||||
try {
|
||||
ExecUtil.execute(builder);
|
||||
int result = ExecUtil.execute(builder);
|
||||
if(result != 0) {
|
||||
throw new IngestModuleException(String.format("Failed to compile Yara rules file %s. Compile error %d", file.toString(), result));
|
||||
}
|
||||
} catch (SecurityException | IOException ex) {
|
||||
throw new IngestModuleException(String.format("Failed to compile Yara rules file", file.toString()), ex);
|
||||
throw new IngestModuleException(String.format("Failed to compile Yara rules file, %s", file.toString()), ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -77,6 +77,15 @@ public final class YaraIngestJobSettings implements IngestModuleIngestJobSetting
|
||||
selectedRuleSetNames.add(set.getName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if there are selected Rule Sets.
|
||||
*
|
||||
* @return True if there is at least one selected rule.
|
||||
*/
|
||||
boolean hasSelectedRuleSets() {
|
||||
return selectedRuleSetNames != null && !selectedRuleSetNames.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process only executable Files.
|
||||
|
@ -97,7 +97,11 @@ public class YaraIngestModule extends FileIngestModuleAdapter {
|
||||
tempRuleSetDir.toFile().mkdir();
|
||||
}
|
||||
|
||||
YaraIngestHelper.compileRules(settings.getSelectedRuleSetNames(), tempRuleSetDir);
|
||||
if(settings.hasSelectedRuleSets()) {
|
||||
YaraIngestHelper.compileRules(settings.getSelectedRuleSetNames(), tempRuleSetDir);
|
||||
} else {
|
||||
logger.log(Level.INFO, "YARA ingest module: No rule set was selected for this ingest job.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,6 +120,10 @@ public class YaraIngestModule extends FileIngestModuleAdapter {
|
||||
@Override
|
||||
public ProcessResult process(AbstractFile file) {
|
||||
|
||||
if(!settings.hasSelectedRuleSets()) {
|
||||
return ProcessResult.OK;
|
||||
}
|
||||
|
||||
if (settings.onlyExecutableFiles()) {
|
||||
String extension = file.getNameExtension();
|
||||
if (!extension.equals("exe")) {
|
||||
|
@ -37,8 +37,8 @@ import org.sleuthkit.autopsy.modules.yara.ui.YaraIngestSettingsPanel;
|
||||
public class YaraIngestModuleFactory extends IngestModuleFactoryAdapter {
|
||||
|
||||
@Messages({
|
||||
"Yara_Module_Name=YARA",
|
||||
"Yara_Module_Description=With the YARA ingest module you use YARA rule files to search files for textual or binary patterns."
|
||||
"Yara_Module_Name=YARA Analyzer",
|
||||
"Yara_Module_Description=The YARA Analyzer uses YARA to search files for textual or binary patterns."
|
||||
})
|
||||
|
||||
@Override
|
||||
|
@ -45,6 +45,10 @@ public class RuleSetManager {
|
||||
*/
|
||||
public RuleSet createRuleSet(String name) throws RuleSetException {
|
||||
|
||||
if(name == null || name.isEmpty()) {
|
||||
throw new RuleSetException("YARA rule set name cannot be null or empty string" );
|
||||
}
|
||||
|
||||
if (isRuleSetExists(name)) {
|
||||
throw new RuleSetException(String.format("Yara rule set with name %s already exits.", name));
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ YaraIngestSettingsPanel.allFilesButton.text=All Files
|
||||
YaraIngestSettingsPanel.allFilesButton.toolTipText=
|
||||
YaraIngestSettingsPanel.executableFilesButton.text=Only Executable Files
|
||||
RuleSetDetailsPanel.refreshButton.text=Refresh File List
|
||||
YaraRuleSetOptionPanel_badName2_msg=Rule set is invalid.\nRule set names must be non-empty string and unique.
|
||||
# {0} - rule set name
|
||||
YaraRuleSetOptionPanel_badName_msg=Rule set name {0} already exists.\nRule set names must be unique.
|
||||
YaraRuleSetOptionPanel_badName_title=Create Rule Set
|
||||
|
@ -93,7 +93,8 @@ public class YaraRuleSetOptionPanel extends javax.swing.JPanel {
|
||||
"YaraRuleSetOptionPanel_new_rule_set_name_title=Rule Set Name",
|
||||
"# {0} - rule set name",
|
||||
"YaraRuleSetOptionPanel_badName_msg=Rule set name {0} already exists.\nRule set names must be unique.",
|
||||
"YaraRuleSetOptionPanel_badName_title=Create Rule Set"
|
||||
"YaraRuleSetOptionPanel_badName_title=Create Rule Set",
|
||||
"YaraRuleSetOptionPanel_badName2_msg=Rule set is invalid.\nRule set names must be non-empty string and unique.",
|
||||
})
|
||||
/**
|
||||
* Handle the new rule set action. Prompt the user for a rule set name,
|
||||
@ -103,6 +104,15 @@ public class YaraRuleSetOptionPanel extends javax.swing.JPanel {
|
||||
String value = JOptionPane.showInputDialog(this,
|
||||
Bundle.YaraRuleSetOptionPanel_new_rule_set_name_msg(),
|
||||
Bundle.YaraRuleSetOptionPanel_new_rule_set_name_title());
|
||||
|
||||
if(value == null || value.isEmpty()) {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.YaraRuleSetOptionPanel_badName2_msg(),
|
||||
Bundle.YaraRuleSetOptionPanel_badName_title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
ruleSetPanel.addRuleSet(manager.createRuleSet(value));
|
||||
} catch (RuleSetException ex) {
|
||||
@ -110,7 +120,7 @@ public class YaraRuleSetOptionPanel extends javax.swing.JPanel {
|
||||
Bundle.YaraRuleSetOptionPanel_badName_msg(value),
|
||||
Bundle.YaraRuleSetOptionPanel_badName_title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
logger.log(Level.WARNING, "Failed to create new rule set, user provide existing name.", ex);
|
||||
logger.log(Level.WARNING, "Failed to create new rule set, user provided existing name.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,8 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -60,6 +62,7 @@ import org.sleuthkit.autopsy.coreutils.FileTypeUtils.FileTypeCategory;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
import org.sleuthkit.caseuco.CaseUcoExporter;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.Account;
|
||||
import org.sleuthkit.datamodel.Blackboard.BlackboardException;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifactTag;
|
||||
@ -81,6 +84,9 @@ import org.sleuthkit.datamodel.TskDataException;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
import org.sleuthkit.datamodel.Volume;
|
||||
import org.sleuthkit.datamodel.VolumeSystem;
|
||||
import org.sleuthkit.datamodel.blackboardutils.CommunicationArtifactsHelper;
|
||||
import org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil;
|
||||
import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments;
|
||||
|
||||
/**
|
||||
* Creates a portable case from tagged files
|
||||
@ -883,6 +889,9 @@ public class PortableCaseReportModule implements ReportModule {
|
||||
|
||||
// Copy the artifact
|
||||
BlackboardArtifact newArtifact = copyArtifact(newContentId, tag.getArtifact());
|
||||
|
||||
// Copy any attachments
|
||||
copyAttachments(newArtifact, tag.getArtifact(), portableSkCase.getAbstractFileById(newContentId));
|
||||
|
||||
// Tag the artfiact
|
||||
if (!oldTagNameToNewTagName.containsKey(tag.getName())) {
|
||||
@ -932,6 +941,11 @@ public class PortableCaseReportModule implements ReportModule {
|
||||
if (oldAttr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Attachments will be handled later
|
||||
if (oldAttr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS.getTypeID()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
BlackboardAttribute.Type newAttributeType = getNewAttributeType(oldAttr);
|
||||
switch (oldAttr.getValueType()) {
|
||||
@ -1142,6 +1156,61 @@ public class PortableCaseReportModule implements ReportModule {
|
||||
newIdToContent.put(newContent.getId(), newContent);
|
||||
return oldIdToNewContent.get(content.getId()).getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy attachments to the portable case.
|
||||
*
|
||||
* @param newArtifact The new artifact in the portable case. Should be complete apart from the TSK_ATTACHMENTS attribute.
|
||||
* @param oldArtifact The old artifact.
|
||||
* @param newFile The new file in the portable case associated with the artifact.
|
||||
*
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
private void copyAttachments(BlackboardArtifact newArtifact, BlackboardArtifact oldArtifact, AbstractFile newFile) throws TskCoreException {
|
||||
// Get the attachments from TSK_ATTACHMENTS attribute.
|
||||
BlackboardAttribute attachmentsAttr = oldArtifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS));
|
||||
if (attachmentsAttr != null) {
|
||||
try {
|
||||
MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class);
|
||||
|
||||
Collection<MessageAttachments.FileAttachment> oldFileAttachments = msgAttachments.getFileAttachments();
|
||||
List<MessageAttachments.FileAttachment> newFileAttachments = new ArrayList<>();
|
||||
for (MessageAttachments.FileAttachment oldFileAttachment : oldFileAttachments) {
|
||||
long attachedFileObjId = oldFileAttachment.getObjectId();
|
||||
if (attachedFileObjId >= 0) {
|
||||
// Copy the attached file and save to the MessageAttachments object
|
||||
AbstractFile attachedFile = currentCase.getSleuthkitCase().getAbstractFileById(attachedFileObjId);
|
||||
if (attachedFile == null) {
|
||||
throw new TskCoreException("Error loading file with object ID " + attachedFileObjId + " from portable case");
|
||||
}
|
||||
long newFileID = copyContent(attachedFile);
|
||||
newFileAttachments.add(new MessageAttachments.FileAttachment(portableSkCase.getAbstractFileById(newFileID)));
|
||||
}
|
||||
}
|
||||
|
||||
// Get the name of the module(s) that created the attachment
|
||||
String newSourceStr = "";
|
||||
List<String> oldSources = attachmentsAttr.getSources();
|
||||
if (! oldSources.isEmpty()) {
|
||||
newSourceStr = String.join(",", oldSources);
|
||||
}
|
||||
|
||||
// Add the attachment. The account type specified in the constructor will not be used.
|
||||
CommunicationArtifactsHelper communicationArtifactsHelper = new CommunicationArtifactsHelper(currentCase.getSleuthkitCase(),
|
||||
newSourceStr, newFile, Account.Type.EMAIL);
|
||||
communicationArtifactsHelper.addAttachments(newArtifact, new MessageAttachments(newFileAttachments, msgAttachments.getUrlAttachments()));
|
||||
}
|
||||
catch (BlackboardJsonAttrUtil.InvalidJsonException ex) {
|
||||
throw new TskCoreException(String.format("Unable to parse json for MessageAttachments object in artifact: %s", oldArtifact.getName()), ex);
|
||||
}
|
||||
} else { // backward compatibility - email message attachments are derived files, children of the message.
|
||||
for (Content childContent : oldArtifact.getChildren()) {
|
||||
if (childContent instanceof AbstractFile) {
|
||||
copyContent(childContent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the subfolder name for this file based on MIME type
|
||||
|
@ -6,7 +6,7 @@
|
||||
</configurations>
|
||||
<dependencies>
|
||||
<dependency conf="experimental->default" org="com.github.lgooddatepicker" name="LGoodDatePicker" rev="10.3.1"/>
|
||||
<dependency conf="experimental->default" org="org.postgresql" name="postgresql" rev="9.4-1201-jdbc41"/>
|
||||
<dependency conf="experimental->default" org="org.postgresql" name="postgresql" rev="42.2.18"/>
|
||||
<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="org.swinglabs.swingx" name="swingx-all" rev="1.6.4"/>
|
||||
|
@ -39,7 +39,6 @@ AutoIngestSettingsPanel.MustRestart=Autopsy must be restarted for new configurat
|
||||
AutoIngestSettingsPanel.nodePanel.TabConstraints.tabTitle=Node Configuration
|
||||
AutoIngestSettingsPanel.NodeStatusLogging.text=Node Status Logging Settings
|
||||
AutoIngestSettingsPanel.restartRequiredLabel.text=Application restart required to take effect.
|
||||
AutoIngestSettingsPanel.restartRequiredLabel.text=Application restart required
|
||||
AutoIngestSettingsPanel.ResultsDirectoryUnspecified=Shared cases folder must be set
|
||||
AutoIngestSettingsPanel.tbOops.text=
|
||||
AutoIngestSettingsPanel.validationErrMsg.incomplete=Fill in all values
|
||||
|
@ -39,7 +39,6 @@ AutoIngestSettingsPanel.MustRestart=Autopsy must be restarted for new configurat
|
||||
AutoIngestSettingsPanel.nodePanel.TabConstraints.tabTitle=Node Configuration
|
||||
AutoIngestSettingsPanel.NodeStatusLogging.text=Node Status Logging Settings
|
||||
AutoIngestSettingsPanel.restartRequiredLabel.text=Application restart required to take effect.
|
||||
AutoIngestSettingsPanel.restartRequiredLabel.text=Application restart required
|
||||
AutoIngestSettingsPanel.ResultsDirectoryUnspecified=Shared cases folder must be set
|
||||
AutoIngestSettingsPanel.tbOops.text=
|
||||
AutoIngestSettingsPanel.validationErrMsg.incomplete=Fill in all values
|
||||
|
@ -26,13 +26,21 @@
|
||||
<fileset dir="solr"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="get-solr4-deployment" description="copy the solr 4 deployment into release">
|
||||
<copy todir="${basedir}/release/solr4" > <!-- for embedded Solr 4 -->
|
||||
<fileset dir="solr4"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="get-deps" depends="init-ivy, get-solr-deployment">
|
||||
<target name="get-deps" depends="init-ivy, get-solr-deployment, get-solr4-deployment">
|
||||
<!-- fetch all the dependencies from Ivy and stick them in the right places -->
|
||||
<ivy:resolve log="quiet"/>
|
||||
<ivy:retrieve conf="autopsy" pattern="${basedir}/release/modules/ext/[artifact]-[revision](-[classifier]).[ext]" />
|
||||
<ivy:retrieve conf="solr-war" pattern="${basedir}/release/solr/webapps/solr.war" />
|
||||
<ivy:retrieve conf="start-solr" pattern="${basedir}/release/solr/start.jar" />
|
||||
<ivy:retrieve conf="solr-war" pattern="${basedir}/release/solr4/webapps/solr.war" /> <!-- for embedded Solr 4 -->
|
||||
<ivy:retrieve conf="start-solr" pattern="${basedir}/release/solr4/start.jar" /> <!-- for embedded Solr 4 -->
|
||||
<ivy:retrieve conf="jetty-libs" pattern="${basedir}/release/solr4/lib/[artifact]-[revision](-[classifier]).[ext]" /> <!-- for embedded Solr 4 -->
|
||||
<ivy:retrieve conf="slf4j-libs" pattern="${basedir}/release/solr4/lib/ext/[artifact]-[revision](-[classifier]).[ext]" /> <!-- for embedded Solr 4 -->
|
||||
<ivy:retrieve conf="servlet" pattern="${basedir}/release/solr4/lib/servlet-api-3.0.jar" /> <!-- for embedded Solr 4 -->
|
||||
<ivy:retrieve conf="jetty-libs" pattern="${basedir}/release/solr/lib/[artifact]-[revision](-[classifier]).[ext]" />
|
||||
<ivy:retrieve conf="solr-libs" pattern="${basedir}/release/solr/solr/lib/[artifact]-[revision](-[classifier]).[ext]" />
|
||||
<ivy:retrieve conf="slf4j-libs" pattern="${basedir}/release/solr/lib/ext/[artifact]-[revision](-[classifier]).[ext]" />
|
||||
|
@ -7,28 +7,37 @@
|
||||
|
||||
<!-- Solr server dependencies -->
|
||||
<conf name="solr-libs"/>
|
||||
<conf name="solr-war"/>
|
||||
<conf name="start-solr"/>
|
||||
<conf name="solr-war"/> <!-- for embedded Solr 4 -->
|
||||
<conf name="start-solr"/> <!-- for embedded Solr 4 -->
|
||||
<conf name="jetty-libs"/>
|
||||
<conf name="slf4j-libs"/>
|
||||
<conf name="servlet"/>
|
||||
</configurations>
|
||||
<dependencies>
|
||||
<!-- Solr -->
|
||||
<dependency conf="solr-war->default" org="org.apache.solr" name="solr" rev="4.9.1" transitive="false" /> <!-- the war file -->
|
||||
<dependency conf="solr-war->default" org="org.apache.solr" name="solr" rev="4.9.1" transitive="false" /> <!-- the war file for embedded Solr 4 -->
|
||||
<dependency name="solr-cell" rev="8.6.3" org="org.apache.solr" conf="solr-libs->default"/>
|
||||
|
||||
<!-- Autopsy -->
|
||||
<dependency conf="autopsy->default" org="org.apache.solr" name="solr-solrj" rev="4.9.1"/>
|
||||
<dependency conf="autopsy->default" org="commons-lang" name="commons-lang" rev="2.4"/>
|
||||
<dependency conf="autopsy->default" org="commons-validator" name="commons-validator" rev="1.5.1"/>
|
||||
<dependency conf="autopsy->default" org="com.optimaize.languagedetector" name="language-detector" rev="0.6"/>
|
||||
<dependency conf="autopsy->*" org="org.apache.solr" name="solr-solrj" rev="8.6.3"/>
|
||||
<dependency conf="autopsy->*" org="commons-lang" name="commons-lang" rev="2.4"/>
|
||||
<dependency conf="autopsy->*" org="commons-validator" name="commons-validator" rev="1.5.1"/>
|
||||
<dependency conf="autopsy->*" org="com.optimaize.languagedetector" name="language-detector" rev="0.6"/>
|
||||
<!-- Exclude the version of cxf-rt-rs-client from Tika 1.20, one of its depedencies breaks Ivy -->
|
||||
<dependency conf="autopsy->*" org="org.apache.tika" name="tika-parsers" rev="1.20">
|
||||
<exclude module="cxf-rt-rs-client"/>
|
||||
<exclude module="cleartk-ml"/>
|
||||
</dependency>
|
||||
|
||||
<dependency conf="autopsy->*" org="org.apache.cxf" name="cxf-rt-rs-client" rev="3.3.0"/>
|
||||
<dependency conf="autopsy->*" org="org.cleartk" name="cleartk-ml" rev="2.0.0"/>
|
||||
|
||||
<!-- icu4j for pdfbox bidirectional text support, needs to be defined explicitely (it is optional) -->
|
||||
<dependency conf="autopsy->default" org="com.ibm.icu" name="icu4j" rev="3.8"/>
|
||||
<dependency conf="autopsy->default" org="net.htmlparser.jericho" name="jericho-html" rev="3.3"/>
|
||||
|
||||
<!-- Jetty -->
|
||||
<dependency conf="start-solr->default" org="org.eclipse.jetty" name="jetty-start" rev="8.1.16.v20140903"/>
|
||||
<dependency conf="start-solr->default" org="org.eclipse.jetty" name="jetty-start" rev="8.1.16.v20140903"/> <!-- for embedded Solr 4 -->
|
||||
<dependency conf="jetty-libs->default" org="org.eclipse.jetty" name="jetty-server" rev="8.1.16.v20140903"/>
|
||||
<dependency conf="jetty-libs->default" org="org.eclipse.jetty" name="jetty-deploy" rev="8.1.16.v20140903"/>
|
||||
<dependency conf="servlet->default" org="org.eclipse.jetty.orbit" name="javax.servlet" rev="3.0.0.v201112011016"/>
|
||||
|
@ -1,27 +1,70 @@
|
||||
file.reference.annotations-12.0.jar=release\\modules\\ext\\annotations-12.0.jar
|
||||
file.reference.commons-beanutils-1.9.2.jar=release\\modules\\ext\\commons-beanutils-1.9.2.jar
|
||||
file.reference.commons-collections-3.2.2.jar=release\\modules\\ext\\commons-collections-3.2.2.jar
|
||||
file.reference.boilerpipe-1.1.0.jar=release/modules/ext/boilerpipe-1.1.0.jar
|
||||
file.reference.bzip2-0.9.1.jar=release/modules/ext/bzip2-0.9.1.jar
|
||||
file.reference.c3p0-0.9.1.1.jar=release/modules/ext/c3p0-0.9.1.1.jar
|
||||
file.reference.cdm-4.5.5.jar=release/modules/ext/cdm-4.5.5.jar
|
||||
file.reference.cleartk-util-2.0.0.jar=release/modules/ext/cleartk-util-2.0.0.jar
|
||||
file.reference.commons-beanutils-1.9.2.jar=release/modules/ext/commons-beanutils-1.9.2.jar
|
||||
file.reference.commons-collections-3.2.2.jar=release/modules/ext/commons-collections-3.2.2.jar
|
||||
file.reference.commons-digester-1.8.1.jar=release\\modules\\ext\\commons-digester-1.8.1.jar
|
||||
file.reference.commons-io-2.3.jar=release\\modules\\ext\\commons-io-2.3.jar
|
||||
file.reference.commons-lang-2.4.jar=release\\modules\\ext\\commons-lang-2.4.jar
|
||||
file.reference.commons-logging-1.2.jar=release\\modules\\ext\\commons-logging-1.2.jar
|
||||
file.reference.commons-validator-1.5.1.jar=release\\modules\\ext\\commons-validator-1.5.1.jar
|
||||
file.reference.guava-18.0.jar=release\\modules\\ext\\guava-18.0.jar
|
||||
file.reference.httpclient-4.5.6.jar=release\\modules\\ext\\httpclient-4.5.6.jar
|
||||
file.reference.httpcore-4.4.10.jar=release\\modules\\ext\\httpcore-4.4.10.jar
|
||||
file.reference.httpmime-4.5.6.jar=release\\modules\\ext\\httpmime-4.5.6.jar
|
||||
file.reference.icu4j-3.8.jar=release\\modules\\ext\\icu4j-3.8.jar
|
||||
file.reference.commons-exec-1.3.jar=release/modules/ext/commons-exec-1.3.jar
|
||||
file.reference.commons-io-2.6.jar=release/modules/ext/commons-io-2.6.jar
|
||||
file.reference.commons-lang-2.6.jar=release/modules/ext/commons-lang-2.6.jar
|
||||
file.reference.commons-logging-1.2.jar=release/modules/ext/commons-logging-1.2.jar
|
||||
file.reference.commons-validator-1.5.1.jar=release/modules/ext/commons-validator-1.5.1.jar
|
||||
file.reference.ehcache-core-2.6.2.jar=release/modules/ext/ehcache-core-2.6.2.jar
|
||||
file.reference.findstructapi-0.0.1.jar=release/modules/ext/findstructapi-0.0.1.jar
|
||||
file.reference.grib-4.5.5.jar=release/modules/ext/grib-4.5.5.jar
|
||||
file.reference.guava-18.0.jar=release/modules/ext/guava-18.0.jar
|
||||
file.reference.httpclient-4.5.10.jar=release/modules/ext/httpclient-4.5.10.jar
|
||||
file.reference.httpcore-4.4.12.jar=release/modules/ext/httpcore-4.4.12.jar
|
||||
file.reference.httpmime-4.5.10.jar=release/modules/ext/httpmime-4.5.10.jar
|
||||
file.reference.httpservices-4.5.5.jar=release/modules/ext/httpservices-4.5.5.jar
|
||||
file.reference.icu4j-3.8.jar=release/modules/ext/icu4j-3.8.jar
|
||||
file.reference.java-libpst-0.8.1.jar=release/modules/ext/java-libpst-0.8.1.jar
|
||||
file.reference.jcip-annotations-1.0.jar=release/modules/ext/jcip-annotations-1.0.jar
|
||||
file.reference.jcommander-1.35.jar=release/modules/ext/jcommander-1.35.jar
|
||||
file.reference.jdom-1.0.jar=release/modules/ext/jdom-1.0.jar
|
||||
file.reference.jericho-html-3.3.jar=release\\modules\\ext\\jericho-html-3.3.jar
|
||||
file.reference.jsonic-1.2.11.jar=release\\modules\\ext\\jsonic-1.2.11.jar
|
||||
file.reference.joda-time-2.2.jar=release/modules/ext/joda-time-2.2.jar
|
||||
file.reference.json-simple-1.1.1.jar=release/modules/ext/json-simple-1.1.1.jar
|
||||
file.reference.juniversalchardet-1.0.3.jar=release/modules/ext/juniversalchardet-1.0.3.jar
|
||||
file.reference.language-detector-0.6.jar=release\\modules\\ext\\language-detector-0.6.jar
|
||||
file.reference.noggit-0.5.jar=release\\modules\\ext\\noggit-0.5.jar
|
||||
file.reference.slf4j-api-1.7.6.jar=release\\modules\\ext\\slf4j-api-1.7.6.jar
|
||||
file.reference.solr-solrj-4.9.1.jar=release\\modules\\ext\\solr-solrj-4.9.1.jar
|
||||
file.reference.wstx-asl-3.2.7.jar=release\\modules\\ext\\wstx-asl-3.2.7.jar
|
||||
file.reference.zookeeper-3.4.6.jar=release\\modules\\ext\\zookeeper-3.4.6.jar
|
||||
file.reference.libsvm-3.1.jar=release/modules/ext/libsvm-3.1.jar
|
||||
file.reference.log4j-1.2.17.jar=release/modules/ext/log4j-1.2.17.jar
|
||||
file.reference.lucene-core-4.0.0.jar=release/modules/ext/lucene-core-4.0.0.jar
|
||||
file.reference.lucene-queries-4.0.0.jar=release/modules/ext/lucene-queries-4.0.0.jar
|
||||
file.reference.lucene-sandbox-4.0.0.jar=release/modules/ext/lucene-sandbox-4.0.0.jar
|
||||
file.reference.netcdf4-4.5.5.jar=release/modules/ext/netcdf4-4.5.5.jar
|
||||
file.reference.openaifsm-0.0.1.jar=release/modules/ext/openaifsm-0.0.1.jar
|
||||
file.reference.opennlp-maxent-3.0.3.jar=release/modules/ext/opennlp-maxent-3.0.3.jar
|
||||
file.reference.poi-4.0.1.jar=release/modules/ext/poi-4.0.1.jar
|
||||
file.reference.poi-ooxml-4.0.1.jar=release/modules/ext/poi-ooxml-4.0.1.jar
|
||||
file.reference.poi-ooxml-schemas-4.0.1.jar=release/modules/ext/poi-ooxml-schemas-4.0.1.jar
|
||||
file.reference.poi-scratchpad-4.0.1.jar=release/modules/ext/poi-scratchpad-4.0.1.jar
|
||||
file.reference.protobuf-java-2.5.0.jar=release/modules/ext/protobuf-java-2.5.0.jar
|
||||
file.reference.quartz-2.2.0.jar=release/modules/ext/quartz-2.2.0.jar
|
||||
file.reference.slf4j-api-1.7.25.jar=release/modules/ext/slf4j-api-1.7.25.jar
|
||||
file.reference.solr-solrj-8.6.2.jar=release/modules/ext/solr-solrj-8.6.2.jar
|
||||
file.reference.solr-solrj-8.6.3.jar=release/modules/ext/solr-solrj-8.6.3.jar
|
||||
file.reference.sqlwrapper-0.0.1.jar=release/modules/ext/sqlwrapper-0.0.1.jar
|
||||
file.reference.stax2-api-3.1.4.jar=release/modules/ext/stax2-api-3.1.4.jar
|
||||
file.reference.tagsoup-1.2.1.jar=release/modules/ext/tagsoup-1.2.1.jar
|
||||
file.reference.tika-core-1.20.jar=release/modules/ext/tika-core-1.20.jar
|
||||
file.reference.tika-parsers-1.20.jar=release/modules/ext/tika-parsers-1.20.jar
|
||||
file.reference.udunits-4.5.5.jar=release/modules/ext/udunits-4.5.5.jar
|
||||
file.reference.vorbis-java-core-0.8.jar=release/modules/ext/vorbis-java-core-0.8.jar
|
||||
file.reference.vorbis-java-tika-0.8.jar=release/modules/ext/vorbis-java-tika-0.8.jar
|
||||
file.reference.woodstox-core-asl-4.4.1.jar=release/modules/ext/woodstox-core-asl-4.4.1.jar
|
||||
file.reference.xmlbeans-2.6.0.jar=release/modules/ext/xmlbeans-2.6.0.jar
|
||||
file.reference.xmpcore-5.1.3.jar=release/modules/ext/xmpcore-5.1.3.jar
|
||||
file.reference.zookeeper-3.5.7.jar=release/modules/ext/zookeeper-3.5.7.jar
|
||||
file.reference.annotations-12.0.jar=release\\modules\\ext\\annotations-12.0.jar
|
||||
file.reference.jsonic-1.2.11.jar=release\\modules\\ext\\jsonic-1.2.11.jar
|
||||
javac.source=11
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
||||
license.file=../LICENSE-2.0.txt
|
||||
nbm.homepage=http://www.sleuthkit.org/autopsy/
|
||||
nbm.needs.restart=true
|
||||
source.reference.commons-validator-1.5.1.jar=release/modules/ext/commons-validator-1.5.1-sources.jar
|
||||
source.reference.solr-solrj-8.6.2.jar=release/modules/ext/solr-solrj-8.6.2-sources.jar
|
||||
spec.version.base=6.6
|
||||
|
@ -142,21 +142,6 @@
|
||||
</dependency>
|
||||
</module-dependencies>
|
||||
<public-packages>
|
||||
<package>com.ctc.wstx.api</package>
|
||||
<package>com.ctc.wstx.cfg</package>
|
||||
<package>com.ctc.wstx.compat</package>
|
||||
<package>com.ctc.wstx.dom</package>
|
||||
<package>com.ctc.wstx.dtd</package>
|
||||
<package>com.ctc.wstx.ent</package>
|
||||
<package>com.ctc.wstx.evt</package>
|
||||
<package>com.ctc.wstx.exc</package>
|
||||
<package>com.ctc.wstx.io</package>
|
||||
<package>com.ctc.wstx.msv</package>
|
||||
<package>com.ctc.wstx.sax</package>
|
||||
<package>com.ctc.wstx.sr</package>
|
||||
<package>com.ctc.wstx.stax</package>
|
||||
<package>com.ctc.wstx.sw</package>
|
||||
<package>com.ctc.wstx.util</package>
|
||||
<package>org.apache.commons.logging.impl</package>
|
||||
<package>org.apache.http</package>
|
||||
<package>org.apache.http.annotation</package>
|
||||
@ -201,9 +186,6 @@
|
||||
<package>org.apache.http.protocol</package>
|
||||
<package>org.apache.http.ssl</package>
|
||||
<package>org.apache.http.util</package>
|
||||
<package>org.apache.jute</package>
|
||||
<package>org.apache.jute.compiler</package>
|
||||
<package>org.apache.jute.compiler.generated</package>
|
||||
<package>org.apache.solr.client.solrj</package>
|
||||
<package>org.apache.solr.client.solrj.beans</package>
|
||||
<package>org.apache.solr.client.solrj.impl</package>
|
||||
@ -218,17 +200,13 @@
|
||||
<package>org.apache.zookeeper</package>
|
||||
<package>org.apache.zookeeper.client</package>
|
||||
<package>org.apache.zookeeper.common</package>
|
||||
<package>org.apache.zookeeper.data</package>
|
||||
<package>org.apache.zookeeper.jmx</package>
|
||||
<package>org.apache.zookeeper.proto</package>
|
||||
<package>org.apache.zookeeper.server</package>
|
||||
<package>org.apache.zookeeper.server.auth</package>
|
||||
<package>org.apache.zookeeper.server.persistence</package>
|
||||
<package>org.apache.zookeeper.server.quorum</package>
|
||||
<package>org.apache.zookeeper.server.quorum.flexible</package>
|
||||
<package>org.apache.zookeeper.server.upgrade</package>
|
||||
<package>org.apache.zookeeper.server.util</package>
|
||||
<package>org.apache.zookeeper.txn</package>
|
||||
<package>org.apache.zookeeper.version</package>
|
||||
<package>org.apache.zookeeper.version.util</package>
|
||||
<package>org.codehaus.stax2</package>
|
||||
@ -236,92 +214,187 @@
|
||||
<package>org.codehaus.stax2.io</package>
|
||||
<package>org.codehaus.stax2.ri</package>
|
||||
<package>org.codehaus.stax2.validation</package>
|
||||
<package>org.noggit</package>
|
||||
<package>org.sleuthkit.autopsy.keywordsearch</package>
|
||||
</public-packages>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/guava-18.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\guava-18.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/zookeeper-3.4.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\zookeeper-3.4.6.jar</binary-origin>
|
||||
<runtime-relative-path>ext/findstructapi-0.0.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/findstructapi-0.0.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-digester-1.8.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-digester-1.8.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpmime-4.5.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\httpmime-4.5.6.jar</binary-origin>
|
||||
<runtime-relative-path>ext/jcommander-1.35.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jcommander-1.35.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpclient-4.5.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\httpclient-4.5.6.jar</binary-origin>
|
||||
<runtime-relative-path>ext/vorbis-java-core-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/vorbis-java-core-0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-validator-1.5.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-validator-1.5.1.jar</binary-origin>
|
||||
<runtime-relative-path>ext/lucene-sandbox-4.0.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/lucene-sandbox-4.0.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-lang-2.4.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-lang-2.4.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>
|
||||
<runtime-relative-path>ext/httpmime-4.5.10.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/httpmime-4.5.10.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jericho-html-3.3.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jericho-html-3.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpcore-4.4.10.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\httpcore-4.4.10.jar</binary-origin>
|
||||
<runtime-relative-path>ext/netcdf4-4.5.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/netcdf4-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/slf4j-api-1.7.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\slf4j-api-1.7.6.jar</binary-origin>
|
||||
<runtime-relative-path>ext/cdm-4.5.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/cdm-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-beanutils-1.9.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-beanutils-1.9.2.jar</binary-origin>
|
||||
<runtime-relative-path>ext/httpservices-4.5.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/httpservices-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-io-2.3.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-io-2.3.jar</binary-origin>
|
||||
<runtime-relative-path>ext/java-libpst-0.8.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/java-libpst-0.8.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/wstx-asl-3.2.7.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\wstx-asl-3.2.7.jar</binary-origin>
|
||||
<runtime-relative-path>ext/protobuf-java-2.5.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/protobuf-java-2.5.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/annotations-12.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\annotations-12.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/lucene-queries-4.0.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/lucene-queries-4.0.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-collections-3.2.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-collections-3.2.2.jar</binary-origin>
|
||||
<runtime-relative-path>ext/boilerpipe-1.1.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/boilerpipe-1.1.0.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>
|
||||
<runtime-relative-path>ext/juniversalchardet-1.0.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/juniversalchardet-1.0.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-lang-2.6.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-lang-2.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/quartz-2.2.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/quartz-2.2.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/libsvm-3.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/libsvm-3.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/slf4j-api-1.7.25.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/slf4j-api-1.7.25.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/icu4j-3.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\icu4j-3.8.jar</binary-origin>
|
||||
<binary-origin>release/modules/ext/icu4j-3.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jsonic-1.2.11.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jsonic-1.2.11.jar</binary-origin>
|
||||
<runtime-relative-path>ext/poi-4.0.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/poi-4.0.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/language-detector-0.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\language-detector-0.6.jar</binary-origin>
|
||||
</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>
|
||||
<runtime-relative-path>ext/guava-18.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/guava-18.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/joda-time-2.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/joda-time-2.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jcip-annotations-1.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jcip-annotations-1.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-validator-1.5.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-validator-1.5.1.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>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/bzip2-0.9.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/bzip2-0.9.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/cleartk-util-2.0.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/cleartk-util-2.0.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/grib-4.5.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/grib-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpcore-4.4.12.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/httpcore-4.4.12.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jdom-1.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jdom-1.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-beanutils-1.9.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-beanutils-1.9.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/ehcache-core-2.6.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/ehcache-core-2.6.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/poi-ooxml-schemas-4.0.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/poi-ooxml-schemas-4.0.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/zookeeper-3.5.7.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/zookeeper-3.5.7.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-collections-3.2.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-collections-3.2.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-io-2.6.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-io-2.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/annotations-12.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\annotations-12.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/openaifsm-0.0.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/openaifsm-0.0.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/stax2-api-3.1.4.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/stax2-api-3.1.4.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpclient-4.5.10.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/httpclient-4.5.10.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/solr-solrj-8.6.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/solr-solrj-8.6.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/vorbis-java-tika-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/vorbis-java-tika-0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/xmpcore-5.1.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/xmpcore-5.1.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
</data>
|
||||
</configuration>
|
||||
|
2032
KeywordSearch/solr/bin/autopsy-solr.cmd
Executable file
2032
KeywordSearch/solr/bin/autopsy-solr.cmd
Executable file
File diff suppressed because it is too large
Load Diff
173
KeywordSearch/solr/bin/autopsy-solr.in.cmd
Executable file
173
KeywordSearch/solr/bin/autopsy-solr.in.cmd
Executable file
@ -0,0 +1,173 @@
|
||||
@REM
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@REM contributor license agreements. See the NOTICE file distributed with
|
||||
@REM this work for additional information regarding copyright ownership.
|
||||
@REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
@REM (the "License"); you may not use this file except in compliance with
|
||||
@REM the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing, software
|
||||
@REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@REM See the License for the specific language governing permissions and
|
||||
@REM limitations under the License.
|
||||
|
||||
@REM @echo off
|
||||
|
||||
REM Settings here will override settings in existing env vars or in bin/solr. The default shipped state
|
||||
REM of this file is completely commented.
|
||||
|
||||
REM By default the script will use JAVA_HOME to determine which java
|
||||
REM to use, but you can set a specific path for Solr to use without
|
||||
REM affecting other Java applications on your server/workstation.
|
||||
REM set SOLR_JAVA_HOME=
|
||||
|
||||
REM Increase Java Min/Max Heap as needed to support your indexing / query needs
|
||||
REM set SOLR_JAVA_MEM=-Xms512m -Xmx512m
|
||||
|
||||
REM Configure verbose GC logging:
|
||||
REM For Java 8: if this is set, additional params will be added to specify the log file & rotation
|
||||
REM For Java 9 or higher: GC_LOG_OPTS is currently not supported. If you set it, the startup script will exit with failure.
|
||||
REM set GC_LOG_OPTS=-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime
|
||||
|
||||
REM Various GC settings have shown to work well for a number of common Solr workloads.
|
||||
REM See solr.cmd GC_TUNE for the default list.
|
||||
REM set GC_TUNE=-XX:SurvivorRatio=4
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:TargetSurvivorRatio=90
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:MaxTenuringThreshold=8
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+UseConcMarkSweepGC
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:ConcGCThreads=4
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:ParallelGCThreads=4
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+CMSScavengeBeforeRemark
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:PretenureSizeThreshold=64m
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+UseCMSInitiatingOccupancyOnly
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:CMSInitiatingOccupancyFraction=50
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:CMSMaxAbortablePrecleanTime=6000
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+CMSParallelRemarkEnabled
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+ParallelRefProcEnabled
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:-OmitStackTraceInFastThrow etc.
|
||||
|
||||
REM Set the ZooKeeper connection string if using an external ZooKeeper ensemble
|
||||
REM e.g. host1:2181,host2:2181/chroot
|
||||
REM Leave empty if not using SolrCloud
|
||||
REM set ZK_HOST=
|
||||
|
||||
REM Set the ZooKeeper client timeout (for SolrCloud mode)
|
||||
REM set ZK_CLIENT_TIMEOUT=15000
|
||||
|
||||
REM By default the start script uses "localhost"; override the hostname here
|
||||
REM for production SolrCloud environments to control the hostname exposed to cluster state
|
||||
REM set SOLR_HOST=192.168.1.1
|
||||
|
||||
REM By default Solr will try to connect to Zookeeper with 30 seconds in timeout; override the timeout if needed
|
||||
REM set SOLR_WAIT_FOR_ZK=30
|
||||
|
||||
REM By default the start script uses UTC; override the timezone if needed
|
||||
REM set SOLR_TIMEZONE=UTC
|
||||
|
||||
REM Set to true to activate the JMX RMI connector to allow remote JMX client applications
|
||||
REM to monitor the JVM hosting Solr; set to "false" to disable that behavior
|
||||
REM (false is recommended in production environments)
|
||||
REM set ENABLE_REMOTE_JMX_OPTS=false
|
||||
|
||||
REM The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
|
||||
REM set RMI_PORT=18983
|
||||
|
||||
REM Anything you add to the SOLR_OPTS variable will be included in the java
|
||||
REM start command line as-is, in ADDITION to other options. If you specify the
|
||||
REM -a option on start script, those options will be appended as well. Examples:
|
||||
set SOLR_OPTS=%SOLR_OPTS% -Dbootstrap_confdir=../solr/configsets/AutopsyConfig/conf -Dcollection.configName=AutopsyConfig -Dsolr.default.confdir=../solr/configsets/AutopsyConfig/conf
|
||||
|
||||
REM Path to a directory for Solr to store cores and their data. By default, Solr will use server\solr
|
||||
REM If solr.xml is not stored in ZooKeeper, this directory needs to contain solr.xml
|
||||
REM set SOLR_HOME=
|
||||
|
||||
REM Path to a directory that Solr will use as root for data folders for each core.
|
||||
REM If not set, defaults to <instance_dir>/data. Overridable per core through 'dataDir' core property
|
||||
REM set SOLR_DATA_HOME=
|
||||
|
||||
REM Changes the logging level. Valid values: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Default is INFO
|
||||
REM This is an alternative to changing the rootLogger in log4j2.xml
|
||||
REM set SOLR_LOG_LEVEL=INFO
|
||||
|
||||
REM Location where Solr should write logs to. Absolute or relative to solr start dir
|
||||
REM set SOLR_LOGS_DIR=logs
|
||||
|
||||
REM Enables log rotation before starting Solr. Setting SOLR_LOG_PRESTART_ROTATION=true will let Solr take care of pre
|
||||
REM start rotation of logs. This is false by default as log4j2 handles this for us. If you choose to use another log
|
||||
REM framework that cannot do startup rotation, you may want to enable this to let Solr rotate logs on startup.
|
||||
REM set SOLR_LOG_PRESTART_ROTATION=false
|
||||
|
||||
REM Set the host interface to listen on. Jetty will listen on all interfaces (0.0.0.0) by default.
|
||||
REM This must be an IPv4 ("a.b.c.d") or bracketed IPv6 ("[x::y]") address, not a hostname!
|
||||
REM set SOLR_JETTY_HOST=0.0.0.0
|
||||
|
||||
REM Sets the port Solr binds to, default is 8983
|
||||
REM set SOLR_PORT=8983
|
||||
|
||||
REM Enables HTTPS. It is implictly true if you set SOLR_SSL_KEY_STORE. Use this config
|
||||
REM to enable https module with custom jetty configuration.
|
||||
REM set SOLR_SSL_ENABLED=true
|
||||
REM Uncomment to set SSL-related system properties
|
||||
REM Be sure to update the paths to the correct keystore for your environment
|
||||
REM set SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.jks
|
||||
REM set SOLR_SSL_KEY_STORE_PASSWORD=secret
|
||||
REM set SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.jks
|
||||
REM set SOLR_SSL_TRUST_STORE_PASSWORD=secret
|
||||
REM Require clients to authenticate
|
||||
REM set SOLR_SSL_NEED_CLIENT_AUTH=false
|
||||
REM Enable clients to authenticate (but not require)
|
||||
REM set SOLR_SSL_WANT_CLIENT_AUTH=false
|
||||
REM SSL Certificates contain host/ip "peer name" information that is validated by default. Setting
|
||||
REM this to false can be useful to disable these checks when re-using a certificate on many hosts
|
||||
REM set SOLR_SSL_CHECK_PEER_NAME=true
|
||||
REM Override Key/Trust Store types if necessary
|
||||
REM set SOLR_SSL_KEY_STORE_TYPE=JKS
|
||||
REM set SOLR_SSL_TRUST_STORE_TYPE=JKS
|
||||
|
||||
REM Uncomment if you want to override previously defined SSL values for HTTP client
|
||||
REM otherwise keep them commented and the above values will automatically be set for HTTP clients
|
||||
REM set SOLR_SSL_CLIENT_KEY_STORE=
|
||||
REM set SOLR_SSL_CLIENT_KEY_STORE_PASSWORD=
|
||||
REM set SOLR_SSL_CLIENT_TRUST_STORE=
|
||||
REM set SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD=
|
||||
REM set SOLR_SSL_CLIENT_KEY_STORE_TYPE=
|
||||
REM set SOLR_SSL_CLIENT_TRUST_STORE_TYPE=
|
||||
|
||||
REM Sets path of Hadoop credential provider (hadoop.security.credential.provider.path property) and
|
||||
REM enables usage of credential store.
|
||||
REM Credential provider should store the following keys:
|
||||
REM * solr.jetty.keystore.password
|
||||
REM * solr.jetty.truststore.password
|
||||
REM Set the two below if you want to set specific store passwords for HTTP client
|
||||
REM * javax.net.ssl.keyStorePassword
|
||||
REM * javax.net.ssl.trustStorePassword
|
||||
REM More info: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CredentialProviderAPI.html
|
||||
REM set SOLR_HADOOP_CREDENTIAL_PROVIDER_PATH=localjceks://file/home/solr/hadoop-credential-provider.jceks
|
||||
REM set SOLR_OPTS=" -Dsolr.ssl.credential.provider.chain=hadoop"
|
||||
|
||||
REM Settings for authentication
|
||||
REM Please configure only one of SOLR_AUTHENTICATION_CLIENT_BUILDER or SOLR_AUTH_TYPE parameters
|
||||
REM set SOLR_AUTHENTICATION_CLIENT_BUILDER=org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory
|
||||
REM set SOLR_AUTH_TYPE=basic
|
||||
REM set SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
|
||||
|
||||
REM Settings for ZK ACL
|
||||
REM set SOLR_ZK_CREDS_AND_ACLS=-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider ^
|
||||
REM -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider ^
|
||||
REM -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD ^
|
||||
REM -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% %SOLR_ZK_CREDS_AND_ACLS%
|
||||
|
||||
REM When running Solr in non-cloud mode and if planning to do distributed search (using the "shards" parameter), the
|
||||
REM list of hosts needs to be whitelisted or Solr will forbid the request. The whitelist can be configured in solr.xml,
|
||||
REM or if you are using the OOTB solr.xml, can be specified using the system property "solr.shardsWhitelist". Alternatively
|
||||
REM host checking can be disabled by using the system property "solr.disable.shardsWhitelist"
|
||||
REM set SOLR_OPTS="%SOLR_OPTS% -Dsolr.shardsWhitelist=http://localhost:8983,http://localhost:8984"
|
||||
|
||||
REM For a visual indication in the Admin UI of what type of environment this cluster is, configure
|
||||
REM a -Dsolr.environment property below. Valid values are prod, stage, test, dev, with an optional
|
||||
REM label or color, e.g. -Dsolr.environment=test,label=Functional+test,color=brown
|
||||
REM SOLR_OPTS="$SOLR_OPTS -Dsolr.environment=prod"
|
78
KeywordSearch/solr/bin/init.d/solr
Executable file
78
KeywordSearch/solr/bin/init.d/solr
Executable file
@ -0,0 +1,78 @@
|
||||
#!/bin/sh
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: solr
|
||||
# Required-Start: $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Description: Controls Apache Solr as a Service
|
||||
### END INIT INFO
|
||||
|
||||
# Example of a very simple *nix init script that delegates commands to the bin/solr script
|
||||
# Typical usage is to do:
|
||||
#
|
||||
# cp bin/init.d/solr /etc/init.d/solr
|
||||
# chmod 755 /etc/init.d/solr
|
||||
# chown root:root /etc/init.d/solr
|
||||
# update-rc.d solr defaults
|
||||
# update-rc.d solr enable
|
||||
|
||||
# Where you extracted the Solr distribution bundle
|
||||
SOLR_INSTALL_DIR="/opt/solr"
|
||||
|
||||
if [ ! -d "$SOLR_INSTALL_DIR" ]; then
|
||||
echo "$SOLR_INSTALL_DIR not found! Please check the SOLR_INSTALL_DIR setting in your $0 script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Path to an include file that defines environment specific settings to override default
|
||||
# variables used by the bin/solr script. It's highly recommended to define this script so
|
||||
# that you can keep the Solr binary files separated from live files (pid, logs, index data, etc)
|
||||
# see bin/solr.in.sh for an example
|
||||
SOLR_ENV="/etc/default/solr.in.sh"
|
||||
|
||||
if [ ! -f "$SOLR_ENV" ]; then
|
||||
echo "$SOLR_ENV not found! Please check the SOLR_ENV setting in your $0 script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Specify the user to run Solr as; if not set, then Solr will run as root.
|
||||
# Running Solr as root is not recommended for production environments
|
||||
RUNAS="solr"
|
||||
|
||||
# verify the specified run as user exists
|
||||
runas_uid="`id -u "$RUNAS"`"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "User $RUNAS not found! Please create the $RUNAS user before running this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart|status)
|
||||
SOLR_CMD="$1"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit
|
||||
esac
|
||||
|
||||
if [ -n "$RUNAS" ]; then
|
||||
su -c "SOLR_INCLUDE=\"$SOLR_ENV\" \"$SOLR_INSTALL_DIR/bin/solr\" $SOLR_CMD" - "$RUNAS"
|
||||
else
|
||||
SOLR_INCLUDE="$SOLR_ENV" "$SOLR_INSTALL_DIR/bin/solr" "$SOLR_CMD"
|
||||
fi
|
370
KeywordSearch/solr/bin/install_solr_service.sh
Executable file
370
KeywordSearch/solr/bin/install_solr_service.sh
Executable file
@ -0,0 +1,370 @@
|
||||
#!/usr/bin/env bash
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo -e "\nERROR: This script must be run as root\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_usage() {
|
||||
ERROR_MSG="$1"
|
||||
|
||||
if [ "$ERROR_MSG" != "" ]; then
|
||||
echo -e "\nERROR: $ERROR_MSG\n" 1>&2
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Usage: install_solr_service.sh <path_to_solr_distribution_archive> [OPTIONS]"
|
||||
echo ""
|
||||
echo " The first argument to the script must be a path to a Solr distribution archive, such as solr-5.0.0.tgz"
|
||||
echo " (only .tgz or .zip are supported formats for the archive)"
|
||||
echo ""
|
||||
echo " Supported OPTIONS include:"
|
||||
echo ""
|
||||
echo " -d Directory for live / writable Solr files, such as logs, pid files, and index data; defaults to /var/solr"
|
||||
echo ""
|
||||
echo " -i Directory to extract the Solr installation archive; defaults to /opt/"
|
||||
echo " The specified path must exist prior to using this script."
|
||||
echo ""
|
||||
echo " -p Port Solr should bind to; default is 8983"
|
||||
echo ""
|
||||
echo " -s Service name; defaults to solr"
|
||||
echo ""
|
||||
echo " -u User to own the Solr files and run the Solr process as; defaults to solr"
|
||||
echo " This script will create the specified user account if it does not exist."
|
||||
echo ""
|
||||
echo " -f Upgrade Solr. Overwrite symlink and init script of previous installation."
|
||||
echo ""
|
||||
echo " -n Do not start Solr service after install, and do not abort on missing Java"
|
||||
echo ""
|
||||
echo " NOTE: Must be run as the root user"
|
||||
echo ""
|
||||
} # end print_usage
|
||||
|
||||
print_error() {
|
||||
echo $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Locate *NIX distribution by looking for match from various detection strategies
|
||||
# We start with /etc/os-release, as this will also work for Docker containers
|
||||
for command in "grep -E \"^NAME=\" /etc/os-release" \
|
||||
"lsb_release -i" \
|
||||
"cat /proc/version" \
|
||||
"uname -a" ; do
|
||||
distro_string=$(eval $command 2>/dev/null)
|
||||
unset distro
|
||||
if [[ ${distro_string,,} == *"debian"* ]]; then
|
||||
distro=Debian
|
||||
elif [[ ${distro_string,,} == *"red hat"* ]]; then
|
||||
distro=RedHat
|
||||
elif [[ ${distro_string,,} == *"centos"* ]]; then
|
||||
distro=CentOS
|
||||
elif [[ ${distro_string,,} == *"ubuntu"* ]]; then
|
||||
distro=Ubuntu
|
||||
elif [[ ${distro_string,,} == *"suse"* ]]; then
|
||||
distro=SUSE
|
||||
elif [[ ${distro_string,,} == *"darwin"* ]]; then
|
||||
echo "Sorry, this script does not support macOS. You'll need to setup Solr as a service manually using the documentation provided in the Solr Reference Guide."
|
||||
echo "You could also try installing via Homebrew (http://brew.sh/), e.g. brew install solr"
|
||||
exit 1
|
||||
fi
|
||||
if [[ $distro ]] ; then break ; fi
|
||||
done
|
||||
if [[ ! $distro ]] ; then
|
||||
echo -e "\nERROR: Unable to auto-detect your *NIX distribution!\nYou'll need to setup Solr as a service manually using the documentation provided in the Solr Reference Guide.\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
print_usage "Must specify the path to the Solr installation archive, such as solr-5.0.0.tgz"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOLR_ARCHIVE=$1
|
||||
if [ ! -f "$SOLR_ARCHIVE" ]; then
|
||||
print_usage "Specified Solr installation archive $SOLR_ARCHIVE not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# strip off path info
|
||||
SOLR_INSTALL_FILE=${SOLR_ARCHIVE##*/}
|
||||
is_tar=true
|
||||
if [ ${SOLR_INSTALL_FILE: -4} == ".tgz" ]; then
|
||||
SOLR_DIR=${SOLR_INSTALL_FILE%.tgz}
|
||||
elif [ ${SOLR_INSTALL_FILE: -4} == ".zip" ]; then
|
||||
SOLR_DIR=${SOLR_INSTALL_FILE%.zip}
|
||||
is_tar=false
|
||||
else
|
||||
print_usage "Solr installation archive $SOLR_ARCHIVE is invalid, expected a .tgz or .zip file!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOLR_START=true
|
||||
if [ $# -gt 1 ]; then
|
||||
shift
|
||||
while true; do
|
||||
case $1 in
|
||||
-i)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Directory path is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_EXTRACT_DIR=$2
|
||||
shift 2
|
||||
;;
|
||||
-d)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Directory path is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_VAR_DIR="$2"
|
||||
shift 2
|
||||
;;
|
||||
-u)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Username is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_USER="$2"
|
||||
shift 2
|
||||
;;
|
||||
-s)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Service name is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_SERVICE="$2"
|
||||
shift 2
|
||||
;;
|
||||
-p)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Port is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_PORT="$2"
|
||||
shift 2
|
||||
;;
|
||||
-f)
|
||||
SOLR_UPGRADE="YES"
|
||||
shift 1
|
||||
;;
|
||||
-n)
|
||||
SOLR_START=false
|
||||
shift 1
|
||||
;;
|
||||
-help|-usage)
|
||||
print_usage ""
|
||||
exit 0
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
if [ "$1" != "" ]; then
|
||||
print_usage "Unrecognized or misplaced argument: $1!"
|
||||
exit 1
|
||||
else
|
||||
break # out-of-args, stop looping
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
# Test for availability of needed tools
|
||||
if [[ $is_tar ]] ; then
|
||||
tar --version &>/dev/null || print_error "Script requires the 'tar' command"
|
||||
else
|
||||
unzip -hh &>/dev/null || print_error "Script requires the 'unzip' command"
|
||||
fi
|
||||
if [[ $SOLR_START == "true" ]] ; then
|
||||
service --version &>/dev/null || service --help &>/dev/null || print_error "Script requires the 'service' command"
|
||||
java -version &>/dev/null || print_error "Solr requires java, please install or set JAVA_HOME properly"
|
||||
fi
|
||||
lsof -h &>/dev/null || echo "We recommend installing the 'lsof' command for more stable start/stop of Solr"
|
||||
|
||||
|
||||
if [ -z "$SOLR_EXTRACT_DIR" ]; then
|
||||
SOLR_EXTRACT_DIR=/opt
|
||||
fi
|
||||
|
||||
if [ ! -d "$SOLR_EXTRACT_DIR" ]; then
|
||||
print_usage "Installation directory $SOLR_EXTRACT_DIR not found! Please create it before running this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_SERVICE" ]; then
|
||||
SOLR_SERVICE=solr
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_VAR_DIR" ]; then
|
||||
SOLR_VAR_DIR="/var/$SOLR_SERVICE"
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_USER" ]; then
|
||||
SOLR_USER=solr
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_PORT" ]; then
|
||||
SOLR_PORT=8983
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_UPGRADE" ]; then
|
||||
SOLR_UPGRADE=NO
|
||||
fi
|
||||
|
||||
if [ ! "$SOLR_UPGRADE" = "YES" ]; then
|
||||
if [ -f "/etc/init.d/$SOLR_SERVICE" ]; then
|
||||
print_usage "/etc/init.d/$SOLR_SERVICE already exists! Perhaps Solr is already setup as a service on this host? To upgrade Solr use the -f option."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" ]; then
|
||||
print_usage "$SOLR_EXTRACT_DIR/$SOLR_SERVICE already exists! Please move this directory / link or choose a different service name using the -s option."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# stop running instance
|
||||
if [ -f "/etc/init.d/$SOLR_SERVICE" ]; then
|
||||
echo -e "\nStopping Solr instance if exists ...\n"
|
||||
service "$SOLR_SERVICE" stop
|
||||
fi
|
||||
|
||||
# create user if not exists
|
||||
solr_uid="`id -u "$SOLR_USER"`"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Creating new user: $SOLR_USER"
|
||||
if [ "$distro" == "RedHat" ] || [ "$distro" == "CentOS" ] ; then
|
||||
adduser --system -U -m --home-dir "$SOLR_VAR_DIR" "$SOLR_USER"
|
||||
elif [ "$distro" == "SUSE" ]; then
|
||||
useradd --system -U -m --home-dir "$SOLR_VAR_DIR" "$SOLR_USER"
|
||||
else
|
||||
adduser --system --shell /bin/bash --group --disabled-password --home "$SOLR_VAR_DIR" "$SOLR_USER"
|
||||
fi
|
||||
fi
|
||||
|
||||
# extract
|
||||
SOLR_INSTALL_DIR="$SOLR_EXTRACT_DIR/$SOLR_DIR"
|
||||
if [ ! -d "$SOLR_INSTALL_DIR" ]; then
|
||||
|
||||
echo -e "\nExtracting $SOLR_ARCHIVE to $SOLR_EXTRACT_DIR\n"
|
||||
|
||||
if $is_tar ; then
|
||||
tar zxf "$SOLR_ARCHIVE" -C "$SOLR_EXTRACT_DIR"
|
||||
else
|
||||
unzip -q "$SOLR_ARCHIVE" -d "$SOLR_EXTRACT_DIR"
|
||||
fi
|
||||
|
||||
if [ ! -d "$SOLR_INSTALL_DIR" ]; then
|
||||
echo -e "\nERROR: Expected directory $SOLR_INSTALL_DIR not found after extracting $SOLR_ARCHIVE ... script fails.\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chown -R root: "$SOLR_INSTALL_DIR"
|
||||
find "$SOLR_INSTALL_DIR" -type d -print0 | xargs -0 chmod 0755
|
||||
find "$SOLR_INSTALL_DIR" -type f -print0 | xargs -0 chmod 0644
|
||||
chmod -R 0755 "$SOLR_INSTALL_DIR/bin"
|
||||
else
|
||||
echo -e "\nWARNING: $SOLR_INSTALL_DIR already exists! Skipping extract ...\n"
|
||||
fi
|
||||
|
||||
# create a symlink for easier scripting
|
||||
if [ -h "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" ]; then
|
||||
echo -e "\nRemoving old symlink $SOLR_EXTRACT_DIR/$SOLR_SERVICE ...\n"
|
||||
rm "$SOLR_EXTRACT_DIR/$SOLR_SERVICE"
|
||||
fi
|
||||
if [ -e "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" ]; then
|
||||
echo -e "\nWARNING: $SOLR_EXTRACT_DIR/$SOLR_SERVICE is not symlink! Skipping symlink update ...\n"
|
||||
else
|
||||
echo -e "\nInstalling symlink $SOLR_EXTRACT_DIR/$SOLR_SERVICE -> $SOLR_INSTALL_DIR ...\n"
|
||||
ln -s "$SOLR_INSTALL_DIR" "$SOLR_EXTRACT_DIR/$SOLR_SERVICE"
|
||||
fi
|
||||
|
||||
# install init.d script
|
||||
echo -e "\nInstalling /etc/init.d/$SOLR_SERVICE script ...\n"
|
||||
cp "$SOLR_INSTALL_DIR/bin/init.d/solr" "/etc/init.d/$SOLR_SERVICE"
|
||||
chmod 0744 "/etc/init.d/$SOLR_SERVICE"
|
||||
chown root: "/etc/init.d/$SOLR_SERVICE"
|
||||
# do some basic variable substitution on the init.d script
|
||||
sed_expr1="s#SOLR_INSTALL_DIR=.*#SOLR_INSTALL_DIR=\"$SOLR_EXTRACT_DIR/$SOLR_SERVICE\"#"
|
||||
sed_expr2="s#SOLR_ENV=.*#SOLR_ENV=\"/etc/default/$SOLR_SERVICE.in.sh\"#"
|
||||
sed_expr3="s#RUNAS=.*#RUNAS=\"$SOLR_USER\"#"
|
||||
sed_expr4="s#Provides:.*#Provides: $SOLR_SERVICE#"
|
||||
sed -i -e "$sed_expr1" -e "$sed_expr2" -e "$sed_expr3" -e "$sed_expr4" "/etc/init.d/$SOLR_SERVICE"
|
||||
|
||||
# install/move configuration
|
||||
if [ ! -d /etc/default ]; then
|
||||
mkdir /etc/default
|
||||
chown root: /etc/default
|
||||
chmod 0755 /etc/default
|
||||
fi
|
||||
if [ -f "$SOLR_VAR_DIR/solr.in.sh" ]; then
|
||||
echo -e "\nMoving existing $SOLR_VAR_DIR/solr.in.sh to /etc/default/$SOLR_SERVICE.in.sh ...\n"
|
||||
mv "$SOLR_VAR_DIR/solr.in.sh" "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
elif [ -f "/etc/default/$SOLR_SERVICE.in.sh" ]; then
|
||||
echo -e "\n/etc/default/$SOLR_SERVICE.in.sh already exist. Skipping install ...\n"
|
||||
else
|
||||
echo -e "\nInstalling /etc/default/$SOLR_SERVICE.in.sh ...\n"
|
||||
cp "$SOLR_INSTALL_DIR/bin/solr.in.sh" "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
mv "$SOLR_INSTALL_DIR/bin/solr.in.sh" "$SOLR_INSTALL_DIR/bin/solr.in.sh.orig"
|
||||
mv "$SOLR_INSTALL_DIR/bin/solr.in.cmd" "$SOLR_INSTALL_DIR/bin/solr.in.cmd.orig"
|
||||
echo "SOLR_PID_DIR=\"$SOLR_VAR_DIR\"
|
||||
SOLR_HOME=\"$SOLR_VAR_DIR/data\"
|
||||
LOG4J_PROPS=\"$SOLR_VAR_DIR/log4j2.xml\"
|
||||
SOLR_LOGS_DIR=\"$SOLR_VAR_DIR/logs\"
|
||||
SOLR_PORT=\"$SOLR_PORT\"
|
||||
" >> "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
fi
|
||||
chown root:${SOLR_USER} "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
chmod 0640 "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
|
||||
# install data directories and files
|
||||
mkdir -p "$SOLR_VAR_DIR/data"
|
||||
mkdir -p "$SOLR_VAR_DIR/logs"
|
||||
if [ -f "$SOLR_VAR_DIR/data/solr.xml" ]; then
|
||||
echo -e "\n$SOLR_VAR_DIR/data/solr.xml already exists. Skipping install ...\n"
|
||||
else
|
||||
cp "$SOLR_INSTALL_DIR/server/solr/"{solr.xml,zoo.cfg} "$SOLR_VAR_DIR/data/"
|
||||
fi
|
||||
if [ -f "$SOLR_VAR_DIR/log4j2.xml" ]; then
|
||||
echo -e "\n$SOLR_VAR_DIR/log4j2.xml already exists. Skipping install ...\n"
|
||||
else
|
||||
cp "$SOLR_INSTALL_DIR/server/resources/log4j2.xml" "$SOLR_VAR_DIR/log4j2.xml"
|
||||
fi
|
||||
chown -R "$SOLR_USER:" "$SOLR_VAR_DIR"
|
||||
find "$SOLR_VAR_DIR" -type d -print0 | xargs -0 chmod 0750
|
||||
find "$SOLR_VAR_DIR" -type f -print0 | xargs -0 chmod 0640
|
||||
|
||||
# configure autostart of service
|
||||
if [[ "$distro" == "RedHat" || "$distro" == "CentOS" || "$distro" == "SUSE" ]]; then
|
||||
chkconfig "$SOLR_SERVICE" on
|
||||
else
|
||||
update-rc.d "$SOLR_SERVICE" defaults
|
||||
fi
|
||||
echo "Service $SOLR_SERVICE installed."
|
||||
echo "Customize Solr startup configuration in /etc/default/$SOLR_SERVICE.in.sh"
|
||||
|
||||
# start service
|
||||
if [[ $SOLR_START == "true" ]] ; then
|
||||
service "$SOLR_SERVICE" start
|
||||
sleep 5
|
||||
service "$SOLR_SERVICE" status
|
||||
else
|
||||
echo "Not starting Solr service (option -n given). Start manually with 'service $SOLR_SERVICE start'"
|
||||
fi
|
30
KeywordSearch/solr/bin/oom_solr.sh
Executable file
30
KeywordSearch/solr/bin/oom_solr.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
SOLR_PORT=$1
|
||||
SOLR_LOGS_DIR=$2
|
||||
SOLR_PID=`ps auxww | grep start.jar | grep $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`
|
||||
if [ -z "$SOLR_PID" ]; then
|
||||
echo "Couldn't find Solr process running on port $SOLR_PORT!"
|
||||
exit
|
||||
fi
|
||||
NOW=$(date +"%F_%H_%M_%S")
|
||||
(
|
||||
echo "Running OOM killer script for process $SOLR_PID for Solr on port $SOLR_PORT"
|
||||
kill -9 $SOLR_PID
|
||||
echo "Killed process $SOLR_PID"
|
||||
) | tee $SOLR_LOGS_DIR/solr_oom_killer-$SOLR_PORT-$NOW.log
|
239
KeywordSearch/solr/bin/post
Executable file
239
KeywordSearch/solr/bin/post
Executable file
@ -0,0 +1,239 @@
|
||||
#!/usr/bin/env bash
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# ====== Common code copied/adapted from bin/solr (TODO: centralize/share this kind of thing across bin/solr, etc)
|
||||
|
||||
THIS_SCRIPT="$0"
|
||||
|
||||
# Resolve symlinks to this script
|
||||
while [ -h "$THIS_SCRIPT" ] ; do
|
||||
ls=`ls -ld "$THIS_SCRIPT"`
|
||||
# Drop everything prior to ->
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
THIS_SCRIPT="$link"
|
||||
else
|
||||
THIS_SCRIPT=`dirname "$THIS_SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
SOLR_TIP=`dirname "$THIS_SCRIPT"`/..
|
||||
SOLR_TIP=`cd "$SOLR_TIP"; pwd`
|
||||
|
||||
if [ -n "$SOLR_JAVA_HOME" ]; then
|
||||
JAVA="$SOLR_JAVA_HOME/bin/java"
|
||||
elif [ -n "$JAVA_HOME" ]; then
|
||||
for java in "$JAVA_HOME"/bin/amd64/java "$JAVA_HOME"/bin/java; do
|
||||
if [ -x "$java" ]; then
|
||||
JAVA="$java"
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
JAVA=java
|
||||
fi
|
||||
|
||||
# test that Java exists and is executable on this server
|
||||
"$JAVA" -version >/dev/null 2>&1 || { echo >&2 "Java is required to run this tool! Please install Java 8 or greater before running this script."; exit 1; }
|
||||
|
||||
|
||||
# ===== post specific code
|
||||
|
||||
TOOL_JAR=("$SOLR_TIP/dist"/solr-core-*.jar)
|
||||
|
||||
function print_usage() {
|
||||
echo ""
|
||||
echo 'Usage: post -c <collection> [OPTIONS] <files|directories|urls|-d ["...",...]>'
|
||||
echo " or post -help"
|
||||
echo ""
|
||||
echo " collection name defaults to DEFAULT_SOLR_COLLECTION if not specified"
|
||||
echo ""
|
||||
echo "OPTIONS"
|
||||
echo "======="
|
||||
echo " Solr options:"
|
||||
echo " -url <base Solr update URL> (overrides collection, host, and port)"
|
||||
echo " -host <host> (default: localhost)"
|
||||
echo " -p or -port <port> (default: 8983)"
|
||||
echo " -commit yes|no (default: yes)"
|
||||
echo " -u or -user <user:pass> (sets BasicAuth credentials)"
|
||||
# optimize intentionally omitted, but can be used as '-optimize yes' (default: no)
|
||||
echo ""
|
||||
echo " Web crawl options:"
|
||||
echo " -recursive <depth> (default: 1)"
|
||||
echo " -delay <seconds> (default: 10)"
|
||||
echo ""
|
||||
echo " Directory crawl options:"
|
||||
echo " -delay <seconds> (default: 0)"
|
||||
echo ""
|
||||
echo " stdin/args options:"
|
||||
echo " -type <content/type> (default: application/xml)"
|
||||
echo ""
|
||||
echo " Other options:"
|
||||
echo " -filetypes <type>[,<type>,...] (default: xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log)"
|
||||
echo " -params \"<key>=<value>[&<key>=<value>...]\" (values must be URL-encoded; these pass through to Solr update request)"
|
||||
echo " -out yes|no (default: no; yes outputs Solr response to console)"
|
||||
echo " -format solr (sends application/json content as Solr commands to /update instead of /update/json/docs)"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo ""
|
||||
echo "* JSON file: $THIS_SCRIPT -c wizbang events.json"
|
||||
echo "* XML files: $THIS_SCRIPT -c records article*.xml"
|
||||
echo "* CSV file: $THIS_SCRIPT -c signals LATEST-signals.csv"
|
||||
echo "* Directory of files: $THIS_SCRIPT -c myfiles ~/Documents"
|
||||
echo "* Web crawl: $THIS_SCRIPT -c gettingstarted http://lucene.apache.org/solr -recursive 1 -delay 1"
|
||||
echo "* Standard input (stdin): echo '{"commit": {}}' | $THIS_SCRIPT -c my_collection -type application/json -out yes -d"
|
||||
echo "* Data as string: $THIS_SCRIPT -c signals -type text/csv -out yes -d $'id,value\n1,0.47'"
|
||||
echo ""
|
||||
} # end print_usage
|
||||
|
||||
if [[ $# -eq 1 && ("$1" == "-help" || "$1" == "-h" || "$1" == "-usage") ]]; then
|
||||
print_usage
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
COLLECTION="$DEFAULT_SOLR_COLLECTION"
|
||||
PROPS=('-Dauto=yes')
|
||||
RECURSIVE=""
|
||||
FILES=()
|
||||
URLS=()
|
||||
ARGS=()
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
# TODO: natively handle the optional parameters to SPT
|
||||
# but for now they can be specified as bin/post -c collection-name delay=5 http://lucidworks.com
|
||||
|
||||
if [[ -d "$1" ]]; then
|
||||
# Directory
|
||||
# echo "$1: DIRECTORY"
|
||||
RECURSIVE=yes
|
||||
FILES+=("$1")
|
||||
elif [[ -f "$1" ]]; then
|
||||
# File
|
||||
# echo "$1: FILE"
|
||||
FILES+=("$1")
|
||||
elif [[ "$1" == http* ]]; then
|
||||
# URL
|
||||
# echo "$1: URL"
|
||||
URLS+=("$1")
|
||||
else
|
||||
if [[ "$1" == -* ]]; then
|
||||
if [[ "$1" == "-c" ]]; then
|
||||
# Special case, pull out collection name
|
||||
shift
|
||||
COLLECTION="$1"
|
||||
elif [[ "$1" == "-p" ]]; then
|
||||
# -p alias for -port for convenience and compatibility with `bin/solr start`
|
||||
shift
|
||||
PROPS+=("-Dport=$1")
|
||||
elif [[ ("$1" == "-d" || "$1" == "--data" || "$1" == "-") ]]; then
|
||||
if [[ ! -t 0 ]]; then
|
||||
MODE="stdin"
|
||||
else
|
||||
# when no stdin exists and -d specified, the rest of the arguments
|
||||
# are assumed to be strings to post as-is
|
||||
MODE="args"
|
||||
shift
|
||||
if [[ $# -gt 0 ]]; then
|
||||
ARGS=("$@")
|
||||
shift $#
|
||||
else
|
||||
# SPT needs a valid args string, useful for 'bin/post -c foo -d' to force a commit
|
||||
ARGS+=("<add/>")
|
||||
fi
|
||||
fi
|
||||
elif [[ ("$1" == "-u" || "$1" == "-user") ]]; then
|
||||
shift
|
||||
PROPS+=("-Dbasicauth=$1")
|
||||
else
|
||||
if [[ "$1" == -D* ]] ; then
|
||||
PROPS+=("$1")
|
||||
if [[ "${1:2:4}" == "url=" ]]; then
|
||||
SOLR_URL=${1:6}
|
||||
fi
|
||||
else
|
||||
key="${1:1}"
|
||||
shift
|
||||
# echo "$1: PROP"
|
||||
PROPS+=("-D$key=$1")
|
||||
if [[ "$key" == "url" ]]; then
|
||||
SOLR_URL=$1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo -e "\nUnrecognized argument: $1\n"
|
||||
echo -e "If this was intended to be a data file, it does not exist relative to $PWD\n"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
# Check for errors
|
||||
if [[ $COLLECTION == "" && $SOLR_URL == "" ]]; then
|
||||
echo -e "\nCollection or URL must be specified. Use -c <collection name> or set DEFAULT_SOLR_COLLECTION in your environment, or use -url instead.\n"
|
||||
echo -e "See '$THIS_SCRIPT -h' for usage instructions.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Unsupported: bin/post -c foo
|
||||
if [[ ${#FILES[@]} == 0 && ${#URLS[@]} == 0 && $MODE != "stdin" && $MODE != "args" ]]; then
|
||||
echo -e "\nNo files, directories, URLs, -d strings, or stdin were specified.\n"
|
||||
echo -e "See '$THIS_SCRIPT -h' for usage instructions.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# SPT does not support mixing different data mode types, just files, just URLs, just stdin, or just argument strings.
|
||||
# The following are unsupported constructs:
|
||||
# bin/post -c foo existing_file.csv http://example.com
|
||||
# echo '<xml.../>' | bin/post -c foo existing_file.csv
|
||||
# bin/post -c foo existing_file.csv -d 'anything'
|
||||
if [[ (${#FILES[@]} != 0 && ${#URLS[@]} != 0 && $MODE != "stdin" && $MODE != "args")
|
||||
|| ((${#FILES[@]} != 0 || ${#URLS[@]} != 0) && ($MODE == "stdin" || $MODE == "args")) ]]; then
|
||||
echo -e "\nCombining files/directories, URLs, stdin, or args is not supported. Post them separately.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PARAMS=""
|
||||
|
||||
# TODO: let's simplify this
|
||||
if [[ $MODE != "stdin" && $MODE != "args" ]]; then
|
||||
if [[ $FILES != "" ]]; then
|
||||
MODE="files"
|
||||
PARAMS=("${FILES[@]}")
|
||||
fi
|
||||
|
||||
if [[ $URLS != "" ]]; then
|
||||
MODE="web"
|
||||
PARAMS=("${URLS[@]}")
|
||||
fi
|
||||
else
|
||||
PARAMS=("${ARGS[@]}")
|
||||
fi
|
||||
|
||||
PROPS+=("-Dc=$COLLECTION" "-Ddata=$MODE")
|
||||
if [[ -n "$RECURSIVE" ]]; then
|
||||
PROPS+=('-Drecursive=yes')
|
||||
fi
|
||||
|
||||
echo "$JAVA" -classpath "${TOOL_JAR[0]}" "${PROPS[@]}" org.apache.solr.util.SimplePostTool "${PARAMS[@]}"
|
||||
"$JAVA" -classpath "${TOOL_JAR[0]}" "${PROPS[@]}" org.apache.solr.util.SimplePostTool "${PARAMS[@]}"
|
||||
|
||||
# post smoker:
|
||||
# bin/post -c signals -out yes -type application/json -d '[{"id": 2, "val": 0.47}]'
|
||||
# bin/post -c signals -out yes -params "wt=json" -d '<add><doc><field name="id">1</field></doc></add>'
|
33
KeywordSearch/solr/bin/postlogs
Executable file
33
KeywordSearch/solr/bin/postlogs
Executable file
@ -0,0 +1,33 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
############################################################################################
|
||||
#
|
||||
# A command line tool for indexing Solr logs in the out-of-the-box log format.
|
||||
#
|
||||
# First build the Solr distribution. Then run postlogs from inside the Solr distribution
|
||||
# home directory as described below:
|
||||
#
|
||||
# parameters:
|
||||
#
|
||||
# -- baseUrl: Example http://localhost:8983/solr/collection1
|
||||
# -- rootDir: All files found at or below the root will be indexed
|
||||
#
|
||||
# Sample syntax: ./bin/postlogs http://localhost:8983/solr/collection1 /user/foo/logs");
|
||||
#
|
||||
#
|
||||
############################################################################################
|
||||
|
||||
java -classpath dist/*:dist/solrj-lib/*: org.apache.solr.util.SolrLogPostTool $1 $2
|
2291
KeywordSearch/solr/bin/solr
Executable file
2291
KeywordSearch/solr/bin/solr
Executable file
File diff suppressed because it is too large
Load Diff
2069
KeywordSearch/solr/bin/solr.cmd
Executable file
2069
KeywordSearch/solr/bin/solr.cmd
Executable file
File diff suppressed because it is too large
Load Diff
206
KeywordSearch/solr/bin/solr.in.cmd
Executable file
206
KeywordSearch/solr/bin/solr.in.cmd
Executable file
@ -0,0 +1,206 @@
|
||||
@REM
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@REM contributor license agreements. See the NOTICE file distributed with
|
||||
@REM this work for additional information regarding copyright ownership.
|
||||
@REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
@REM (the "License"); you may not use this file except in compliance with
|
||||
@REM the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing, software
|
||||
@REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@REM See the License for the specific language governing permissions and
|
||||
@REM limitations under the License.
|
||||
|
||||
@echo off
|
||||
|
||||
REM Settings here will override settings in existing env vars or in bin/solr. The default shipped state
|
||||
REM of this file is completely commented.
|
||||
|
||||
REM By default the script will use JAVA_HOME to determine which java
|
||||
REM to use, but you can set a specific path for Solr to use without
|
||||
REM affecting other Java applications on your server/workstation.
|
||||
REM set SOLR_JAVA_HOME=
|
||||
|
||||
REM Increase Java Min/Max Heap as needed to support your indexing / query needs
|
||||
REM set SOLR_JAVA_MEM=-Xms512m -Xmx512m
|
||||
|
||||
REM Configure verbose GC logging:
|
||||
REM For Java 8: if this is set, additional params will be added to specify the log file & rotation
|
||||
REM For Java 9 or higher: GC_LOG_OPTS is currently not supported. If you set it, the startup script will exit with failure.
|
||||
REM set GC_LOG_OPTS=-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime
|
||||
|
||||
REM Various GC settings have shown to work well for a number of common Solr workloads.
|
||||
REM See solr.cmd GC_TUNE for the default list.
|
||||
REM set GC_TUNE=-XX:+ExplicitGCInvokesConcurrent
|
||||
REM set GC_TUNE=-XX:SurvivorRatio=4
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:TargetSurvivorRatio=90
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:MaxTenuringThreshold=8
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+UseConcMarkSweepGC
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:ConcGCThreads=4
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:ParallelGCThreads=4
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+CMSScavengeBeforeRemark
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:PretenureSizeThreshold=64m
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+UseCMSInitiatingOccupancyOnly
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:CMSInitiatingOccupancyFraction=50
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:CMSMaxAbortablePrecleanTime=6000
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+CMSParallelRemarkEnabled
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+ParallelRefProcEnabled etc.
|
||||
|
||||
REM Set the ZooKeeper connection string if using an external ZooKeeper ensemble
|
||||
REM e.g. host1:2181,host2:2181/chroot
|
||||
REM Leave empty if not using SolrCloud
|
||||
REM set ZK_HOST=
|
||||
|
||||
REM Set the ZooKeeper client timeout (for SolrCloud mode)
|
||||
REM set ZK_CLIENT_TIMEOUT=15000
|
||||
|
||||
REM By default the start script uses "localhost"; override the hostname here
|
||||
REM for production SolrCloud environments to control the hostname exposed to cluster state
|
||||
REM set SOLR_HOST=192.168.1.1
|
||||
|
||||
REM By default Solr will try to connect to Zookeeper with 30 seconds in timeout; override the timeout if needed
|
||||
REM set SOLR_WAIT_FOR_ZK=30
|
||||
|
||||
REM By default the start script uses UTC; override the timezone if needed
|
||||
REM set SOLR_TIMEZONE=UTC
|
||||
|
||||
REM Set to true to activate the JMX RMI connector to allow remote JMX client applications
|
||||
REM to monitor the JVM hosting Solr; set to "false" to disable that behavior
|
||||
REM (false is recommended in production environments)
|
||||
REM set ENABLE_REMOTE_JMX_OPTS=false
|
||||
|
||||
REM The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
|
||||
REM set RMI_PORT=18983
|
||||
|
||||
REM Anything you add to the SOLR_OPTS variable will be included in the java
|
||||
REM start command line as-is, in ADDITION to other options. If you specify the
|
||||
REM -a option on start script, those options will be appended as well. Examples:
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.autoSoftCommit.maxTime=3000
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.autoCommit.maxTime=60000
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.clustering.enabled=true
|
||||
|
||||
REM Path to a directory for Solr to store cores and their data. By default, Solr will use server\solr
|
||||
REM If solr.xml is not stored in ZooKeeper, this directory needs to contain solr.xml
|
||||
REM set SOLR_HOME=
|
||||
|
||||
REM Path to a directory that Solr will use as root for data folders for each core.
|
||||
REM If not set, defaults to <instance_dir>/data. Overridable per core through 'dataDir' core property
|
||||
REM set SOLR_DATA_HOME=
|
||||
|
||||
REM Changes the logging level. Valid values: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Default is INFO
|
||||
REM This is an alternative to changing the rootLogger in log4j2.xml
|
||||
REM set SOLR_LOG_LEVEL=INFO
|
||||
|
||||
REM Location where Solr should write logs to. Absolute or relative to solr start dir
|
||||
REM set SOLR_LOGS_DIR=logs
|
||||
|
||||
REM Enables log rotation before starting Solr. Setting SOLR_LOG_PRESTART_ROTATION=true will let Solr take care of pre
|
||||
REM start rotation of logs. This is false by default as log4j2 handles this for us. If you choose to use another log
|
||||
REM framework that cannot do startup rotation, you may want to enable this to let Solr rotate logs on startup.
|
||||
REM set SOLR_LOG_PRESTART_ROTATION=false
|
||||
|
||||
REM Enables jetty request log for all requests
|
||||
REM set SOLR_REQUESTLOG_ENABLED=false
|
||||
|
||||
REM Set the host interface to listen on. Jetty will listen on all interfaces (0.0.0.0) by default.
|
||||
REM This must be an IPv4 ("a.b.c.d") or bracketed IPv6 ("[x::y]") address, not a hostname!
|
||||
REM set SOLR_JETTY_HOST=0.0.0.0
|
||||
|
||||
REM Sets the port Solr binds to, default is 8983
|
||||
REM set SOLR_PORT=8983
|
||||
|
||||
REM Restrict access to solr by IP address.
|
||||
REM Specify a comma-separated list of addresses or networks, for example:
|
||||
REM 127.0.0.1, 192.168.0.0/24, [::1], [2000:123:4:5::]/64
|
||||
REM set SOLR_IP_WHITELIST=
|
||||
|
||||
REM Block access to solr from specific IP addresses.
|
||||
REM Specify a comma-separated list of addresses or networks, for example:
|
||||
REM 127.0.0.1, 192.168.0.0/24, [::1], [2000:123:4:5::]/64
|
||||
REM set SOLR_IP_BLACKLIST=
|
||||
|
||||
REM Enables HTTPS. It is implictly true if you set SOLR_SSL_KEY_STORE. Use this config
|
||||
REM to enable https module with custom jetty configuration.
|
||||
REM set SOLR_SSL_ENABLED=true
|
||||
REM Uncomment to set SSL-related system properties
|
||||
REM Be sure to update the paths to the correct keystore for your environment
|
||||
REM set SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.p12
|
||||
REM set SOLR_SSL_KEY_STORE_PASSWORD=secret
|
||||
REM set SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.p12
|
||||
REM set SOLR_SSL_TRUST_STORE_PASSWORD=secret
|
||||
REM Require clients to authenticate
|
||||
REM set SOLR_SSL_NEED_CLIENT_AUTH=false
|
||||
REM Enable clients to authenticate (but not require)
|
||||
REM set SOLR_SSL_WANT_CLIENT_AUTH=false
|
||||
REM Verify client hostname during SSL handshake
|
||||
REM set SOLR_SSL_CLIENT_HOSTNAME_VERIFICATION=false
|
||||
REM SSL Certificates contain host/ip "peer name" information that is validated by default. Setting
|
||||
REM this to false can be useful to disable these checks when re-using a certificate on many hosts
|
||||
REM set SOLR_SSL_CHECK_PEER_NAME=true
|
||||
REM Override Key/Trust Store types if necessary
|
||||
REM set SOLR_SSL_KEY_STORE_TYPE=PKCS12
|
||||
REM set SOLR_SSL_TRUST_STORE_TYPE=PKCS12
|
||||
|
||||
REM Uncomment if you want to override previously defined SSL values for HTTP client
|
||||
REM otherwise keep them commented and the above values will automatically be set for HTTP clients
|
||||
REM set SOLR_SSL_CLIENT_KEY_STORE=
|
||||
REM set SOLR_SSL_CLIENT_KEY_STORE_PASSWORD=
|
||||
REM set SOLR_SSL_CLIENT_TRUST_STORE=
|
||||
REM set SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD=
|
||||
REM set SOLR_SSL_CLIENT_KEY_STORE_TYPE=
|
||||
REM set SOLR_SSL_CLIENT_TRUST_STORE_TYPE=
|
||||
|
||||
REM Sets path of Hadoop credential provider (hadoop.security.credential.provider.path property) and
|
||||
REM enables usage of credential store.
|
||||
REM Credential provider should store the following keys:
|
||||
REM * solr.jetty.keystore.password
|
||||
REM * solr.jetty.truststore.password
|
||||
REM Set the two below if you want to set specific store passwords for HTTP client
|
||||
REM * javax.net.ssl.keyStorePassword
|
||||
REM * javax.net.ssl.trustStorePassword
|
||||
REM More info: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CredentialProviderAPI.html
|
||||
REM set SOLR_HADOOP_CREDENTIAL_PROVIDER_PATH=localjceks://file/home/solr/hadoop-credential-provider.jceks
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.ssl.credential.provider.chain=hadoop
|
||||
|
||||
REM Settings for authentication
|
||||
REM Please configure only one of SOLR_AUTHENTICATION_CLIENT_BUILDER or SOLR_AUTH_TYPE parameters
|
||||
REM set SOLR_AUTHENTICATION_CLIENT_BUILDER=org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory
|
||||
REM set SOLR_AUTH_TYPE=basic
|
||||
REM set SOLR_AUTHENTICATION_OPTS=-Dbasicauth=solr:SolrRocks
|
||||
|
||||
REM Settings for ZK ACL
|
||||
REM set SOLR_ZK_CREDS_AND_ACLS=-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider ^
|
||||
REM -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider ^
|
||||
REM -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD ^
|
||||
REM -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% %SOLR_ZK_CREDS_AND_ACLS%
|
||||
|
||||
REM When running Solr in non-cloud mode and if planning to do distributed search (using the "shards" parameter), the
|
||||
REM list of hosts needs to be whitelisted or Solr will forbid the request. The whitelist can be configured in solr.xml,
|
||||
REM or if you are using the OOTB solr.xml, can be specified using the system property "solr.shardsWhitelist". Alternatively
|
||||
REM host checking can be disabled by using the system property "solr.disable.shardsWhitelist"
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.shardsWhitelist=http://localhost:8983,http://localhost:8984
|
||||
|
||||
REM For a visual indication in the Admin UI of what type of environment this cluster is, configure
|
||||
REM a -Dsolr.environment property below. Valid values are prod, stage, test, dev, with an optional
|
||||
REM label or color, e.g. -Dsolr.environment=test,label=Functional+test,color=brown
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.environment=prod
|
||||
|
||||
REM Specifies the path to a common library directory that will be shared across all cores.
|
||||
REM Any JAR files in this directory will be added to the search path for Solr plugins.
|
||||
REM If the specified path is not absolute, it will be relative to `%SOLR_HOME%`.
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.sharedLib=/path/to/lib
|
||||
|
||||
REM Runs solr in a java security manager sandbox. This can protect against some attacks.
|
||||
REM Runtime properties are passed to the security policy file (server\etc\security.policy)
|
||||
REM You can also tweak via standard JDK files such as ~\.java.policy, see https://s.apache.org/java8policy
|
||||
REM This is experimental! It may not work at all with Hadoop/HDFS features.
|
||||
REM set SOLR_SECURITY_MANAGER_ENABLED=false
|
||||
|
||||
REM Solr is by default allowed to read and write data from/to SOLR_HOME and a few other well defined locations
|
||||
REM Sometimes it may be necessary to place a core or a backup on a different location or a different disk
|
||||
REM This parameter lets you specify file system path(s) to explicitly allow. The special value of '*' will allow any path
|
||||
REM SOLR_OPTS="%SOLR_OPTS% -Dsolr.allowPaths=D:\,E:\other\path"
|
234
KeywordSearch/solr/bin/solr.in.sh
Executable file
234
KeywordSearch/solr/bin/solr.in.sh
Executable file
@ -0,0 +1,234 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Settings here will override settings in existing env vars or in bin/solr. The default shipped state
|
||||
# of this file is completely commented.
|
||||
|
||||
# By default the script will use JAVA_HOME to determine which java
|
||||
# to use, but you can set a specific path for Solr to use without
|
||||
# affecting other Java applications on your server/workstation.
|
||||
#SOLR_JAVA_HOME=""
|
||||
|
||||
# This controls the number of seconds that the solr script will wait for
|
||||
# Solr to stop gracefully or Solr to start. If the graceful stop fails,
|
||||
# the script will forcibly stop Solr. If the start fails, the script will
|
||||
# give up waiting and display the last few lines of the logfile.
|
||||
#SOLR_STOP_WAIT="180"
|
||||
|
||||
# Increase Java Heap as needed to support your indexing / query needs
|
||||
#SOLR_HEAP="512m"
|
||||
|
||||
# Expert: If you want finer control over memory options, specify them directly
|
||||
# Comment out SOLR_HEAP if you are using this though, that takes precedence
|
||||
#SOLR_JAVA_MEM="-Xms512m -Xmx512m"
|
||||
|
||||
# Enable verbose GC logging...
|
||||
# * If this is unset, various default options will be selected depending on which JVM version is in use
|
||||
# * For Java 8: if this is set, additional params will be added to specify the log file & rotation
|
||||
# * For Java 9 or higher: each included opt param that starts with '-Xlog:gc', but does not include an
|
||||
# output specifier, will have a 'file' output specifier (as well as formatting & rollover options)
|
||||
# appended, using the effective value of the SOLR_LOGS_DIR.
|
||||
#
|
||||
#GC_LOG_OPTS='-Xlog:gc*' # (Java 9+)
|
||||
#GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails \
|
||||
# -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime"
|
||||
|
||||
# These GC settings have shown to work well for a number of common Solr workloads
|
||||
#GC_TUNE=" \
|
||||
#-XX:+ExplicitGCInvokesConcurrent \
|
||||
#-XX:SurvivorRatio=4 \
|
||||
#-XX:TargetSurvivorRatio=90 \
|
||||
#-XX:MaxTenuringThreshold=8 \
|
||||
#-XX:+UseConcMarkSweepGC \
|
||||
#-XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 \
|
||||
#-XX:+CMSScavengeBeforeRemark \
|
||||
#-XX:PretenureSizeThreshold=64m \
|
||||
#-XX:+UseCMSInitiatingOccupancyOnly \
|
||||
#-XX:CMSInitiatingOccupancyFraction=50 \
|
||||
#-XX:CMSMaxAbortablePrecleanTime=6000 \
|
||||
#-XX:+CMSParallelRemarkEnabled \
|
||||
#-XX:+ParallelRefProcEnabled etc.
|
||||
|
||||
# Set the ZooKeeper connection string if using an external ZooKeeper ensemble
|
||||
# e.g. host1:2181,host2:2181/chroot
|
||||
# Leave empty if not using SolrCloud
|
||||
#ZK_HOST=""
|
||||
|
||||
# Set the ZooKeeper client timeout (for SolrCloud mode)
|
||||
#ZK_CLIENT_TIMEOUT="15000"
|
||||
|
||||
# By default the start script uses "localhost"; override the hostname here
|
||||
# for production SolrCloud environments to control the hostname exposed to cluster state
|
||||
#SOLR_HOST="192.168.1.1"
|
||||
|
||||
# By default Solr will try to connect to Zookeeper with 30 seconds in timeout; override the timeout if needed
|
||||
#SOLR_WAIT_FOR_ZK="30"
|
||||
|
||||
# By default the start script uses UTC; override the timezone if needed
|
||||
#SOLR_TIMEZONE="UTC"
|
||||
|
||||
# Set to true to activate the JMX RMI connector to allow remote JMX client applications
|
||||
# to monitor the JVM hosting Solr; set to "false" to disable that behavior
|
||||
# (false is recommended in production environments)
|
||||
#ENABLE_REMOTE_JMX_OPTS="false"
|
||||
|
||||
# The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
|
||||
# RMI_PORT=18983
|
||||
|
||||
# Anything you add to the SOLR_OPTS variable will be included in the java
|
||||
# start command line as-is, in ADDITION to other options. If you specify the
|
||||
# -a option on start script, those options will be appended as well. Examples:
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoSoftCommit.maxTime=3000"
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoCommit.maxTime=60000"
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.clustering.enabled=true"
|
||||
|
||||
# Location where the bin/solr script will save PID files for running instances
|
||||
# If not set, the script will create PID files in $SOLR_TIP/bin
|
||||
#SOLR_PID_DIR=
|
||||
|
||||
# Path to a directory for Solr to store cores and their data. By default, Solr will use server/solr
|
||||
# If solr.xml is not stored in ZooKeeper, this directory needs to contain solr.xml
|
||||
#SOLR_HOME=
|
||||
|
||||
# Path to a directory that Solr will use as root for data folders for each core.
|
||||
# If not set, defaults to <instance_dir>/data. Overridable per core through 'dataDir' core property
|
||||
#SOLR_DATA_HOME=
|
||||
|
||||
# Solr provides a default Log4J configuration xml file in server/resources
|
||||
# however, you may want to customize the log settings and file appender location
|
||||
# so you can point the script to use a different log4j2.xml file
|
||||
#LOG4J_PROPS=/var/solr/log4j2.xml
|
||||
|
||||
# Changes the logging level. Valid values: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Default is INFO
|
||||
# This is an alternative to changing the rootLogger in log4j2.xml
|
||||
#SOLR_LOG_LEVEL=INFO
|
||||
|
||||
# Location where Solr should write logs to. Absolute or relative to solr start dir
|
||||
#SOLR_LOGS_DIR=logs
|
||||
|
||||
# Enables log rotation before starting Solr. Setting SOLR_LOG_PRESTART_ROTATION=true will let Solr take care of pre
|
||||
# start rotation of logs. This is false by default as log4j2 handles this for us. If you choose to use another log
|
||||
# framework that cannot do startup rotation, you may want to enable this to let Solr rotate logs on startup.
|
||||
#SOLR_LOG_PRESTART_ROTATION=false
|
||||
|
||||
# Enables jetty request log for all requests
|
||||
#SOLR_REQUESTLOG_ENABLED=false
|
||||
|
||||
# Sets the port Solr binds to, default is 8983
|
||||
#SOLR_PORT=8983
|
||||
|
||||
# Restrict access to solr by IP address.
|
||||
# Specify a comma-separated list of addresses or networks, for example:
|
||||
# 127.0.0.1, 192.168.0.0/24, [::1], [2000:123:4:5::]/64
|
||||
#SOLR_IP_WHITELIST=
|
||||
|
||||
# Block access to solr from specific IP addresses.
|
||||
# Specify a comma-separated list of addresses or networks, for example:
|
||||
# 127.0.0.1, 192.168.0.0/24, [::1], [2000:123:4:5::]/64
|
||||
#SOLR_IP_BLACKLIST=
|
||||
|
||||
# Enables HTTPS. It is implictly true if you set SOLR_SSL_KEY_STORE. Use this config
|
||||
# to enable https module with custom jetty configuration.
|
||||
#SOLR_SSL_ENABLED=true
|
||||
# Uncomment to set SSL-related system properties
|
||||
# Be sure to update the paths to the correct keystore for your environment
|
||||
#SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.p12
|
||||
#SOLR_SSL_KEY_STORE_PASSWORD=secret
|
||||
#SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.p12
|
||||
#SOLR_SSL_TRUST_STORE_PASSWORD=secret
|
||||
# Require clients to authenticate
|
||||
#SOLR_SSL_NEED_CLIENT_AUTH=false
|
||||
# Enable clients to authenticate (but not require)
|
||||
#SOLR_SSL_WANT_CLIENT_AUTH=false
|
||||
# Verify client's hostname during SSL handshake
|
||||
#SOLR_SSL_CLIENT_HOSTNAME_VERIFICATION=false
|
||||
# SSL Certificates contain host/ip "peer name" information that is validated by default. Setting
|
||||
# this to false can be useful to disable these checks when re-using a certificate on many hosts
|
||||
#SOLR_SSL_CHECK_PEER_NAME=true
|
||||
# Override Key/Trust Store types if necessary
|
||||
#SOLR_SSL_KEY_STORE_TYPE=PKCS12
|
||||
#SOLR_SSL_TRUST_STORE_TYPE=PKCS12
|
||||
|
||||
# Uncomment if you want to override previously defined SSL values for HTTP client
|
||||
# otherwise keep them commented and the above values will automatically be set for HTTP clients
|
||||
#SOLR_SSL_CLIENT_KEY_STORE=
|
||||
#SOLR_SSL_CLIENT_KEY_STORE_PASSWORD=
|
||||
#SOLR_SSL_CLIENT_TRUST_STORE=
|
||||
#SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD=
|
||||
#SOLR_SSL_CLIENT_KEY_STORE_TYPE=
|
||||
#SOLR_SSL_CLIENT_TRUST_STORE_TYPE=
|
||||
|
||||
# Sets path of Hadoop credential provider (hadoop.security.credential.provider.path property) and
|
||||
# enables usage of credential store.
|
||||
# Credential provider should store the following keys:
|
||||
# * solr.jetty.keystore.password
|
||||
# * solr.jetty.truststore.password
|
||||
# Set the two below if you want to set specific store passwords for HTTP client
|
||||
# * javax.net.ssl.keyStorePassword
|
||||
# * javax.net.ssl.trustStorePassword
|
||||
# More info: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CredentialProviderAPI.html
|
||||
#SOLR_HADOOP_CREDENTIAL_PROVIDER_PATH=localjceks://file/home/solr/hadoop-credential-provider.jceks
|
||||
#SOLR_OPTS=" -Dsolr.ssl.credential.provider.chain=hadoop"
|
||||
|
||||
# Settings for authentication
|
||||
# Please configure only one of SOLR_AUTHENTICATION_CLIENT_BUILDER or SOLR_AUTH_TYPE parameters
|
||||
#SOLR_AUTHENTICATION_CLIENT_BUILDER="org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory"
|
||||
#SOLR_AUTH_TYPE="basic"
|
||||
#SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
|
||||
|
||||
# Settings for ZK ACL
|
||||
#SOLR_ZK_CREDS_AND_ACLS="-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider \
|
||||
# -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider \
|
||||
# -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD \
|
||||
# -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD"
|
||||
#SOLR_OPTS="$SOLR_OPTS $SOLR_ZK_CREDS_AND_ACLS"
|
||||
|
||||
|
||||
# Settings for common system values that may cause operational imparement when system defaults are used.
|
||||
# Solr can use many processes and many file handles. On modern operating systems the savings by leaving
|
||||
# these settings low is minuscule, while the consequence can be Solr instability. To turn these checks off, set
|
||||
# SOLR_ULIMIT_CHECKS=false either here or as part of your profile.
|
||||
|
||||
# Different limits can be set in solr.in.sh or your profile if you prefer as well.
|
||||
#SOLR_RECOMMENDED_OPEN_FILES=
|
||||
#SOLR_RECOMMENDED_MAX_PROCESSES=
|
||||
#SOLR_ULIMIT_CHECKS=
|
||||
|
||||
# When running Solr in non-cloud mode and if planning to do distributed search (using the "shards" parameter), the
|
||||
# list of hosts needs to be whitelisted or Solr will forbid the request. The whitelist can be configured in solr.xml,
|
||||
# or if you are using the OOTB solr.xml, can be specified using the system property "solr.shardsWhitelist". Alternatively
|
||||
# host checking can be disabled by using the system property "solr.disable.shardsWhitelist"
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.shardsWhitelist=http://localhost:8983,http://localhost:8984"
|
||||
|
||||
# For a visual indication in the Admin UI of what type of environment this cluster is, configure
|
||||
# a -Dsolr.environment property below. Valid values are prod, stage, test, dev, with an optional
|
||||
# label or color, e.g. -Dsolr.environment=test,label=Functional+test,color=brown
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.environment=prod"
|
||||
|
||||
# Specifies the path to a common library directory that will be shared across all cores.
|
||||
# Any JAR files in this directory will be added to the search path for Solr plugins.
|
||||
# If the specified path is not absolute, it will be relative to `$SOLR_HOME`.
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.sharedLib=/path/to/lib"
|
||||
|
||||
# Runs solr in java security manager sandbox. This can protect against some attacks.
|
||||
# Runtime properties are passed to the security policy file (server/etc/security.policy)
|
||||
# You can also tweak via standard JDK files such as ~/.java.policy, see https://s.apache.org/java8policy
|
||||
# This is experimental! It may not work at all with Hadoop/HDFS features.
|
||||
#SOLR_SECURITY_MANAGER_ENABLED=false
|
||||
|
||||
# Solr is by default allowed to read and write data from/to SOLR_HOME and a few other well defined locations
|
||||
# Sometimes it may be necessary to place a core or a backup on a different location or a different disk
|
||||
# This parameter lets you specify file system path(s) to explicitly allow. The special value of '*' will allow any path
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.allowPaths=/mnt/bigdisk,/other/path"
|
109
KeywordSearch/solr/server/README.txt
Executable file
109
KeywordSearch/solr/server/README.txt
Executable file
@ -0,0 +1,109 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
Solr server
|
||||
------------
|
||||
|
||||
This directory contains an instance of the Jetty Servlet container setup to
|
||||
run Solr.
|
||||
|
||||
To run Solr:
|
||||
|
||||
cd $SOLR_INSTALL
|
||||
bin/solr start
|
||||
|
||||
where $SOLR_INSTALL is the location where you extracted the Solr installation bundle.
|
||||
|
||||
Server directory layout
|
||||
-----------------------
|
||||
|
||||
server/contexts
|
||||
|
||||
This directory contains the Jetty Web application deployment descriptor for the Solr Web app.
|
||||
|
||||
server/etc
|
||||
|
||||
Jetty configuration and example SSL keystore
|
||||
|
||||
server/lib
|
||||
|
||||
Jetty and other 3rd party libraries
|
||||
|
||||
server/logs
|
||||
|
||||
Solr log files
|
||||
|
||||
server/resources
|
||||
|
||||
Contains configuration files, such as the Log4j configuration (log4j2.xml) for configuring Solr loggers.
|
||||
|
||||
server/scripts/cloud-scripts
|
||||
|
||||
Command-line utility for working with ZooKeeper when running in SolrCloud mode, see zkcli.sh / .cmd for
|
||||
usage information.
|
||||
|
||||
server/solr
|
||||
|
||||
Default solr.solr.home directory where Solr will create core directories; must contain solr.xml
|
||||
|
||||
server/solr/configsets
|
||||
|
||||
Directories containing different configuration options for running Solr.
|
||||
|
||||
_default : Bare minimum configurations with field-guessing and managed schema turned
|
||||
on by default, so as to start indexing data in Solr without having to design
|
||||
a schema upfront. You can use the REST API to manage your schema as you refine your index
|
||||
requirements. You can turn off the field (for a collection, say mycollection) guessing by:
|
||||
curl http://host:8983/solr/mycollection/config -d '{"set-user-property": {"update.autoCreateFields":"false"}}'
|
||||
|
||||
sample_techproducts_configs : Comprehensive example configuration that demonstrates many of the powerful
|
||||
features of Solr, based on the use case of building a search solution for
|
||||
tech products.
|
||||
|
||||
server/solr-webapp
|
||||
|
||||
Contains files used by the Solr server; do not edit files in this directory (Solr is not a Java Web application).
|
||||
|
||||
|
||||
Notes About Solr Examples
|
||||
--------------------------
|
||||
|
||||
* SolrHome *
|
||||
|
||||
By default, start.jar starts Solr in Jetty using the default Solr Home
|
||||
directory of "./solr/" (relative to the working directory of the servlet
|
||||
container).
|
||||
|
||||
* References to Jar Files Outside This Directory *
|
||||
|
||||
Various example SolrHome dirs contained in this directory may use "<lib>"
|
||||
statements in the solrconfig.xml file to reference plugin jars outside of
|
||||
this directory for loading "contrib" plugins via relative paths.
|
||||
|
||||
If you make a copy of this example server and wish to use the
|
||||
ExtractingRequestHandler (SolrCell), DataImportHandler (DIH), the
|
||||
clustering component, or any other modules in "contrib", you will need to
|
||||
copy the required jars or update the paths to those jars in your
|
||||
solrconfig.xml.
|
||||
|
||||
* Logging *
|
||||
|
||||
By default, Jetty & Solr will log to the console and logs/solr.log. This can
|
||||
be convenient when first getting started, but eventually you will want to
|
||||
log just to a file. To configure logging, edit the log4j2.xml file in
|
||||
"resources".
|
||||
|
||||
It is also possible to setup log4j or other popular logging frameworks.
|
||||
|
8
KeywordSearch/solr/server/contexts/solr-jetty-context.xml
Executable file
8
KeywordSearch/solr/server/contexts/solr-jetty-context.xml
Executable file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
|
||||
<Set name="contextPath"><Property name="hostContext" default="/solr"/></Set>
|
||||
<Set name="war"><Property name="jetty.base"/>/solr-webapp/webapp</Set>
|
||||
<Set name="defaultsDescriptor"><Property name="jetty.base"/>/etc/webdefault.xml</Set>
|
||||
<Set name="extractWAR">false</Set>
|
||||
</Configure>
|
50
KeywordSearch/solr/server/etc/jetty-http.xml
Executable file
50
KeywordSearch/solr/server/etc/jetty-http.xml
Executable file
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||
|
||||
<!-- ============================================================= -->
|
||||
<!-- Configure the Jetty Server instance with an ID "Server" -->
|
||||
<!-- by adding a HTTP connector. -->
|
||||
<!-- This configuration must be used in conjunction with jetty.xml -->
|
||||
<!-- ============================================================= -->
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Add a HTTP Connector. -->
|
||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||
<!-- instance defined in jetty.xml -->
|
||||
<!-- -->
|
||||
<!-- Consult the javadoc of o.e.j.server.ServerConnector and -->
|
||||
<!-- o.e.j.server.HttpConnectionFactory for all configuration -->
|
||||
<!-- that may be set here. -->
|
||||
<!-- =========================================================== -->
|
||||
<Call name="addConnector">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.server.ServerConnector">
|
||||
<Arg name="server"><Ref refid="Server" /></Arg>
|
||||
<Arg name="acceptors" type="int"><Property name="solr.jetty.http.acceptors" default="-1"/></Arg>
|
||||
<Arg name="selectors" type="int"><Property name="solr.jetty.http.selectors" default="-1"/></Arg>
|
||||
<Arg name="factories">
|
||||
<Array type="org.eclipse.jetty.server.ConnectionFactory">
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
|
||||
<Arg name="config"><Ref refid="httpConfig" /></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory">
|
||||
<Arg name="config"><Ref refid="httpConfig" /></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
</Array>
|
||||
</Arg>
|
||||
<Set name="host"><Property name="jetty.host" /></Set>
|
||||
<Set name="port"><Property name="jetty.port" default="8983" /></Set>
|
||||
<Set name="idleTimeout"><Property name="solr.jetty.http.idleTimeout" default="120000"/></Set>
|
||||
<Set name="acceptorPriorityDelta"><Property name="solr.jetty.http.acceptorPriorityDelta" default="0"/></Set>
|
||||
<Set name="acceptQueueSize"><Property name="solr.jetty.http.acceptQueueSize" default="0"/></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
</Configure>
|
75
KeywordSearch/solr/server/etc/jetty-https.xml
Executable file
75
KeywordSearch/solr/server/etc/jetty-https.xml
Executable file
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||
|
||||
<!-- ============================================================= -->
|
||||
<!-- Configure a HTTPS connector. -->
|
||||
<!-- This configuration must be used in conjunction with jetty.xml -->
|
||||
<!-- and jetty-ssl.xml. -->
|
||||
<!-- ============================================================= -->
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<Ref refid="sslContextFactory">
|
||||
<Set name="CipherComparator">
|
||||
<Get class="org.eclipse.jetty.http2.HTTP2Cipher" name="COMPARATOR"/>
|
||||
</Set>
|
||||
<Set name="useCipherSuitesOrder">true</Set>
|
||||
</Ref>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Add a HTTPS Connector. -->
|
||||
<!-- Configure an o.e.j.server.ServerConnector with connection -->
|
||||
<!-- factories for TLS (aka SSL) and HTTP to provide HTTPS. -->
|
||||
<!-- All accepted TLS connections are wired to a HTTP connection.-->
|
||||
<!-- -->
|
||||
<!-- Consult the javadoc of o.e.j.server.ServerConnector, -->
|
||||
<!-- o.e.j.server.SslConnectionFactory and -->
|
||||
<!-- o.e.j.server.HttpConnectionFactory for all configuration -->
|
||||
<!-- that may be set here. -->
|
||||
<!-- =========================================================== -->
|
||||
<Call id="httpsConnector" name="addConnector">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.server.ServerConnector">
|
||||
<Arg name="server"><Ref refid="Server" /></Arg>
|
||||
<Arg name="acceptors" type="int"><Property name="solr.jetty.ssl.acceptors" default="-1"/></Arg>
|
||||
<Arg name="selectors" type="int"><Property name="solr.jetty.ssl.selectors" default="-1"/></Arg>
|
||||
<Arg name="factories">
|
||||
<Array type="org.eclipse.jetty.server.ConnectionFactory">
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.SslConnectionFactory">
|
||||
<Arg name="next">alpn</Arg>
|
||||
<Arg name="sslContextFactory"><Ref refid="sslContextFactory"/></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
<Item>
|
||||
<New id="alpn" class="org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory">
|
||||
<Arg name="protocols">
|
||||
<Array type="java.lang.String">
|
||||
<Item>h2</Item>
|
||||
<Item>http/1.1</Item>
|
||||
</Array>
|
||||
</Arg>
|
||||
<Set name="defaultProtocol">http/1.1</Set>
|
||||
</New>
|
||||
</Item>
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory">
|
||||
<Arg name="config"><Ref refid="sslHttpConfig"/></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
|
||||
<Arg name="config"><Ref refid="sslHttpConfig"/></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
</Array>
|
||||
</Arg>
|
||||
<Set name="host"><Property name="solr.jetty.host" /></Set>
|
||||
<Set name="port"><Property name="solr.jetty.https.port" default="8983" /></Set>
|
||||
<Set name="idleTimeout"><Property name="solr.jetty.https.timeout" default="120000"/></Set>
|
||||
<Set name="acceptorPriorityDelta"><Property name="solr.jetty.ssl.acceptorPriorityDelta" default="0"/></Set>
|
||||
<Set name="acceptQueueSize"><Property name="solr.jetty.https.acceptQueueSize" default="0"/></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
</Configure>
|
68
KeywordSearch/solr/server/etc/jetty-https8.xml
Executable file
68
KeywordSearch/solr/server/etc/jetty-https8.xml
Executable file
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You 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.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||
|
||||
<!-- ============================================================= -->
|
||||
<!-- Configure a HTTPS connector. -->
|
||||
<!-- This configuration must be used in conjunction with jetty.xml -->
|
||||
<!-- and jetty-ssl.xml. -->
|
||||
<!-- ============================================================= -->
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Add a HTTPS Connector. -->
|
||||
<!-- Configure an o.e.j.server.ServerConnector with connection -->
|
||||
<!-- factories for TLS (aka SSL) and HTTP to provide HTTPS. -->
|
||||
<!-- All accepted TLS connections are wired to a HTTP connection.-->
|
||||
<!-- -->
|
||||
<!-- Consult the javadoc of o.e.j.server.ServerConnector, -->
|
||||
<!-- o.e.j.server.SslConnectionFactory and -->
|
||||
<!-- o.e.j.server.HttpConnectionFactory for all configuration -->
|
||||
<!-- that may be set here. -->
|
||||
<!-- =========================================================== -->
|
||||
<Call id="httpsConnector" name="addConnector">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.server.ServerConnector">
|
||||
<Arg name="server"><Ref refid="Server" /></Arg>
|
||||
<Arg name="acceptors" type="int"><Property name="solr.jetty.ssl.acceptors" default="-1"/></Arg>
|
||||
<Arg name="selectors" type="int"><Property name="solr.jetty.ssl.selectors" default="-1"/></Arg>
|
||||
<Arg name="factories">
|
||||
<Array type="org.eclipse.jetty.server.ConnectionFactory">
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.SslConnectionFactory">
|
||||
<Arg name="next">http/1.1</Arg>
|
||||
<Arg name="sslContextFactory"><Ref refid="sslContextFactory"/></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
|
||||
<Arg name="config"><Ref refid="sslHttpConfig"/></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
</Array>
|
||||
</Arg>
|
||||
<Set name="host"><Property name="solr.jetty.host" /></Set>
|
||||
<Set name="port"><Property name="solr.jetty.https.port" default="8983" /></Set>
|
||||
<Set name="idleTimeout"><Property name="solr.jetty.https.timeout" default="120000"/></Set>
|
||||
<Set name="acceptorPriorityDelta"><Property name="solr.jetty.ssl.acceptorPriorityDelta" default="0"/></Set>
|
||||
<Set name="acceptQueueSize"><Property name="solr.jetty.https.acceptQueueSize" default="0"/></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
</Configure>
|
43
KeywordSearch/solr/server/etc/jetty-requestlog.xml
Executable file
43
KeywordSearch/solr/server/etc/jetty-requestlog.xml
Executable file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You 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.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Configure Request Log -->
|
||||
<!-- =========================================================== -->
|
||||
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
<Set name="RequestLog">
|
||||
<New id="RequestLog" class="org.eclipse.jetty.server.CustomRequestLog">
|
||||
<!-- Writer -->
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.server.AsyncRequestLogWriter">
|
||||
<Arg><Property name="solr.log.dir" default="logs"/>/yyyy_mm_dd.request.log</Arg>
|
||||
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
|
||||
<Set name="retainDays">90</Set>
|
||||
<Set name="append">true</Set>
|
||||
<Set name="timeZone">UTC</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
|
||||
<!-- Format String -->
|
||||
<Arg><Get class="org.eclipse.jetty.server.CustomRequestLog" name="NCSA_FORMAT"/></Arg>
|
||||
</New>
|
||||
</Set>
|
||||
</Configure>
|
36
KeywordSearch/solr/server/etc/jetty-ssl.xml
Executable file
36
KeywordSearch/solr/server/etc/jetty-ssl.xml
Executable file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||
|
||||
<!-- ============================================================= -->
|
||||
<!-- Configure a TLS (SSL) Context Factory -->
|
||||
<!-- This configuration must be used in conjunction with jetty.xml -->
|
||||
<!-- and either jetty-https.xml or jetty-spdy.xml (but not both) -->
|
||||
<!-- ============================================================= -->
|
||||
<Configure id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory$Server">
|
||||
<Call class="org.apache.solr.util.configuration.SSLConfigurationsFactory" name="current">
|
||||
<Get name="keyStorePassword" id="keyStorePassword"/>
|
||||
<Get name="trustStorePassword" id="trustStorePassword"/>
|
||||
</Call>
|
||||
<Set name="KeyStorePath"><Property name="solr.jetty.keystore" default="./etc/solr-ssl.keystore.jks"/></Set>
|
||||
<Set name="KeyStorePassword"><Ref refid="keyStorePassword"/></Set>
|
||||
<Set name="TrustStorePath"><Property name="solr.jetty.truststore" default="./etc/solr-ssl.keystore.jks"/></Set>
|
||||
<Set name="TrustStorePassword"><Ref refid="trustStorePassword"/></Set>
|
||||
<Set name="NeedClientAuth"><Property name="solr.jetty.ssl.needClientAuth" default="false"/></Set>
|
||||
<Set name="WantClientAuth"><Property name="solr.jetty.ssl.wantClientAuth" default="false"/></Set>
|
||||
<Set name="KeyStoreType"><Property name="solr.jetty.keystore.type" default="PKCS12"/></Set>
|
||||
<Set name="TrustStoreType"><Property name="solr.jetty.truststore.type" default="PKCS12"/></Set>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Create a TLS specific HttpConfiguration based on the -->
|
||||
<!-- common HttpConfiguration defined in jetty.xml -->
|
||||
<!-- Add a SecureRequestCustomizer to extract certificate and -->
|
||||
<!-- session information -->
|
||||
<!-- =========================================================== -->
|
||||
<New id="sslHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
|
||||
<Arg><Ref refid="httpConfig"/></Arg>
|
||||
<Call name="addCustomizer">
|
||||
<Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg>
|
||||
</Call>
|
||||
</New>
|
||||
|
||||
</Configure>
|
248
KeywordSearch/solr/server/etc/jetty.xml
Executable file
248
KeywordSearch/solr/server/etc/jetty.xml
Executable file
@ -0,0 +1,248 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Configure the Jetty Server -->
|
||||
<!-- -->
|
||||
<!-- Documentation of this file format can be found at: -->
|
||||
<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax -->
|
||||
<!-- -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Configure the Server Thread Pool. -->
|
||||
<!-- The server holds a common thread pool which is used by -->
|
||||
<!-- default as the executor used by all connectors and servlet -->
|
||||
<!-- dispatches. -->
|
||||
<!-- -->
|
||||
<!-- Configuring a fixed thread pool is vital to controlling the -->
|
||||
<!-- maximal memory footprint of the server and is a key tuning -->
|
||||
<!-- parameter for tuning. In an application that rarely blocks -->
|
||||
<!-- then maximal threads may be close to the number of 5*CPUs. -->
|
||||
<!-- In an application that frequently blocks, then maximal -->
|
||||
<!-- threads should be set as high as possible given the memory -->
|
||||
<!-- available. -->
|
||||
<!-- -->
|
||||
<!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool -->
|
||||
<!-- for all configuration that may be set here. -->
|
||||
<!-- =========================================================== -->
|
||||
<Arg name="threadpool">
|
||||
<New id="threadpool" class="com.codahale.metrics.jetty9.InstrumentedQueuedThreadPool">
|
||||
<Arg name="registry">
|
||||
<Call id="solrJettyMetricRegistry" name="getOrCreate" class="com.codahale.metrics.SharedMetricRegistries">
|
||||
<Arg>solr.jetty</Arg>
|
||||
</Call>
|
||||
</Arg>
|
||||
</New>
|
||||
</Arg>
|
||||
|
||||
<Get name="ThreadPool">
|
||||
<Set name="minThreads" type="int"><Property name="solr.jetty.threads.min" default="10"/></Set>
|
||||
<Set name="maxThreads" type="int"><Property name="solr.jetty.threads.max" default="10000"/></Set>
|
||||
<Set name="idleTimeout" type="int"><Property name="solr.jetty.threads.idle.timeout" default="120000"/></Set>
|
||||
<Set name="stopTimeout" type="int"><Property name="solr.jetty.threads.stop.timeout" default="60000"/></Set>
|
||||
<Set name="detailedDump">false</Set>
|
||||
</Get>
|
||||
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Http Configuration. -->
|
||||
<!-- This is a common configuration instance used by all -->
|
||||
<!-- connectors that can carry HTTP semantics (HTTP, HTTPS, SPDY)-->
|
||||
<!-- It configures the non wire protocol aspects of the HTTP -->
|
||||
<!-- semantic. -->
|
||||
<!-- -->
|
||||
<!-- This configuration is only defined here and is used by -->
|
||||
<!-- reference from the jetty-http.xml, jetty-https.xml and -->
|
||||
<!-- jetty-spdy.xml configuration files which instantiate the -->
|
||||
<!-- connectors. -->
|
||||
<!-- -->
|
||||
<!-- Consult the javadoc of o.e.j.server.HttpConfiguration -->
|
||||
<!-- for all configuration that may be set here. -->
|
||||
<!-- =========================================================== -->
|
||||
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
|
||||
<Set name="secureScheme">https</Set>
|
||||
<Set name="securePort"><Property name="solr.jetty.secure.port" default="8443" /></Set>
|
||||
<Set name="outputBufferSize"><Property name="solr.jetty.output.buffer.size" default="32768" /></Set>
|
||||
<Set name="outputAggregationSize"><Property name="solr.jetty.output.aggregation.size" default="8192" /></Set>
|
||||
<Set name="requestHeaderSize"><Property name="solr.jetty.request.header.size" default="8192" /></Set>
|
||||
<Set name="responseHeaderSize"><Property name="solr.jetty.response.header.size" default="8192" /></Set>
|
||||
<Set name="sendServerVersion"><Property name="solr.jetty.send.server.version" default="false" /></Set>
|
||||
<Set name="sendDateHeader"><Property name="solr.jetty.send.date.header" default="false" /></Set>
|
||||
<Set name="headerCacheSize"><Property name="solr.jetty.header.cache.size" default="512" /></Set>
|
||||
<Set name="delayDispatchUntilContent"><Property name="solr.jetty.delayDispatchUntilContent" default="false"/></Set>
|
||||
<!-- Uncomment to enable handling of X-Forwarded- style headers
|
||||
<Call name="addCustomizer">
|
||||
<Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
|
||||
</Call>
|
||||
-->
|
||||
</New>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- RewriteHandle to set headers, redirect root to Solr -->
|
||||
<!-- =========================================================== -->
|
||||
<New id="RewriteHandler" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
|
||||
<Set name="rewriteRequestURI">true</Set>
|
||||
<Set name="rewritePathInfo">false</Set>
|
||||
<Set name="originalPathAttribute">requestedPath</Set>
|
||||
|
||||
<!-- security-related headers -->
|
||||
<Call name="addRule">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
|
||||
<Set name="pattern">*</Set>
|
||||
<Set name="name">Content-Security-Policy</Set>
|
||||
<Set name="value">default-src 'none'; base-uri 'none'; connect-src 'self'; form-action 'self'; font-src 'self'; frame-ancestors 'none'; img-src 'self'; media-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; worker-src 'self';</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Call name="addRule">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
|
||||
<Set name="pattern">*</Set>
|
||||
<Set name="name">X-Content-Type-Options</Set>
|
||||
<Set name="value">nosniff</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Call name="addRule">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
|
||||
<Set name="pattern">*</Set>
|
||||
<Set name="name">X-Frame-Options</Set>
|
||||
<Set name="value">SAMEORIGIN</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Call name="addRule">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
|
||||
<Set name="pattern">*</Set>
|
||||
<Set name="name">X-XSS-Protection</Set>
|
||||
<Set name="value">1; mode=block</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
<!-- redirect root to solr -->
|
||||
<Call name="addRule">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule">
|
||||
<Set name="regex">^/$</Set>
|
||||
<Set name="location">/solr/</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Call name="addRule">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
|
||||
<Set name="pattern">/v2/*</Set>
|
||||
<Set name="replacement">/solr/____v2</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Call name="addRule">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
|
||||
<Set name="pattern">/api/*</Set>
|
||||
<Set name="replacement">/solr/____v2</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Set name="handler">
|
||||
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
|
||||
<Set name="handlers">
|
||||
<Array type="org.eclipse.jetty.server.Handler">
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.handler.InetAccessHandler">
|
||||
<Call name="include">
|
||||
<Arg>
|
||||
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
|
||||
<Arg><Property name="solr.jetty.inetaccess.includes" default=""/></Arg>
|
||||
</Call>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Call name="exclude">
|
||||
<Arg>
|
||||
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
|
||||
<Arg><Property name="solr.jetty.inetaccess.excludes" default=""/></Arg>
|
||||
</Call>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Set name="handler">
|
||||
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
|
||||
</Set>
|
||||
</New>
|
||||
</Item>
|
||||
<Item>
|
||||
<New id="InstrumentedHandler" class="com.codahale.metrics.jetty9.InstrumentedHandler">
|
||||
<Arg><Ref refid="solrJettyMetricRegistry"/></Arg>
|
||||
<Set name="handler">
|
||||
<New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
|
||||
</Set>
|
||||
</New>
|
||||
</Item>
|
||||
</Array>
|
||||
</Set>
|
||||
</New>
|
||||
</Set>
|
||||
</New>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Set handler Collection Structure -->
|
||||
<!-- =========================================================== -->
|
||||
<Set name="handler">
|
||||
<Ref id="RewriteHandler"/>
|
||||
</Set>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- extra options -->
|
||||
<!-- =========================================================== -->
|
||||
<Set name="stopAtShutdown">true</Set>
|
||||
<Set name="dumpAfterStart">false</Set>
|
||||
<Set name="dumpBeforeStop">false</Set>
|
||||
|
||||
<Call name="addBean">
|
||||
<Arg>
|
||||
<New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
|
||||
<Set name="contexts">
|
||||
<Ref refid="Contexts" />
|
||||
</Set>
|
||||
<Call name="setContextAttribute">
|
||||
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
|
||||
<Arg>.*/servlet-api-[^/]*\.jar$</Arg>
|
||||
</Call>
|
||||
|
||||
<Call name="addAppProvider">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
|
||||
<Set name="monitoredDirName"><Property name="jetty.base" default="."/>/contexts</Set>
|
||||
<Set name="scanInterval">0</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
<!-- Add a customize step to the deployment lifecycle -->
|
||||
<!-- uncomment and replace DebugBinding with your extended AppLifeCycle.Binding class
|
||||
<Call name="insertLifeCycleNode">
|
||||
<Arg>deployed</Arg>
|
||||
<Arg>starting</Arg>
|
||||
<Arg>customise</Arg>
|
||||
</Call>
|
||||
<Call name="addLifeCycleBinding">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.deploy.bindings.DebugBinding">
|
||||
<Arg>customise</Arg>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
-->
|
||||
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
</Configure>
|
203
KeywordSearch/solr/server/etc/security.policy
Executable file
203
KeywordSearch/solr/server/etc/security.policy
Executable file
@ -0,0 +1,203 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You 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.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Policy file for solr. Please keep minimal and avoid wildcards.
|
||||
|
||||
// permissions needed for tests to pass, based on properties set by the build system
|
||||
// NOTE: if the property is not set, the permission entry is ignored.
|
||||
grant {
|
||||
// contain read access to only what we need:
|
||||
// 3rd party jar resources (where symlinks are not supported), test-files/ resources
|
||||
permission java.io.FilePermission "${common.dir}${/}-", "read";
|
||||
permission java.io.FilePermission "${common.dir}${/}..${/}solr${/}-", "read";
|
||||
// 3rd party jar resources (where symlinks are supported)
|
||||
permission java.io.FilePermission "${user.home}${/}.ivy2${/}cache${/}-", "read";
|
||||
// system jar resources
|
||||
permission java.io.FilePermission "${java.home}${/}-", "read";
|
||||
permission java.io.FilePermission "${junit4.childvm.cwd}", "read";
|
||||
permission java.io.FilePermission "${junit4.childvm.cwd}${/}temp", "read,write,delete";
|
||||
permission java.io.FilePermission "${junit4.childvm.cwd}${/}temp${/}-", "read,write,delete";
|
||||
permission java.io.FilePermission "${junit4.childvm.cwd}${/}jacoco.db", "write";
|
||||
permission java.io.FilePermission "${junit4.tempDir}${/}*", "read,write,delete";
|
||||
permission java.io.FilePermission "${clover.db.dir}${/}-", "read,write,delete";
|
||||
permission java.io.FilePermission "${tests.linedocsfile}", "read";
|
||||
// DirectoryFactoryTest messes with these (wtf?)
|
||||
permission java.io.FilePermission "/tmp/inst1/conf/solrcore.properties", "read";
|
||||
permission java.io.FilePermission "/path/to/myinst/conf/solrcore.properties", "read";
|
||||
// TestConfigSets messes with these (wtf?)
|
||||
permission java.io.FilePermission "/path/to/solr/home/lib", "read";
|
||||
|
||||
permission java.nio.file.LinkPermission "hard";
|
||||
|
||||
// all possibilities of accepting/binding/connections on localhost with ports >=1024:
|
||||
permission java.net.SocketPermission "localhost:1024-", "accept,listen,connect,resolve";
|
||||
permission java.net.SocketPermission "127.0.0.1:1024-", "accept,listen,connect,resolve";
|
||||
permission java.net.SocketPermission "[::1]:1024-", "accept,listen,connect,resolve";
|
||||
// "dead hosts", we try to keep it fast
|
||||
permission java.net.SocketPermission "[::1]:4", "connect,resolve";
|
||||
permission java.net.SocketPermission "[::1]:6", "connect,resolve";
|
||||
permission java.net.SocketPermission "[::1]:8", "connect,resolve";
|
||||
|
||||
// Basic permissions needed for Lucene to work:
|
||||
permission java.util.PropertyPermission "*", "read,write";
|
||||
|
||||
// needed by gson serialization of junit4 runner: TODO clean that up
|
||||
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
|
||||
permission java.lang.RuntimePermission "accessDeclaredMembers";
|
||||
// needed by junit4 runner to capture sysout/syserr:
|
||||
permission java.lang.RuntimePermission "setIO";
|
||||
// needed by randomized runner to catch failures from other threads:
|
||||
permission java.lang.RuntimePermission "setDefaultUncaughtExceptionHandler";
|
||||
// needed by randomized runner getTopThreadGroup:
|
||||
permission java.lang.RuntimePermission "modifyThreadGroup";
|
||||
// needed by tests e.g. shutting down executors:
|
||||
permission java.lang.RuntimePermission "modifyThread";
|
||||
// needed for tons of test hacks etc
|
||||
permission java.lang.RuntimePermission "getStackTrace";
|
||||
// needed for mock filesystems in tests
|
||||
permission java.lang.RuntimePermission "fileSystemProvider";
|
||||
// needed for test of IOUtils.spins (maybe it can be avoided)
|
||||
permission java.lang.RuntimePermission "getFileStoreAttributes";
|
||||
// analyzers/uima: needed by lucene expressions' JavascriptCompiler
|
||||
permission java.lang.RuntimePermission "createClassLoader";
|
||||
// needed to test unmap hack on platforms that support it
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
|
||||
// needed by jacoco to dump coverage
|
||||
permission java.lang.RuntimePermission "shutdownHooks";
|
||||
// needed by org.apache.logging.log4j
|
||||
permission java.lang.RuntimePermission "getenv.*";
|
||||
permission java.lang.RuntimePermission "getClassLoader";
|
||||
permission java.lang.RuntimePermission "setContextClassLoader";
|
||||
permission java.lang.RuntimePermission "getStackWalkerWithClassReference";
|
||||
// needed by bytebuddy
|
||||
permission java.lang.RuntimePermission "defineClass";
|
||||
// needed by mockito
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
|
||||
permission java.lang.RuntimePermission "reflectionFactoryAccess";
|
||||
// needed by SolrResourceLoader
|
||||
permission java.lang.RuntimePermission "closeClassLoader";
|
||||
// needed by HttpSolrClient
|
||||
permission java.lang.RuntimePermission "getFileSystemAttributes";
|
||||
// needed by hadoop auth (TODO: there is a cleaner way to handle this)
|
||||
permission java.lang.RuntimePermission "loadLibrary.jaas";
|
||||
permission java.lang.RuntimePermission "loadLibrary.jaas_unix";
|
||||
permission java.lang.RuntimePermission "loadLibrary.jaas_nt";
|
||||
// needed by hadoop common RawLocalFileSystem for java nio getOwner
|
||||
permission java.lang.RuntimePermission "accessUserInformation";
|
||||
// needed by hadoop hdfs
|
||||
permission java.lang.RuntimePermission "readFileDescriptor";
|
||||
permission java.lang.RuntimePermission "writeFileDescriptor";
|
||||
// needed by hadoop http
|
||||
permission java.lang.RuntimePermission "getProtectionDomain";
|
||||
|
||||
// These two *have* to be spelled out a separate
|
||||
permission java.lang.management.ManagementPermission "control";
|
||||
permission java.lang.management.ManagementPermission "monitor";
|
||||
|
||||
// needed by hadoop htrace
|
||||
permission java.net.NetPermission "getNetworkInformation";
|
||||
|
||||
// needed by DIH
|
||||
permission java.sql.SQLPermission "deregisterDriver";
|
||||
|
||||
permission java.util.logging.LoggingPermission "control";
|
||||
|
||||
// needed by solr mbeans feature/tests
|
||||
// TODO: can we remove wildcard for class names/members?
|
||||
permission javax.management.MBeanPermission "*", "getAttribute";
|
||||
permission javax.management.MBeanPermission "*", "getMBeanInfo";
|
||||
permission javax.management.MBeanPermission "*", "queryMBeans";
|
||||
permission javax.management.MBeanPermission "*", "queryNames";
|
||||
permission javax.management.MBeanPermission "*", "registerMBean";
|
||||
permission javax.management.MBeanPermission "*", "unregisterMBean";
|
||||
permission javax.management.MBeanServerPermission "createMBeanServer";
|
||||
permission javax.management.MBeanServerPermission "findMBeanServer";
|
||||
permission javax.management.MBeanServerPermission "releaseMBeanServer";
|
||||
permission javax.management.MBeanTrustPermission "register";
|
||||
|
||||
// needed by hadoop auth
|
||||
permission javax.security.auth.AuthPermission "getSubject";
|
||||
permission javax.security.auth.AuthPermission "modifyPrincipals";
|
||||
permission javax.security.auth.AuthPermission "doAs";
|
||||
permission javax.security.auth.AuthPermission "getLoginConfiguration";
|
||||
permission javax.security.auth.AuthPermission "setLoginConfiguration";
|
||||
permission javax.security.auth.AuthPermission "modifyPrivateCredentials";
|
||||
permission javax.security.auth.AuthPermission "modifyPublicCredentials";
|
||||
permission javax.security.auth.PrivateCredentialPermission "org.apache.hadoop.security.Credentials * \"*\"", "read";
|
||||
|
||||
// needed by hadoop security
|
||||
permission java.security.SecurityPermission "putProviderProperty.SaslPlainServer";
|
||||
permission java.security.SecurityPermission "insertProvider";
|
||||
|
||||
permission javax.xml.bind.JAXBPermission "setDatatypeConverter";
|
||||
|
||||
// SSL related properties for Solr tests
|
||||
permission javax.net.ssl.SSLPermission "setDefaultSSLContext";
|
||||
|
||||
// SASL/Kerberos related properties for Solr tests
|
||||
permission javax.security.auth.PrivateCredentialPermission "javax.security.auth.kerberos.KerberosTicket * \"*\"", "read";
|
||||
|
||||
// may only be necessary with Java 7?
|
||||
permission javax.security.auth.PrivateCredentialPermission "javax.security.auth.kerberos.KeyTab * \"*\"", "read";
|
||||
permission javax.security.auth.PrivateCredentialPermission "sun.security.jgss.krb5.Krb5Util$KeysFromKeyTab * \"*\"", "read";
|
||||
|
||||
permission javax.security.auth.kerberos.ServicePermission "*", "initiate";
|
||||
permission javax.security.auth.kerberos.ServicePermission "*", "accept";
|
||||
permission javax.security.auth.kerberos.DelegationPermission "\"*\" \"krbtgt/EXAMPLE.COM@EXAMPLE.COM\"";
|
||||
|
||||
// java 8 accessibility requires this perm - should not after 8 I believe (rrd4j is the root reason we hit an accessibility code path)
|
||||
permission java.awt.AWTPermission "*";
|
||||
|
||||
// used by solr to create sandboxes (e.g. script execution)
|
||||
permission java.security.SecurityPermission "createAccessControlContext";
|
||||
};
|
||||
|
||||
// additional permissions based on system properties set by /bin/solr
|
||||
// NOTE: if the property is not set, the permission entry is ignored.
|
||||
grant {
|
||||
permission java.io.FilePermission "${hadoop.security.credential.provider.path}", "read,write,delete,readlink";
|
||||
permission java.io.FilePermission "${hadoop.security.credential.provider.path}${/}-", "read,write,delete,readlink";
|
||||
|
||||
permission java.io.FilePermission "${solr.jetty.keystore}", "read,write,delete,readlink";
|
||||
permission java.io.FilePermission "${solr.jetty.keystore}${/}-", "read,write,delete,readlink";
|
||||
|
||||
permission java.io.FilePermission "${solr.jetty.truststore}", "read,write,delete,readlink";
|
||||
permission java.io.FilePermission "${solr.jetty.truststore}${/}-", "read,write,delete,readlink";
|
||||
|
||||
permission java.io.FilePermission "${solr.install.dir}", "read,write,delete,readlink";
|
||||
permission java.io.FilePermission "${solr.install.dir}${/}-", "read,write,delete,readlink";
|
||||
|
||||
permission java.io.FilePermission "${jetty.home}", "read,write,delete,readlink";
|
||||
permission java.io.FilePermission "${jetty.home}${/}-", "read,write,delete,readlink";
|
||||
|
||||
permission java.io.FilePermission "${solr.solr.home}", "read,write,delete,readlink";
|
||||
permission java.io.FilePermission "${solr.solr.home}${/}-", "read,write,delete,readlink";
|
||||
|
||||
permission java.io.FilePermission "${solr.data.home}", "read,write,delete,readlink";
|
||||
permission java.io.FilePermission "${solr.data.home}${/}-", "read,write,delete,readlink";
|
||||
|
||||
permission java.io.FilePermission "${solr.default.confdir}", "read,write,delete,readlink";
|
||||
permission java.io.FilePermission "${solr.default.confdir}${/}-", "read,write,delete,readlink";
|
||||
|
||||
permission java.io.FilePermission "${solr.log.dir}", "read,write,delete,readlink";
|
||||
permission java.io.FilePermission "${solr.log.dir}${/}-", "read,write,delete,readlink";
|
||||
|
||||
permission java.io.FilePermission "${log4j.configurationFile}", "read,write,delete,readlink";
|
||||
|
||||
// expanded to a wildcard if set, allows all networking everywhere
|
||||
permission java.net.SocketPermission "${solr.internal.network.permission}", "accept,listen,connect,resolve";
|
||||
};
|
24
KeywordSearch/solr/server/etc/security.properties
Executable file
24
KeywordSearch/solr/server/etc/security.properties
Executable file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# command-line security properties file
|
||||
#
|
||||
# By default, when enabling security manager, DNS lookups are cached indefinitely,
|
||||
# as protection against DNS spoofing. We set this back to the default (non-security-manager)
|
||||
# value of 30 seconds, to prevent surprising behavior (e.g. nodes in cloud environments without
|
||||
# static IP addresses). Users concerned about DNS spoofing should instead follow best practices:
|
||||
# populating solr.shardsWhitelist, enabling TLS, etc.
|
||||
networkaddress.cache.ttl=30
|
527
KeywordSearch/solr/server/etc/webdefault.xml
Executable file
527
KeywordSearch/solr/server/etc/webdefault.xml
Executable file
@ -0,0 +1,527 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- This file contains the default descriptor for web applications. -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- The intent of this descriptor is to include jetty specific or common -->
|
||||
<!-- configuration for all webapps. If a context has a webdefault.xml -->
|
||||
<!-- descriptor, it is applied before the contexts own web.xml file -->
|
||||
<!-- -->
|
||||
<!-- A context may be assigned a default descriptor by: -->
|
||||
<!-- + Calling WebApplicationContext.setDefaultsDescriptor -->
|
||||
<!-- + Passed an arg to addWebApplications -->
|
||||
<!-- -->
|
||||
<!-- This file is used both as the resource within the jetty.jar (which is -->
|
||||
<!-- used as the default if no explicit defaults descriptor is set) and it -->
|
||||
<!-- is copied to the etc directory of the Jetty distro and explicitly -->
|
||||
<!-- by the jetty.xml file. -->
|
||||
<!-- -->
|
||||
<!-- ===================================================================== -->
|
||||
<web-app
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
metadata-complete="true"
|
||||
version="2.5"
|
||||
>
|
||||
|
||||
<description>
|
||||
Default web.xml file.
|
||||
This file is applied to a Web application before its own WEB_INF/web.xml file
|
||||
</description>
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- Removes static references to beans from javax.el.BeanELResolver to -->
|
||||
<!-- ensure webapp classloader can be released on undeploy -->
|
||||
<!-- ==================================================================== -->
|
||||
<listener>
|
||||
<listener-class>org.eclipse.jetty.servlet.listener.ELContextCleaner</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- Removes static cache of Methods from java.beans.Introspector to -->
|
||||
<!-- ensure webapp classloader can be released on undeploy -->
|
||||
<!-- ==================================================================== -->
|
||||
<listener>
|
||||
<listener-class>org.eclipse.jetty.servlet.listener.IntrospectorCleaner</listener-class>
|
||||
</listener>
|
||||
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- Context params to control Session Cookies -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!--
|
||||
UNCOMMENT TO ACTIVATE <context-param> <param-name>org.eclipse.jetty.servlet.SessionDomain</param-name> <param-value>127.0.0.1</param-value> </context-param> <context-param>
|
||||
<param-name>org.eclipse.jetty.servlet.SessionPath</param-name> <param-value>/</param-value> </context-param> <context-param> <param-name>org.eclipse.jetty.servlet.MaxAge</param-name>
|
||||
<param-value>-1</param-value> </context-param>
|
||||
-->
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- The default servlet. -->
|
||||
<!-- This servlet, normally mapped to /, provides the handling for static -->
|
||||
<!-- content, OPTIONS and TRACE methods for the context. -->
|
||||
<!-- The following initParameters are supported: -->
|
||||
<!--
|
||||
* acceptRanges If true, range requests and responses are
|
||||
* supported
|
||||
*
|
||||
* dirAllowed If true, directory listings are returned if no
|
||||
* welcome file is found. Else 403 Forbidden.
|
||||
*
|
||||
* welcomeServlets If true, attempt to dispatch to welcome files
|
||||
* that are servlets, but only after no matching static
|
||||
* resources could be found. If false, then a welcome
|
||||
* file must exist on disk. If "exact", then exact
|
||||
* servlet matches are supported without an existing file.
|
||||
* Default is true.
|
||||
*
|
||||
* This must be false if you want directory listings,
|
||||
* but have index.jsp in your welcome file list.
|
||||
*
|
||||
* redirectWelcome If true, welcome files are redirected rather than
|
||||
* forwarded to.
|
||||
*
|
||||
* gzip If set to true, then static content will be served as
|
||||
* gzip content encoded if a matching resource is
|
||||
* found ending with ".gz"
|
||||
*
|
||||
* resourceBase Set to replace the context resource base
|
||||
*
|
||||
* resourceCache If set, this is a context attribute name, which the servlet
|
||||
* will use to look for a shared ResourceCache instance.
|
||||
*
|
||||
* relativeResourceBase
|
||||
* Set with a pathname relative to the base of the
|
||||
* servlet context root. Useful for only serving static content out
|
||||
* of only specific subdirectories.
|
||||
*
|
||||
* aliases If True, aliases of resources are allowed (eg. symbolic
|
||||
* links and caps variations). May bypass security constraints.
|
||||
*
|
||||
* maxCacheSize The maximum total size of the cache or 0 for no cache.
|
||||
* maxCachedFileSize The maximum size of a file to cache
|
||||
* maxCachedFiles The maximum number of files to cache
|
||||
*
|
||||
* useFileMappedBuffer
|
||||
* If set to true, it will use mapped file buffer to serve static content
|
||||
* when using NIO connector. Setting this value to false means that
|
||||
* a direct buffer will be used instead of a mapped file buffer.
|
||||
* By default, this is set to true.
|
||||
*
|
||||
* cacheControl If set, all static content will have this value set as the cache-control
|
||||
* header.
|
||||
-->
|
||||
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<servlet>
|
||||
<servlet-name>default</servlet-name>
|
||||
<servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>aliases</param-name>
|
||||
<param-value>false</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>acceptRanges</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>dirAllowed</param-name>
|
||||
<param-value>false</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>welcomeServlets</param-name>
|
||||
<param-value>false</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>redirectWelcome</param-name>
|
||||
<param-value>false</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>maxCacheSize</param-name>
|
||||
<param-value>256000000</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>maxCachedFileSize</param-name>
|
||||
<param-value>200000000</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>maxCachedFiles</param-name>
|
||||
<param-value>2048</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>gzip</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>useFileMappedBuffer</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
<!--
|
||||
<init-param>
|
||||
<param-name>resourceCache</param-name>
|
||||
<param-value>resourceCache</param-value>
|
||||
</init-param>
|
||||
-->
|
||||
<!--
|
||||
<init-param>
|
||||
<param-name>cacheControl</param-name>
|
||||
<param-value>max-age=3600,public</param-value>
|
||||
</init-param>
|
||||
-->
|
||||
<load-on-startup>0</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>default</servlet-name>
|
||||
<url-pattern>/</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- JSP Servlet -->
|
||||
<!-- This is the jasper JSP servlet from the jakarta project -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- The JSP page compiler and execution servlet, which is the mechanism -->
|
||||
<!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
|
||||
<!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
|
||||
<!-- following initialization parameters (default values are in square -->
|
||||
<!-- brackets): -->
|
||||
<!-- -->
|
||||
<!-- checkInterval If development is false and reloading is true, -->
|
||||
<!-- background compiles are enabled. checkInterval -->
|
||||
<!-- is the time in seconds between checks to see -->
|
||||
<!-- if a JSP page needs to be recompiled. [300] -->
|
||||
<!-- -->
|
||||
<!-- compiler Which compiler Ant should use to compile JSP -->
|
||||
<!-- pages. See the Ant documenation for more -->
|
||||
<!-- information. [javac] -->
|
||||
<!-- -->
|
||||
<!-- classdebuginfo Should the class file be compiled with -->
|
||||
<!-- debugging information? [true] -->
|
||||
<!-- -->
|
||||
<!-- classpath What class path should I use while compiling -->
|
||||
<!-- generated servlets? [Created dynamically -->
|
||||
<!-- based on the current web application] -->
|
||||
<!-- Set to ? to make the container explicitly set -->
|
||||
<!-- this parameter. -->
|
||||
<!-- -->
|
||||
<!-- development Is Jasper used in development mode (will check -->
|
||||
<!-- for JSP modification on every access)? [true] -->
|
||||
<!-- -->
|
||||
<!-- enablePooling Determines whether tag handler pooling is -->
|
||||
<!-- enabled [true] -->
|
||||
<!-- -->
|
||||
<!-- fork Tell Ant to fork compiles of JSP pages so that -->
|
||||
<!-- a separate JVM is used for JSP page compiles -->
|
||||
<!-- from the one Tomcat is running in. [true] -->
|
||||
<!-- -->
|
||||
<!-- ieClassId The class-id value to be sent to Internet -->
|
||||
<!-- Explorer when using <jsp:plugin> tags. -->
|
||||
<!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
|
||||
<!-- -->
|
||||
<!-- javaEncoding Java file encoding to use for generating java -->
|
||||
<!-- source files. [UTF-8] -->
|
||||
<!-- -->
|
||||
<!-- keepgenerated Should we keep the generated Java source code -->
|
||||
<!-- for each page instead of deleting it? [true] -->
|
||||
<!-- -->
|
||||
<!-- logVerbosityLevel The level of detailed messages to be produced -->
|
||||
<!-- by this servlet. Increasing levels cause the -->
|
||||
<!-- generation of more messages. Valid values are -->
|
||||
<!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
|
||||
<!-- [WARNING] -->
|
||||
<!-- -->
|
||||
<!-- mappedfile Should we generate static content with one -->
|
||||
<!-- print statement per input line, to ease -->
|
||||
<!-- debugging? [false] -->
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<!-- reloading Should Jasper check for modified JSPs? [true] -->
|
||||
<!-- -->
|
||||
<!-- suppressSmap Should the generation of SMAP info for JSR45 -->
|
||||
<!-- debugging be suppressed? [false] -->
|
||||
<!-- -->
|
||||
<!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
|
||||
<!-- dumped to a file? [false] -->
|
||||
<!-- False if suppressSmap is true -->
|
||||
<!-- -->
|
||||
<!-- scratchdir What scratch directory should we use when -->
|
||||
<!-- compiling JSP pages? [default work directory -->
|
||||
<!-- for the current web application] -->
|
||||
<!-- -->
|
||||
<!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
|
||||
<!-- -->
|
||||
<!-- xpoweredBy Determines whether X-Powered-By response -->
|
||||
<!-- header is added by generated servlet [false] -->
|
||||
<!-- -->
|
||||
<!-- If you wish to use Jikes to compile JSP pages: -->
|
||||
<!-- Set the init parameter "compiler" to "jikes". Define -->
|
||||
<!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
|
||||
<!-- to cause Jikes to emit error messages in a format compatible with -->
|
||||
<!-- Jasper. -->
|
||||
<!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
|
||||
<!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<servlet
|
||||
id="jsp"
|
||||
>
|
||||
<servlet-name>jsp</servlet-name>
|
||||
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>logVerbosityLevel</param-name>
|
||||
<param-value>DEBUG</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>fork</param-name>
|
||||
<param-value>false</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>xpoweredBy</param-name>
|
||||
<param-value>false</param-value>
|
||||
</init-param>
|
||||
<!--
|
||||
<init-param>
|
||||
<param-name>classpath</param-name>
|
||||
<param-value>?</param-value>
|
||||
</init-param>
|
||||
-->
|
||||
<load-on-startup>0</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>jsp</servlet-name>
|
||||
<url-pattern>*.jsp</url-pattern>
|
||||
<url-pattern>*.jspf</url-pattern>
|
||||
<url-pattern>*.jspx</url-pattern>
|
||||
<url-pattern>*.xsp</url-pattern>
|
||||
<url-pattern>*.JSP</url-pattern>
|
||||
<url-pattern>*.JSPF</url-pattern>
|
||||
<url-pattern>*.JSPX</url-pattern>
|
||||
<url-pattern>*.XSP</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- Dynamic Servlet Invoker. -->
|
||||
<!-- This servlet invokes anonymous servlets that have not been defined -->
|
||||
<!-- in the web.xml or by other means. The first element of the pathInfo -->
|
||||
<!-- of a request passed to the envoker is treated as a servlet name for -->
|
||||
<!-- an existing servlet, or as a class name of a new servlet. -->
|
||||
<!-- This servlet is normally mapped to /servlet/* -->
|
||||
<!-- This servlet support the following initParams: -->
|
||||
<!-- -->
|
||||
<!-- nonContextServlets If false, the invoker can only load -->
|
||||
<!-- servlets from the contexts classloader. -->
|
||||
<!-- This is false by default and setting this -->
|
||||
<!-- to true may have security implications. -->
|
||||
<!-- -->
|
||||
<!-- verbose If true, log dynamic loads -->
|
||||
<!-- -->
|
||||
<!-- * All other parameters are copied to the -->
|
||||
<!-- each dynamic servlet as init parameters -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!--
|
||||
Uncomment for dynamic invocation <servlet> <servlet-name>invoker</servlet-name> <servlet-class>org.eclipse.jetty.servlet.Invoker</servlet-class> <init-param> <param-name>verbose</param-name>
|
||||
<param-value>false</param-value> </init-param> <init-param> <param-name>nonContextServlets</param-name> <param-value>false</param-value> </init-param> <init-param>
|
||||
<param-name>dynamicParam</param-name> <param-value>anyValue</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>invoker</servlet-name>
|
||||
<url-pattern>/servlet/*</url-pattern> </servlet-mapping>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<session-config>
|
||||
<session-timeout>30</session-timeout>
|
||||
</session-config>
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- Default MIME mappings -->
|
||||
<!-- The default MIME mappings are provided by the mime.properties -->
|
||||
<!-- resource in the org.eclipse.jetty.server.jar file. Additional or modified -->
|
||||
<!-- mappings may be specified here -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- UNCOMMENT TO ACTIVATE
|
||||
<mime-mapping>
|
||||
<extension>mysuffix</extension>
|
||||
<mime-type>mymime/type</mime-type>
|
||||
</mime-mapping>
|
||||
-->
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
<welcome-file>index.htm</welcome-file>
|
||||
<welcome-file>index.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<locale-encoding-mapping-list>
|
||||
<locale-encoding-mapping>
|
||||
<locale>ar</locale>
|
||||
<encoding>ISO-8859-6</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>be</locale>
|
||||
<encoding>ISO-8859-5</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>bg</locale>
|
||||
<encoding>ISO-8859-5</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>ca</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>cs</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>da</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>de</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>el</locale>
|
||||
<encoding>ISO-8859-7</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>en</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>es</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>et</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>fi</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>fr</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>hr</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>hu</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>is</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>it</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>iw</locale>
|
||||
<encoding>ISO-8859-8</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>ja</locale>
|
||||
<encoding>Shift_JIS</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>ko</locale>
|
||||
<encoding>EUC-KR</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>lt</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>lv</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>mk</locale>
|
||||
<encoding>ISO-8859-5</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>nl</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>no</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>pl</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>pt</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>ro</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>ru</locale>
|
||||
<encoding>ISO-8859-5</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>sh</locale>
|
||||
<encoding>ISO-8859-5</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>sk</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>sl</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>sq</locale>
|
||||
<encoding>ISO-8859-2</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>sr</locale>
|
||||
<encoding>ISO-8859-5</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>sv</locale>
|
||||
<encoding>ISO-8859-1</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>tr</locale>
|
||||
<encoding>ISO-8859-9</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>uk</locale>
|
||||
<encoding>ISO-8859-5</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>zh</locale>
|
||||
<encoding>GB2312</encoding>
|
||||
</locale-encoding-mapping>
|
||||
<locale-encoding-mapping>
|
||||
<locale>zh_TW</locale>
|
||||
<encoding>Big5</encoding>
|
||||
</locale-encoding-mapping>
|
||||
</locale-encoding-mapping-list>
|
||||
|
||||
<security-constraint>
|
||||
<web-resource-collection>
|
||||
<web-resource-name>Disable TRACE</web-resource-name>
|
||||
<url-pattern>/</url-pattern>
|
||||
<http-method>TRACE</http-method>
|
||||
</web-resource-collection>
|
||||
<auth-constraint/>
|
||||
</security-constraint>
|
||||
|
||||
</web-app>
|
||||
|
BIN
KeywordSearch/solr/server/lib/ext/disruptor-3.4.2.jar
Executable file
BIN
KeywordSearch/solr/server/lib/ext/disruptor-3.4.2.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/ext/jcl-over-slf4j-1.7.24.jar
Executable file
BIN
KeywordSearch/solr/server/lib/ext/jcl-over-slf4j-1.7.24.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/ext/jul-to-slf4j-1.7.24.jar
Executable file
BIN
KeywordSearch/solr/server/lib/ext/jul-to-slf4j-1.7.24.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/ext/log4j-1.2-api-2.13.2.jar
Executable file
BIN
KeywordSearch/solr/server/lib/ext/log4j-1.2-api-2.13.2.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/ext/log4j-api-2.13.2.jar
Executable file
BIN
KeywordSearch/solr/server/lib/ext/log4j-api-2.13.2.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/ext/log4j-core-2.13.2.jar
Executable file
BIN
KeywordSearch/solr/server/lib/ext/log4j-core-2.13.2.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/ext/log4j-slf4j-impl-2.13.2.jar
Executable file
BIN
KeywordSearch/solr/server/lib/ext/log4j-slf4j-impl-2.13.2.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/ext/log4j-web-2.13.2.jar
Executable file
BIN
KeywordSearch/solr/server/lib/ext/log4j-web-2.13.2.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/ext/slf4j-api-1.7.24.jar
Executable file
BIN
KeywordSearch/solr/server/lib/ext/slf4j-api-1.7.24.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/http2-common-9.4.27.v20200227.jar
Executable file
BIN
KeywordSearch/solr/server/lib/http2-common-9.4.27.v20200227.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/http2-hpack-9.4.27.v20200227.jar
Executable file
BIN
KeywordSearch/solr/server/lib/http2-hpack-9.4.27.v20200227.jar
Executable file
Binary file not shown.
BIN
KeywordSearch/solr/server/lib/http2-server-9.4.27.v20200227.jar
Executable file
BIN
KeywordSearch/solr/server/lib/http2-server-9.4.27.v20200227.jar
Executable file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user