mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-10 07:09:32 +00:00
Merge pull request #3992 from rcordovano/restrict-access-rename-AbstractAbstractFileNode-method
Restrict access and rename AbstractAbstractFileNode method
This commit is contained in:
commit
c0c94e15d1
@ -77,7 +77,7 @@ public class FileInstanceNode extends FileNode {
|
|||||||
|
|
||||||
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), NO_DESCR, this.getContent().getName()));
|
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), NO_DESCR, this.getContent().getName()));
|
||||||
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR, this.getContent().getParentPath()));
|
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR, this.getContent().getParentPath()));
|
||||||
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), NO_DESCR, getHashSetHitsForFile(this.getContent())));
|
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), NO_DESCR, getHashSetHitsCsvList(this.getContent())));
|
||||||
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), NO_DESCR, this.getDataSource()));
|
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), NO_DESCR, this.getDataSource()));
|
||||||
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_mimeTypeColLbl(), Bundle.CommonFilesSearchResultsViewerTable_mimeTypeColLbl(), NO_DESCR, StringUtils.defaultString(this.getContent().getMIMEType())));
|
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_mimeTypeColLbl(), Bundle.CommonFilesSearchResultsViewerTable_mimeTypeColLbl(), NO_DESCR, StringUtils.defaultString(this.getContent().getMIMEType())));
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
|
|||||||
map.put(TYPE_DIR.toString(), content.getDirType().getLabel());
|
map.put(TYPE_DIR.toString(), content.getDirType().getLabel());
|
||||||
map.put(TYPE_META.toString(), content.getMetaType().toString());
|
map.put(TYPE_META.toString(), content.getMetaType().toString());
|
||||||
map.put(KNOWN.toString(), content.getKnown().getName());
|
map.put(KNOWN.toString(), content.getKnown().getName());
|
||||||
map.put(HASHSETS.toString(), getHashSetHitsForFile(content));
|
map.put(HASHSETS.toString(), getHashSetHitsCsvList(content));
|
||||||
map.put(MD5HASH.toString(), StringUtils.defaultString(content.getMd5Hash()));
|
map.put(MD5HASH.toString(), StringUtils.defaultString(content.getMd5Hash()));
|
||||||
map.put(ObjectID.toString(), content.getId());
|
map.put(ObjectID.toString(), content.getId());
|
||||||
map.put(MIMETYPE.toString(), StringUtils.defaultString(content.getMIMEType()));
|
map.put(MIMETYPE.toString(), StringUtils.defaultString(content.getMIMEType()));
|
||||||
@ -263,7 +263,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
|
|||||||
* to their sheets.
|
* to their sheets.
|
||||||
*
|
*
|
||||||
* @param sheetSet the modifiable Sheet.Set returned by
|
* @param sheetSet the modifiable Sheet.Set returned by
|
||||||
* Sheet.get(Sheet.PROPERTIES)
|
* Sheet.get(Sheet.PROPERTIES)
|
||||||
*/
|
*/
|
||||||
@NbBundle.Messages("AbstractAbstractFileNode.tagsProperty.displayName=Tags")
|
@NbBundle.Messages("AbstractAbstractFileNode.tagsProperty.displayName=Tags")
|
||||||
protected void addTagProperty(Sheet.Set sheetSet) {
|
protected void addTagProperty(Sheet.Set sheetSet) {
|
||||||
@ -301,7 +301,15 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getHashSetHitsForFile(AbstractFile file) {
|
/**
|
||||||
|
* Gets a comma-separated values list of the names of the hash sets
|
||||||
|
* currently identified as including a given file.
|
||||||
|
*
|
||||||
|
* @param file The file.
|
||||||
|
*
|
||||||
|
* @return The CSV list of hash set names.
|
||||||
|
*/
|
||||||
|
protected static String getHashSetHitsCsvList(AbstractFile file) {
|
||||||
try {
|
try {
|
||||||
return StringUtils.join(file.getHashSetNames(), ", ");
|
return StringUtils.join(file.getHashSetNames(), ", ");
|
||||||
} catch (TskCoreException tskCoreException) {
|
} catch (TskCoreException tskCoreException) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user