4272 add comments to CaseDataSourcesWrapper remove unused code

This commit is contained in:
William Schaefer 2018-10-15 14:19:21 -04:00
parent 55b972b058
commit 9e44c52f6b
5 changed files with 58 additions and 46 deletions

View File

@ -79,14 +79,8 @@ GlobalSettingsPanel.ingestRunningWarningLabel.text=Cannot make changes to centra
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

View File

@ -24,49 +24,107 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamOrganization;
/**
* An object to contain both a CorrelationCase and the list of
* CorrelationDataSources which are associated with that case.
*/
class CaseDataSourcesWrapper {
private final CorrelationCase eamCase;
private final List<CorrelationDataSource> dataSources;
/**
* Create a new CaseDataSourcesWrapper object.
*
* @param correlationCase - the CorrelationCase which is being represented
* @param dataSourceList - the list of CorrelationDataSource objects which
* are associated with the CorrelationCase
*/
CaseDataSourcesWrapper(CorrelationCase correlationCase, List<CorrelationDataSource> dataSourceList) {
eamCase = correlationCase;
dataSources = dataSourceList;
}
/**
* Get the display name of the CorrelationCase.
*
* @return the display name of the CorrelationCase.
*/
String getDisplayName() {
return eamCase.getDisplayName();
}
/**
* Get the list of CorrelationDataSources associated with the
* CorrelationCase.
*
* @return the list of CorrelationDataSources associated with the
* CorrelationCase.
*/
List<CorrelationDataSource> getDataSources() {
return Collections.unmodifiableList(dataSources);
}
/**
* Get the creation date of the CorrelationCase.
*
* @return the creation date of the CorrelationCase.
*/
String getCreationDate() {
return eamCase.getCreationDate();
}
/**
* Get the organization name of the CorrelationCase.
*
* @return the organization name of the CorrelationCase.
*/
String getOrganizationName() {
EamOrganization org = eamCase.getOrg();
return org == null ? "" : org.getName();
}
/**
* Get the case number of the CorrelationCase.
*
* @return the case number of the CorrelationCase.
*/
String getCaseNumber() {
return eamCase.getCaseNumber();
}
/**
* Get the examiner name of the CorrelationCase.
*
* @return the examiner name of the CorrelationCase.
*/
String getExaminerName() {
return eamCase.getExaminerName();
}
/**
* Get the examiner email of the CorrelationCase.
*
* @return the examiner email of the CorrelationCase.
*/
String getExaminerEmail() {
return eamCase.getExaminerEmail();
}
/**
* Get the notes of the CorrelationCase.
*
* @return the notes of the CorrelationCase.
*/
String getNotes() {
return eamCase.getNotes();
}
/**
* Get the examiner phone number of the CorrelationCase.
*
* @return the examiner phone number of the CorrelationCase.
*/
String getExaminerPhone() {
return eamCase.getExaminerPhone();
}

View File

@ -203,9 +203,6 @@
</Property>
<Property name="lineWrap" type="boolean" value="true"/>
<Property name="rows" type="int" value="3"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<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 name="wrapStyleWord" type="boolean" value="true"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
@ -271,39 +268,14 @@
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="orgValueLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<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>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="caseNumberValueLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<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>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="examinerNameValueLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<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>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="examinerEmailValueLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<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>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="examinerPhoneValueLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<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>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="closeButton">
<Properties>

View File

@ -145,7 +145,6 @@ class CaseDetailsDialog 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(CaseDetailsDialog.class, "CaseDetailsDialog.notesTextArea.text")); // NOI18N
notesTextArea.setWrapStyleWord(true);
notesTextArea.setBorder(null);
notesScrollPane.setViewportView(notesTextArea);
@ -166,16 +165,6 @@ class CaseDetailsDialog extends javax.swing.JDialog {
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(CaseDetailsDialog.class, "CaseDetailsDialog.orgValueLabel.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(CaseDetailsDialog.class, "CaseDetailsDialog.examinerNameValueLabel.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(CaseDetailsDialog.class, "CaseDetailsDialog.examinerPhoneValueLabel.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));

View File

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