19package org.sleuthkit.autopsy.casemodule.events;
21import java.util.ArrayList;
22import java.util.Collections;
24import java.util.function.Function;
25import java.util.logging.Level;
26import java.util.stream.Collectors;
27import org.sleuthkit.autopsy.casemodule.Case;
28import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
29import org.sleuthkit.autopsy.coreutils.Logger;
30import org.sleuthkit.autopsy.events.AutopsyEvent;
31import org.sleuthkit.datamodel.SleuthkitCase;
32import org.sleuthkit.datamodel.TskCoreException;
92 super(eventName,
null,
null);
94 this.oldValueObjects =
new ArrayList<>();
98 .map(o -> oldValueGetIdMethod.apply(o))
99 .collect(Collectors.toList()));
105 this.newValueObjects =
new ArrayList<>();
109 .map(o -> newValueGetIdMethod.apply(o))
110 .collect(Collectors.toList()));
132 logger.log(Level.SEVERE, String.format(
"Error getting oldValue() TSK Data Model objects for %s event (%s)", getPropertyName(),
getSourceType()), ex);
133 return Collections.emptyList();
138 return Collections.emptyList();
157 logger.log(Level.SEVERE, String.format(
"Error getting newValue() TSK Data Model objects for %s event (%s)", getPropertyName(),
getSourceType()), ex);
158 return Collections.emptyList();
163 return Collections.emptyList();
183 return Collections.emptyList();
202 return Collections.emptyList();
SleuthkitCase getSleuthkitCase()
static Case getCurrentCaseThrows()
List< T > getOldValueObjects(SleuthkitCase caseDb, List< Long > ids)
TskDataModelChangedEvent(String eventName, List< T > oldValueObjects, Function< T, Long > oldValueGetIdMethod, List< U > newValueObjects, Function< U, Long > newValueGetIdMethod)
transient List< T > oldValueObjects
final List< Long > oldValueIds
transient List< U > newValueObjects
final boolean hasNewValue
static final Logger logger
final boolean hasOldValue
final List< Long > newValueIds
List< U > getNewValueObjects(SleuthkitCase caseDb, List< Long > ids)
static final long serialVersionUID
synchronized static Logger getLogger(String name)
SourceType getSourceType()
AutopsyEvent(String eventName, Object oldValue, Object newValue)