Autopsy  4.19.3
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  */
19 package org.sleuthkit.autopsy.modules.yara;
20 
21 import java.util.ArrayList;
22 import java.util.Collections;
23 import java.util.List;
26 
31 
32  private static final long serialVersionUID = 1L;
33 
34  private List<String> selectedRuleSetNames;
35  private boolean onlyExecutableFiles;
36 
37  // Default constructor.
39  onlyExecutableFiles = true;
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() {
97  return 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-2022 Basis Technology. Generated on: Thu Dec 8 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.