Merge branch 'collaborative' of https://github.com/sleuthkit/autopsy into services_monitor

This commit is contained in:
Eugene Livis 2015-07-20 13:42:22 -04:00
commit ad44b4b24c
12 changed files with 1427 additions and 107 deletions

View File

@ -244,3 +244,15 @@ CollaborationMonitor.addingDataSourceStatus.msg={0} adding data source
CollaborationMonitor.analyzingDataSourceStatus.msg={0} analyzing {1}
MissingImageDialog.lbWarning.text=
MissingImageDialog.lbWarning.toolTipText=
CaseConverter.AlreadyMultiUser=Case is already multi-user!
CaseConverter.FinishedConverting=Finished converting
CaseConverter.To= to
CaseConverter.BadCaseSourceFolder=Case source folder does not exist!
CaseConverter.BadImageSourceFolder=Image source folder does not exist!
CaseConverter.BadDatabaseFileName=Database file does not exist!
CaseConverter.NonUniqueOutputFolder=Output folder not unique. Skipping
CaseConverter.NonUniqueDatabaseName=Database name not unique. Skipping.
CaseConverter.PotentiallyNonUniqueDatabaseName=Unclear if database name unique. Moving ahead.
CaseConverter.ConvertedToMultiUser=This case was converted to a Multi-user collaborative case on
CaseConverter.UnableToCopySourceImages=Unable to copy source images
CaseConverter.ConversionSuccessful=. Conversion successful:

View File

