19 package org.sleuthkit.autopsy.datamodel.hosts;
 
   21 import java.awt.Frame;
 
   22 import java.awt.event.ActionEvent;
 
   23 import java.util.Collections;
 
   24 import java.util.logging.Level;
 
   25 import javax.swing.AbstractAction;
 
   26 import javax.swing.JOptionPane;
 
   27 import org.apache.commons.lang.StringUtils;
 
   28 import org.openide.util.NbBundle.Messages;
 
   29 import org.openide.windows.WindowManager;
 
   42     "AssociateNewPersonAction_menuTitle=New Person...",
 
   43     "AssociateNewPersonAction_onError_title=Error While Associating New Person",
 
   46     "AssociateNewPersonAction_onError_description=There was an error while associating host {0} with new person {1}."})
 
   59         super(Bundle.AssociateNewPersonAction_menuTitle());
 
   65         String newPersonName = 
"";
 
   67             newPersonName = getAddDialogName();
 
   68             if (StringUtils.isNotBlank(newPersonName)) {
 
   73             String hostName = this.host == null || this.host.
getName() == null ? 
"" : this.host.
getName();
 
   74             logger.log(Level.WARNING, String.format(
"Unable to remove parent from host: %s", hostName), ex);
 
   76             JOptionPane.showMessageDialog(
 
   77                     WindowManager.getDefault().getMainWindow(),
 
   78                     Bundle.AssociateNewPersonAction_onError_description(hostName, newPersonName),
 
   79                     Bundle.AssociateNewPersonAction_onError_title(),
 
   80                     JOptionPane.WARNING_MESSAGE);
 
   93         Frame parent = WindowManager.getDefault().getMainWindow();
 
  101         addEditDialog.setResizable(
false);
 
  102         addEditDialog.setLocationRelativeTo(parent);
 
  103         addEditDialog.setVisible(
true);
 
  104         addEditDialog.toFront();
 
  107             String newHostName = addEditDialog.
getValue();
 
List< Person > getPersons()
AssociateNewPersonAction(Host host)
PersonManager getPersonManager()
Person newPerson(String name)
SleuthkitCase getSleuthkitCase()
String getAddDialogName()
synchronized static Logger getLogger(String name)
static Case getCurrentCaseThrows()
void actionPerformed(ActionEvent e)
void addHostsToPerson(Person person, List< Host > hosts)