mirror of
https://github.com/elisspace/autopsy.git
synced 2026-10-05 08:46:20 +00:00
Split IngestEvent enum into two enums
This commit is contained in:
@@ -282,13 +282,13 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String eventType = evt.getPropertyName();
|
||||
|
||||
if (eventType.equals(IngestManager.IngestEvent.DATA.toString())) {
|
||||
if (eventType.equals(IngestManager.IngestModuleEvent.DATA.toString())) {
|
||||
if (((ModuleDataEvent) evt.getOldValue()).getArtifactType() == BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG) {
|
||||
emailResults.update();
|
||||
}
|
||||
}
|
||||
else if (eventType.equals(IngestManager.IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
else if (eventType.equals(IngestManager.IngestJobEvent.COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestJobEvent.CANCELLED.toString())) {
|
||||
emailResults.update();
|
||||
}
|
||||
}
|
||||
@@ -296,14 +296,16 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
|
||||
@Override
|
||||
protected void addNotify() {
|
||||
IngestManager.addPropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().addIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().addIngestModuleEventListener(pcl);
|
||||
emailResults.update();
|
||||
emailResults.addObserver(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeNotify() {
|
||||
IngestManager.removePropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().removeIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().removeIngestModuleEventListener(pcl);
|
||||
emailResults.deleteObserver(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -152,13 +152,13 @@ public class ExtractedContent implements AutopsyVisitableItem {
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String eventType = evt.getPropertyName();
|
||||
|
||||
if (eventType.equals(IngestManager.IngestEvent.DATA.toString())) {
|
||||
if (eventType.equals(IngestManager.IngestModuleEvent.DATA.toString())) {
|
||||
final ModuleDataEvent event = (ModuleDataEvent) evt.getOldValue();
|
||||
if (doNotShow.contains(event.getArtifactType()) == false) {
|
||||
refresh(true);
|
||||
}
|
||||
} else if (eventType.equals(IngestManager.IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
} else if (eventType.equals(IngestManager.IngestJobEvent.COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestJobEvent.CANCELLED.toString())) {
|
||||
refresh(true);
|
||||
}
|
||||
}
|
||||
@@ -166,12 +166,14 @@ public class ExtractedContent implements AutopsyVisitableItem {
|
||||
|
||||
@Override
|
||||
protected void addNotify() {
|
||||
IngestManager.addPropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().addIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().addIngestModuleEventListener(pcl);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeNotify() {
|
||||
IngestManager.removePropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().removeIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().removeIngestModuleEventListener(pcl);
|
||||
typeNodeList.clear();
|
||||
}
|
||||
|
||||
@@ -347,13 +349,13 @@ public class ExtractedContent implements AutopsyVisitableItem {
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String eventType = evt.getPropertyName();
|
||||
|
||||
if (eventType.equals(IngestManager.IngestEvent.DATA.toString())) {
|
||||
if (eventType.equals(IngestManager.IngestModuleEvent.DATA.toString())) {
|
||||
final ModuleDataEvent event = (ModuleDataEvent) evt.getOldValue();
|
||||
if (event.getArtifactType() == type) {
|
||||
refresh(true);
|
||||
}
|
||||
} else if (eventType.equals(IngestManager.IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
} else if (eventType.equals(IngestManager.IngestJobEvent.COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestJobEvent.CANCELLED.toString())) {
|
||||
refresh(true);
|
||||
}
|
||||
}
|
||||
@@ -361,12 +363,14 @@ public class ExtractedContent implements AutopsyVisitableItem {
|
||||
|
||||
@Override
|
||||
protected void addNotify() {
|
||||
IngestManager.addPropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().addIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().addIngestModuleEventListener(pcl);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeNotify() {
|
||||
IngestManager.removePropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().removeIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().removeIngestModuleEventListener(pcl);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -183,13 +183,13 @@ public class HashsetHits implements AutopsyVisitableItem {
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String eventType = evt.getPropertyName();
|
||||
|
||||
if (eventType.equals(IngestManager.IngestEvent.DATA.toString())) {
|
||||
if (eventType.equals(IngestManager.IngestModuleEvent.DATA.toString())) {
|
||||
if (((ModuleDataEvent) evt.getOldValue()).getArtifactType() == ARTIFACT_TYPE.TSK_HASHSET_HIT) {
|
||||
hashsetResults.update();
|
||||
}
|
||||
}
|
||||
else if (eventType.equals(IngestManager.IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
else if (eventType.equals(IngestManager.IngestJobEvent.COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestJobEvent.CANCELLED.toString())) {
|
||||
hashsetResults.update();
|
||||
}
|
||||
}
|
||||
@@ -197,14 +197,16 @@ public class HashsetHits implements AutopsyVisitableItem {
|
||||
|
||||
@Override
|
||||
protected void addNotify() {
|
||||
IngestManager.addPropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().addIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().addIngestModuleEventListener(pcl);
|
||||
hashsetResults.update();
|
||||
hashsetResults.addObserver(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeNotify() {
|
||||
IngestManager.removePropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().removeIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().removeIngestModuleEventListener(pcl);
|
||||
hashsetResults.deleteObserver(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -178,14 +178,14 @@ public class InterestingHits implements AutopsyVisitableItem {
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String eventType = evt.getPropertyName();
|
||||
|
||||
if (eventType.equals(IngestManager.IngestEvent.DATA.toString())) {
|
||||
if (eventType.equals(IngestManager.IngestModuleEvent.DATA.toString())) {
|
||||
if ((((ModuleDataEvent) evt.getOldValue()).getArtifactType() == BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT) ||
|
||||
(((ModuleDataEvent) evt.getOldValue()).getArtifactType() == BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT)) {
|
||||
interestingResults.update();
|
||||
}
|
||||
}
|
||||
else if (eventType.equals(IngestManager.IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
else if (eventType.equals(IngestManager.IngestJobEvent.COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestJobEvent.CANCELLED.toString())) {
|
||||
interestingResults.update();
|
||||
}
|
||||
}
|
||||
@@ -193,14 +193,16 @@ public class InterestingHits implements AutopsyVisitableItem {
|
||||
|
||||
@Override
|
||||
protected void addNotify() {
|
||||
IngestManager.addPropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().addIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().addIngestModuleEventListener(pcl);
|
||||
interestingResults.update();
|
||||
interestingResults.addObserver(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeNotify() {
|
||||
IngestManager.removePropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().removeIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().removeIngestModuleEventListener(pcl);
|
||||
interestingResults.deleteObserver(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -236,13 +236,13 @@ public class KeywordHits implements AutopsyVisitableItem {
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String eventType = evt.getPropertyName();
|
||||
|
||||
if (eventType.equals(IngestManager.IngestEvent.DATA.toString())) {
|
||||
if (eventType.equals(IngestManager.IngestModuleEvent.DATA.toString())) {
|
||||
if (((ModuleDataEvent) evt.getOldValue()).getArtifactType() == BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT) {
|
||||
keywordResults.update();
|
||||
}
|
||||
}
|
||||
else if (eventType.equals(IngestManager.IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
else if (eventType.equals(IngestManager.IngestJobEvent.COMPLETED.toString())
|
||||
|| eventType.equals(IngestManager.IngestJobEvent.CANCELLED.toString())) {
|
||||
keywordResults.update();
|
||||
}
|
||||
}
|
||||
@@ -250,14 +250,16 @@ public class KeywordHits implements AutopsyVisitableItem {
|
||||
|
||||
@Override
|
||||
protected void addNotify() {
|
||||
IngestManager.addPropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().addIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().addIngestModuleEventListener(pcl);
|
||||
keywordResults.update();
|
||||
keywordResults.addObserver(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeNotify() {
|
||||
IngestManager.removePropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().removeIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().removeIngestModuleEventListener(pcl);
|
||||
keywordResults.deleteObserver(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -121,12 +121,12 @@ public class Tags implements AutopsyVisitableItem {
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String eventType = evt.getPropertyName();
|
||||
if (eventType.equals(IngestManager.IngestEvent.DATA.toString())) {
|
||||
if (eventType.equals(IngestManager.IngestModuleEvent.DATA.toString())) {
|
||||
if ((((ModuleDataEvent) evt.getOldValue()).getArtifactType() == BlackboardArtifact.ARTIFACT_TYPE.TSK_TAG_ARTIFACT) || ((ModuleDataEvent) evt.getOldValue()).getArtifactType() == BlackboardArtifact.ARTIFACT_TYPE.TSK_TAG_FILE) {
|
||||
refresh(true);
|
||||
tagResults.update();
|
||||
}
|
||||
} else if (eventType.equals(IngestManager.IngestEvent.INGEST_JOB_COMPLETED.toString()) || eventType.equals(IngestManager.IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
} else if (eventType.equals(IngestManager.IngestJobEvent.COMPLETED.toString()) || eventType.equals(IngestManager.IngestJobEvent.CANCELLED.toString())) {
|
||||
refresh(true);
|
||||
tagResults.update();
|
||||
}
|
||||
@@ -135,14 +135,16 @@ public class Tags implements AutopsyVisitableItem {
|
||||
|
||||
@Override
|
||||
protected void addNotify() {
|
||||
IngestManager.addPropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().addIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().addIngestModuleEventListener(pcl);
|
||||
tagResults.update();
|
||||
tagResults.addObserver(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeNotify() {
|
||||
IngestManager.removePropertyChangeListener(pcl);
|
||||
IngestManager.getInstance().removeIngestJobEventListener(pcl);
|
||||
IngestManager.getInstance().removeIngestModuleEventListener(pcl);
|
||||
tagResults.deleteObserver(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.BlackboardResultViewer;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
|
||||
import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
|
||||
import org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode;
|
||||
import org.sleuthkit.autopsy.datamodel.ExtractedContent.RootNode;
|
||||
import org.sleuthkit.autopsy.datamodel.DataSources;
|
||||
import org.sleuthkit.autopsy.datamodel.DataSourcesNode;
|
||||
import org.sleuthkit.autopsy.datamodel.KeywordHits;
|
||||
@@ -67,8 +66,6 @@ import org.sleuthkit.autopsy.datamodel.RootContentChildren;
|
||||
import org.sleuthkit.autopsy.datamodel.Views;
|
||||
import org.sleuthkit.autopsy.datamodel.ViewsNode;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager.IngestEvent;
|
||||
import org.sleuthkit.autopsy.ingest.ModuleDataEvent;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
@@ -578,18 +575,18 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
else if (changed.equals(ExplorerManager.PROP_SELECTED_NODES)) {
|
||||
respondSelection((Node[]) oldValue, (Node[]) newValue);
|
||||
}
|
||||
else if (changed.equals(IngestEvent.DATA.toString())) {
|
||||
else if (changed.equals(IngestManager.IngestModuleEvent.DATA.toString())) {
|
||||
// nothing to do here.
|
||||
// all nodes should be listening for these events and update accordingly.
|
||||
} else if (changed.equals(IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| changed.equals(IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
} else if (changed.equals(IngestManager.IngestJobEvent.COMPLETED.toString())
|
||||
|| changed.equals(IngestManager.IngestJobEvent.CANCELLED.toString())) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
refreshDataSourceTree();
|
||||
}
|
||||
});
|
||||
} else if (changed.equals(IngestEvent.CONTENT_CHANGED.toString())) {
|
||||
} else if (changed.equals(IngestManager.IngestModuleEvent.CONTENT_CHANGED.toString())) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -230,45 +230,55 @@ public class IngestManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Ingest events.
|
||||
* Ingest job events.
|
||||
*/
|
||||
public enum IngestEvent {
|
||||
public enum IngestJobEvent {
|
||||
|
||||
/**
|
||||
* Property change event fired when an ingest job is started. The old
|
||||
* value of the PropertyChangeEvent object is set to the ingest job id,
|
||||
* and the new value is set to null.
|
||||
*/
|
||||
INGEST_JOB_STARTED,
|
||||
STARTED,
|
||||
/**
|
||||
* Property change event fired when an ingest job is completed. The old
|
||||
* value of the PropertyChangeEvent object is set to the ingest job id,
|
||||
* and the new value is set to null.
|
||||
*/
|
||||
INGEST_JOB_COMPLETED,
|
||||
COMPLETED,
|
||||
/**
|
||||
* Property change event fired when an ingest job is canceled. The old
|
||||
* value of the PropertyChangeEvent object is set to the ingest job id,
|
||||
* and the new value is set to null.
|
||||
*/
|
||||
INGEST_JOB_CANCELLED,
|
||||
CANCELLED,
|
||||
};
|
||||
|
||||
/**
|
||||
* Ingest module events.
|
||||
*/
|
||||
public enum IngestModuleEvent {
|
||||
|
||||
/**
|
||||
* Event sent when an ingest module posts new data to blackboard or
|
||||
* somewhere else. Second argument of the property change fired contains
|
||||
* ModuleDataEvent object and third argument is null. The object can
|
||||
* contain encapsulated new data created by the module. Listener can
|
||||
* also query new data as needed.
|
||||
* Property change event fired when an ingest module adds new data to a
|
||||
* case, usually by posting to the blackboard. The old value of the
|
||||
* PropertyChangeEvent is a ModuleDataEvent object, and the new value is
|
||||
* set to null.
|
||||
*/
|
||||
DATA,
|
||||
/**
|
||||
* Event send when content changed, either its attributes changed, or
|
||||
* new content children have been added. I.e. from ZIP files or Carved
|
||||
* files
|
||||
* Property change event fired when an ingest module adds new content to
|
||||
* a case or changes a recorded attribute of existing content. For
|
||||
* example, if a module adds an extracted or carved file to a case, the
|
||||
* module should fire this event. The old value of the
|
||||
* PropertyChangeEvent is a ModuleContentEvent object, and the new value
|
||||
* is set to null.
|
||||
*/
|
||||
CONTENT_CHANGED,
|
||||
/**
|
||||
* Event sent when a file has finished going through a pipeline of
|
||||
* modules. Second argument is the object ID. Third argument is null
|
||||
* Property change event fired when the ingest of a file is completed.
|
||||
* The old value of the PropertyChangeEvent is the Autopsy object ID of
|
||||
* the file, and the new value is set to null.
|
||||
*/
|
||||
FILE_DONE,
|
||||
};
|
||||
@@ -309,35 +319,13 @@ public class IngestManager {
|
||||
ingestModuleEventPublisher.removePropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an ingest module event property change listener.
|
||||
*
|
||||
* @deprecated
|
||||
* @param listener The PropertyChangeListener to register.
|
||||
*/
|
||||
public static void addPropertyChangeListener(final PropertyChangeListener listener) {
|
||||
instance.ingestJobEventPublisher.addPropertyChangeListener(listener);
|
||||
instance.ingestModuleEventPublisher.addPropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an ingest module event property change listener.
|
||||
*
|
||||
* @deprecated
|
||||
* @param listener The PropertyChangeListener to unregister.
|
||||
*/
|
||||
public static void removePropertyChangeListener(final PropertyChangeListener listener) {
|
||||
instance.ingestJobEventPublisher.removePropertyChangeListener(listener);
|
||||
instance.ingestModuleEventPublisher.removePropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire an ingest event signifying an ingest job started.
|
||||
*
|
||||
* @param ingestJobId The ingest job id.
|
||||
*/
|
||||
void fireIngestJobStarted(long ingestJobId) {
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestJobEventPublisher, IngestEvent.INGEST_JOB_STARTED, ingestJobId, null));
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestJobEventPublisher, IngestJobEvent.STARTED, ingestJobId, null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -346,7 +334,7 @@ public class IngestManager {
|
||||
* @param ingestJobId The ingest job id.
|
||||
*/
|
||||
void fireIngestJobCompleted(long ingestJobId) {
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestJobEventPublisher, IngestEvent.INGEST_JOB_COMPLETED, ingestJobId, null));
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestJobEventPublisher, IngestJobEvent.COMPLETED, ingestJobId, null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -355,7 +343,7 @@ public class IngestManager {
|
||||
* @param ingestJobId The ingest job id.
|
||||
*/
|
||||
void fireIngestJobCancelled(long ingestJobId) {
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestJobEventPublisher, IngestEvent.INGEST_JOB_CANCELLED, ingestJobId, null));
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestJobEventPublisher, IngestJobEvent.CANCELLED, ingestJobId, null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -364,7 +352,7 @@ public class IngestManager {
|
||||
* @param fileId The object id of file.
|
||||
*/
|
||||
void fireFileIngestDone(long fileId) {
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestModuleEventPublisher, IngestEvent.FILE_DONE, fileId, null));
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestModuleEventPublisher, IngestModuleEvent.FILE_DONE, fileId, null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -373,7 +361,7 @@ public class IngestManager {
|
||||
* @param moduleDataEvent A ModuleDataEvent with the details of the posting.
|
||||
*/
|
||||
void fireIngestModuleDataEvent(ModuleDataEvent moduleDataEvent) {
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestModuleEventPublisher, IngestEvent.DATA, moduleDataEvent, null));
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestModuleEventPublisher, IngestModuleEvent.DATA, moduleDataEvent, null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -384,7 +372,7 @@ public class IngestManager {
|
||||
* content.
|
||||
*/
|
||||
void fireIngestModuleContentEvent(ModuleContentEvent moduleContentEvent) {
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestModuleEventPublisher, IngestEvent.CONTENT_CHANGED, moduleContentEvent, null));
|
||||
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestModuleEventPublisher, IngestModuleEvent.CONTENT_CHANGED, moduleContentEvent, null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -534,13 +522,23 @@ public class IngestManager {
|
||||
private static class FireIngestEventThread implements Runnable {
|
||||
|
||||
private final PropertyChangeSupport publisher;
|
||||
private final IngestEvent event;
|
||||
private final IngestJobEvent jobEvent;
|
||||
private final IngestModuleEvent moduleEvent;
|
||||
private final Object oldValue;
|
||||
private final Object newValue;
|
||||
|
||||
FireIngestEventThread(PropertyChangeSupport publisher, IngestEvent event, Object oldValue, Object newValue) {
|
||||
FireIngestEventThread(PropertyChangeSupport publisher, IngestJobEvent event, Object oldValue, Object newValue) {
|
||||
this.publisher = publisher;
|
||||
this.event = event;
|
||||
this.jobEvent = event;
|
||||
this.moduleEvent = null;
|
||||
this.oldValue = oldValue;
|
||||
this.newValue = newValue;
|
||||
}
|
||||
|
||||
FireIngestEventThread(PropertyChangeSupport publisher, IngestModuleEvent event, Object oldValue, Object newValue) {
|
||||
this.publisher = publisher;
|
||||
this.jobEvent = null;
|
||||
this.moduleEvent = event;
|
||||
this.oldValue = oldValue;
|
||||
this.newValue = newValue;
|
||||
}
|
||||
@@ -548,7 +546,7 @@ public class IngestManager {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
publisher.firePropertyChange(event.toString(), oldValue, newValue);
|
||||
publisher.firePropertyChange((jobEvent != null ? jobEvent.toString() : moduleEvent.toString()), oldValue, newValue);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
|
||||
|
||||
@@ -231,9 +231,9 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
}
|
||||
|
||||
private boolean isIngestJobEvent(PropertyChangeEvent evt) {
|
||||
return evt.getPropertyName().equals(IngestManager.IngestEvent.INGEST_JOB_STARTED.toString())
|
||||
|| evt.getPropertyName().equals(IngestManager.IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| evt.getPropertyName().equals(IngestManager.IngestEvent.INGEST_JOB_CANCELLED.toString());
|
||||
return evt.getPropertyName().equals(IngestManager.IngestJobEvent.STARTED.toString())
|
||||
|| evt.getPropertyName().equals(IngestManager.IngestJobEvent.COMPLETED.toString())
|
||||
|| evt.getPropertyName().equals(IngestManager.IngestJobEvent.CANCELLED.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -43,7 +43,7 @@ import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.TableColumn;
|
||||
import org.sleuthkit.autopsy.corecomponents.OptionsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager.IngestEvent;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager.IngestJobEvent;
|
||||
|
||||
/**
|
||||
* KeywordSearchEditListPanel widget to manage keywords in lists
|
||||
@@ -130,9 +130,9 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String changed = evt.getPropertyName();
|
||||
if (changed.equals(IngestEvent.INGEST_JOB_STARTED.toString())
|
||||
|| changed.equals(IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| changed.equals(IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
if (changed.equals(IngestJobEvent.STARTED.toString())
|
||||
|| changed.equals(IngestJobEvent.COMPLETED.toString())
|
||||
|| changed.equals(IngestJobEvent.CANCELLED.toString())) {
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
+4
-4
@@ -42,7 +42,7 @@ import org.openide.util.NbBundle;
|
||||
import org.openide.util.actions.SystemAction;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager.IngestEvent;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager.IngestJobEvent;
|
||||
|
||||
/**
|
||||
* Viewer panel widget for keyword lists that is used in the ingest config and options area.
|
||||
@@ -122,9 +122,9 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String changed = evt.getPropertyName();
|
||||
if (changed.equals(IngestEvent.INGEST_JOB_STARTED.toString())
|
||||
|| changed.equals(IngestEvent.INGEST_JOB_COMPLETED.toString())
|
||||
|| changed.equals(IngestEvent.INGEST_JOB_CANCELLED.toString())) {
|
||||
if (changed.equals(IngestJobEvent.STARTED.toString())
|
||||
|| changed.equals(IngestJobEvent.COMPLETED.toString())
|
||||
|| changed.equals(IngestJobEvent.CANCELLED.toString())) {
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Reference in New Issue
Block a user