Go to the documentation of this file.
19package org.sleuthkit.autopsy.datamodel.persons;
21import java.awt.event.ActionEvent;
23import java.util.logging.Level;
24import javax.swing.AbstractAction;
25import javax.swing.JOptionPane;
26import org.apache.commons.collections.CollectionUtils;
27import org.openide.util.NbBundle.Messages;
28import org.openide.windows.WindowManager;
29import org.sleuthkit.autopsy.casemodule.Case;
30import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
31import org.sleuthkit.datamodel.TskCoreException;
32import org.sleuthkit.autopsy.coreutils.Logger;
33import org.sleuthkit.datamodel.Host;
34import org.sleuthkit.datamodel.Person;
40 "DeletePersonAction_menuTitle=Delete Person",
41 "DeletePersonAction_onError_title=Error Delete Host from Person",
43 "DeletePersonAction_onError_description=There was an error removing person: {0}.",})
56 super(Bundle.DeletePersonAction_menuTitle());
70 if (CollectionUtils.isNotEmpty(
hosts)) {
75 logger.log(Level.WARNING, String.format(
"Unable to fetch hosts belonging to person: %s",
person.getName() ==
null ?
"<null>" :
person.getName(), ex));
87 String personName = this.person ==
null || this.person.getName() ==
null ?
"" : this.person.getName();
88 logger.log(Level.WARNING, String.format(
"Unable to remove parent from host: %s", personName), ex);
90 JOptionPane.showMessageDialog(
91 WindowManager.getDefault().getMainWindow(),
92 Bundle.DeletePersonAction_onError_description(personName),
93 Bundle.DeletePersonAction_onError_title(),
94 JOptionPane.WARNING_MESSAGE);
SleuthkitCase getSleuthkitCase()
static Case getCurrentCaseThrows()
synchronized static Logger getLogger(String name)
DeletePersonAction(Person person)
void actionPerformed(ActionEvent e)
static final Logger logger
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.