Go to the documentation of this file.
19package org.sleuthkit.autopsy.datamodel.hosts;
21import java.awt.event.ActionEvent;
22import java.util.logging.Level;
23import javax.swing.AbstractAction;
24import javax.swing.JOptionPane;
25import javax.swing.SwingWorker;
26import org.openide.util.NbBundle;
27import org.openide.util.NbBundle.Messages;
28import org.openide.windows.WindowManager;
29import org.sleuthkit.autopsy.casemodule.Case;
30import org.sleuthkit.autopsy.coreutils.Logger;
31import org.sleuthkit.autopsy.progress.ModalDialogProgressIndicator;
32import org.sleuthkit.autopsy.progress.ProgressIndicator;
33import org.sleuthkit.datamodel.Host;
39 "MergeHostAction_onError_title=Error Merging Hosts",
40 "# {0} - sourceHostName",
41 "# {1} - destHostName",
42 "MergeHostAction_onError_description=There was an error merging host {0} into host {1}.",})
64 "MergeHostAction.progressIndicatorName=Merging Hosts",
65 "MergeHostAction.confirmTitle=Confirmation",
68 "MergeHostAction.confirmText=Are you sure you want to merge {0} into {1}?\nThis may include merging OS Accounts and cannot be undone.",
71 "MergeHostAction.progressText=Merging {0} into {1}..."
77 int response = JOptionPane.showConfirmDialog(
78 WindowManager.getDefault().getMainWindow(),
79 NbBundle.getMessage(
this.getClass(),
"MergeHostAction.confirmText",
sourceHost.getName(),
destHost.getName()),
80 NbBundle.getMessage(
this.getClass(),
"MergeHostAction.confirmTitle"),
81 JOptionPane.YES_NO_OPTION);
82 if (response == JOptionPane.NO_OPTION) {
87 Bundle.MergeHostAction_progressIndicatorName());
90 progressDialog.
start(NbBundle.getMessage(
this.getClass(),
"MergeHostAction.progressText",
sourceHost.getName(),
destHost.getName()));
116 "MergeHostAction.errorTitle=Error Merging Hosts",
117 "MergeHostAction.errorText=An error occurred while merging hosts.\nTry again in a few minutes or check the log for details."
124 }
catch (Exception ex) {
127 JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
128 NbBundle.getMessage(
this.getClass(),
"MergeHostAction.errorText"),
129 NbBundle.getMessage(
this.getClass(),
"MergeHostAction.errorTitle"),
130 JOptionPane.ERROR_MESSAGE);
SleuthkitCase getSleuthkitCase()
static Case getCurrentCaseThrows()
synchronized static Logger getLogger(String name)
final ProgressIndicator progress
MergeHostsBackgroundTask(Host sourceHost, Host destHost, ProgressIndicator progress)
static final Logger logger
void actionPerformed(ActionEvent e)
MergeHostAction(Host sourceHost, Host destHost)
synchronized void start(String message, int totalWorkUnits)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.