mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
5367 re-order arguements for consistancy with API
This commit is contained in:
parent
6e81e55490
commit
293c5cb40e
@ -217,26 +217,26 @@ final class DiscoveryEvents {
|
||||
/**
|
||||
* Construct a new GroupSelectedEvent.
|
||||
*
|
||||
* @param resultType The type of files which exist in the group.
|
||||
* @param groupName The name of the group which was selected.
|
||||
* @param groupSize The number of files in the group which was
|
||||
* selected.
|
||||
* @param searchfilters The search filters which were used by the
|
||||
* search.
|
||||
* @param groupingAttribute The grouping attribute used by the search.
|
||||
* @param groupSort The sorting algorithm used for groups.
|
||||
* @param fileSortMethod The sorting method used for files.
|
||||
* @param groupName The name of the group which was selected.
|
||||
* @param groupSize The number of files in the group which was
|
||||
* selected.
|
||||
* @param resultType The type of files which exist in the group.
|
||||
*/
|
||||
GroupSelectedEvent(FileType resultType, String groupName, int groupSize, List<FileSearchFiltering.FileFilter> searchfilters,
|
||||
GroupSelectedEvent(List<FileSearchFiltering.FileFilter> searchfilters,
|
||||
FileSearch.AttributeType groupingAttribute, FileGroup.GroupSortingAlgorithm groupSort,
|
||||
FileSorter.SortingMethod fileSortMethod) {
|
||||
this.resultType = resultType;
|
||||
this.groupName = groupName;
|
||||
this.groupSize = groupSize;
|
||||
FileSorter.SortingMethod fileSortMethod, String groupName, int groupSize, FileType resultType) {
|
||||
this.searchfilters = searchfilters;
|
||||
this.groupingAttribute = groupingAttribute;
|
||||
this.groupSort = groupSort;
|
||||
this.fileSortMethod = fileSortMethod;
|
||||
this.groupName = groupName;
|
||||
this.groupSize = groupSize;
|
||||
this.resultType = resultType;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,6 +22,7 @@ import com.google.common.eventbus.Subscribe;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||
import org.sleuthkit.autopsy.filequery.FileSearchData.FileType;
|
||||
|
||||
/**
|
||||
@ -38,7 +39,6 @@ class GroupListPanel extends javax.swing.JPanel {
|
||||
private FileSorter.SortingMethod fileSortMethod;
|
||||
private String selectedGroupName;
|
||||
|
||||
|
||||
/**
|
||||
* Creates new form GroupListPanel
|
||||
*/
|
||||
@ -126,14 +126,14 @@ class GroupListPanel extends javax.swing.JPanel {
|
||||
for (String groupName : groupMap.keySet()) {
|
||||
if (selectedGroup.startsWith(groupName)) {
|
||||
selectedGroupName = groupName;
|
||||
DiscoveryEvents.getDiscoveryEventBus().post(new DiscoveryEvents.GroupSelectedEvent(resultType, selectedGroupName, groupMap.get(selectedGroupName), searchfilters,groupingAttribute, groupSort, fileSortMethod));
|
||||
DiscoveryEvents.getDiscoveryEventBus().post(new DiscoveryEvents.GroupSelectedEvent(
|
||||
searchfilters, groupingAttribute, groupSort, fileSortMethod, selectedGroupName, groupMap.get(selectedGroupName), resultType));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}//GEN-LAST:event_groupSelected
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JList<String> groupList;
|
||||
private javax.swing.JScrollPane groupListScrollPane;
|
||||
|
@ -32,8 +32,6 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
final class PageWorker extends SwingWorker<Void, Void> {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(PageWorker.class.getName());
|
||||
private final FileSearchData.FileType resultType;
|
||||
private final EamDb centralRepo;
|
||||
private final List<FileSearchFiltering.FileFilter> searchfilters;
|
||||
private final FileSearch.AttributeType groupingAttribute;
|
||||
private final FileGroup.GroupSortingAlgorithm groupSort;
|
||||
@ -41,12 +39,12 @@ final class PageWorker extends SwingWorker<Void, Void> {
|
||||
private final String groupName;
|
||||
private final int startingEntry;
|
||||
private final int pageSize;
|
||||
private final FileSearchData.FileType resultType;
|
||||
private final EamDb centralRepo;
|
||||
|
||||
/**
|
||||
* Construct a new PageWorker.
|
||||
*
|
||||
* @param resultType The type of files which exist in the group.
|
||||
* @param centralRepo The central repository to be used.
|
||||
* @param searchfilters The search filters which were used by the
|
||||
* search.
|
||||
* @param groupingAttribute The grouping attribute used by the search.
|
||||
@ -56,12 +54,12 @@ final class PageWorker extends SwingWorker<Void, Void> {
|
||||
* @param startingEntry The first entry in the group to include in this
|
||||
* page.
|
||||
* @param pageSize The number of files to include in this page.
|
||||
* @param resultType The type of files which exist in the group.
|
||||
* @param centralRepo The central repository to be used.
|
||||
*/
|
||||
PageWorker(FileSearchData.FileType resultType, EamDb centralRepo, List<FileSearchFiltering.FileFilter> searchfilters,
|
||||
FileSearch.AttributeType groupingAttribute, FileGroup.GroupSortingAlgorithm groupSort,
|
||||
FileSorter.SortingMethod fileSortMethod, String groupName, int startingEntry, int pageSize) {
|
||||
this.resultType = resultType;
|
||||
this.centralRepo = centralRepo;
|
||||
PageWorker(List<FileSearchFiltering.FileFilter> searchfilters, FileSearch.AttributeType groupingAttribute,
|
||||
FileGroup.GroupSortingAlgorithm groupSort, FileSorter.SortingMethod fileSortMethod, String groupName,
|
||||
int startingEntry, int pageSize, FileSearchData.FileType resultType, EamDb centralRepo) {
|
||||
this.searchfilters = searchfilters;
|
||||
this.groupingAttribute = groupingAttribute;
|
||||
this.groupSort = groupSort;
|
||||
@ -69,6 +67,8 @@ final class PageWorker extends SwingWorker<Void, Void> {
|
||||
this.groupName = groupName;
|
||||
this.startingEntry = startingEntry;
|
||||
this.pageSize = pageSize;
|
||||
this.resultType = resultType;
|
||||
this.centralRepo = centralRepo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -42,8 +42,6 @@ public class ResultsPanel extends javax.swing.JPanel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final DataResultViewerThumbnail thumbnailViewer;
|
||||
private final DataResultViewerTable tableViewer;
|
||||
private final EamDb centralRepo;
|
||||
private FileSearchData.FileType resultType;
|
||||
private List<FileSearchFiltering.FileFilter> searchFilters;
|
||||
private FileSearch.AttributeType groupingAttribute;
|
||||
private FileGroup.GroupSortingAlgorithm groupSort;
|
||||
@ -51,6 +49,8 @@ public class ResultsPanel extends javax.swing.JPanel {
|
||||
private String selectedGroupName;
|
||||
private int currentPage = 0;
|
||||
private int previousPageSize = 10;
|
||||
private FileSearchData.FileType resultType;
|
||||
private final EamDb centralRepo;
|
||||
private int groupSize = 0;
|
||||
private PageWorker pageWorker;
|
||||
|
||||
@ -106,12 +106,12 @@ public class ResultsPanel extends javax.swing.JPanel {
|
||||
@Subscribe
|
||||
void handlePageChangedEvent(DiscoveryEvents.GroupSelectedEvent groupSelectedEvent) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
resultType = groupSelectedEvent.getResultType();
|
||||
searchFilters = groupSelectedEvent.getFilters();
|
||||
groupingAttribute = groupSelectedEvent.getGroupingAttr();
|
||||
groupSort = groupSelectedEvent.getGroupSort();
|
||||
fileSortMethod = groupSelectedEvent.getFileSort();
|
||||
selectedGroupName = groupSelectedEvent.getGroupName();
|
||||
resultType = groupSelectedEvent.getResultType();
|
||||
groupSize = groupSelectedEvent.getGroupSize();
|
||||
setPage(0);
|
||||
});
|
||||
@ -129,7 +129,7 @@ public class ResultsPanel extends javax.swing.JPanel {
|
||||
if (pageWorker != null && !pageWorker.isDone()) {
|
||||
pageWorker.cancel(true);
|
||||
}
|
||||
pageWorker = new PageWorker(resultType, centralRepo, searchFilters, groupingAttribute, groupSort, fileSortMethod, selectedGroupName, startingEntry, pageSize);
|
||||
pageWorker = new PageWorker(searchFilters, groupingAttribute, groupSort, fileSortMethod, selectedGroupName, startingEntry, pageSize, resultType, centralRepo);
|
||||
pageWorker.execute();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user