19 package org.sleuthkit.autopsy.ingest;
21 import java.util.Objects;
30 final class FileIngestTask
extends IngestTask {
32 private final long fileId;
33 private AbstractFile file = null;
35 FileIngestTask(IngestJobPipeline ingestJobPipeline, AbstractFile file) {
36 super(ingestJobPipeline);
38 fileId = file.getId();
41 FileIngestTask(IngestJobPipeline ingestJobPipeline,
long fileId) {
42 super(ingestJobPipeline);
50 synchronized AbstractFile getFile() throws TskCoreException {
52 file = Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(fileId);
58 void execute(
long threadId)
throws InterruptedException {
59 super.setThreadId(threadId);
60 getIngestJobPipeline().process(
this);
64 public boolean equals(Object obj) {
68 if (getClass() != obj.getClass()) {
71 FileIngestTask other = (FileIngestTask) obj;
72 IngestJobPipeline thisPipeline = getIngestJobPipeline();
73 IngestJobPipeline otherPipeline = other.getIngestJobPipeline();
74 if (thisPipeline != otherPipeline && (thisPipeline == null || !thisPipeline.equals(otherPipeline))) {
77 return (this.fileId == other.fileId);
81 public int hashCode() {
83 hash = 47 * hash + Objects.hashCode(getIngestJobPipeline());
84 hash = 47 * hash + Objects.hashCode(this.fileId);