19 package org.sleuthkit.autopsy.modules.photoreccarver;
21 import java.util.ArrayList;
22 import java.util.Collections;
24 import java.util.List;
29 final class PhotoRecCarverIngestJobSettings
implements IngestModuleIngestJobSettings {
34 enum ExtensionFilterOption {
50 private static final long serialVersionUID = 1L;
52 private boolean keepCorruptedFiles;
53 private List<String> extensions;
54 private ExtensionFilterOption extensionFilterOption;
59 PhotoRecCarverIngestJobSettings() {
60 this(PhotoRecCarverFileIngestModule.DEFAULT_CONFIG_KEEP_CORRUPTED_FILES,
61 PhotoRecCarverFileIngestModule.DEFAULT_CONFIG_EXTENSION_FILTER,
75 PhotoRecCarverIngestJobSettings(
boolean keepCorruptedFiles, ExtensionFilterOption extensionFilterOption, List<String> includeExcludeExtensions) {
76 this.keepCorruptedFiles = keepCorruptedFiles;
77 setExtensionFilterOption(extensionFilterOption);
78 setExtensions(includeExcludeExtensions);
83 public long getVersionNumber() {
84 return serialVersionUID;
92 boolean isKeepCorruptedFiles() {
93 return keepCorruptedFiles;
101 void setKeepCorruptedFiles(
boolean keepCorruptedFiles) {
102 this.keepCorruptedFiles = keepCorruptedFiles;
111 List<String> getExtensions() {
112 return extensions == null
113 ? Collections.emptyList()
114 : Collections.unmodifiableList(extensions);
123 void setExtensions(List<String> includeExcludeExtensions) {
124 this.extensions =
new ArrayList<>();
125 if (includeExcludeExtensions != null) {
126 this.extensions.addAll(includeExcludeExtensions);
134 ExtensionFilterOption getExtensionFilterOption() {
135 return (this.extensionFilterOption == null) ?
136 ExtensionFilterOption.NO_FILTER :
137 extensionFilterOption;
144 void setExtensionFilterOption(ExtensionFilterOption extensionFilterOption) {
145 this.extensionFilterOption = (extensionFilterOption == null) ?
146 ExtensionFilterOption.NO_FILTER :
147 extensionFilterOption;