@ -460,7 +460,7 @@ public class Case {
*
* @return the sanitized case name to use for Database, Solr, and ActiveMQ
*/
private static String sanitizeCaseName(String caseName) {
public static String sanitizeCaseName(String caseName) {
String result;
@ -1572,11 +1572,8 @@ public class Case {
* Set the host name variable. Sometimes the network can be finicky, so the
* answer returned by getHostName() could throw an exception or be null.
* Have it read the environment variable if getHostName() is unsuccessful.
* Also note that some calls into the Case class are static via Case.*, so
* anywhere we use HOSTNAME prior to a Case class being instantiated, we
* must call getLocalHostName() first.
*/
private static String getLocalHostName() {
public static String getLocalHostName() {
if (HostName == null || HostName.isEmpty()) {
try {
HostName = java.net.InetAddress.getLocalHost().getHostName();

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
package org.sleuthkit.autopsy.casemodule;
public interface ConversionDoneCallback {
void conversionDoneCallback(boolean result);
}

View File

@ -0,0 +1,53 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2015 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.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Class offers utility functions to identify and process time stamped folders.
*/
public final class TimeStampUtils {
// Pattern to identify whether case name contains a time stamp generated by Auto Ingest.
// Sample case name created by auto-ingest: Case 1_2015_02_02_12_10_31 for case "Case 1"
private static final Pattern timeStampPattern = Pattern.compile("\\d{4}_\\d{2}_\\d{2}_\\d{2}_\\d{2}_\\d{2}$");
private static final int LENGTH_OF_DATE_TIME_STAMP = 20; // length of the above time stamp
/**
* Checks whether a string ends with a time stamp defined by pattern.
*
* @param inputString Input string
* @return true if string ends with a time stamp, false otherwise.
*/
public static boolean endsWithTimeStamp(String inputString) {
Matcher m = timeStampPattern.matcher(inputString);
return m.find();
}
/**
* Returns length of time stamp string.
*
* @return length of time stamp string.
*/
public static int getTimeStampLength() {
return LENGTH_OF_DATE_TIME_STAMP;
}
}

View File

@ -45,7 +45,7 @@ import org.xml.sax.SAXException;
*
* @author jantonius
*/
class XMLCaseManagement implements CaseConfigFileInterface {
public class XMLCaseManagement implements CaseConfigFileInterface {
final static String XSDFILE = "CaseSchema.xsd"; //NON-NLS
final static String TOP_ROOT_NAME = "AutopsyCase"; //NON-NLS
@ -98,7 +98,7 @@ import org.xml.sax.SAXException;
/**
* The constructor
*/
XMLCaseManagement() {
public XMLCaseManagement() {
autopsySavedVersion = System.getProperty("netbeans.buildnumber");
}
@ -153,6 +153,22 @@ import org.xml.sax.SAXException;
}
/**
* Sets the created date on the XML configuration file. This method is for
* preserving the created date when converting a case from single-user to
* multi-user.
*
* @param createdDate the date the case was originally created
* @throws org.sleuthkit.autopsy.casemodule.CaseActionException
*/
public void setCreatedDate(String createdDate) throws CaseActionException {
String newDate = dateFormat.format(new Date());
Element rootEl = getRootElement();
rootEl.getElementsByTagName(CREATED_DATE_NAME).item(0).setTextContent(createdDate);
rootEl.getElementsByTagName(MODIFIED_DATE_NAME).item(0).setTextContent(newDate);
writeFile();
}
/**
* Sets the examiner on the XML configuration file
*
@ -369,7 +385,7 @@ import org.xml.sax.SAXException;
*
* @return createdDate the creation date of this case
*/
protected String getCreatedDate() {
public String getCreatedDate() {
if (doc != null) {
Element crDateElement = (Element) getRootElement().getElementsByTagName(CREATED_DATE_NAME).item(0);
return crDateElement.getTextContent();
@ -533,7 +549,7 @@ import org.xml.sax.SAXException;
* a Postgre db name.
* @param textIndexName The name of the index where extracted text is stored.
*/
protected void create(String dirPath, String caseName, String examiner, String caseNumber, CaseType caseType, String dbName, String textIndexName) throws CaseActionException {
public void create(String dirPath, String caseName, String examiner, String caseNumber, CaseType caseType, String dbName, String textIndexName) throws CaseActionException {
clear(); // clear the previous data
// set the case Name and Directory and the parent directory

View File

@ -109,7 +109,7 @@ public final class UserPreferences {
public static CaseDbConnectionInfo getDatabaseConnectionInfo() {
DbType dbType;
try {
dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "UNKOWN"));
dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "SQLITE"));
} catch (Exception ex) {
dbType = DbType.SQLITE;
}

View File

@ -150,7 +150,6 @@ FXVideoPanel.progress.errorWritingVideoToDisk=Error writing video to disk
OptionsCategory_Name_Multi_User_Settings=Multi-user
OptionsCategory_Keywords_Multi_User_Options=Multi-user Options
MultiUserSettingsPanel.lbSolrSettings.text=Solr Settings
MultiUserSettingsPanel.lbOops.text=
MultiUserSettingsPanel.tbPassword.toolTipText=Password
MultiUserSettingsPanel.tbPassword.text=
MultiUserSettingsPanel.tbUsername.toolTipText=User Name
@ -185,3 +184,4 @@ DataContentViewerHex.goToOffsetLabel.text=Jump to Offset
DataContentViewerHex.goToOffsetTextField.text=
DataContentViewerHex.goToOffsetTextField.msgDlg=Invalid Offset: {0}
DataContentViewerHex.setDataView.invalidOffset.negativeOffsetValue=Cannot jump to the resultant offset
MultiUserSettingsPanel.tbOops.text=

View File

@ -65,7 +65,7 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
private DataContent customContentViewer;
private boolean isMain;
private String title;
private final DummyNodeListener dummyNodeListener = new DummyNodeListener();
private final RootNodeListener rootNodeListener = new RootNodeListener();
private static final Logger logger = Logger.getLogger(DataResultPanel.class.getName() );
private boolean listeningToTabbedPane = false;
@ -369,7 +369,7 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
@Override
public void setNode(Node selectedNode) {
if (this.rootNode != null) {
this.rootNode.removeNodeListener(dummyNodeListener);
this.rootNode.removeNodeListener(rootNodeListener);
}
// Deferring becoming a listener to the tabbed pane until this point
// eliminates handling a superfluous stateChanged event during construction.
@ -380,8 +380,8 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
this.rootNode = selectedNode;
if (this.rootNode != null) {
dummyNodeListener.reset();
this.rootNode.addNodeListener(dummyNodeListener);
rootNodeListener.reset();
this.rootNode.addNodeListener(rootNodeListener);
}
resetTabs(selectedNode);
@ -620,28 +620,33 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
}
}
private class DummyNodeListener implements NodeListener {
private class RootNodeListener implements NodeListener {
private volatile boolean waitingForData = true;
private volatile boolean load = true;
public void reset() {
load = true;
waitingForData = true;
}
@Override
public void childrenAdded(final NodeMemberEvent nme) {
Node[] delta = nme.getDelta();
if (load && containsReal(delta)) {
load = false;
updateMatches();
/* There is a known issue in this code whereby we will only
call setupTabs() once even though childrenAdded could be
called multiple times. That means that each panel may not
have access to all of the children when they decide if they
support the content */
if (waitingForData && containsReal(delta)) {
waitingForData = false;
if (SwingUtilities.isEventDispatchThread()) {
setupTabs(nme.getNode());
updateMatches();
} else {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
setupTabs(nme.getNode());
updateMatches();
}
});
}

View File

@ -36,8 +36,8 @@
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="cbEnableMultiUser" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="lbOops" min="-2" pref="314" max="-2" attributes="0"/>
<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"/>
@ -50,18 +50,17 @@
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="cbEnableMultiUser" alignment="3" max="32767" attributes="0"/>
<Component id="lbOops" alignment="3" max="32767" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="tbOops" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="cbEnableMultiUser" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="pnDatabaseSettings" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="pnSolrSettings" min="-2" pref="106" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="pnMessagingSettings" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="35" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -126,9 +125,6 @@
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbHostnameOrIp.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="tbHostnameOrIpActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JTextField" name="tbPortNumber">
<Properties>
@ -242,9 +238,6 @@
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbIndexingServerHost.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="tbIndexingServerHostActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JTextField" name="tbIndexingServerPort">
<Properties>
@ -255,26 +248,9 @@
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbIndexingServerPort.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="tbIndexingServerPortActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="lbOops">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Tahoma" size="12" style="1"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</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.lbOops.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="verticalAlignment" type="int" value="3"/>
</Properties>
</Component>
<Container class="javax.swing.JPanel" name="pnMessagingSettings">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
@ -396,6 +372,26 @@
<EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="cbEnableMultiUserItemStateChanged"/>
</Events>
</Component>
<Component class="javax.swing.JTextField" name="tbOops">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="f0" green="f0" red="f0" type="rgb"/>
</Property>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Tahoma" size="12" style="1"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</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.tbOops.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>

View File

@ -119,7 +119,6 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
lbSolrSettings = new javax.swing.JLabel();
tbIndexingServerHost = new javax.swing.JTextField();
tbIndexingServerPort = new javax.swing.JTextField();
lbOops = new javax.swing.JLabel();
pnMessagingSettings = new javax.swing.JPanel();
lbMessagingSettings = new javax.swing.JLabel();
msgHostTextField = new javax.swing.JTextField();
@ -127,17 +126,13 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
msgPortTextField = new javax.swing.JTextField();
msgPasswordField = new javax.swing.JPasswordField();
cbEnableMultiUser = new javax.swing.JCheckBox();
tbOops = new javax.swing.JTextField();
pnDatabaseSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
tbHostnameOrIp.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
tbHostnameOrIp.setText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbHostnameOrIp.text")); // NOI18N
tbHostnameOrIp.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbHostnameOrIp.toolTipText")); // NOI18N
tbHostnameOrIp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
tbHostnameOrIpActionPerformed(evt);
}
});
tbPortNumber.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
tbPortNumber.setText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbPortNumber.text")); // NOI18N
@ -194,19 +189,9 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
tbIndexingServerHost.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
tbIndexingServerHost.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbIndexingServerHost.toolTipText")); // NOI18N
tbIndexingServerHost.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
tbIndexingServerHostActionPerformed(evt);
}
});
tbIndexingServerPort.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
tbIndexingServerPort.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbIndexingServerPort.toolTipText")); // NOI18N
tbIndexingServerPort.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
tbIndexingServerPortActionPerformed(evt);
}
});
javax.swing.GroupLayout pnSolrSettingsLayout = new javax.swing.GroupLayout(pnSolrSettings);
pnSolrSettings.setLayout(pnSolrSettingsLayout);
@ -234,11 +219,6 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
.addGap(45, 45, 45))
);
lbOops.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
lbOops.setForeground(new java.awt.Color(255, 0, 0));
org.openide.awt.Mnemonics.setLocalizedText(lbOops, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbOops.text")); // NOI18N
lbOops.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
pnMessagingSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
lbMessagingSettings.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
@ -299,6 +279,13 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
}
});
tbOops.setEditable(false);
tbOops.setBackground(new java.awt.Color(240, 240, 240));
tbOops.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
tbOops.setForeground(new java.awt.Color(255, 0, 0));
tbOops.setText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbOops.text")); // NOI18N
tbOops.setBorder(null);
javax.swing.GroupLayout pnOverallPanelLayout = new javax.swing.GroupLayout(pnOverallPanel);
pnOverallPanel.setLayout(pnOverallPanelLayout);
pnOverallPanelLayout.setHorizontalGroup(
@ -308,8 +295,8 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
.addGroup(pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(pnOverallPanelLayout.createSequentialGroup()
.addComponent(cbEnableMultiUser)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(lbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE))
.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))
@ -318,17 +305,16 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
pnOverallPanelLayout.setVerticalGroup(
pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnOverallPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cbEnableMultiUser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(lbOops, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(16, 16, 16)
.addGroup(pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.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, 106, 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)
.addGap(35, 35, 35))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
@ -356,24 +342,12 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
private void cbEnableMultiUserItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbEnableMultiUserItemStateChanged
if (!cbEnableMultiUser.isSelected()) {
lbOops.setText("");
tbOops.setText("");
}
enableMultiUserComponents(textBoxes, cbEnableMultiUser.isSelected());
controller.changed();
}//GEN-LAST:event_cbEnableMultiUserItemStateChanged
private void tbHostnameOrIpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbHostnameOrIpActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_tbHostnameOrIpActionPerformed
private void tbIndexingServerHostActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbIndexingServerHostActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_tbIndexingServerHostActionPerformed
private void tbIndexingServerPortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbIndexingServerPortActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_tbIndexingServerPortActionPerformed
void load() {
CaseDbConnectionInfo dbInfo = UserPreferences.getDatabaseConnectionInfo();
tbHostnameOrIp.setText(dbInfo.getHost().trim());
@ -451,7 +425,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
* @return true if it's okay, false otherwise.
*/
boolean valid() {
lbOops.setText("");
tbOops.setText("");
if (cbEnableMultiUser.isSelected()) {
return settingsAreComplete() && databaseSettingsAreValid() && indexingServerSettingsAreValid() && messageServiceSettingsAreValid();
} else {
@ -473,7 +447,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
|| !messageServiceFieldsArePopulated()) {
// We don't even have everything filled out
result = false;
lbOops.setText(INCOMPLETE_SETTINGS_MSG);
tbOops.setText(INCOMPLETE_SETTINGS_MSG);
}
return result;
}
@ -487,7 +461,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
if (portNumberIsValid(tbPortNumber.getText())) {
return true;
} else {
lbOops.setText(INVALID_DB_PORT_MSG);
tbOops.setText(INVALID_DB_PORT_MSG);
return false;
}
}
@ -499,7 +473,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
*/
boolean messageServiceSettingsAreValid() {
if (!portNumberIsValid(msgPortTextField.getText())) {
lbOops.setText(INVALID_MESSAGE_SERVICE_PORT_MSG);
tbOops.setText(INVALID_MESSAGE_SERVICE_PORT_MSG);
return false;
}
@ -513,7 +487,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
*/
boolean indexingServerSettingsAreValid() {
if (!portNumberIsValid(tbIndexingServerPort.getText())) {
lbOops.setText(INVALID_INDEXING_SERVER_PORT_MSG);
tbOops.setText(INVALID_INDEXING_SERVER_PORT_MSG);
return false;
}
@ -543,7 +517,6 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
private javax.swing.JCheckBox cbEnableMultiUser;
private javax.swing.JLabel lbDatabaseSettings;
private javax.swing.JLabel lbMessagingSettings;
private javax.swing.JLabel lbOops;
private javax.swing.JLabel lbSolrSettings;
private javax.swing.JTextField msgHostTextField;
private javax.swing.JPasswordField msgPasswordField;
@ -556,6 +529,7 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel {
private javax.swing.JTextField tbHostnameOrIp;
private javax.swing.JTextField tbIndexingServerHost;
private javax.swing.JTextField tbIndexingServerPort;
private javax.swing.JTextField tbOops;
private javax.swing.JPasswordField tbPassword;
private javax.swing.JTextField tbPortNumber;
private javax.swing.JTextField tbUsername;

View File

@ -386,9 +386,11 @@ final class DataSourceIngestJob {
// errors are likely redundant.
while (!this.fileIngestPipelinesQueue.isEmpty()) {
pipeline = this.fileIngestPipelinesQueue.poll();
List<IngestModuleError> shutDownErrors = pipeline.shutDown();
if (!shutDownErrors.isEmpty()) {
logIngestModuleErrors(shutDownErrors);
if(pipeline.isRunning()){
List<IngestModuleError> shutDownErrors = pipeline.shutDown();
if (!shutDownErrors.isEmpty()) {
logIngestModuleErrors(shutDownErrors);
}
}
}
break;
@ -565,7 +567,9 @@ final class DataSourceIngestJob {
List<IngestModuleError> errors = new ArrayList<>();
while (!this.fileIngestPipelinesQueue.isEmpty()) {
FileIngestPipeline pipeline = fileIngestPipelinesQueue.poll();
errors.addAll(pipeline.shutDown());
if(pipeline.isRunning()){
errors.addAll(pipeline.shutDown());
}
}
if (!errors.isEmpty()) {
logIngestModuleErrors(errors);