diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties index 400e8d7ceb..a338ad9449 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties @@ -76,20 +76,20 @@ GlobalSettingsPanel.Case\ Details.AccessibleContext.accessibleName=Cases Details ShowCasesDialog.caseDetailsTable.AccessibleContext.accessibleDescription=Click column name to sort. 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! -CaseInfoDialog.caseInfoLabel.text=Case Info: -CaseInfoDialog.dataSourcesLabel.text=DataSources: -CaseInfoDialog.notesLabel.text=Notes: -CaseInfoDialog.notesTextArea.text=notes here\nmultiple lines\nscrolls\nwhen necessary -CaseInfoDialog.casesTable.columnModel.title1=Date -CaseInfoDialog.casesTable.columnModel.title0=Case Name -CaseInfoDialog.orgLabel.text=Organization: -CaseInfoDialog.caseNumberLabel.text=Case Number: -CaseInfoDialog.examinerNameLabel.text=Examiner Name: -CaseInfoDialog.examinerEmailLabel.text=Examiner Email: -CaseInfoDialog.examinerPhoneLabel.text=Examiner Phone: -CaseInfoDialog.orgValueLabel.text=a -CaseInfoDialog.caseNumberValueLabel.text=b -CaseInfoDialog.examinerNameValueLabel.text=c -CaseInfoDialog.examinerEmailValueLabel.text=d -CaseInfoDialog.examinerPhoneValueLabel.text=e -CaseInfoDialog.closeButton.text=Close +CaseDetailsDialog.orgLabel.text=Organization: +CaseDetailsDialog.closeButton.text=Close +CaseDetailsDialog.notesLabel.text=Notes: +CaseDetailsDialog.examinerPhoneValueLabel.text= +CaseDetailsDialog.dataSourcesLabel.text=DataSources: +CaseDetailsDialog.examinerEmailValueLabel.text= +CaseDetailsDialog.caseInfoLabel.text=Case Info: +CaseDetailsDialog.examinerNameValueLabel.text= +CaseDetailsDialog.notesTextArea.text= +CaseDetailsDialog.caseNumberValueLabel.text= +CaseDetailsDialog.orgValueLabel.text= +CaseDetailsDialog.examinerPhoneLabel.text=Examiner Phone: +CaseDetailsDialog.examinerNameLabel.text=Examiner Name: +CaseDetailsDialog.casesTable.columnModel.title1=Date +CaseDetailsDialog.casesTable.columnModel.title0=Case Name +CaseDetailsDialog.examinerEmailLabel.text=Examiner Email: +CaseDetailsDialog.caseNumberLabel.text=Case Number: diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseDataSourcesWrapper.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseDataSourcesWrapper.java new file mode 100644 index 0000000000..bad360b900 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseDataSourcesWrapper.java @@ -0,0 +1,73 @@ +/* + * Central Repository + * + * Copyright 2018 Basis Technology Corp. + * Contact: carrier sleuthkit 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 dataSources; + + CaseDataSourcesWrapper(CorrelationCase correlationCase, List dataSourceList) { + eamCase = correlationCase; + dataSources = dataSourceList; + } + + String getDisplayName() { + return eamCase.getDisplayName(); + } + + List 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(); + } +} diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseInfoDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseDetailsDialog.form similarity index 88% rename from Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseInfoDialog.form rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseDetailsDialog.form index 6047fb22de..25ba17eaed 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseInfoDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseDetailsDialog.form @@ -204,7 +204,7 @@ - + @@ -217,98 +217,98 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -320,6 +320,9 @@ + + + @@ -365,14 +368,14 @@ - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.casesTable.columnModel.title0" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.casesTable.columnModel.title0" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.casesTable.columnModel.title1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.casesTable.columnModel.title1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseInfoDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseDetailsDialog.java similarity index 83% rename from Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseInfoDialog.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseDetailsDialog.java index 2ab26d934d..262062021d 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseInfoDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CaseDetailsDialog.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Central Repository + * + * Copyright 2018 Basis Technology Corp. + * Contact: carrier sleuthkit 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; @@ -17,26 +30,24 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; -import org.sleuthkit.autopsy.centralrepository.optionspanel.ShowCasesTableModel.TableCaseWrapper; import org.sleuthkit.autopsy.coreutils.Logger; +import org.openide.util.NbBundle.Messages; -/** - * - * @author wschaefer - */ -public class CaseInfoDialog extends javax.swing.JDialog { + +class CaseDetailsDialog extends javax.swing.JDialog { private static final long serialVersionUID = 1L; - private final ShowCasesTableModel tableModel; - private final static Logger logger = Logger.getLogger(CaseInfoDialog.class.getName()); + private final CasesTableModel tableModel; + private final static Logger logger = Logger.getLogger(CaseDetailsDialog.class.getName()); /** * Creates new form CaseInfoDialog */ - private CaseInfoDialog() { - super(WindowManager.getDefault().getMainWindow(), + @Messages({"CaseDetailsDialog.title.text=Case Details"}) + private CaseDetailsDialog() { + super(WindowManager.getDefault().getMainWindow(), Bundle.CaseDetailsDialog_title_text(), true); - tableModel = new ShowCasesTableModel(); + tableModel = new CasesTableModel(); initComponents(); try { EamDb dbManager = EamDb.getInstance(); @@ -64,7 +75,7 @@ public class CaseInfoDialog extends javax.swing.JDialog { } static void displayCaseInfoDialog() { - CaseInfoDialog caseInfoDialog = new CaseInfoDialog(); + CaseDetailsDialog caseInfoDialog = new CaseDetailsDialog(); caseInfoDialog.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); 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.setLineWrap(true); 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.setBorder(null); 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.setMinimumSize(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); caseInfoPanel.setLayout(caseInfoPanelLayout); @@ -259,8 +275,8 @@ public class CaseInfoDialog extends javax.swing.JDialog { casesTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); casesScrollPane.setViewportView(casesTable); 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(1).setHeaderValue(org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.casesTable.columnModel.title1")); // 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(CaseDetailsDialog.class, "CaseDetailsDialog.casesTable.columnModel.title1")); // NOI18N } javax.swing.GroupLayout casesPanelLayout = new javax.swing.GroupLayout(casesPanel); @@ -294,12 +310,13 @@ public class CaseInfoDialog extends javax.swing.JDialog { pack(); }// //GEN-END:initComponents + private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed + this.dispose(); + }//GEN-LAST:event_closeButtonActionPerformed + private void updateSelection() { if (casesTable.getSelectedRow() >= 0 && casesTable.getSelectedRow() < casesTable.getRowCount()) { - System.out.println("VALID INDEX"); - TableCaseWrapper caseWrapper = tableModel.getEamCase(casesTable.getSelectedRow()); - System.out.println("CASE NAME AGAINL " + caseWrapper.getDisplayName()); - System.out.println("CASE ORG " + caseWrapper.getOrganizationName()); + CaseDataSourcesWrapper caseWrapper = tableModel.getEamCase(casesTable.getSelectedRow()); orgValueLabel.setText(caseWrapper.getOrganizationName()); caseNumberValueLabel.setText(caseWrapper.getCaseNumber()); examinerNameValueLabel.setText(caseWrapper.getExaminerName()); @@ -310,7 +327,6 @@ public class CaseInfoDialog extends javax.swing.JDialog { dataSourcesModel.addDataSources(caseWrapper.getDataSources()); dataSourcesTable.setModel(dataSourcesModel); } else { - System.out.println("INVALID INDEX"); orgValueLabel.setText(""); caseNumberValueLabel.setText(""); examinerNameValueLabel.setText(""); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ShowCasesTableModel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CasesTableModel.java similarity index 61% rename from Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ShowCasesTableModel.java rename to Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CasesTableModel.java index 5dd7d2fa65..b797701a8c 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ShowCasesTableModel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/CasesTableModel.java @@ -19,27 +19,25 @@ package org.sleuthkit.autopsy.centralrepository.optionspanel; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import javax.swing.table.AbstractTableModel; 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.EamOrganization; /** * Model for cells to display correlation case information */ -class ShowCasesTableModel extends AbstractTableModel { +class CasesTableModel extends AbstractTableModel { private static final long serialVersionUID = 1L; /** * list of Eam Cases from central repository. */ - private final List eamCases; + private final List eamCases; - ShowCasesTableModel() { + CasesTableModel() { eamCases = new ArrayList<>(); } @@ -93,35 +91,18 @@ class ShowCasesTableModel extends AbstractTableModel { * * @return value in the cell */ + @Messages({"CasesTableModel.noData=No Cases"}) private Object mapValueById(int rowIdx, TableColumns colId) { - TableCaseWrapper eamCase = eamCases.get(rowIdx); + CaseDataSourcesWrapper eamCase = eamCases.get(rowIdx); String value = Bundle.ShowCasesTableModel_noData(); switch (colId) { case CASE_NAME: value = eamCase.getDisplayName(); break; -// case DATA_SOURCE: -// value = eamCase.getDataSources(); -// break; case CREATION_DATE: value = eamCase.getCreationDate(); 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: break; } @@ -139,11 +120,11 @@ class ShowCasesTableModel extends AbstractTableModel { * @param eamCase central repository case to add to the table */ void addEamCase(CorrelationCase eamCase, List dataSourceList) { - eamCases.add(new TableCaseWrapper(eamCase, dataSourceList)); + eamCases.add(new CaseDataSourcesWrapper(eamCase, dataSourceList)); fireTableDataChanged(); } - TableCaseWrapper getEamCase(int listIndex) { + CaseDataSourcesWrapper getEamCase(int listIndex) { return eamCases.get(listIndex); } @@ -152,17 +133,16 @@ class ShowCasesTableModel extends AbstractTableModel { fireTableDataChanged(); } - @Messages({"ShowCasesTableModel.case=Case Name", - "ShowCasesTableModel.creationDate=Creation Date", - "ShowCasesTableModel.noData=No Cases"}) /** * Enum which lists columns of interest from CorrelationCase. */ + @Messages({"CasesTableModel.case=Case Name", + "CasesTableModel.creationDate=Creation Date"}) private enum TableColumns { // Ordering here determines displayed column order in Content Viewer. // If order is changed, update the CellRenderer to ensure correct row coloring. - CASE_NAME(Bundle.ShowCasesTableModel_case(), 120), - CREATION_DATE(Bundle.ShowCasesTableModel_creationDate(), 120); + CASE_NAME(Bundle.CasesTableModel_case(), 120), + CREATION_DATE(Bundle.CasesTableModel_creationDate(), 120); private final String columnName; private final int columnWidth; @@ -180,53 +160,4 @@ class ShowCasesTableModel extends AbstractTableModel { return columnWidth; } } - - class TableCaseWrapper { - - private final CorrelationCase eamCase; - private final List dataSources; - - TableCaseWrapper(CorrelationCase correlationCase, List dataSourceList) { - eamCase = correlationCase; - dataSources = dataSourceList; - } - - String getDisplayName() { - return eamCase.getDisplayName(); - } - - List 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(); - } - } - } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/DataSourcesTableModel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/DataSourcesTableModel.java index 053b731e1e..8a70331ed1 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/DataSourcesTableModel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/DataSourcesTableModel.java @@ -22,7 +22,6 @@ import java.util.ArrayList; import java.util.List; import javax.swing.table.AbstractTableModel; import org.openide.util.NbBundle.Messages; -import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource; /** @@ -87,6 +86,7 @@ class DataSourcesTableModel extends AbstractTableModel { * * @return value in the cell */ + @Messages({"DataSourcesTableModel.noData=No Cases"}) private Object mapValueById(int rowIdx, TableColumns colId) { CorrelationDataSource dataSource = dataSources.get(rowIdx); String value = Bundle.DataSourcesTableModel_noData(); @@ -126,8 +126,7 @@ class DataSourcesTableModel extends AbstractTableModel { } @Messages({"DataSourcesTableModel.dataSource=Data Source", - "DataSourcesTableModel.deviceId=Device ID", - "DataSourcesTableModel.noData=No Cases"}) + "DataSourcesTableModel.deviceId=Device ID"}) /** * Enum which lists columns of interest from CorrelationCase. */ diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 897bddaaab..5bce48934d 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -442,7 +442,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private void showCasesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showCasesButtonActionPerformed store(); // ShowCasesDialog showCasesDialog = new ShowCasesDialog(); - CaseInfoDialog.displayCaseInfoDialog(); + CaseDetailsDialog.displayCaseInfoDialog(); }//GEN-LAST:event_showCasesButtonActionPerformed @Override