Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
MimeTypeSummaryGetter.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2020-2021 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.datasourcesummary.ui;
20 
22 import java.sql.SQLException;
23 import java.util.Arrays;
24 import java.util.Collections;
25 import java.util.HashSet;
26 import java.util.Set;
32 import org.sleuthkit.datamodel.AbstractFile;
33 import org.sleuthkit.datamodel.DataSource;
34 import org.sleuthkit.datamodel.TskCoreException;
35 
41 
42  private static final Set<IngestManager.IngestJobEvent> INGEST_JOB_EVENTS = new HashSet<>(
44 
46 
51  mimeTypeSummary = new MimeTypeSummary();
52  }
53 
54  @Override
55  public boolean isRefreshRequired(ModuleContentEvent evt) {
56  return true;
57  }
58 
59  @Override
60  public boolean isRefreshRequired(AbstractFile file) {
61  return true;
62  }
63 
64  @Override
66  return (evt != null && INGEST_JOB_EVENTS.contains(evt));
67  }
68 
69  @Override
71  return Collections.unmodifiableSet(INGEST_JOB_EVENTS);
72  }
73 
92  public Long getCountOfFilesForMimeTypes(DataSource currentDataSource, Set<String> setOfMimeTypes)
93  throws SleuthkitCaseProvider.SleuthkitCaseProviderException, TskCoreException, SQLException {
94  return mimeTypeSummary.getCountOfFilesForMimeTypes(currentDataSource, setOfMimeTypes);
95  }
96 
113  public Long getCountOfFilesNotInMimeTypes(DataSource currentDataSource, Set<String> setOfMimeTypes)
114  throws SleuthkitCaseProvider.SleuthkitCaseProviderException, TskCoreException, SQLException {
115  return mimeTypeSummary.getCountOfFilesNotInMimeTypes(currentDataSource, setOfMimeTypes);
116  }
117 
129  public Long getCountOfAllRegularFiles(DataSource dataSource)
130  throws SleuthkitCaseProvider.SleuthkitCaseProviderException, TskCoreException, SQLException {
131  return mimeTypeSummary.getCountOfAllRegularFiles(dataSource);
132  }
133 
146  public Long getCountOfFilesWithNoMimeType(DataSource currentDataSource)
147  throws SleuthkitCaseProvider.SleuthkitCaseProviderException, TskCoreException, SQLException {
148  return mimeTypeSummary.getCountOfFilesWithNoMimeType(currentDataSource);
149  }
150 }
static final Set< IngestManager.IngestJobEvent > INGEST_JOB_EVENTS
Long getCountOfFilesNotInMimeTypes(DataSource currentDataSource, Set< String > setOfMimeTypes)
Long getCountOfFilesNotInMimeTypes(DataSource currentDataSource, Set< String > setOfMimeTypes)
Long getCountOfFilesForMimeTypes(DataSource currentDataSource, Set< String > setOfMimeTypes)
Long getCountOfFilesForMimeTypes(DataSource currentDataSource, Set< String > setOfMimeTypes)

Copyright © 2012-2022 Basis Technology. Generated on: Sat Nov 26 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.