Autopsy  4.20.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
IngestJobContext.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2014-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.ingest;
20 
21 import java.util.List;
22 import org.sleuthkit.datamodel.AbstractFile;
23 import org.sleuthkit.datamodel.Content;
24 
29 public final class IngestJobContext {
30 
31  private final IngestJobExecutor ingestJobExecutor;
32 
39  IngestJobContext(IngestJobExecutor ingestJobExecutor) {
40  this.ingestJobExecutor = ingestJobExecutor;
41  }
42 
48  public String getExecutionContext() {
49  return ingestJobExecutor.getExecutionContext();
50  }
51 
57  public Content getDataSource() {
58  return ingestJobExecutor.getDataSource();
59  }
60 
66  public long getJobId() {
67  return ingestJobExecutor.getIngestJobId();
68  }
69 
79  @Deprecated
80  public boolean isJobCancelled() {
81  return ingestJobExecutor.isCancelled();
82  }
83 
92  public boolean dataSourceIngestIsCancelled() {
93  return ingestJobExecutor.currentDataSourceIngestModuleIsCancelled() || ingestJobExecutor.isCancelled();
94  }
95 
103  public boolean fileIngestIsCancelled() {
104  /*
105  * It is not currently possible to cancel individual file ingest
106  * modules.
107  */
108  return ingestJobExecutor.isCancelled();
109  }
110 
119  public boolean dataArtifactIngestIsCancelled() {
120  /*
121  * It is not currently possible to cancel individual data artifact
122  * ingest modules.
123  */
124  return ingestJobExecutor.isCancelled();
125  }
126 
133  public boolean processingUnallocatedSpace() {
134  return ingestJobExecutor.shouldProcessUnallocatedSpace();
135  }
136 
145  @Deprecated
146  public void scheduleFiles(List<AbstractFile> files) {
147  addFilesToJob(files);
148  }
149 
156  public void addFilesToJob(List<AbstractFile> files) {
157  ingestJobExecutor.addFiles(files);
158  }
159 
160 }
void addFilesToJob(List< AbstractFile > files)
void scheduleFiles(List< AbstractFile > files)

Copyright © 2012-2022 Basis Technology. Generated on: Tue Aug 1 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.