mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Remove scope column and reference set entries from the content viewer
This commit is contained in:
parent
cbf545e578
commit
f44e570d4a
@ -433,36 +433,6 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
|||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the global file instances matching the given eamArtifact and convert
|
|
||||||
* them to central repository artifact instances.
|
|
||||||
*
|
|
||||||
* @param eamArtifact Artifact to use for ArtifactTypeEnum matching
|
|
||||||
*
|
|
||||||
* @return List of central repository artifact instances, empty list if none
|
|
||||||
* found
|
|
||||||
*/
|
|
||||||
public Collection<CorrelationAttributeInstance> getReferenceInstancesAsArtifactInstances(CorrelationAttribute eamArtifact) {
|
|
||||||
Collection<CorrelationAttributeInstance> eamArtifactInstances = new ArrayList<>();
|
|
||||||
// FUTURE: support other reference types
|
|
||||||
if (eamArtifact.getCorrelationType().getId() != CorrelationAttribute.FILES_TYPE_ID) {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
EamDb dbManager = EamDb.getInstance();
|
|
||||||
Collection<EamGlobalFileInstance> eamGlobalFileInstances = dbManager.getReferenceInstancesByTypeValue(eamArtifact.getCorrelationType(), eamArtifact.getCorrelationValue());
|
|
||||||
eamGlobalFileInstances.forEach((eamGlobalFileInstance) -> {
|
|
||||||
eamArtifactInstances.add(new CorrelationAttributeInstance(
|
|
||||||
null, null, "", eamGlobalFileInstance.getComment(), eamGlobalFileInstance.getKnownStatus()
|
|
||||||
));
|
|
||||||
});
|
|
||||||
return eamArtifactInstances;
|
|
||||||
} catch (EamDbException ex) {
|
|
||||||
LOGGER.log(Level.SEVERE, "Error getting reference instances from database.", ex); // NON-NLS
|
|
||||||
}
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported(Node node) {
|
public boolean isSupported(Node node) {
|
||||||
if (!EamDb.isEnabled()) {
|
if (!EamDb.isEnabled()) {
|
||||||
@ -517,7 +487,6 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
|||||||
|
|
||||||
// get correlation and reference set instances from DB
|
// get correlation and reference set instances from DB
|
||||||
corAttrInstances.addAll(getCorrelatedInstances(corAttr, dataSourceName, deviceId));
|
corAttrInstances.addAll(getCorrelatedInstances(corAttr, dataSourceName, deviceId));
|
||||||
corAttrInstances.addAll(getReferenceInstancesAsArtifactInstances(corAttr));
|
|
||||||
|
|
||||||
corAttrInstances.forEach((corAttrInstance) -> {
|
corAttrInstances.forEach((corAttrInstance) -> {
|
||||||
CorrelationAttribute newCeArtifact = new CorrelationAttribute(
|
CorrelationAttribute newCeArtifact = new CorrelationAttribute(
|
||||||
|
@ -36,8 +36,7 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
|||||||
"DataContentViewerOtherCasesTableModel.path=Path",
|
"DataContentViewerOtherCasesTableModel.path=Path",
|
||||||
"DataContentViewerOtherCasesTableModel.type=Correlation Type",
|
"DataContentViewerOtherCasesTableModel.type=Correlation Type",
|
||||||
"DataContentViewerOtherCasesTableModel.value=Correlation Value",
|
"DataContentViewerOtherCasesTableModel.value=Correlation Value",
|
||||||
"DataContentViewerOtherCasesTableModel.scope=Scope",
|
"DataContentViewerOtherCasesTableModel.known=Tagged",
|
||||||
"DataContentViewerOtherCasesTableModel.known=Known",
|
|
||||||
"DataContentViewerOtherCasesTableModel.comment=Comment",
|
"DataContentViewerOtherCasesTableModel.comment=Comment",
|
||||||
"DataContentViewerOtherCasesTableModel.noData=No Data.",})
|
"DataContentViewerOtherCasesTableModel.noData=No Data.",})
|
||||||
enum TableColumns {
|
enum TableColumns {
|
||||||
@ -48,7 +47,6 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
|||||||
TYPE(Bundle.DataContentViewerOtherCasesTableModel_type(), 100),
|
TYPE(Bundle.DataContentViewerOtherCasesTableModel_type(), 100),
|
||||||
VALUE(Bundle.DataContentViewerOtherCasesTableModel_value(), 200),
|
VALUE(Bundle.DataContentViewerOtherCasesTableModel_value(), 200),
|
||||||
KNOWN(Bundle.DataContentViewerOtherCasesTableModel_known(), 50),
|
KNOWN(Bundle.DataContentViewerOtherCasesTableModel_known(), 50),
|
||||||
SCOPE(Bundle.DataContentViewerOtherCasesTableModel_scope(), 50),
|
|
||||||
FILE_PATH(Bundle.DataContentViewerOtherCasesTableModel_path(), 450),
|
FILE_PATH(Bundle.DataContentViewerOtherCasesTableModel_path(), 450),
|
||||||
COMMENT(Bundle.DataContentViewerOtherCasesTableModel_comment(), 200),
|
COMMENT(Bundle.DataContentViewerOtherCasesTableModel_comment(), 200),
|
||||||
DEVICE(Bundle.DataContentViewerOtherCasesTableModel_device(), 250);
|
DEVICE(Bundle.DataContentViewerOtherCasesTableModel_device(), 250);
|
||||||
@ -156,9 +154,6 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
|||||||
case VALUE:
|
case VALUE:
|
||||||
value = eamArtifact.getCorrelationValue();
|
value = eamArtifact.getCorrelationValue();
|
||||||
break;
|
break;
|
||||||
case SCOPE:
|
|
||||||
value = eamArtifactInstance.getGlobalStatus().toString();
|
|
||||||
break;
|
|
||||||
case KNOWN:
|
case KNOWN:
|
||||||
value = eamArtifactInstance.getKnownStatus().getName();
|
value = eamArtifactInstance.getKnownStatus().getName();
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user