From 9a153d5beb87a5d755570993e867bd43a981ed0c Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Fri, 8 Oct 2021 15:35:37 -0400 Subject: [PATCH] fix for file node sheet and TODO --- .../FileTypeExtensionsSearchParam.java | 1 + .../mainui/datamodel/ThreePanelViewsDAO.java | 32 +++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/mainui/datamodel/FileTypeExtensionsSearchParam.java b/Core/src/org/sleuthkit/autopsy/mainui/datamodel/FileTypeExtensionsSearchParam.java index b3d43ba8fb..54822962f2 100644 --- a/Core/src/org/sleuthkit/autopsy/mainui/datamodel/FileTypeExtensionsSearchParam.java +++ b/Core/src/org/sleuthkit/autopsy/mainui/datamodel/FileTypeExtensionsSearchParam.java @@ -29,6 +29,7 @@ public class FileTypeExtensionsSearchParam { private final Long dataSourceId; private final boolean knownShown; + // TODO: This should ideally take in some kind of ENUM once we redo the tree. // this assumes that filters implicitly or explicitly implement hashCode and equals to work public FileTypeExtensionsSearchParam(FileExtSearchFilter filter, Long dataSourceId, boolean showKnown) { this.filter = filter; diff --git a/Core/src/org/sleuthkit/autopsy/mainui/datamodel/ThreePanelViewsDAO.java b/Core/src/org/sleuthkit/autopsy/mainui/datamodel/ThreePanelViewsDAO.java index 69e0037170..ed764dc027 100644 --- a/Core/src/org/sleuthkit/autopsy/mainui/datamodel/ThreePanelViewsDAO.java +++ b/Core/src/org/sleuthkit/autopsy/mainui/datamodel/ThreePanelViewsDAO.java @@ -89,20 +89,21 @@ public class ThreePanelViewsDAO { getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_sizeColLbl()), getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_flagsDirColLbl()), getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_flagsMetaColLbl()), - getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_modeColLbl()), - getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_useridColLbl()), - getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_groupidColLbl()), - getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_metaAddrColLbl()), - getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_attrAddrColLbl()), - getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_typeDirColLbl()), - getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_typeMetaColLbl()), +// getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_modeColLbl()), +// getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_useridColLbl()), +// getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_groupidColLbl()), +// getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_metaAddrColLbl()), +// getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_attrAddrColLbl()), +// getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_typeDirColLbl()), +// getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_typeMetaColLbl()), getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_knownColLbl()), getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_md5HashColLbl()), getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_sha256HashColLbl()), - getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_objectId()), +// getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_objectId()), getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_mimeType()), getFileColumnKey(Bundle.ThreePanelViewsDAO_fileColumns_extensionColLbl())); + private static ThreePanelViewsDAO instance = null; synchronized static ThreePanelViewsDAO getInstance() { @@ -215,10 +216,12 @@ public class ThreePanelViewsDAO { List cellValues = Arrays.asList( file.getName(), // GVDTODO handle . and .. from getContentDisplayName() // GVDTODO translation column + null, //GVDTDO replace nulls with SCO null, null, null, + file.getUniquePath(), TimeZoneUtils.getFormattedTime(file.getMtime()), TimeZoneUtils.getFormattedTime(file.getCtime()), TimeZoneUtils.getFormattedTime(file.getAtime()), @@ -226,10 +229,21 @@ public class ThreePanelViewsDAO { file.getSize(), file.getDirFlagAsString(), file.getMetaFlagsAsString(), + +// mode, +// userid, +// groupid, +// metaAddr, +// attrAddr, +// typeDir, +// typeMeta, + file.getKnown().getName(), - file.getUniquePath(), StringUtils.defaultString(file.getMd5Hash()), StringUtils.defaultString(file.getSha256Hash()), + +// objectId, + StringUtils.defaultString(file.getMIMEType()), file.getNameExtension() );