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;
43 FileIngestTask(IngestJobPipeline ingestJobPipeline, AbstractFile file) {
44 super(ingestJobPipeline);
46 fileId = file.getId();
59 FileIngestTask(IngestJobPipeline ingestJobPipeline,
long fileId) {
60 super(ingestJobPipeline);
81 synchronized AbstractFile getFile() throws TskCoreException {
83 file = Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(fileId);
89 void execute(
long threadId) {
90 super.setThreadId(threadId);
91 getIngestJobPipeline().execute(
this);
95 public boolean equals(Object obj) {
99 if (getClass() != obj.getClass()) {
102 FileIngestTask other = (FileIngestTask) obj;
103 IngestJobPipeline thisPipeline = getIngestJobPipeline();
104 IngestJobPipeline otherPipeline = other.getIngestJobPipeline();
105 if (thisPipeline != otherPipeline && (thisPipeline == null || !thisPipeline.equals(otherPipeline))) {
108 return (this.fileId == other.fileId);
112 public int hashCode() {
114 hash = 47 * hash + Objects.hashCode(getIngestJobPipeline());
115 hash = 47 * hash + Objects.hashCode(this.fileId);