4272 first batch of clean up for Case Details dialog on CR panel

This commit is contained in:
William Schaefer 2018-10-12 17:38:47 -04:00
parent ff8c4ff427
commit d05adf1120
7 changed files with 177 additions and 155 deletions

View File

@ -76,20 +76,20 @@ GlobalSettingsPanel.Case\ Details.AccessibleContext.accessibleName=Cases Details
ShowCasesDialog.caseDetailsTable.AccessibleContext.accessibleDescription=Click column name to sort. ShowCasesDialog.caseDetailsTable.AccessibleContext.accessibleDescription=Click column name to sort.
GlobalSettingsPanel.casesTextArea.text=Display table that lists central repository case details. GlobalSettingsPanel.casesTextArea.text=Display table that lists central repository case details.
GlobalSettingsPanel.ingestRunningWarningLabel.text=Cannot make changes to central repository settings when ingest is running! GlobalSettingsPanel.ingestRunningWarningLabel.text=Cannot make changes to central repository settings when ingest is running!
CaseInfoDialog.caseInfoLabel.text=Case Info: CaseDetailsDialog.orgLabel.text=Organization:
CaseInfoDialog.dataSourcesLabel.text=DataSources: CaseDetailsDialog.closeButton.text=Close
CaseInfoDialog.notesLabel.text=Notes: CaseDetailsDialog.notesLabel.text=Notes:
CaseInfoDialog.notesTextArea.text=notes here\nmultiple lines\nscrolls\nwhen necessary CaseDetailsDialog.examinerPhoneValueLabel.text=
CaseInfoDialog.casesTable.columnModel.title1=Date CaseDetailsDialog.dataSourcesLabel.text=DataSources:
CaseInfoDialog.casesTable.columnModel.title0=Case Name CaseDetailsDialog.examinerEmailValueLabel.text=
CaseInfoDialog.orgLabel.text=Organization: CaseDetailsDialog.caseInfoLabel.text=Case Info:
CaseInfoDialog.caseNumberLabel.text=Case Number: CaseDetailsDialog.examinerNameValueLabel.text=
CaseInfoDialog.examinerNameLabel.text=Examiner Name: CaseDetailsDialog.notesTextArea.text=
CaseInfoDialog.examinerEmailLabel.text=Examiner Email: CaseDetailsDialog.caseNumberValueLabel.text=
CaseInfoDialog.examinerPhoneLabel.text=Examiner Phone: CaseDetailsDialog.orgValueLabel.text=
CaseInfoDialog.orgValueLabel.text=a CaseDetailsDialog.examinerPhoneLabel.text=Examiner Phone:
CaseInfoDialog.caseNumberValueLabel.text=b CaseDetailsDialog.examinerNameLabel.text=Examiner Name:
CaseInfoDialog.examinerNameValueLabel.text=c CaseDetailsDialog.casesTable.columnModel.title1=Date
CaseInfoDialog.examinerEmailValueLabel.text=d CaseDetailsDialog.casesTable.columnModel.title0=Case Name
CaseInfoDialog.examinerPhoneValueLabel.text=e CaseDetailsDialog.examinerEmailLabel.text=Examiner Email:
CaseInfoDialog.closeButton.text=Close CaseDetailsDialog.caseNumberLabel.text=Case Number:

View File

