diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 4ebbe9223d..3ffae2bd0f 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -87,10 +87,10 @@ import org.sleuthkit.autopsy.casemodule.events.HostsChangedEvent; import org.sleuthkit.autopsy.casemodule.events.HostsRemovedEvent; import org.sleuthkit.autopsy.casemodule.events.OsAccountAddedEvent; import org.sleuthkit.autopsy.casemodule.events.OsAccountChangedEvent; -import org.sleuthkit.autopsy.casemodule.events.OsAccountRemovedEvent; +import org.sleuthkit.autopsy.casemodule.events.OsAccountDeletedEvent; import org.sleuthkit.autopsy.casemodule.events.PersonsAddedEvent; import org.sleuthkit.autopsy.casemodule.events.PersonsChangedEvent; -import org.sleuthkit.autopsy.casemodule.events.PersonsRemovedEvent; +import org.sleuthkit.autopsy.casemodule.events.PersonsDeletedEvent; import org.sleuthkit.autopsy.casemodule.events.ReportAddedEvent; import org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.CaseNodeDataException; import org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils; @@ -140,24 +140,16 @@ import org.sleuthkit.datamodel.ContentTag; import org.sleuthkit.datamodel.DataSource; import org.sleuthkit.datamodel.FileSystem; import org.sleuthkit.datamodel.Host; -import org.sleuthkit.datamodel.HostManager.HostsCreationEvent; -import org.sleuthkit.datamodel.HostManager.HostsUpdateEvent; -import org.sleuthkit.datamodel.HostManager.HostsDeletionEvent; import org.sleuthkit.datamodel.Image; import org.sleuthkit.datamodel.OsAccount; -import org.sleuthkit.datamodel.OsAccountManager.OsAccountsCreationEvent; -import org.sleuthkit.datamodel.OsAccountManager.OsAccountsDeleteEvent; -import org.sleuthkit.datamodel.OsAccountManager.OsAccountsUpdateEvent; import org.sleuthkit.datamodel.Person; -import org.sleuthkit.datamodel.PersonManager.PersonsCreationEvent; -import org.sleuthkit.datamodel.PersonManager.PersonsUpdateEvent; -import org.sleuthkit.datamodel.PersonManager.PersonsDeletionEvent; import org.sleuthkit.datamodel.Report; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TimelineManager; import org.sleuthkit.datamodel.SleuthkitCaseAdminUtil; import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.TskDataException; +import org.sleuthkit.datamodel.TskEvent; import org.sleuthkit.datamodel.TskUnsupportedSchemaVersionException; /** @@ -504,36 +496,36 @@ public class Case { event.getArtifacts(artifactType))); } } - - @Subscribe - public void publishOsAccountAddedEvent(OsAccountsCreationEvent event) { - for (OsAccount account : event.getOsAcounts()) { + + @Subscribe + public void publishOsAccountAddedEvent(TskEvent.OsAccountsAddedTskEvent event) { + for(OsAccount account: event.getOsAcounts()) { eventPublisher.publish(new OsAccountAddedEvent(account)); } } - - @Subscribe - public void publishOsAccountChangedEvent(OsAccountsUpdateEvent event) { - for (OsAccount account : event.getOsAcounts()) { + + @Subscribe + public void publishOsAccountChangedEvent(TskEvent.OsAccountsChangedTskEvent event) { + for(OsAccount account: event.getOsAcounts()) { eventPublisher.publish(new OsAccountChangedEvent(account)); } } - - @Subscribe - public void publishOsAccountDeletedEvent(OsAccountsDeleteEvent event) { - for (Long accountId : event.getOsAcountObjectIds()) { - eventPublisher.publish(new OsAccountRemovedEvent(accountId)); + + @Subscribe + public void publishOsAccountDeletedEvent(TskEvent.OsAccountsDeletedTskEvent event) { + for(Long accountId: event.getOsAcountObjectIds()) { + eventPublisher.publish(new OsAccountDeletedEvent(accountId)); } } /** - * Publishes an autopsy event from the sleuthkit HostCreationEvent + * Publishes an autopsy event from the sleuthkit HostAddedEvent * indicating that hosts have been created. * * @param event The sleuthkit event for the creation of hosts. */ - @Subscribe - public void publishHostsAddedEvent(HostsCreationEvent event) { + @Subscribe + public void publishHostsAddedEvent(TskEvent.HostsAddedTskEvent event) { eventPublisher.publish(new HostsAddedEvent( event == null ? Collections.emptyList() : event.getHosts())); } @@ -543,9 +535,9 @@ public class Case { * indicating that hosts have been updated. * * @param event The sleuthkit event for the updating of hosts. - */ - @Subscribe - public void publishHostsChangedEvent(HostsUpdateEvent event) { + */ + @Subscribe + public void publishHostsChangedEvent(TskEvent.HostsChangedTskEvent event) { eventPublisher.publish(new HostsChangedEvent( event == null ? Collections.emptyList() : event.getHosts())); } @@ -555,33 +547,33 @@ public class Case { * indicating that hosts have been deleted. * * @param event The sleuthkit event for the deleting of hosts. - */ - @Subscribe - public void publishHostsDeletedEvent(HostsDeletionEvent event) { + */ + @Subscribe + public void publishHostsDeletedEvent(TskEvent.HostsDeletedTskEvent event) { eventPublisher.publish(new HostsRemovedEvent( event == null ? Collections.emptyList() : event.getHosts())); } /** - * Publishes an autopsy event from the sleuthkit PersonCreationEvent + * Publishes an autopsy event from the sleuthkit PersonAddedEvent * indicating that persons have been created. * * @param event The sleuthkit event for the creation of persons. */ - @Subscribe - public void publishPersonsAddedEvent(PersonsCreationEvent event) { + @Subscribe + public void publishPersonsAddedEvent(TskEvent.PersonsAddedTskEvent event) { eventPublisher.publish(new PersonsAddedEvent( event == null ? Collections.emptyList() : event.getPersons())); } /** - * Publishes an autopsy event from the sleuthkit PersonUpdateEvent + * Publishes an autopsy event from the sleuthkit PersonChangedEvent * indicating that persons have been updated. * * @param event The sleuthkit event for the updating of persons. - */ - @Subscribe - public void publishPersonsChangedEvent(PersonsUpdateEvent event) { + */ + @Subscribe + public void publishPersonsChangedEvent(TskEvent.PersonsChangedTskEvent event) { eventPublisher.publish(new PersonsChangedEvent( event == null ? Collections.emptyList() : event.getPersons())); } @@ -591,10 +583,10 @@ public class Case { * indicating that persons have been deleted. * * @param event The sleuthkit event for the deleting of persons. - */ - @Subscribe - public void publishPersonsDeletedEvent(PersonsDeletionEvent event) { - eventPublisher.publish(new PersonsRemovedEvent( + */ + @Subscribe + public void publishPersonsDeletedEvent(TskEvent.PersonsDeletedTskEvent event) { + eventPublisher.publish(new PersonsDeletedEvent( event == null ? Collections.emptyList() : event.getPersons())); } } @@ -1796,7 +1788,7 @@ public class Case { } public void notifyOsAccountRemoved(Long osAccountObjectId) { - eventPublisher.publish(new OsAccountRemovedEvent(osAccountObjectId)); + eventPublisher.publish(new OsAccountDeletedEvent(osAccountObjectId)); } /** @@ -1850,7 +1842,7 @@ public class Case { * @param person The person that has been deleted. */ public void notifyPersonDeleted(Person person) { - eventPublisher.publish(new PersonsRemovedEvent(Collections.singletonList(person))); + eventPublisher.publish(new PersonsDeletedEvent(Collections.singletonList(person))); } /** diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/events/HostsEvent.java b/Core/src/org/sleuthkit/autopsy/casemodule/events/HostsEvent.java index efa60c8b47..7c9a31f01e 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/events/HostsEvent.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/events/HostsEvent.java @@ -33,6 +33,8 @@ import org.sleuthkit.datamodel.TskCoreException; */ public class HostsEvent extends TskDataModelChangeEvent { + private static final long serialVersionUID = 1L; + /** * Retrieves a list of ids from a list of hosts. * diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/events/OsAccountRemovedEvent.java b/Core/src/org/sleuthkit/autopsy/casemodule/events/OsAccountDeletedEvent.java similarity index 90% rename from Core/src/org/sleuthkit/autopsy/casemodule/events/OsAccountRemovedEvent.java rename to Core/src/org/sleuthkit/autopsy/casemodule/events/OsAccountDeletedEvent.java index 4bf03c90d9..adc726fca8 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/events/OsAccountRemovedEvent.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/events/OsAccountDeletedEvent.java @@ -27,11 +27,11 @@ import org.sleuthkit.autopsy.events.AutopsyEvent; * oldValue will contain the objectId of the account that was removed. newValue * will be null. */ -public final class OsAccountRemovedEvent extends AutopsyEvent { +public final class OsAccountDeletedEvent extends AutopsyEvent { private static final long serialVersionUID = 1L; - public OsAccountRemovedEvent(Long osAccountObjectId) { + public OsAccountDeletedEvent(Long osAccountObjectId) { super(Case.Events.OS_ACCOUNT_REMOVED.toString(), osAccountObjectId, null); } } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/events/PersonsRemovedEvent.java b/Core/src/org/sleuthkit/autopsy/casemodule/events/PersonsDeletedEvent.java similarity index 90% rename from Core/src/org/sleuthkit/autopsy/casemodule/events/PersonsRemovedEvent.java rename to Core/src/org/sleuthkit/autopsy/casemodule/events/PersonsDeletedEvent.java index 522c841461..a63fef32cb 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/events/PersonsRemovedEvent.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/events/PersonsDeletedEvent.java @@ -25,7 +25,7 @@ import org.sleuthkit.datamodel.Person; /** * Event fired when persons are removed. */ -public class PersonsRemovedEvent extends PersonsEvent { +public class PersonsDeletedEvent extends PersonsEvent { private static final long serialVersionUID = 1L; @@ -33,7 +33,7 @@ public class PersonsRemovedEvent extends PersonsEvent { * Main constructor. * @param dataModelObjects The list of persons that have been deleted. */ - public PersonsRemovedEvent(List dataModelObjects) { + public PersonsDeletedEvent(List dataModelObjects) { super(Case.Events.PERSONS_DELETED.name(), dataModelObjects); } }