Autopsy  4.19.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 import org.sleuthkit.datamodel.DataArtifact;
25 
30 public final class IngestJobContext {
31 
32  private final IngestJobPipeline ingestJobPipeline;
33 
40  IngestJobContext(IngestJobPipeline ingestJobPipeline) {
41  this.ingestJobPipeline = ingestJobPipeline;
42  }
43 
49  public String getExecutionContext() {
50  return ingestJobPipeline.getExecutionContext();
51  }
52 
58  public Content getDataSource() {
59  return ingestJobPipeline.getDataSource();
60  }
61 
67  public long getJobId() {
68  return ingestJobPipeline.getId();
69  }
70 
80  @Deprecated
81  public boolean isJobCancelled() {
82  return ingestJobPipeline.isCancelled();
83  }
84 
93  public boolean dataSourceIngestIsCancelled() {
94  return ingestJobPipeline.currentDataSourceIngestModuleIsCancelled() || ingestJobPipeline.isCancelled();
95  }
96 
104  public boolean fileIngestIsCancelled() {
105  /*
106  * It is not currently possible to cancel individual file ingest
107  * modules.
108  */
109  return ingestJobPipeline.isCancelled();
110  }
111 
120  public boolean dataArtifactIngestIsCancelled() {
121  /*
122  * It is not currently possible to cancel individual data artifact
123  * ingest modules.
124  */
125  return ingestJobPipeline.isCancelled();
126  }
127 
134  public boolean processingUnallocatedSpace() {
135  return ingestJobPipeline.shouldProcessUnallocatedSpace();
136  }
137 
146  @Deprecated
147  public void scheduleFiles(List<AbstractFile> files) {
148  addFilesToJob(files);
149  }
150 
157  public void addFilesToJob(List<AbstractFile> files) {
158  ingestJobPipeline.addFiles(files);
159  }
160 
167  public void addDataArtifactsToJob(List<DataArtifact> artifacts) {
168  ingestJobPipeline.addDataArtifacts(artifacts);
169  }
170 
171 }
void addFilesToJob(List< AbstractFile > files)
void scheduleFiles(List< AbstractFile > files)
void addDataArtifactsToJob(List< DataArtifact > artifacts)

Copyright © 2012-2021 Basis Technology. Generated on: Fri Aug 6 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.