@ -0,0 +1,73 @@
/*
* Central Repository
*
* Copyright 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.centralrepository.optionspanel;
import java.util.Collections;
import java.util.List;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamOrganization;
class CaseDataSourcesWrapper {
private final CorrelationCase eamCase;
private final List<CorrelationDataSource> dataSources;
CaseDataSourcesWrapper(CorrelationCase correlationCase, List<CorrelationDataSource> dataSourceList) {
eamCase = correlationCase;
dataSources = dataSourceList;
}
String getDisplayName() {
return eamCase.getDisplayName();
}
List<CorrelationDataSource> getDataSources() {
return Collections.unmodifiableList(dataSources);
}
String getCreationDate() {
return eamCase.getCreationDate();
}
String getOrganizationName() {
EamOrganization org = eamCase.getOrg();
return org == null ? "" : org.getName();
}
String getCaseNumber() {
return eamCase.getCaseNumber();
}
String getExaminerName() {
return eamCase.getExaminerName();
}
String getExaminerEmail() {
return eamCase.getExaminerEmail();
}
String getNotes() {
return eamCase.getNotes();
}
String getExaminerPhone() {
return eamCase.getExaminerPhone();
}
}

View File

@ -204,7 +204,7 @@
<Property name="lineWrap" type="boolean" value="true"/> <Property name="lineWrap" type="boolean" value="true"/>
<Property name="rows" type="int" value="3"/> <Property name="rows" type="int" value="3"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.notesTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.notesTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="wrapStyleWord" type="boolean" value="true"/> <Property name="wrapStyleWord" type="boolean" value="true"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
@ -217,98 +217,98 @@
<Component class="javax.swing.JLabel" name="caseInfoLabel"> <Component class="javax.swing.JLabel" name="caseInfoLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.caseInfoLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.caseInfoLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="dataSourcesLabel"> <Component class="javax.swing.JLabel" name="dataSourcesLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.dataSourcesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.dataSourcesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="notesLabel"> <Component class="javax.swing.JLabel" name="notesLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.notesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.notesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="orgLabel"> <Component class="javax.swing.JLabel" name="orgLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.orgLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.orgLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="caseNumberLabel"> <Component class="javax.swing.JLabel" name="caseNumberLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.caseNumberLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.caseNumberLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="examinerEmailLabel"> <Component class="javax.swing.JLabel" name="examinerEmailLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerEmailLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerEmailLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="examinerNameLabel"> <Component class="javax.swing.JLabel" name="examinerNameLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="examinerPhoneLabel"> <Component class="javax.swing.JLabel" name="examinerPhoneLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerPhoneLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerPhoneLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="orgValueLabel"> <Component class="javax.swing.JLabel" name="orgValueLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.orgValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.orgValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="caseNumberValueLabel"> <Component class="javax.swing.JLabel" name="caseNumberValueLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.caseNumberValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.caseNumberValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="examinerNameValueLabel"> <Component class="javax.swing.JLabel" name="examinerNameValueLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerNameValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerNameValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="examinerEmailValueLabel"> <Component class="javax.swing.JLabel" name="examinerEmailValueLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerEmailValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerEmailValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="examinerPhoneValueLabel"> <Component class="javax.swing.JLabel" name="examinerPhoneValueLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerPhoneValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerPhoneValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JButton" name="closeButton"> <Component class="javax.swing.JButton" name="closeButton">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.closeButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.closeButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[65, 23]"/> <Dimension value="[65, 23]"/>
@ -320,6 +320,9 @@
<Dimension value="[65, 23]"/> <Dimension value="[65, 23]"/>
</Property> </Property>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="closeButtonActionPerformed"/>
</Events>
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
@ -365,14 +368,14 @@
<TableColumnModel selectionModel="0"> <TableColumnModel selectionModel="0">
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
<Title editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Title editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.casesTable.columnModel.title0" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.casesTable.columnModel.title0" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Title> </Title>
<Editor/> <Editor/>
<Renderer/> <Renderer/>
</Column> </Column>
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
<Title editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Title editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.casesTable.columnModel.title1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.casesTable.columnModel.title1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Title> </Title>
<Editor/> <Editor/>
<Renderer/> <Renderer/>

View File

@ -1,7 +1,20 @@
/* /*
* To change this license header, choose License Headers in Project Properties. * Central Repository
* To change this template file, choose Tools | Templates *
* and open the template in the editor. * Copyright 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.centralrepository.optionspanel; package org.sleuthkit.autopsy.centralrepository.optionspanel;
@ -17,26 +30,24 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
import org.sleuthkit.autopsy.centralrepository.optionspanel.ShowCasesTableModel.TableCaseWrapper;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.openide.util.NbBundle.Messages;
/**
* class CaseDetailsDialog extends javax.swing.JDialog {
* @author wschaefer
*/
public class CaseInfoDialog extends javax.swing.JDialog {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final ShowCasesTableModel tableModel; private final CasesTableModel tableModel;
private final static Logger logger = Logger.getLogger(CaseInfoDialog.class.getName()); private final static Logger logger = Logger.getLogger(CaseDetailsDialog.class.getName());
/** /**
* Creates new form CaseInfoDialog * Creates new form CaseInfoDialog
*/ */
private CaseInfoDialog() { @Messages({"CaseDetailsDialog.title.text=Case Details"})
super(WindowManager.getDefault().getMainWindow(), private CaseDetailsDialog() {
super(WindowManager.getDefault().getMainWindow(), Bundle.CaseDetailsDialog_title_text(),
true); true);
tableModel = new ShowCasesTableModel(); tableModel = new CasesTableModel();
initComponents(); initComponents();
try { try {
EamDb dbManager = EamDb.getInstance(); EamDb dbManager = EamDb.getInstance();
@ -64,7 +75,7 @@ public class CaseInfoDialog extends javax.swing.JDialog {
} }
static void displayCaseInfoDialog() { static void displayCaseInfoDialog() {
CaseInfoDialog caseInfoDialog = new CaseInfoDialog(); CaseDetailsDialog caseInfoDialog = new CaseDetailsDialog();
caseInfoDialog.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); caseInfoDialog.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
caseInfoDialog.setVisible(true); caseInfoDialog.setVisible(true);
} }
@ -134,41 +145,46 @@ public class CaseInfoDialog extends javax.swing.JDialog {
notesTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N notesTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
notesTextArea.setLineWrap(true); notesTextArea.setLineWrap(true);
notesTextArea.setRows(3); notesTextArea.setRows(3);
notesTextArea.setText(org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.notesTextArea.text")); // NOI18N notesTextArea.setText(org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.notesTextArea.text")); // NOI18N
notesTextArea.setWrapStyleWord(true); notesTextArea.setWrapStyleWord(true);
notesTextArea.setBorder(null); notesTextArea.setBorder(null);
notesScrollPane.setViewportView(notesTextArea); notesScrollPane.setViewportView(notesTextArea);
org.openide.awt.Mnemonics.setLocalizedText(caseInfoLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.caseInfoLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(caseInfoLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.caseInfoLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(dataSourcesLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.dataSourcesLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(dataSourcesLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.dataSourcesLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(notesLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.notesLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(notesLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.notesLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(orgLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.orgLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(orgLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.orgLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.caseNumberLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.caseNumberLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(examinerEmailLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerEmailLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(examinerEmailLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerEmailLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(examinerNameLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerNameLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(examinerNameLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerNameLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerPhoneLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerPhoneLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(orgValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.orgValueLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(orgValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.orgValueLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(caseNumberValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.caseNumberValueLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(caseNumberValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.caseNumberValueLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(examinerNameValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerNameValueLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(examinerNameValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerNameValueLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(examinerEmailValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerEmailValueLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(examinerEmailValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerEmailValueLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerPhoneValueLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerPhoneValueLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.closeButton.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.closeButton.text")); // NOI18N
closeButton.setMaximumSize(new java.awt.Dimension(65, 23)); closeButton.setMaximumSize(new java.awt.Dimension(65, 23));
closeButton.setMinimumSize(new java.awt.Dimension(65, 23)); closeButton.setMinimumSize(new java.awt.Dimension(65, 23));
closeButton.setPreferredSize(new java.awt.Dimension(65, 23)); closeButton.setPreferredSize(new java.awt.Dimension(65, 23));
closeButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
closeButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout caseInfoPanelLayout = new javax.swing.GroupLayout(caseInfoPanel); javax.swing.GroupLayout caseInfoPanelLayout = new javax.swing.GroupLayout(caseInfoPanel);
caseInfoPanel.setLayout(caseInfoPanelLayout); caseInfoPanel.setLayout(caseInfoPanelLayout);
@ -259,8 +275,8 @@ public class CaseInfoDialog extends javax.swing.JDialog {
casesTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); casesTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
casesScrollPane.setViewportView(casesTable); casesScrollPane.setViewportView(casesTable);
if (casesTable.getColumnModel().getColumnCount() > 0) { if (casesTable.getColumnModel().getColumnCount() > 0) {
casesTable.getColumnModel().getColumn(0).setHeaderValue(org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.casesTable.columnModel.title0")); // NOI18N casesTable.getColumnModel().getColumn(0).setHeaderValue(org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.casesTable.columnModel.title0")); // NOI18N
casesTable.getColumnModel().getColumn(1).setHeaderValue(org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.casesTable.columnModel.title1")); // NOI18N casesTable.getColumnModel().getColumn(1).setHeaderValue(org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.casesTable.columnModel.title1")); // NOI18N
} }
javax.swing.GroupLayout casesPanelLayout = new javax.swing.GroupLayout(casesPanel); javax.swing.GroupLayout casesPanelLayout = new javax.swing.GroupLayout(casesPanel);
@ -294,12 +310,13 @@ public class CaseInfoDialog extends javax.swing.JDialog {
pack(); pack();
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
this.dispose();
}//GEN-LAST:event_closeButtonActionPerformed
private void updateSelection() { private void updateSelection() {
if (casesTable.getSelectedRow() >= 0 && casesTable.getSelectedRow() < casesTable.getRowCount()) { if (casesTable.getSelectedRow() >= 0 && casesTable.getSelectedRow() < casesTable.getRowCount()) {
System.out.println("VALID INDEX"); CaseDataSourcesWrapper caseWrapper = tableModel.getEamCase(casesTable.getSelectedRow());
TableCaseWrapper caseWrapper = tableModel.getEamCase(casesTable.getSelectedRow());
System.out.println("CASE NAME AGAINL " + caseWrapper.getDisplayName());
System.out.println("CASE ORG " + caseWrapper.getOrganizationName());
orgValueLabel.setText(caseWrapper.getOrganizationName()); orgValueLabel.setText(caseWrapper.getOrganizationName());
caseNumberValueLabel.setText(caseWrapper.getCaseNumber()); caseNumberValueLabel.setText(caseWrapper.getCaseNumber());
examinerNameValueLabel.setText(caseWrapper.getExaminerName()); examinerNameValueLabel.setText(caseWrapper.getExaminerName());
@ -310,7 +327,6 @@ public class CaseInfoDialog extends javax.swing.JDialog {
dataSourcesModel.addDataSources(caseWrapper.getDataSources()); dataSourcesModel.addDataSources(caseWrapper.getDataSources());
dataSourcesTable.setModel(dataSourcesModel); dataSourcesTable.setModel(dataSourcesModel);
} else { } else {
System.out.println("INVALID INDEX");
orgValueLabel.setText(""); orgValueLabel.setText("");
caseNumberValueLabel.setText(""); caseNumberValueLabel.setText("");
examinerNameValueLabel.setText(""); examinerNameValueLabel.setText("");

View File

@ -19,27 +19,25 @@
package org.sleuthkit.autopsy.centralrepository.optionspanel; package org.sleuthkit.autopsy.centralrepository.optionspanel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import javax.swing.table.AbstractTableModel; import javax.swing.table.AbstractTableModel;
import org.openide.util.NbBundle.Messages; import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamOrganization;
/** /**
* Model for cells to display correlation case information * Model for cells to display correlation case information
*/ */
class ShowCasesTableModel extends AbstractTableModel { class CasesTableModel extends AbstractTableModel {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* list of Eam Cases from central repository. * list of Eam Cases from central repository.
*/ */
private final List<TableCaseWrapper> eamCases; private final List<CaseDataSourcesWrapper> eamCases;
ShowCasesTableModel() { CasesTableModel() {
eamCases = new ArrayList<>(); eamCases = new ArrayList<>();
} }
@ -93,35 +91,18 @@ class ShowCasesTableModel extends AbstractTableModel {
* *
* @return value in the cell * @return value in the cell
*/ */
@Messages({"CasesTableModel.noData=No Cases"})
private Object mapValueById(int rowIdx, TableColumns colId) { private Object mapValueById(int rowIdx, TableColumns colId) {
TableCaseWrapper eamCase = eamCases.get(rowIdx); CaseDataSourcesWrapper eamCase = eamCases.get(rowIdx);
String value = Bundle.ShowCasesTableModel_noData(); String value = Bundle.ShowCasesTableModel_noData();
switch (colId) { switch (colId) {
case CASE_NAME: case CASE_NAME:
value = eamCase.getDisplayName(); value = eamCase.getDisplayName();
break; break;
// case DATA_SOURCE:
// value = eamCase.getDataSources();
// break;
case CREATION_DATE: case CREATION_DATE:
value = eamCase.getCreationDate(); value = eamCase.getCreationDate();
break; break;
// case CASE_NUMBER:
// value = eamCase.getCaseNumber();
// break;
// case EXAMINER_NAME:
// value = eamCase.getExaminerName();
// break;
// case EXAMINER_EMAIL:
// value = eamCase.getExaminerEmail();
// break;
// case EXAMINER_PHONE:
// value = eamCase.getExaminerPhone();
// break;
// case NOTES:
// value = eamCase.getNotes();
// break;
default: default:
break; break;
} }
@ -139,11 +120,11 @@ class ShowCasesTableModel extends AbstractTableModel {
* @param eamCase central repository case to add to the table * @param eamCase central repository case to add to the table
*/ */
void addEamCase(CorrelationCase eamCase, List<CorrelationDataSource> dataSourceList) { void addEamCase(CorrelationCase eamCase, List<CorrelationDataSource> dataSourceList) {
eamCases.add(new TableCaseWrapper(eamCase, dataSourceList)); eamCases.add(new CaseDataSourcesWrapper(eamCase, dataSourceList));
fireTableDataChanged(); fireTableDataChanged();
} }
TableCaseWrapper getEamCase(int listIndex) { CaseDataSourcesWrapper getEamCase(int listIndex) {
return eamCases.get(listIndex); return eamCases.get(listIndex);
} }
@ -152,17 +133,16 @@ class ShowCasesTableModel extends AbstractTableModel {
fireTableDataChanged(); fireTableDataChanged();
} }
@Messages({"ShowCasesTableModel.case=Case Name",
"ShowCasesTableModel.creationDate=Creation Date",
"ShowCasesTableModel.noData=No Cases"})
/** /**
* Enum which lists columns of interest from CorrelationCase. * Enum which lists columns of interest from CorrelationCase.
*/ */
@Messages({"CasesTableModel.case=Case Name",
"CasesTableModel.creationDate=Creation Date"})
private enum TableColumns { private enum TableColumns {
// Ordering here determines displayed column order in Content Viewer. // Ordering here determines displayed column order in Content Viewer.
// If order is changed, update the CellRenderer to ensure correct row coloring. // If order is changed, update the CellRenderer to ensure correct row coloring.
CASE_NAME(Bundle.ShowCasesTableModel_case(), 120), CASE_NAME(Bundle.CasesTableModel_case(), 120),
CREATION_DATE(Bundle.ShowCasesTableModel_creationDate(), 120); CREATION_DATE(Bundle.CasesTableModel_creationDate(), 120);
private final String columnName; private final String columnName;
private final int columnWidth; private final int columnWidth;
@ -180,53 +160,4 @@ class ShowCasesTableModel extends AbstractTableModel {
return columnWidth; return columnWidth;
} }
} }
class TableCaseWrapper {
private final CorrelationCase eamCase;
private final List<CorrelationDataSource> dataSources;
TableCaseWrapper(CorrelationCase correlationCase, List<CorrelationDataSource> dataSourceList) {
eamCase = correlationCase;
dataSources = dataSourceList;
}
String getDisplayName() {
return eamCase.getDisplayName();
}
List<CorrelationDataSource> getDataSources() {
return Collections.unmodifiableList(dataSources);
}
String getCreationDate() {
return eamCase.getCreationDate();
}
String getOrganizationName() {
EamOrganization org = eamCase.getOrg();
return org == null ? "" : org.getName();
}
String getCaseNumber() {
return eamCase.getCaseNumber();
}
String getExaminerName() {
return eamCase.getExaminerName();
}
String getExaminerEmail() {
return eamCase.getExaminerEmail();
}
String getNotes() {
return eamCase.getNotes();
}
String getExaminerPhone() {
return eamCase.getExaminerPhone();
}
}
} }

View File

@ -22,7 +22,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.swing.table.AbstractTableModel; import javax.swing.table.AbstractTableModel;
import org.openide.util.NbBundle.Messages; import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
/** /**
@ -87,6 +86,7 @@ class DataSourcesTableModel extends AbstractTableModel {
* *
* @return value in the cell * @return value in the cell
*/ */
@Messages({"DataSourcesTableModel.noData=No Cases"})
private Object mapValueById(int rowIdx, TableColumns colId) { private Object mapValueById(int rowIdx, TableColumns colId) {
CorrelationDataSource dataSource = dataSources.get(rowIdx); CorrelationDataSource dataSource = dataSources.get(rowIdx);
String value = Bundle.DataSourcesTableModel_noData(); String value = Bundle.DataSourcesTableModel_noData();
@ -126,8 +126,7 @@ class DataSourcesTableModel extends AbstractTableModel {
} }
@Messages({"DataSourcesTableModel.dataSource=Data Source", @Messages({"DataSourcesTableModel.dataSource=Data Source",
"DataSourcesTableModel.deviceId=Device ID", "DataSourcesTableModel.deviceId=Device ID"})
"DataSourcesTableModel.noData=No Cases"})
/** /**
* Enum which lists columns of interest from CorrelationCase. * Enum which lists columns of interest from CorrelationCase.
*/ */

View File

@ -442,7 +442,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
private void showCasesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showCasesButtonActionPerformed private void showCasesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showCasesButtonActionPerformed
store(); store();
// ShowCasesDialog showCasesDialog = new ShowCasesDialog(); // ShowCasesDialog showCasesDialog = new ShowCasesDialog();
CaseInfoDialog.displayCaseInfoDialog(); CaseDetailsDialog.displayCaseInfoDialog();
}//GEN-LAST:event_showCasesButtonActionPerformed }//GEN-LAST:event_showCasesButtonActionPerformed
@Override @Override