Autopsy  4.13.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
TableReportSettings.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2019 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.report.infrastructure;
20 
21 import java.io.Serializable;
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.Map;
25 import org.sleuthkit.datamodel.BlackboardArtifact;
26 
32 final class TableReportSettings implements Serializable {
33 
37  enum TableReportOption {
38  ALL_RESULTS, //NON-NLS
39  ALL_TAGGED_RESULTS, //NON-NLS
40  SPECIFIC_TAGGED_RESULTS; //NON-NLS
41  }
42 
43  private static final long serialVersionUID = 1L;
44  private final List<BlackboardArtifact.Type> artifactTypes = new ArrayList<>();
45  private final List<String> tagNames = new ArrayList<>();
46  private final boolean useStoredTagsAndArtifactsLists;
47  private final TableReportOption reportOption;
48 
62  TableReportSettings(Map<BlackboardArtifact.Type, Boolean> artifactTypeSelections, Map<String, Boolean> tagNameSelections, boolean useTagsAndArtifactsLists, TableReportOption reportOption) {
63  // Get the artifact types selected by the user
64  for (Map.Entry<BlackboardArtifact.Type, Boolean> entry : artifactTypeSelections.entrySet()) {
65  if (entry.getValue()) {
66  artifactTypes.add(entry.getKey());
67  }
68  }
69 
70  // Get the tag names selected by the user
71 
72  for (Map.Entry<String, Boolean> entry : tagNameSelections.entrySet()) {
73  if (entry.getValue() == true) {
74  tagNames.add(entry.getKey());
75  }
76  }
77 
78  this.reportOption = reportOption;
79  this.useStoredTagsAndArtifactsLists = useTagsAndArtifactsLists;
80  }
81 
82  List<BlackboardArtifact.Type> getArtifactSelections() {
83  return artifactTypes;
84  }
85 
86  List<String> getTagSelections() {
87  return tagNames;
88  }
89 
90  boolean useStoredTagsAndArtifactsLists() {
91  return useStoredTagsAndArtifactsLists;
92  }
93 
99  TableReportOption getSelectedReportOption() {
100  return reportOption;
101  }
102 }

Copyright © 2012-2019 Basis Technology. Generated on: Tue Jan 7 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.