19 package org.sleuthkit.autopsy.commonpropertiessearch;
 
   21 import java.awt.event.ActionEvent;
 
   22 import java.util.concurrent.ExecutionException;
 
   23 import java.util.logging.Level;
 
   24 import javax.swing.SwingWorker;
 
   25 import org.openide.DialogDisplayer;
 
   26 import org.openide.NotifyDescriptor;
 
   27 import org.openide.util.HelpCtx;
 
   28 import org.openide.util.NbBundle;
 
   29 import org.openide.util.actions.CallableSystemAction;
 
   50         if (instance == null) {
 
   62         this.setEnabled(
false);
 
   84         "CommonAttributeSearchAction.openPanel.intro=The find common properties feature is not available because:",
 
   85         "CommonAttributeSearchAction.openPanel.resolution=\n\nAddress one of these issues to enable this feature.",
 
   86         "CommonAttributeSearchAction.openPanel.noCaseOpen=\n  - No case is open.",
 
   87         "CommonAttributeSearchAction.openPanel.notEnoughDataSources=\n  - There are not multiple data sources in the current case.",
 
   88         "CommonAttributeSearchAction.openPanel.centralRepoDisabled=\n  - The Central Repository is disabled.",
 
   89         "CommonAttributeSearchAction.openPanel.caseNotInCentralRepo=\n  - The current case is not in the Central Repository.",
 
   90         "CommonAttributeSearchAction.openPanel.notEnoughCases=\n  - Fewer than 2 cases exist in the Central Repository.",
 
   91         "CommonAttributeSearchAction.openPanel.centralRepoInvalid=\n  - The Central Repository configuration is invalid."})
 
   93         new SwingWorker<Boolean, Void>() {
 
   95             String reason = Bundle.CommonAttributeSearchAction_openPanel_intro();
 
   98             protected Boolean doInBackground() 
throws Exception {
 
  101                     reason += Bundle.CommonAttributeSearchAction_openPanel_noCaseOpen();
 
  108                     reason += Bundle.CommonAttributeSearchAction_openPanel_notEnoughDataSources();
 
  111                     reason += Bundle.CommonAttributeSearchAction_openPanel_centralRepoDisabled();
 
  115                     reason += Bundle.CommonAttributeSearchAction_openPanel_centralRepoInvalid();
 
  119                     reason += Bundle.CommonAttributeSearchAction_openPanel_notEnoughCases();
 
  123                     reason += Bundle.CommonAttributeSearchAction_openPanel_caseNotInCentralRepo();
 
  131             protected void done() {
 
  134                     boolean openPanel = 
get();
 
  136                         CommonAttributePanel commonAttributePanel = 
new CommonAttributePanel();
 
  138                         commonAttributePanel.observeSubPanels();
 
  139                         commonAttributePanel.setVisible(
true);
 
  141                         reason += Bundle.CommonAttributeSearchAction_openPanel_resolution();
 
  142                         NotifyDescriptor descriptor = 
new NotifyDescriptor.Message(reason, NotifyDescriptor.INFORMATION_MESSAGE);
 
  143                         DialogDisplayer.getDefault().notify(descriptor);
 
  145                 } 
catch (InterruptedException | ExecutionException ex) {
 
  146                     LOGGER.log(Level.SEVERE, 
"Unexpected exception while opening Find Common Properties", ex); 
 
  154         "CommonAttributeSearchAction.getName.text=Find Common Properties"})
 
  157         return Bundle.CommonAttributeSearchAction_getName_text();
 
  162         return HelpCtx.DEFAULT_HELP;
 
List< Content > getDataSources()
static CommonAttributeSearchAction instance
void createAndShowPanel()
CommonAttributeSearchAction()
static final long serialVersionUID
static final Logger LOGGER
static EamDb getInstance()
static boolean isEnabled()
static synchronized CommonAttributeSearchAction getDefault()
CorrelationCase getCase(Case autopsyCase)
static Case getCurrentCase()
synchronized static Logger getLogger(String name)
void actionPerformed(ActionEvent event)
static boolean isCaseOpen()
List< CorrelationCase > getCases()