Skip to content
Snippets Groups Projects
Unverified Commit d2ab2c01 authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge pull request #2445 from kellykelly3/7646-LocalFileDataSourceNode

7646 - Added support for LocalFilesDataSource in SleuthkitItemVisitor
parents a429252c 8f8741da
No related branches found
No related tags found
No related merge requests found
/*
* Sleuth Kit Data Model
*
* Copyright 2011-2017 Basis Technology Corp.
* Copyright 2011-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -314,6 +314,34 @@ private static void closeStatement(Statement statement) {
}
}
/**
* Accepts a content visitor (Visitor design pattern).
*
* @param <T> The type returned by the visitor.
* @param visitor A ContentVisitor supplying an algorithm to run using this
* virtual directory as input.
*
* @return The output of the algorithm.
*/
@Override
public <T> T accept(ContentVisitor<T> visitor) {
return visitor.visit(this);
}
/**
* Accepts a Sleuthkit item visitor (Visitor design pattern).
*
* @param <T> The type returned by the visitor.
* @param visitor A SleuthkitItemVisitor supplying an algorithm to run using
* this virtual directory as input.
*
* @return The output of the algorithm.
*/
@Override
public <T> T accept(SleuthkitItemVisitor<T> visitor) {
return visitor.visit(this);
}
/**
* Constructs a local/logical files and/or directories data source.
*
......
/*
* Sleuth Kit Data Model
*
* Copyright 2011-2018 Basis Technology Corp.
* Copyright 2011-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -195,6 +195,15 @@ public interface SleuthkitItemVisitor<T> {
* @return result of the visit
*/
T visit(UnsupportedContent unsupportedContent);
/**
* Act on (visit) a LocalFilesDataSource content object
*
* @param localFilesDataSource report to visit / act on
*
* @return result of the visit
*/
T visit(LocalFilesDataSource localFilesDataSource);
/**
* The default visitor - quickest method for implementing a custom visitor.
......@@ -298,5 +307,10 @@ public T visit(OsAccount account) {
public T visit(UnsupportedContent unsupportedContent) {
return defaultVisit(unsupportedContent);
}
@Override
public T visit(LocalFilesDataSource localFilesDataSource) {
return defaultVisit(localFilesDataSource);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment