19 package org.sleuthkit.autopsy.casemodule.events;
21 import java.io.Serializable;
22 import java.util.Collections;
23 import java.util.List;
24 import java.util.logging.Level;
35 abstract class TagAddedEvent<T
extends Tag, V extends DeletedTagInfo<T>> extends AutopsyEvent implements Serializable {
37 private static final long serialVersionUID = 1L;
43 private transient T tag;
45 private List<V> deletedTagInfoList;
51 private final Long tagID;
53 TagAddedEvent(String propertyName, T addedTag) {
54 this(propertyName, addedTag, null);
65 TagAddedEvent(String propertyName, T addedTag, List<V> deletedTagInfoList) {
66 super(propertyName, deletedTagInfoList, null);
68 tagID = addedTag.getId();
69 this.deletedTagInfoList = deletedTagInfoList;
86 public T getAddedTag() {
91 public T getNewValue() {
106 }
catch (NoCurrentCaseException | TskCoreException ex) {
107 Logger.getLogger(TagAddedEvent.class.getName()).log(Level.SEVERE,
"Error doing lazy load for remote event", ex);
118 public List<V> getDeletedTags() {
119 return deletedTagInfoList != null ? Collections.unmodifiableList(deletedTagInfoList) : null;
123 public Object getOldValue() {
124 return getDeletedTags();
138 abstract T getTagByID() throws NoCurrentCaseException, TskCoreException;