Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
YaraIngestJobSettings.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2020 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 */
19package org.sleuthkit.autopsy.modules.yara;
20
21import java.util.ArrayList;
22import java.util.Collections;
23import java.util.List;
24import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
25import org.sleuthkit.autopsy.modules.yara.rules.RuleSet;
26
30public final class YaraIngestJobSettings implements IngestModuleIngestJobSettings {
31
32 private static final long serialVersionUID = 1L;
33
34 private List<String> selectedRuleSetNames;
35 private boolean onlyExecutableFiles;
36
37 // Default constructor.
38 YaraIngestJobSettings() {
40 selectedRuleSetNames = new ArrayList<>();
41 }
42
49 public YaraIngestJobSettings(List<RuleSet> selected, boolean onlyExecutableFiles) {
50 this.selectedRuleSetNames = new ArrayList<>();
51
52 for (RuleSet set : selected) {
53 selectedRuleSetNames.add(set.getName());
54 }
55
56 this.onlyExecutableFiles = onlyExecutableFiles;
57 }
58
65 public List<String> getSelectedRuleSetNames() {
66 return Collections.unmodifiableList(selectedRuleSetNames);
67 }
68
74 void setSelectedRuleSetNames(List<RuleSet> selected) {
75 this.selectedRuleSetNames = new ArrayList<>();
76 for (RuleSet set : selected) {
77 selectedRuleSetNames.add(set.getName());
78 }
79 }
80
86 boolean hasSelectedRuleSets() {
87 return selectedRuleSetNames != null && !selectedRuleSetNames.isEmpty();
88 }
89
96 public boolean onlyExecutableFiles() {
98 }
99
106 void setOnlyExecuteableFile(boolean onlyExecutableFiles) {
107 this.onlyExecutableFiles = onlyExecutableFiles;
108 }
109
110 @Override
111 public long getVersionNumber() {
112 return serialVersionUID;
113 }
114
115}
YaraIngestJobSettings(List< RuleSet > selected, boolean onlyExecutableFiles)

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.