mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
Merge remote-tracking branch 'upstream/develop' into smarterDiffing
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -53,6 +53,8 @@ genfiles.properties
|
||||
!/test/output/gold
|
||||
/test/output/gold/tmp
|
||||
/test/script/ScriptLog.txt
|
||||
/test/script/__pycache__/
|
||||
/test/script/*.pyc
|
||||
/test/build/
|
||||
/test/dist/
|
||||
/test/nbproject/*
|
||||
|
||||
@@ -13,4 +13,5 @@ FileManager.addLocalDirInt.exception.notReadable.msg=Attempted to add a local di
|
||||
FileManager.addLocalDirInt2.exception.closed.msg=Attempted to use FileManager after it was closed.
|
||||
TagsManager.addContentTag.exception.beginByteOffsetOOR.msg=beginByteOffset \= {0} out of content size range (0 - {1})
|
||||
TagsManager.addContentTag.exception.endByteOffsetOOR.msg=endByteOffset \= {0} out of content size range (0 - {1})
|
||||
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
|
||||
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
|
||||
TagsManager.predefTagNames.bookmark.text=Bookmark
|
||||
@@ -13,4 +13,5 @@ FileManager.addLocalDirInt.exception.notReadable.msg=\u8AAD\u307F\u53D6\u308A\u3
|
||||
FileManager.addLocalDirInt2.exception.closed.msg=FileManager\u3092\u9589\u3058\u305F\u5F8C\u306B\u4F7F\u7528\u3092\u8A66\u307F\u307E\u3057\u305F\u3002
|
||||
TagsManager.addContentTag.exception.beginByteOffsetOOR.msg=beginByteOffset \= {0} \u30B3\u30F3\u30C6\u30F3\u30C4\u30B5\u30A4\u30BA\u7BC4\u56F2(0 - {1})\u306E\u5916\u3067\u3059
|
||||
TagsManager.addContentTag.exception.endByteOffsetOOR.msg=endByteOffset \= {0} \u30B3\u30F3\u30C6\u30F3\u30C4\u30B5\u30A4\u30BA\u7BC4\u56F2(0 - {1})\u306E\u5916\u3067\u3059
|
||||
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
|
||||
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
|
||||
TagsManager.predefTagNames.bookmark.text=\u30D6\u30C3\u30AF\u30DE\u30FC\u30AF
|
||||
@@ -443,9 +443,10 @@ public class TagsManager implements Closeable {
|
||||
}
|
||||
|
||||
private void getPredefinedTagNames() {
|
||||
if (!uniqueTagNames.containsKey("Bookmark")) {
|
||||
if (!uniqueTagNames.containsKey(NbBundle.getMessage(this.getClass(), "TagsManager.predefTagNames.bookmark.text"))) {
|
||||
try {
|
||||
TagName tagName = tskCase.addTagName("Bookmark", "", TagName.HTML_COLOR.NONE);
|
||||
TagName tagName = tskCase.addTagName(
|
||||
NbBundle.getMessage(this.getClass(), "TagsManager.predefTagNames.bookmark.text"), "", TagName.HTML_COLOR.NONE);
|
||||
uniqueTagNames.put(tagName.getDisplayName(), tagName);
|
||||
}
|
||||
catch (TskCoreException ex) {
|
||||
|
||||
@@ -93,7 +93,7 @@ public class AboutWindowPanel extends JPanel implements HyperlinkListener {
|
||||
jScrollPane3.setBorder(null);
|
||||
|
||||
copyright.setBorder(null);
|
||||
copyright.setContentType("text/html"); // NOI18N
|
||||
copyright.setContentType("text/html"); // NOI18N NON-NLS
|
||||
copyright.setEditable(false);
|
||||
copyright.setText(org.openide.util.NbBundle.getBundle(AboutWindowPanel.class).getString("LBL_Copyright")); // NOI18N
|
||||
copyright.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
@@ -103,7 +103,7 @@ public class AboutWindowPanel extends JPanel implements HyperlinkListener {
|
||||
});
|
||||
jScrollPane3.setViewportView(copyright);
|
||||
|
||||
description.setContentType("text/html"); // NOI18N
|
||||
description.setContentType("text/html"); // NOI18N NON-NLS
|
||||
description.setEditable(false);
|
||||
jScrollPane2.setViewportView(description);
|
||||
|
||||
@@ -208,7 +208,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
private void showUrl() {
|
||||
if (url != null) {
|
||||
org.openide.awt.StatusDisplayer.getDefault().setStatusText(
|
||||
NbBundle.getBundle(HTMLViewAction.class).getString("CTL_OpeningBrowser"));
|
||||
NbBundle.getBundle(HTMLViewAction.class).getString("CTL_OpeningBrowser")); //NON-NLS
|
||||
HtmlBrowser.URLDisplayer.getDefault().showURL(url);
|
||||
}
|
||||
}
|
||||
@@ -219,25 +219,25 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
|
||||
private static String getProductVersionValue() {
|
||||
return MessageFormat.format(
|
||||
NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion"),
|
||||
NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion"), //NON-NLS
|
||||
new Object[]{System.getProperty("netbeans.buildnumber")});
|
||||
}
|
||||
|
||||
private static String getOperatingSystemValue() {
|
||||
return NbBundle.getMessage(AboutWindowPanel.class, "Format_OperatingSystem_Value",
|
||||
System.getProperty("os.name",
|
||||
System.getProperty("os.name", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text")),
|
||||
System.getProperty("os.version",
|
||||
System.getProperty("os.version", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text")),
|
||||
System.getProperty("os.arch",
|
||||
System.getProperty("os.arch", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text")));
|
||||
}
|
||||
|
||||
private static String getJavaValue() {
|
||||
return System.getProperty("java.version",
|
||||
return System.getProperty("java.version", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text"));
|
||||
}
|
||||
@@ -245,10 +245,10 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
private static String getVMValue() {
|
||||
return NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.getVMValue.text",
|
||||
System.getProperty("java.vm.name",
|
||||
System.getProperty("java.vm.name", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text")),
|
||||
System.getProperty("java.vm.version", ""));
|
||||
System.getProperty("java.vm.version", "")); //NON-NLS
|
||||
}
|
||||
|
||||
private static String getSystemLocaleValue() {
|
||||
@@ -261,7 +261,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
}
|
||||
|
||||
private static String getEncodingValue() {
|
||||
return System.getProperty("file.encoding",
|
||||
return System.getProperty("file.encoding", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class, "ProductInformationPanel.propertyUnknown.text"));
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
*/
|
||||
public void startVerboseLogging() {
|
||||
verboseLogging = true;
|
||||
String logPath = PlatformUtil.getUserDirectory() + File.separator + "sleuthkit.txt";
|
||||
String logPath = PlatformUtil.getUserDirectory() + File.separator + "sleuthkit.txt"; //NON-NLS
|
||||
|
||||
SleuthkitJNI.startVerboseLogging(logPath);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
try {
|
||||
this.em.setSelectedNodes(selected);
|
||||
} catch (PropertyVetoException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't set selected nodes.", ex);
|
||||
logger.log(Level.WARNING, "Couldn't set selected nodes.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
try {
|
||||
path = content.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for {0}", content);
|
||||
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for {0}", content); //NON-NLS
|
||||
}
|
||||
setName(path);
|
||||
} else {
|
||||
@@ -164,7 +164,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
// get the preference for the preferred viewer
|
||||
Preferences pref = NbPreferences.forModule(GeneralPanel.class);
|
||||
boolean keepCurrentViewer = pref.getBoolean("keepPreferredViewer", false);
|
||||
boolean keepCurrentViewer = pref.getBoolean("keepPreferredViewer", false); //NON-NLS
|
||||
|
||||
int currTabIndex = jTabbedPane1.getSelectedIndex();
|
||||
int totalTabs = jTabbedPane1.getTabCount();
|
||||
|
||||
@@ -52,7 +52,7 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
||||
|
||||
// contains a list of the undocked TCs
|
||||
private static ArrayList<DataContentTopComponent> newWindowList = new ArrayList<DataContentTopComponent>();
|
||||
private static final String PREFERRED_ID = "DataContentTopComponent";
|
||||
private static final String PREFERRED_ID = "DataContentTopComponent"; //NON-NLS
|
||||
private static final String DEFAULT_NAME = NbBundle.getMessage(DataContentTopComponent.class, "CTL_DataContentTopComponent");
|
||||
private static final String TOOLTIP_TEXT = NbBundle.getMessage(DataContentTopComponent.class, "HINT_DataContentTopComponent");
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
||||
add(dataContentPanel);
|
||||
|
||||
putClientProperty(TopComponent.PROP_CLOSING_DISABLED, Boolean.valueOf(isDefault)); // prevent option to close compoment in GUI
|
||||
logger.log(Level.INFO, "Created DataContentTopComponent instance: " + this);
|
||||
logger.log(Level.INFO, "Created DataContentTopComponent instance: " + this); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,15 +119,15 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
||||
public static synchronized DataContentTopComponent findInstance() {
|
||||
TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
|
||||
if (win == null) {
|
||||
logger.warning("Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system.");
|
||||
logger.warning("Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system."); //NON-NLS
|
||||
return getDefault();
|
||||
}
|
||||
if (win instanceof DataContentTopComponent) {
|
||||
return (DataContentTopComponent) win;
|
||||
}
|
||||
logger.warning(
|
||||
"There seem to be multiple components with the '" + PREFERRED_ID
|
||||
+ "' ID. That is a potential source of errors and unexpected behavior.");
|
||||
"There seem to be multiple components with the '" + PREFERRED_ID //NON-NLS
|
||||
+ "' ID. That is a potential source of errors and unexpected behavior."); //NON-NLS
|
||||
return getDefault();
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
jPanel1.setPreferredSize(new java.awt.Dimension(622, 424));
|
||||
|
||||
outputViewPane.setEditable(false);
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N NON-NLS
|
||||
outputViewPane.setPreferredSize(new java.awt.Dimension(700, 400));
|
||||
jScrollPane1.setViewportView(outputViewPane);
|
||||
|
||||
@@ -124,14 +124,14 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
|
||||
pageLabel.setPreferredSize(new java.awt.Dimension(33, 14));
|
||||
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.nextPageButton.text")); // NOI18N
|
||||
nextPageButton.setBorderPainted(false);
|
||||
nextPageButton.setContentAreaFilled(false);
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
nextPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
nextPageButtonActionPerformed(evt);
|
||||
@@ -143,14 +143,14 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14));
|
||||
pageLabel2.setPreferredSize(new java.awt.Dimension(29, 14));
|
||||
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.prevPageButton.text")); // NOI18N
|
||||
prevPageButton.setBorderPainted(false);
|
||||
prevPageButton.setContentAreaFilled(false);
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
prevPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
prevPageButtonActionPerformed(evt);
|
||||
@@ -325,7 +325,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
return content.getAllArtifactsCount() > 0;
|
||||
}
|
||||
catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get count of BlackboardArtifacts for content", ex);
|
||||
logger.log(Level.WARNING, "Couldn't get count of BlackboardArtifacts for content", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -450,7 +450,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
artifacts = content.getAllArtifacts();
|
||||
}
|
||||
catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get artifacts", ex);
|
||||
logger.log(Level.WARNING, "Couldn't get artifacts", ex); //NON-NLS
|
||||
return new ViewUpdate(getArtifactContentStrings().size(), currentPage, ERROR_TEXT);
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
}
|
||||
}
|
||||
catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get associated artifact to display in Content Viewer.", ex);
|
||||
logger.log(Level.WARNING, "Couldn't get associated artifact to display in Content Viewer.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
}
|
||||
}
|
||||
catch (InterruptedException | ExecutionException ex) {
|
||||
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex);
|
||||
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -577,7 +577,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
}
|
||||
}
|
||||
catch (InterruptedException | ExecutionException ex) {
|
||||
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex);
|
||||
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
this.resetComponent();
|
||||
logger.log(Level.INFO, "Created HexView instance: " + this);
|
||||
logger.log(Level.INFO, "Created HexView instance: " + this); //NON-NLS
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
@@ -114,7 +114,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
jScrollPane1.setBackground(new java.awt.Color(255, 255, 255));
|
||||
|
||||
outputViewPane.setEditable(false);
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N NON-NLS
|
||||
outputViewPane.setMinimumSize(new java.awt.Dimension(700, 20));
|
||||
outputViewPane.setPreferredSize(new java.awt.Dimension(700, 400));
|
||||
jScrollPane1.setViewportView(outputViewPane);
|
||||
@@ -133,28 +133,28 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
|
||||
pageLabel.setPreferredSize(new java.awt.Dimension(33, 14));
|
||||
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerHex.class, "DataContentViewerHex.prevPageButton.text")); // NOI18N
|
||||
prevPageButton.setBorderPainted(false);
|
||||
prevPageButton.setContentAreaFilled(false);
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
prevPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
prevPageButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerHex.class, "DataContentViewerHex.nextPageButton.text")); // NOI18N
|
||||
nextPageButton.setBorderPainted(false);
|
||||
nextPageButton.setContentAreaFilled(false);
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
nextPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
nextPageButtonActionPerformed(evt);
|
||||
@@ -318,7 +318,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
} catch (TskException ex) {
|
||||
errorText = NbBundle.getMessage(this.getClass(), "DataContentViewerHex.setDataView.errorText", offset,
|
||||
offset + pageLength);
|
||||
logger.log(Level.WARNING, "Error while trying to show the hex content.", ex);
|
||||
logger.log(Level.WARNING, "Error while trying to show the hex content.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
|
||||
})
|
||||
public class DataContentViewerMedia extends javax.swing.JPanel implements DataContentViewer {
|
||||
|
||||
private static final String[] AUDIO_EXTENSIONS = new String[]{".mp3", ".wav", ".wma"};
|
||||
private static final String[] AUDIO_EXTENSIONS = new String[]{".mp3", ".wav", ".wma"}; //NON-NLS
|
||||
private static final Logger logger = Logger.getLogger(DataContentViewerMedia.class.getName());
|
||||
private AbstractFile lastFile;
|
||||
//UI
|
||||
@@ -58,8 +58,8 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
private final MediaViewImagePanel imagePanel;
|
||||
private boolean videoPanelInited;
|
||||
private boolean imagePanelInited;
|
||||
private static final String IMAGE_VIEWER_LAYER = "IMAGE";
|
||||
private static final String VIDEO_VIEWER_LAYER = "VIDEO";
|
||||
private static final String IMAGE_VIEWER_LAYER = "IMAGE"; //NON-NLS
|
||||
private static final String VIDEO_VIEWER_LAYER = "VIDEO"; //NON-NLS
|
||||
|
||||
/**
|
||||
* Creates new form DataContentViewerVideo
|
||||
@@ -78,7 +78,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
videoExtensions = videoPanel.getExtensions();
|
||||
supportedMimes = videoPanel.getMimeTypes();
|
||||
customizeComponents();
|
||||
logger.log(Level.INFO, "Created MediaView instance: " + this);
|
||||
logger.log(Level.INFO, "Created MediaView instance: " + this); //NON-NLS
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
@@ -136,7 +136,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
lastFile = file;
|
||||
|
||||
final Dimension dims = DataContentViewerMedia.this.getSize();
|
||||
logger.info("setting node on media viewer");
|
||||
logger.info("setting node on media viewer"); //NON-NLS
|
||||
if (imagePanelInited && containsExt(file.getName(), imageExtensions)) {
|
||||
imagePanel.showImageFx(file, dims);
|
||||
this.switchPanels(false);
|
||||
@@ -152,7 +152,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Exception while setting node", e);
|
||||
logger.log(Level.SEVERE, "Exception while setting node", e); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
this.resetComponent();
|
||||
logger.log(Level.INFO, "Created StringView instance: " + this);
|
||||
logger.log(Level.INFO, "Created StringView instance: " + this); //NON-NLS
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
@@ -130,7 +130,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
jPanel1.setPreferredSize(new java.awt.Dimension(502, 424));
|
||||
|
||||
outputViewPane.setEditable(false);
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N NON-NLS NON-NLS
|
||||
outputViewPane.setPreferredSize(new java.awt.Dimension(700, 400));
|
||||
jScrollPane1.setViewportView(outputViewPane);
|
||||
|
||||
@@ -148,14 +148,14 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
|
||||
pageLabel.setPreferredSize(new java.awt.Dimension(33, 14));
|
||||
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.nextPageButton.text")); // NOI18N
|
||||
nextPageButton.setBorderPainted(false);
|
||||
nextPageButton.setContentAreaFilled(false);
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
nextPageButton.setPreferredSize(new java.awt.Dimension(55, 23));
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
nextPageButtonActionPerformed(evt);
|
||||
@@ -167,14 +167,14 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14));
|
||||
pageLabel2.setPreferredSize(new java.awt.Dimension(29, 14));
|
||||
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.prevPageButton.text")); // NOI18N
|
||||
prevPageButton.setBorderPainted(false);
|
||||
prevPageButton.setContentAreaFilled(false);
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
prevPageButton.setPreferredSize(new java.awt.Dimension(55, 23));
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
prevPageButtonActionPerformed(evt);
|
||||
@@ -356,7 +356,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
text = NbBundle.getMessage(this.getClass(),
|
||||
"DataContentViewerString.setDataView.errorText", currentOffset,
|
||||
currentOffset + pageLength);
|
||||
logger.log(Level.WARNING, "Error while trying to show the String content.", ex);
|
||||
logger.log(Level.WARNING, "Error while trying to show the String content.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -348,8 +348,8 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
|
||||
@Override
|
||||
public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
if (pcs == null) {
|
||||
logger.log(Level.WARNING, "Could not add listener to DataResultPanel, "
|
||||
+ "listener support not fully initialized yet, listener: " + listener.toString() );
|
||||
logger.log(Level.WARNING, "Could not add listener to DataResultPanel, " //NON-NLS
|
||||
+ "listener support not fully initialized yet, listener: " + listener.toString() ); //NON-NLS
|
||||
}
|
||||
else {
|
||||
this.pcs.addPropertyChangeListener(listener);
|
||||
|
||||
@@ -239,15 +239,15 @@ public class DataResultTopComponent extends TopComponent implements DataResult,
|
||||
//putClientProperty("TopComponentAllowDockAnywhere", Boolean.TRUE);
|
||||
Mode mode = WindowManager.getDefault().findMode(customModeName);
|
||||
if (mode != null) {
|
||||
StringBuilder message = new StringBuilder("Found custom mode, setting: ");
|
||||
StringBuilder message = new StringBuilder("Found custom mode, setting: "); //NON-NLS
|
||||
message.append(customModeName);
|
||||
logger.log(Level.INFO, message.toString());
|
||||
mode.dockInto(this);
|
||||
|
||||
} else {
|
||||
StringBuilder message = new StringBuilder("Could not find mode: ");
|
||||
StringBuilder message = new StringBuilder("Could not find mode: "); //NON-NLS
|
||||
message.append(customModeName);
|
||||
message.append(", will dock into the default one");
|
||||
message.append(", will dock into the default one"); //NON-NLS
|
||||
logger.log(Level.WARNING, message.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,15 +320,15 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
//First property column is sortable, but also sorted initially, so
|
||||
//initially this one will have the arrow icon:
|
||||
if (props.size() > 0) {
|
||||
props.get(0).setValue("TreeColumnTTV", Boolean.TRUE); // Identifies special property representing first (tree) column.
|
||||
props.get(0).setValue("SortingColumnTTV", Boolean.TRUE); // TreeTableView should be initially sorted by this property column.
|
||||
props.get(0).setValue("TreeColumnTTV", Boolean.TRUE); // Identifies special property representing first (tree) column. NON-NLS
|
||||
props.get(0).setValue("SortingColumnTTV", Boolean.TRUE); // TreeTableView should be initially sorted by this property column. NON-NLS
|
||||
}
|
||||
|
||||
// The rest of the columns are sortable, but not initially sorted,
|
||||
// so initially will have no arrow icon:
|
||||
String[] propStrings = new String[props.size() * 2];
|
||||
for (int i = 0; i < props.size(); i++) {
|
||||
props.get(i).setValue("ComparableColumnTTV", Boolean.TRUE);
|
||||
props.get(i).setValue("ComparableColumnTTV", Boolean.TRUE); //NON-NLS
|
||||
propStrings[2 * i] = props.get(i).getName();
|
||||
propStrings[2 * i + 1] = props.get(i).getDisplayName();
|
||||
}
|
||||
@@ -414,7 +414,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
try {
|
||||
rowValues[rowCount][j] = properties[j].getValue();
|
||||
} catch (IllegalAccessException | InvocationTargetException ignore) {
|
||||
rowValues[rowCount][j] = "n/a";
|
||||
rowValues[rowCount][j] = "n/a"; //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,25 +129,25 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
pagesLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagesLabel.text")); // NOI18N
|
||||
|
||||
pagePrevButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
|
||||
pagePrevButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
pagePrevButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagePrevButton.text")); // NOI18N
|
||||
pagePrevButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
|
||||
pagePrevButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
|
||||
pagePrevButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
pagePrevButton.setPreferredSize(new java.awt.Dimension(55, 23));
|
||||
pagePrevButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
|
||||
pagePrevButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
pagePrevButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
pagePrevButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
|
||||
pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
|
||||
pageNextButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pageNextButton.text")); // NOI18N
|
||||
pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
|
||||
pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
|
||||
pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
pageNextButton.setMaximumSize(new java.awt.Dimension(27, 23));
|
||||
pageNextButton.setMinimumSize(new java.awt.Dimension(27, 23));
|
||||
pageNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
|
||||
pageNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
|
||||
pageNextButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
pageNextButtonActionPerformed(evt);
|
||||
@@ -446,7 +446,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
ex.getMessage()),
|
||||
NotifyDescriptor.ERROR_MESSAGE);
|
||||
DialogDisplayer.getDefault().notify(d);
|
||||
logger.log(Level.SEVERE, "Error making thumbnails: " + ex.getMessage());
|
||||
logger.log(Level.SEVERE, "Error making thumbnails: " + ex.getMessage()); //NON-NLS
|
||||
} // catch and ignore if we were cancelled
|
||||
catch (java.util.concurrent.CancellationException ex) {
|
||||
}
|
||||
@@ -581,7 +581,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
filePathLabel.setToolTipText(uPath);
|
||||
}
|
||||
catch (TskCoreException e){
|
||||
logger.log(Level.WARNING, "Could not get unique path for content: {0}", af.getName());
|
||||
logger.log(Level.WARNING, "Could not get unique path for content: {0}", af.getName()); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ import org.sleuthkit.autopsy.core.Installer;
|
||||
})
|
||||
public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".mpg", ".mpeg"};
|
||||
static private final List<String> supportedMimes = Arrays.asList("audio/x-aiff", "video/x-javafx", "video/x-flv", "application/vnd.apple.mpegurl", " audio/mpegurl", "audio/mpeg", "video/mp4","audio/x-m4a","video/x-m4v","audio/x-wav");
|
||||
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".mpg", ".mpeg"}; //NON-NLS
|
||||
static private final List<String> supportedMimes = Arrays.asList("audio/x-aiff", "video/x-javafx", "video/x-flv", "application/vnd.apple.mpegurl", " audio/mpegurl", "audio/mpeg", "video/mp4","audio/x-m4a","video/x-m4v","audio/x-wav"); //NON-NLS
|
||||
|
||||
private static final Logger logger = Logger.getLogger(MediaViewVideoPanel.class.getName());
|
||||
private boolean fxInited = false;
|
||||
@@ -152,7 +152,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
path = file.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Cannot get unique path of video file");
|
||||
logger.log(Level.SEVERE, "Cannot get unique path of video file"); //NON-NLS
|
||||
}
|
||||
mediaPane.setInfoLabelText(path);
|
||||
mediaPane.setInfoLabelToolTipText(path);
|
||||
@@ -260,9 +260,9 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
extractedBytes = ContentUtils.writeToFile(sFile, jFile, progress, this, true);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Error buffering file", ex);
|
||||
logger.log(Level.WARNING, "Error buffering file", ex); //NON-NLS
|
||||
}
|
||||
logger.log(Level.INFO, "Done buffering: " + jFile.getName());
|
||||
logger.log(Level.INFO, "Done buffering: " + jFile.getName()); //NON-NLS
|
||||
success = true;
|
||||
return null;
|
||||
}
|
||||
@@ -273,15 +273,15 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
super.get(); //block and get all exceptions thrown while doInBackground()
|
||||
} catch (CancellationException ex) {
|
||||
logger.log(Level.INFO, "Media buffering was canceled.");
|
||||
logger.log(Level.INFO, "Media buffering was canceled."); //NON-NLS
|
||||
} catch (InterruptedException ex) {
|
||||
logger.log(Level.INFO, "Media buffering was interrupted.");
|
||||
logger.log(Level.INFO, "Media buffering was interrupted."); //NON-NLS
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex);
|
||||
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex); //NON-NLS
|
||||
} finally {
|
||||
progress.finish();
|
||||
if (!this.isCancelled()) {
|
||||
logger.log(Level.INFO, "ExtractMedia in done: " + jFile.getName());
|
||||
logger.log(Level.INFO, "ExtractMedia in done: " + jFile.getName()); //NON-NLS
|
||||
try {
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
@@ -290,7 +290,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
}
|
||||
});
|
||||
} catch(MediaException e) {
|
||||
logger.log(Level.WARNING, "something went wrong with javafx", e);
|
||||
logger.log(Level.WARNING, "something went wrong with javafx", e); //NON-NLS
|
||||
reset();
|
||||
mediaPane.setInfoLabelText(e.getMessage());
|
||||
return;
|
||||
@@ -326,7 +326,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
private int totalHours;
|
||||
private int totalMinutes;
|
||||
private int totalSeconds;
|
||||
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d ";
|
||||
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d "; //NON-NLS
|
||||
|
||||
/** The EventHandler for MediaPlayer.onReady(). **/
|
||||
private final ReadyListener READY_LISTENER = new ReadyListener();
|
||||
@@ -347,12 +347,12 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private static final String PAUSE_TEXT = "||";
|
||||
|
||||
private static final String STOP_TEXT = "X";
|
||||
private static final String STOP_TEXT = "X"; //NON-NLS
|
||||
|
||||
public MediaPane() {
|
||||
// Video Display
|
||||
mediaViewPane = new HBox();
|
||||
mediaViewPane.setStyle("-fx-background-color: black");
|
||||
mediaViewPane.setStyle("-fx-background-color: black"); //NON-NLS
|
||||
mediaViewPane.setAlignment(Pos.CENTER);
|
||||
mediaView = new MediaView();
|
||||
mediaViewPane.getChildren().add(mediaView);
|
||||
@@ -381,7 +381,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
mediaTools.getChildren().add(progressLabel);
|
||||
|
||||
controlPanel.getChildren().add(mediaTools);
|
||||
controlPanel.setStyle("-fx-background-color: white");
|
||||
controlPanel.setStyle("-fx-background-color: white"); //NON-NLS
|
||||
infoLabel = new Label("");
|
||||
controlPanel.getChildren().add(infoLabel);
|
||||
setBottom(controlPanel);
|
||||
@@ -426,7 +426,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
* @param text
|
||||
*/
|
||||
public void setInfoLabelText(final String text) {
|
||||
logger.log(Level.INFO, "Setting Info Label Text: " + text);
|
||||
logger.log(Level.INFO, "Setting Info Label Text: " + text); //NON-NLS
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -473,7 +473,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
mediaPlayer.play();
|
||||
break;
|
||||
default:
|
||||
logger.log(Level.INFO, "MediaPlayer in unexpected state: " + status.toString());
|
||||
logger.log(Level.INFO, "MediaPlayer in unexpected state: " + status.toString()); //NON-NLS
|
||||
// If the MediaPlayer is in an unexpected state, stop playback.
|
||||
mediaPlayer.stop();
|
||||
setInfoLabelText(NbBundle.getMessage(this.getClass(),
|
||||
|
||||
@@ -101,7 +101,7 @@ public final class GeneralOptionsPanelController extends OptionsPanelController
|
||||
try {
|
||||
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e);
|
||||
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(
|
||||
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr.msg"),
|
||||
@@ -112,7 +112,7 @@ public final class GeneralOptionsPanelController extends OptionsPanelController
|
||||
try {
|
||||
pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e);
|
||||
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(
|
||||
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr.msg"),
|
||||
|
||||
@@ -25,10 +25,10 @@ import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
|
||||
final class GeneralPanel extends javax.swing.JPanel {
|
||||
|
||||
private static final String KEEP_PREFERRED_VIEWER = "keepPreferredViewer";
|
||||
private static final String USE_LOCAL_TIME = "useLocalTime";
|
||||
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false
|
||||
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true
|
||||
private static final String KEEP_PREFERRED_VIEWER = "keepPreferredViewer"; //NON-NLS
|
||||
private static final String USE_LOCAL_TIME = "useLocalTime"; //NON-NLS
|
||||
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false NON-NLS
|
||||
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true NON-NLS
|
||||
private final Preferences prefs = NbPreferences.forModule(this.getClass());
|
||||
|
||||
GeneralPanel(GeneralOptionsPanelController controller) {
|
||||
|
||||
@@ -72,7 +72,7 @@ import org.sleuthkit.datamodel.TskData;
|
||||
})
|
||||
public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".3gp", ".avi", ".mpg", ".mpeg", ".wmv"};
|
||||
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".3gp", ".avi", ".mpg", ".mpeg", ".wmv"}; //NON-NLS
|
||||
|
||||
private static final Logger logger = Logger.getLogger(GstVideoPanel.class.getName());
|
||||
private boolean gstInited;
|
||||
@@ -144,12 +144,12 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
if (gstPlaybin2 != null && !autoTracking) {
|
||||
State orig = gstPlaybin2.getState();
|
||||
if (gstPlaybin2.pause() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
if (gstPlaybin2.seek(ClockTime.fromMillis(time)) == false) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.seek() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.seek() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
@@ -162,19 +162,19 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private boolean initGst() {
|
||||
try {
|
||||
logger.log(Level.INFO, "Initializing gstreamer for video/audio viewing");
|
||||
logger.log(Level.INFO, "Initializing gstreamer for video/audio viewing"); //NON-NLS
|
||||
Gst.init();
|
||||
gstInited = true;
|
||||
} catch (GstException e) {
|
||||
gstInited = false;
|
||||
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and frame extraction capabilities", e);
|
||||
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and frame extraction capabilities", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.error(
|
||||
NbBundle.getMessage(this.getClass(), "GstVideoPanel.initGst.gstException.msg"),
|
||||
e.getMessage());
|
||||
return false;
|
||||
} catch (UnsatisfiedLinkError | NoClassDefFoundError | Exception e) {
|
||||
gstInited = false;
|
||||
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and extraction capabilities", e);
|
||||
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and extraction capabilities", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.error(
|
||||
NbBundle.getMessage(this.getClass(), "GstVideoPanel.initGst.otherException.msg"),
|
||||
e.getMessage());
|
||||
@@ -202,7 +202,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
path = file.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Cannot get unique path of video file");
|
||||
logger.log(Level.SEVERE, "Cannot get unique path of video file"); //NON-NLS
|
||||
}
|
||||
infoLabel.setText(path);
|
||||
infoLabel.setToolTipText(path);
|
||||
@@ -216,7 +216,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
if (gstPlaybin2 != null) {
|
||||
gstPlaybin2.dispose();
|
||||
}
|
||||
gstPlaybin2 = new PlayBin2("VideoPlayer");
|
||||
gstPlaybin2 = new PlayBin2("VideoPlayer"); //NON-NLS
|
||||
gstPlaybin2.setVideoSink(gstVideoComponent.getElement());
|
||||
|
||||
videoPanel.removeAll();
|
||||
@@ -230,7 +230,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
gstPlaybin2.setInputFile(ioFile);
|
||||
|
||||
if (gstPlaybin2.setState(State.READY) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
}
|
||||
}
|
||||
@@ -256,13 +256,13 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
if (gstPlaybin2 != null) {
|
||||
if (gstPlaybin2.isPlaying()) {
|
||||
if (gstPlaybin2.stop() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (gstPlaybin2.setState(State.NULL) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.NULL) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.NULL) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
@@ -325,8 +325,8 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
}
|
||||
|
||||
// set up a PlayBin2 object
|
||||
RGBDataSink videoSink = new RGBDataSink("rgb", rgbListener);
|
||||
PlayBin2 playbin = new PlayBin2("VideoFrameCapture");
|
||||
RGBDataSink videoSink = new RGBDataSink("rgb", rgbListener); //NON-NLS
|
||||
PlayBin2 playbin = new PlayBin2("VideoFrameCapture"); //NON-NLS
|
||||
playbin.setInputFile(file);
|
||||
playbin.setVideoSink(videoSink);
|
||||
|
||||
@@ -374,7 +374,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
//System.out.println("Seeking to " + timeStamp + "milliseconds.");
|
||||
if (!playbin.seek(timeStamp, unit)) {
|
||||
logger.log(Level.INFO, "There was a problem seeking to " + timeStamp + " " + unit.name().toLowerCase());
|
||||
logger.log(Level.INFO, "There was a problem seeking to " + timeStamp + " " + unit.name().toLowerCase()); //NON-NLS
|
||||
}
|
||||
|
||||
ret = playbin.play();
|
||||
@@ -390,7 +390,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
lock.wait(FRAME_CAPTURE_TIMEOUT_MILLIS);
|
||||
} catch (InterruptedException e) {
|
||||
logger.log(Level.INFO, "InterruptedException occurred while waiting for frame capture.", e);
|
||||
logger.log(Level.INFO, "InterruptedException occurred while waiting for frame capture.", e); //NON-NLS
|
||||
}
|
||||
}
|
||||
Image image = rgbListener.getImage();
|
||||
@@ -404,7 +404,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
}
|
||||
|
||||
if (image == null) {
|
||||
logger.log(Level.WARNING, "There was a problem while trying to capture a frame from file " + file.getName());
|
||||
logger.log(Level.WARNING, "There was a problem while trying to capture a frame from file " + file.getName()); //NON-NLS
|
||||
badVideoFiles.add(file.getName());
|
||||
break;
|
||||
}
|
||||
@@ -534,27 +534,27 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
State state = gstPlaybin2.getState();
|
||||
if (state.equals(State.PLAYING)) {
|
||||
if (gstPlaybin2.pause() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
pauseButton.setText("►");
|
||||
// Is this call necessary considering we just called gstPlaybin2.pause()?
|
||||
if (gstPlaybin2.setState(State.PAUSED) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PAUSED) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PAUSED) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
} else if (state.equals(State.PAUSED)) {
|
||||
if (gstPlaybin2.play() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
pauseButton.setText("||");
|
||||
// Is this call necessary considering we just called gstPlaybin2.play()?
|
||||
if (gstPlaybin2.setState(State.PLAYING) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PLAYING) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PLAYING) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
@@ -577,7 +577,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private class VideoProgressWorker extends SwingWorker<Object, Object> {
|
||||
|
||||
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d ";
|
||||
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d "; //NON-NLS
|
||||
private long millisElapsed = 0;
|
||||
private final long INTER_FRAME_PERIOD_MS = 20;
|
||||
private final long END_TIME_MARGIN_MS = 50;
|
||||
@@ -593,12 +593,12 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
synchronized (playbinLock) {
|
||||
if (gstPlaybin2 != null) {
|
||||
if (gstPlaybin2.stop() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
}
|
||||
// ready to be played again
|
||||
if (gstPlaybin2.setState(State.READY) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
}
|
||||
gstPlaybin2.getState(); //NEW
|
||||
@@ -676,7 +676,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
get();
|
||||
} catch (InterruptedException | ExecutionException ex) {
|
||||
logger.log(Level.WARNING, "Error updating video progress: " + ex.getMessage());
|
||||
logger.log(Level.WARNING, "Error updating video progress: " + ex.getMessage()); //NON-NLS
|
||||
infoLabel.setText(NbBundle.getMessage(this.getClass(), "GstVideoPanel.progress.infoLabel.updateErr",
|
||||
ex.getMessage()));
|
||||
}
|
||||
@@ -722,7 +722,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
extractedBytes = ContentUtils.writeToFile(sFile, jFile, progress, this, true);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Error buffering file", ex);
|
||||
logger.log(Level.WARNING, "Error buffering file", ex); //NON-NLS
|
||||
}
|
||||
success = true;
|
||||
return null;
|
||||
@@ -734,11 +734,11 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
super.get(); //block and get all exceptions thrown while doInBackground()
|
||||
} catch (CancellationException ex) {
|
||||
logger.log(Level.INFO, "Media buffering was canceled.");
|
||||
logger.log(Level.INFO, "Media buffering was canceled."); //NON-NLS
|
||||
} catch (InterruptedException ex) {
|
||||
logger.log(Level.INFO, "Media buffering was interrupted.");
|
||||
logger.log(Level.INFO, "Media buffering was interrupted."); //NON-NLS
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex);
|
||||
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex); //NON-NLS
|
||||
} finally {
|
||||
progress.finish();
|
||||
if (!this.isCancelled()) {
|
||||
@@ -756,12 +756,12 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
synchronized (playbinLock) {
|
||||
// must play, then pause and get state to get duration.
|
||||
if (gstPlaybin2.play() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
if (gstPlaybin2.pause() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
@@ -787,7 +787,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
synchronized (playbinLock) {
|
||||
if (gstPlaybin2.play() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class Installer extends ModuleInstall {
|
||||
//UIManager.put("nimbusBlueGrey", new Color());
|
||||
//UIManager.put("control", new Color());
|
||||
|
||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
|
||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
|
||||
setupMacOsXLAF();
|
||||
}
|
||||
|
||||
@@ -101,10 +101,10 @@ public class Installer extends ModuleInstall {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
} catch (ClassNotFoundException | InstantiationException
|
||||
| IllegalAccessException | UnsupportedLookAndFeelException ex) {
|
||||
logger.log(Level.WARNING, "Unable to set theme. ", ex);
|
||||
logger.log(Level.WARNING, "Unable to set theme. ", ex); //NON-NLS
|
||||
}
|
||||
|
||||
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI",
|
||||
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI", //NON-NLS
|
||||
};
|
||||
|
||||
Map<Object, Object> uiEntries = new TreeMap<>();
|
||||
@@ -117,12 +117,12 @@ public class Installer extends ModuleInstall {
|
||||
|
||||
//use Metal if available
|
||||
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
|
||||
if ("Nimbus".equals(info.getName())) {
|
||||
if ("Nimbus".equals(info.getName())) { //NON-NLS
|
||||
try {
|
||||
UIManager.setLookAndFeel(info.getClassName());
|
||||
} catch (ClassNotFoundException | InstantiationException |
|
||||
IllegalAccessException | UnsupportedLookAndFeelException ex) {
|
||||
logger.log(Level.WARNING, "Unable to set theme. ", ex);
|
||||
logger.log(Level.WARNING, "Unable to set theme. ", ex); //NON-NLS
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
|
||||
//original input stream
|
||||
BufferedImage bi = ImageIO.read(inputStream);
|
||||
if (bi == null) {
|
||||
logger.log(Level.WARNING, "Could image reader not found for file: " + fileName);
|
||||
logger.log(Level.WARNING, "Could image reader not found for file: " + fileName); //NON-NLS
|
||||
return;
|
||||
}
|
||||
//scale image using Scalr
|
||||
@@ -158,10 +158,10 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
|
||||
//convert from awt imageto fx image
|
||||
fxImage = SwingFXUtils.toFXImage(biScaled, null);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName, ex);
|
||||
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName, ex); //NON-NLS
|
||||
return;
|
||||
} catch (OutOfMemoryError ex) {
|
||||
logger.log(Level.WARNING, "Could not load image file into media view (too large): " + fileName, ex);
|
||||
logger.log(Level.WARNING, "Could not load image file into media view (too large): " + fileName, ex); //NON-NLS
|
||||
MessageNotifyUtil.Notify.warn(
|
||||
NbBundle.getMessage(this.getClass(), "MediaViewImagePanel.imgFileTooLarge.msg", file.getName()),
|
||||
ex.getMessage());
|
||||
@@ -170,12 +170,12 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Could not close input stream after loading image in media view: " + fileName, ex);
|
||||
logger.log(Level.WARNING, "Could not close input stream after loading image in media view: " + fileName, ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
if (fxImage == null || fxImage.isError()) {
|
||||
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName);
|
||||
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName); //NON-NLS
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
|
||||
private static final Logger logger = Logger.getLogger(MediaViewVideoPanel.class.getName());
|
||||
|
||||
// 64 bit architectures
|
||||
private static final String[] ARCH64 = new String[]{"amd64", "x86_64"};
|
||||
private static final String[] ARCH64 = new String[]{"amd64", "x86_64"}; //NON-NLS NON-NLS
|
||||
|
||||
// 32 bit architectures
|
||||
private static final String[] ARCH32 = new String[]{"x86"};
|
||||
private static final String[] ARCH32 = new String[]{"x86"}; //NON-NLS
|
||||
|
||||
/**
|
||||
* Factory Method to create a MediaViewVideoPanel.
|
||||
@@ -49,10 +49,10 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
|
||||
*/
|
||||
public static MediaViewVideoPanel createVideoPanel() {
|
||||
if (is64BitJVM()) {
|
||||
logger.log(Level.INFO, "64 bit JVM detected. Creating JavaFX Video Player.");
|
||||
logger.log(Level.INFO, "64 bit JVM detected. Creating JavaFX Video Player."); //NON-NLS
|
||||
return getFXImpl();
|
||||
} else {
|
||||
logger.log(Level.INFO, "32 bit JVM detected. Creating GStreamer Video Player.");
|
||||
logger.log(Level.INFO, "32 bit JVM detected. Creating GStreamer Video Player."); //NON-NLS
|
||||
return getGstImpl();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ class ThumbnailViewChildren extends Children.Keys<Integer> {
|
||||
int to = from + showImages - 1;
|
||||
setDisplayName(from + "-" + to);
|
||||
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
|
||||
try {
|
||||
path = content.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Except while calling Content.getUniquePath() on {0}", content);
|
||||
logger.log(Level.SEVERE, "Except while calling Content.getUniquePath() on {0}", content); //NON-NLS
|
||||
}
|
||||
|
||||
map.put(AbstractFilePropertyType.NAME.toString(), AbstractAbstractFileNode.getContentDisplayName(content));
|
||||
@@ -252,23 +252,23 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
|
||||
// }
|
||||
// }
|
||||
|
||||
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id "
|
||||
+ "FROM blackboard_attributes,blackboard_artifacts WHERE "
|
||||
+ "attribute_type_id=" + setNameId
|
||||
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id"
|
||||
+ " AND blackboard_artifacts.artifact_type_id=" + artId
|
||||
+ " AND blackboard_artifacts.obj_id=" + objId;
|
||||
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id " //NON-NLS
|
||||
+ "FROM blackboard_attributes,blackboard_artifacts WHERE " //NON-NLS
|
||||
+ "attribute_type_id=" + setNameId //NON-NLS
|
||||
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS
|
||||
+ " AND blackboard_artifacts.artifact_type_id=" + artId //NON-NLS
|
||||
+ " AND blackboard_artifacts.obj_id=" + objId; //NON-NLS
|
||||
rs = skCase.runQuery(query);
|
||||
int i = 0;
|
||||
while (rs.next()) {
|
||||
if (i++ > 0) {
|
||||
strList += ", ";
|
||||
}
|
||||
strList += rs.getString("value_text");
|
||||
strList += rs.getString("value_text"); //NON-NLS
|
||||
}
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "SQL Exception occurred: ", ex);
|
||||
logger.log(Level.WARNING, "SQL Exception occurred: ", ex); //NON-NLS
|
||||
}
|
||||
// catch (TskCoreException ex) {
|
||||
// logger.log(Level.WARNING, "TskCore Exception occurred: ", ex);
|
||||
@@ -278,7 +278,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
|
||||
try {
|
||||
skCase.closeRunQuery(rs);
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Error closing result set after getting hashset hits", ex);
|
||||
logger.log(Level.WARNING, "Error closing result set after getting hashset hits", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
|
||||
super(new ContentChildren(content), Lookups.singleton(content));
|
||||
this.content = content;
|
||||
//super.setName(ContentUtils.getSystemName(content));
|
||||
super.setName("content_" + Long.toString(content.getId()));
|
||||
super.setName("content_" + Long.toString(content.getId())); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,7 +87,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
|
||||
try {
|
||||
hasChildren = content.hasChildren();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error checking if the node has children, for content: " + content, ex);
|
||||
logger.log(Level.SEVERE, "Error checking if the node has children, for content: " + content, ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
|
||||
try {
|
||||
childrenIds = content.getChildrenIds();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting children ids, for content: " + content, ex);
|
||||
logger.log(Level.SEVERE, "Error getting children ids, for content: " + content, ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
|
||||
try {
|
||||
children = content.getChildren();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting children, for content: " + content, ex);
|
||||
logger.log(Level.SEVERE, "Error getting children, for content: " + content, ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
|
||||
try {
|
||||
childrenCount = content.getChildrenCount();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error checking node content children count, for content: " + content, ex);
|
||||
logger.log(Level.SEVERE, "Error checking node content children count, for content: " + content, ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public abstract class AbstractFsContentNode<T extends AbstractFile> extends Abst
|
||||
|
||||
|
||||
private boolean directoryBrowseMode;
|
||||
public static final String HIDE_PARENT = "hide_parent";
|
||||
public static final String HIDE_PARENT = "hide_parent"; //NON-NLS
|
||||
|
||||
AbstractFsContentNode(T fsContent) {
|
||||
this(fsContent, true);
|
||||
|
||||
@@ -54,29 +54,29 @@ public class ArtifactStringContent implements StringContent {
|
||||
if (stringContent.isEmpty()) {
|
||||
try {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("<html>\n");
|
||||
buffer.append("<body>\n");
|
||||
buffer.append("<html>\n"); //NON-NLS
|
||||
buffer.append("<body>\n"); //NON-NLS
|
||||
|
||||
// artifact name header
|
||||
buffer.append("<h4>");
|
||||
buffer.append("<h4>"); //NON-NLS
|
||||
buffer.append(wrapped.getDisplayName());
|
||||
buffer.append("</h4>\n");
|
||||
buffer.append("</h4>\n"); //NON-NLS
|
||||
|
||||
// start table for attributes
|
||||
buffer.append("<table border='0'>");
|
||||
buffer.append("<tr>");
|
||||
buffer.append("</tr>\n");
|
||||
buffer.append("<table border='0'>"); //NON-NLS
|
||||
buffer.append("<tr>"); //NON-NLS
|
||||
buffer.append("</tr>\n"); //NON-NLS
|
||||
|
||||
// cycle through each attribute and display in a row in the table.
|
||||
for (BlackboardAttribute attr : wrapped.getAttributes()) {
|
||||
|
||||
// name column
|
||||
buffer.append("<tr><td>");
|
||||
buffer.append("<tr><td>"); //NON-NLS
|
||||
buffer.append(attr.getAttributeTypeDisplayName());
|
||||
buffer.append("</td>");
|
||||
buffer.append("</td>"); //NON-NLS
|
||||
|
||||
// value column
|
||||
buffer.append("<td>");
|
||||
buffer.append("<td>"); //NON-NLS
|
||||
if (attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID()
|
||||
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID()
|
||||
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID()
|
||||
@@ -96,10 +96,10 @@ public class ArtifactStringContent implements StringContent {
|
||||
switch (attr.getValueType()) {
|
||||
case STRING:
|
||||
String str = attr.getValueString();
|
||||
str = str.replaceAll(" ", " ");
|
||||
str = str.replaceAll("<", "<");
|
||||
str = str.replaceAll(">", ">");
|
||||
str = str.replaceAll("(\r\n|\n)", "<br />");
|
||||
str = str.replaceAll(" ", " "); //NON-NLS
|
||||
str = str.replaceAll("<", "<"); //NON-NLS
|
||||
str = str.replaceAll(">", ">"); //NON-NLS
|
||||
str = str.replaceAll("(\r\n|\n)", "<br />"); //NON-NLS
|
||||
buffer.append(str);
|
||||
break;
|
||||
case INTEGER:
|
||||
@@ -121,8 +121,8 @@ public class ArtifactStringContent implements StringContent {
|
||||
buffer.append(attr.getContext());
|
||||
buffer.append(")");
|
||||
}
|
||||
buffer.append("</td>");
|
||||
buffer.append("</tr>\n");
|
||||
buffer.append("</td>"); //NON-NLS
|
||||
buffer.append("</tr>\n"); //NON-NLS
|
||||
}
|
||||
|
||||
final Content content = getAssociatedContent(wrapped);
|
||||
@@ -131,22 +131,22 @@ public class ArtifactStringContent implements StringContent {
|
||||
try {
|
||||
path = content.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() on {0} : {1}", new Object[]{content, ex.getLocalizedMessage()});
|
||||
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() on {0} : {1}", new Object[]{content, ex.getLocalizedMessage()}); //NON-NLS
|
||||
}
|
||||
|
||||
//add file path
|
||||
|
||||
buffer.append("<tr>");
|
||||
buffer.append("<td>");
|
||||
buffer.append("<tr>"); //NON-NLS
|
||||
buffer.append("<td>"); //NON-NLS
|
||||
buffer.append(NbBundle.getMessage(this.getClass(), "ArtifactStringContent.getStr.srcFilePath.text"));
|
||||
buffer.append("</td>");
|
||||
buffer.append("<td>");
|
||||
buffer.append("</td>"); //NON-NLS
|
||||
buffer.append("<td>"); //NON-NLS
|
||||
buffer.append(path);
|
||||
buffer.append("</td>");
|
||||
buffer.append("</tr>\n");
|
||||
buffer.append("</td>"); //NON-NLS
|
||||
buffer.append("</tr>\n"); //NON-NLS
|
||||
|
||||
buffer.append("</table>");
|
||||
buffer.append("</html>\n");
|
||||
buffer.append("</table>"); //NON-NLS
|
||||
buffer.append("</html>\n"); //NON-NLS
|
||||
|
||||
stringContent = buffer.toString();
|
||||
} catch (TskException ex) {
|
||||
@@ -161,7 +161,7 @@ public class ArtifactStringContent implements StringContent {
|
||||
try {
|
||||
return artifact.getSleuthkitCase().getContentById(artifact.getObjectID());
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Getting file failed", ex);
|
||||
logger.log(Level.WARNING, "Getting file failed", ex); //NON-NLS
|
||||
}
|
||||
throw new IllegalArgumentException(NbBundle.getMessage(ArtifactStringContent.class, "ArtifactStringContent.exception.msg"));
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class ArtifactTypeChildren extends ChildFactory<BlackboardArtifact>{
|
||||
list.addAll(arts);
|
||||
} catch (TskException ex) {
|
||||
Logger.getLogger(ArtifactTypeChildren.class.getName())
|
||||
.log(Level.SEVERE, "Couldn't get blackboard artifacts from database", ex);
|
||||
.log(Level.SEVERE, "Couldn't get blackboard artifacts from database", ex); //NON-NLS
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -49,11 +49,11 @@ public class ArtifactTypeNode extends DisplayableItemNode {
|
||||
this.childCount = skCase.getBlackboardArtifactsTypeCount(type.getTypeID());
|
||||
} catch (TskException ex) {
|
||||
Logger.getLogger(ArtifactTypeNode.class.getName())
|
||||
.log(Level.WARNING, "Error getting child count", ex);
|
||||
.log(Level.WARNING, "Error getting child count", ex); //NON-NLS
|
||||
}
|
||||
super.setDisplayName(type.getDisplayName() + " (" + childCount + ")");
|
||||
this.type = type;
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/" + getIcon(type));
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/" + getIcon(type)); //NON-NLS
|
||||
|
||||
}
|
||||
|
||||
@@ -88,49 +88,49 @@ public class ArtifactTypeNode extends DisplayableItemNode {
|
||||
private String getIcon(BlackboardArtifact.ARTIFACT_TYPE type) {
|
||||
switch (type) {
|
||||
case TSK_WEB_BOOKMARK:
|
||||
return "bookmarks.png";
|
||||
return "bookmarks.png"; //NON-NLS
|
||||
case TSK_WEB_COOKIE:
|
||||
return "cookies.png";
|
||||
return "cookies.png"; //NON-NLS
|
||||
case TSK_WEB_HISTORY:
|
||||
return "history.png";
|
||||
return "history.png"; //NON-NLS
|
||||
case TSK_WEB_DOWNLOAD:
|
||||
return "downloads.png";
|
||||
return "downloads.png"; //NON-NLS
|
||||
case TSK_INSTALLED_PROG:
|
||||
return "programs.png";
|
||||
return "programs.png"; //NON-NLS
|
||||
case TSK_RECENT_OBJECT:
|
||||
return "recent_docs.png";
|
||||
return "recent_docs.png"; //NON-NLS
|
||||
case TSK_DEVICE_ATTACHED:
|
||||
return "usb_devices.png";
|
||||
return "usb_devices.png"; //NON-NLS
|
||||
case TSK_WEB_SEARCH_QUERY:
|
||||
return "searchquery.png";
|
||||
return "searchquery.png"; //NON-NLS
|
||||
case TSK_METADATA_EXIF:
|
||||
return "camera-icon-16.png";
|
||||
return "camera-icon-16.png"; //NON-NLS
|
||||
case TSK_CONTACT:
|
||||
return "contact.png";
|
||||
return "contact.png"; //NON-NLS
|
||||
case TSK_MESSAGE:
|
||||
return "message.png";
|
||||
return "message.png"; //NON-NLS
|
||||
case TSK_CALLLOG:
|
||||
return "calllog.png";
|
||||
return "calllog.png"; //NON-NLS
|
||||
case TSK_CALENDAR_ENTRY:
|
||||
return "calendar.png";
|
||||
return "calendar.png"; //NON-NLS
|
||||
case TSK_SPEED_DIAL_ENTRY:
|
||||
return "speeddialentry.png";
|
||||
return "speeddialentry.png"; //NON-NLS
|
||||
case TSK_BLUETOOTH_PAIRING:
|
||||
return "bluetooth.png";
|
||||
return "bluetooth.png"; //NON-NLS
|
||||
case TSK_GPS_BOOKMARK:
|
||||
return "gpsfav.png";
|
||||
return "gpsfav.png"; //NON-NLS
|
||||
case TSK_GPS_LAST_KNOWN_LOCATION:
|
||||
return "gps-lastlocation.png";
|
||||
return "gps-lastlocation.png"; //NON-NLS
|
||||
case TSK_GPS_SEARCH:
|
||||
return "gps-search.png";
|
||||
return "gps-search.png"; //NON-NLS
|
||||
case TSK_SERVICE_ACCOUNT:
|
||||
return "account-icon-16.png";
|
||||
return "account-icon-16.png"; //NON-NLS
|
||||
case TSK_ENCRYPTION_DETECTED:
|
||||
return "encrypted-file.png";
|
||||
return "encrypted-file.png"; //NON-NLS
|
||||
case TSK_EXT_MISMATCH_DETECTED:
|
||||
return "mismatch-16.png";
|
||||
return "mismatch-16.png"; //NON-NLS
|
||||
}
|
||||
return "artifact-icon.png";
|
||||
return "artifact-icon.png"; //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -93,7 +93,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
this.associated = this.getLookup().lookup(Content.class);
|
||||
this.setName(Long.toString(artifact.getArtifactID()));
|
||||
this.setDisplayName(associated.getName());
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/" + getIcon(BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID())));
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/" + getIcon(BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID()))); //NON-NLS
|
||||
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
}
|
||||
}
|
||||
if (actualMimeType.isEmpty()) {
|
||||
logger.log(Level.WARNING, "Could not find expected TSK_FILE_TYPE_SIG attribute.");
|
||||
logger.log(Level.WARNING, "Could not find expected TSK_FILE_TYPE_SIG attribute."); //NON-NLS
|
||||
} else {
|
||||
ss.put(new NodeProperty<>(
|
||||
NbBundle.getMessage(this.getClass(), "BlackboardArtifactNode.createSheet.mimeType.name"),
|
||||
@@ -163,7 +163,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
actualMimeType));
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Error while searching for TSK_FILE_TYPE_SIG attribute: ", ex);
|
||||
logger.log(Level.WARNING, "Error while searching for TSK_FILE_TYPE_SIG attribute: ", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
try {
|
||||
sourcePath = associated.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Failed to get unique path from: {0}", associated.getName());
|
||||
logger.log(Level.WARNING, "Failed to get unique path from: {0}", associated.getName()); //NON-NLS
|
||||
}
|
||||
|
||||
if (sourcePath.isEmpty() == false) {
|
||||
@@ -192,7 +192,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
dataSource = getRootParentName();
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Failed to get image name from {0}", associated.getName());
|
||||
logger.log(Level.WARNING, "Failed to get image name from {0}", associated.getName()); //NON-NLS
|
||||
}
|
||||
|
||||
if (dataSource.isEmpty() == false) {
|
||||
@@ -215,7 +215,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
parentName = parent.getName();
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Failed to get parent name from {0}", associated.getName());
|
||||
logger.log(Level.WARNING, "Failed to get parent name from {0}", associated.getName()); //NON-NLS
|
||||
return "";
|
||||
}
|
||||
return parentName;
|
||||
@@ -285,7 +285,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
}
|
||||
}
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.SEVERE, "Getting attributes failed", ex);
|
||||
logger.log(Level.SEVERE, "Getting attributes failed", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
try {
|
||||
return artifact.getSleuthkitCase().getContentById(artifact.getObjectID());
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Getting file failed", ex);
|
||||
logger.log(Level.WARNING, "Getting file failed", ex); //NON-NLS
|
||||
}
|
||||
throw new IllegalArgumentException(
|
||||
NbBundle.getMessage(BlackboardArtifactNode.class, "BlackboardArtifactNode.getAssocCont.exception.msg"));
|
||||
@@ -348,7 +348,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
return highlightFactory.createInstance(content, keyword, isRegexp, origQuery);
|
||||
}
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Failed to retrieve Blackboard Attributes", ex);
|
||||
logger.log(Level.WARNING, "Failed to retrieve Blackboard Attributes", ex); //NON-NLS
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -357,54 +357,54 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
private String getIcon(BlackboardArtifact.ARTIFACT_TYPE type) {
|
||||
switch (type) {
|
||||
case TSK_WEB_BOOKMARK:
|
||||
return "bookmarks.png";
|
||||
return "bookmarks.png"; //NON-NLS
|
||||
case TSK_WEB_COOKIE:
|
||||
return "cookies.png";
|
||||
return "cookies.png"; //NON-NLS
|
||||
case TSK_WEB_HISTORY:
|
||||
return "history.png";
|
||||
return "history.png"; //NON-NLS
|
||||
case TSK_WEB_DOWNLOAD:
|
||||
return "downloads.png";
|
||||
return "downloads.png"; //NON-NLS
|
||||
case TSK_INSTALLED_PROG:
|
||||
return "programs.png";
|
||||
return "programs.png"; //NON-NLS
|
||||
case TSK_RECENT_OBJECT:
|
||||
return "recent_docs.png";
|
||||
return "recent_docs.png"; //NON-NLS
|
||||
case TSK_DEVICE_ATTACHED:
|
||||
return "usb_devices.png";
|
||||
return "usb_devices.png"; //NON-NLS
|
||||
case TSK_WEB_SEARCH_QUERY:
|
||||
return "searchquery.png";
|
||||
return "searchquery.png"; //NON-NLS
|
||||
case TSK_TAG_FILE:
|
||||
return "blue-tag-icon-16.png";
|
||||
return "blue-tag-icon-16.png"; //NON-NLS
|
||||
case TSK_TAG_ARTIFACT:
|
||||
return "green-tag-icon-16.png";
|
||||
return "green-tag-icon-16.png"; //NON-NLS
|
||||
case TSK_METADATA_EXIF:
|
||||
return "camera-icon-16.png";
|
||||
return "camera-icon-16.png"; //NON-NLS
|
||||
case TSK_CONTACT:
|
||||
return "contact.png";
|
||||
return "contact.png"; //NON-NLS
|
||||
case TSK_MESSAGE:
|
||||
return "message.png";
|
||||
return "message.png"; //NON-NLS
|
||||
case TSK_CALLLOG:
|
||||
return "calllog.png";
|
||||
return "calllog.png"; //NON-NLS
|
||||
case TSK_CALENDAR_ENTRY:
|
||||
return "calendar.png";
|
||||
return "calendar.png"; //NON-NLS
|
||||
case TSK_SPEED_DIAL_ENTRY:
|
||||
return "speeddialentry.png";
|
||||
return "speeddialentry.png"; //NON-NLS
|
||||
case TSK_BLUETOOTH_PAIRING:
|
||||
return "bluetooth.png";
|
||||
return "bluetooth.png"; //NON-NLS
|
||||
case TSK_GPS_BOOKMARK:
|
||||
return "gpsfav.png";
|
||||
return "gpsfav.png"; //NON-NLS
|
||||
case TSK_GPS_LAST_KNOWN_LOCATION:
|
||||
return "gps-lastlocation.png";
|
||||
return "gps-lastlocation.png"; //NON-NLS
|
||||
case TSK_GPS_SEARCH:
|
||||
return "gps-search.png";
|
||||
return "gps-search.png"; //NON-NLS
|
||||
case TSK_SERVICE_ACCOUNT:
|
||||
return "account-icon-16.png";
|
||||
return "account-icon-16.png"; //NON-NLS
|
||||
case TSK_ENCRYPTION_DETECTED:
|
||||
return "encrypted-file.png";
|
||||
return "encrypted-file.png"; //NON-NLS
|
||||
case TSK_EXT_MISMATCH_DETECTED:
|
||||
return "mismatch-16.png";
|
||||
return "mismatch-16.png"; //NON-NLS
|
||||
|
||||
}
|
||||
return "artifact-icon.png";
|
||||
return "artifact-icon.png"; //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*/
|
||||
public class BlackboardArtifactTagNode extends DisplayableItemNode {
|
||||
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/green-tag-icon-16.png";
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/green-tag-icon-16.png"; //NON-NLS
|
||||
private final BlackboardArtifactTag tag;
|
||||
|
||||
public BlackboardArtifactTagNode(BlackboardArtifactTag tag) {
|
||||
@@ -68,7 +68,7 @@ public class BlackboardArtifactTagNode extends DisplayableItemNode {
|
||||
try {
|
||||
contentPath = tag.getContent().getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(ContentTagNode.class.getName()).log(Level.SEVERE, "Failed to get path for content (id = " + tag.getContent().getId() + ")", ex);
|
||||
Logger.getLogger(ContentTagNode.class.getName()).log(Level.SEVERE, "Failed to get path for content (id = " + tag.getContent().getId() + ")", ex); //NON-NLS
|
||||
contentPath = NbBundle.getMessage(this.getClass(), "BlackboardArtifactTagNode.createSheet.unavail.text");
|
||||
}
|
||||
properties.put(new NodeProperty<>(
|
||||
|
||||
@@ -57,7 +57,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
try {
|
||||
children = parent.getChildren();
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Error getting Content children.", ex);
|
||||
logger.log(Level.WARNING, "Error getting Content children.", ex); //NON-NLS
|
||||
children = Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
try {
|
||||
children = parent.getChildren();
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Error getting Content children.", ex);
|
||||
logger.log(Level.WARNING, "Error getting Content children.", ex); //NON-NLS
|
||||
children = Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*/
|
||||
class ContentTagNode extends DisplayableItemNode {
|
||||
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/blue-tag-icon-16.png";
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/blue-tag-icon-16.png"; //NON-NLS
|
||||
private final ContentTag tag;
|
||||
|
||||
public ContentTagNode(ContentTag tag) {
|
||||
@@ -66,7 +66,7 @@ class ContentTagNode extends DisplayableItemNode {
|
||||
try {
|
||||
contentPath = tag.getContent().getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(ContentTagNode.class.getName()).log(Level.SEVERE, "Failed to get path for content (id = " + tag.getContent().getId() + ")", ex);
|
||||
Logger.getLogger(ContentTagNode.class.getName()).log(Level.SEVERE, "Failed to get path for content (id = " + tag.getContent().getId() + ")", ex); //NON-NLS
|
||||
contentPath = NbBundle.getMessage(this.getClass(), "ContentTagNode.createSheet.unavail.path");
|
||||
}
|
||||
properties.put(new NodeProperty<>(NbBundle.getMessage(this.getClass(), "ContentTagNode.createSheet.filePath.name"),
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
public class ContentTagTypeNode extends DisplayableItemNode {
|
||||
|
||||
private static final String DISPLAY_NAME = NbBundle.getMessage(ContentTagTypeNode.class, "ContentTagTypeNode.displayName.text");
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png";
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png"; //NON-NLS
|
||||
|
||||
public ContentTagTypeNode(TagName tagName) {
|
||||
super(Children.create(new ContentTagNodeFactory(tagName), true), Lookups.singleton(tagName.getDisplayName() + " " + DISPLAY_NAME));
|
||||
@@ -49,7 +49,7 @@ public class ContentTagTypeNode extends DisplayableItemNode {
|
||||
try {
|
||||
tagsCount = Case.getCurrentCase().getServices().getTagsManager().getContentTagsCountByTagName(tagName);
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(ContentTagTypeNode.class.getName()).log(Level.SEVERE, "Failed to get content tags count for " + tagName.getDisplayName() + " tag name", ex);
|
||||
Logger.getLogger(ContentTagTypeNode.class.getName()).log(Level.SEVERE, "Failed to get content tags count for " + tagName.getDisplayName() + " tag name", ex); //NON-NLS
|
||||
}
|
||||
|
||||
super.setName(DISPLAY_NAME);
|
||||
@@ -98,7 +98,7 @@ public class ContentTagTypeNode extends DisplayableItemNode {
|
||||
try {
|
||||
keys.addAll(Case.getCurrentCase().getServices().getTagsManager().getContentTagsByTagName(tagName));
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(ContentTagTypeNode.ContentTagNodeFactory.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex);
|
||||
Logger.getLogger(ContentTagTypeNode.ContentTagNodeFactory.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public final class ContentUtils {
|
||||
}
|
||||
|
||||
public static String getStringTimeISO8601(long epochSeconds, TimeZone tzone) {
|
||||
String time = "0000-00-00T00:00:00Z";
|
||||
String time = "0000-00-00T00:00:00Z"; //NON-NLS
|
||||
if (epochSeconds != 0) {
|
||||
dateFormatterISO8601.setTimeZone(tzone);
|
||||
time = dateFormatterISO8601.format(new java.util.Date(epochSeconds * 1000));
|
||||
@@ -259,7 +259,7 @@ public final class ContentUtils {
|
||||
ContentUtils.writeToFile(f, dest, progress, worker, source);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE,
|
||||
"Trouble extracting file to " + dest.getAbsolutePath(),
|
||||
"Trouble extracting file to " + dest.getAbsolutePath(), //NON-NLS
|
||||
ex);
|
||||
}
|
||||
return null;
|
||||
@@ -271,7 +271,7 @@ public final class ContentUtils {
|
||||
ContentUtils.writeToFile(f, dest, progress, worker, source);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE,
|
||||
"Trouble extracting unallocated content file to " + dest.getAbsolutePath(),
|
||||
"Trouble extracting unallocated content file to " + dest.getAbsolutePath(), //NON-NLS
|
||||
ex);
|
||||
}
|
||||
return null;
|
||||
@@ -283,7 +283,7 @@ public final class ContentUtils {
|
||||
ContentUtils.writeToFile(df, dest, progress, worker, source);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE,
|
||||
"Error extracting derived file to " + dest.getAbsolutePath(),
|
||||
"Error extracting derived file to " + dest.getAbsolutePath(), //NON-NLS
|
||||
ex);
|
||||
}
|
||||
return null;
|
||||
@@ -295,7 +295,7 @@ public final class ContentUtils {
|
||||
ContentUtils.writeToFile(lf, dest, progress, worker, source);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE,
|
||||
"Error extracting local file to " + dest.getAbsolutePath(),
|
||||
"Error extracting local file to " + dest.getAbsolutePath(), //NON-NLS
|
||||
ex);
|
||||
}
|
||||
return null;
|
||||
@@ -349,7 +349,7 @@ public final class ContentUtils {
|
||||
}
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.SEVERE,
|
||||
"Trouble fetching children to extract.", ex);
|
||||
"Trouble fetching children to extract.", ex); //NON-NLS
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.Formatter;
|
||||
*/
|
||||
public class DataConversion {
|
||||
|
||||
final private static char[] hexArray = "0123456789ABCDEF".toCharArray();
|
||||
final private static char[] hexArray = "0123456789ABCDEF".toCharArray(); //NON-NLS
|
||||
|
||||
/**
|
||||
* Return the hex-dump layout of the passed in byte array.
|
||||
@@ -67,7 +67,7 @@ public class DataConversion {
|
||||
|
||||
// print the offset column
|
||||
//outputStringBuilder.append("0x");
|
||||
outputStringBuilder.append(String.format("0x%08x: ", arrayOffset + curOffset));
|
||||
outputStringBuilder.append(String.format("0x%08x: ", arrayOffset + curOffset)); //NON-NLS
|
||||
//outputStringBuilder.append(": ");
|
||||
|
||||
// print the hex columns
|
||||
|
||||
@@ -36,7 +36,7 @@ public class DataSourcesNode extends DisplayableItemNode {
|
||||
super(new RootContentChildren(images), Lookups.singleton(NAME));
|
||||
setName(NAME);
|
||||
setDisplayName(NAME);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/image.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/image.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,10 +53,10 @@ public class DeletedContent implements AutopsyVisitableItem {
|
||||
public enum DeletedContentFilter implements AutopsyVisitableItem {
|
||||
|
||||
FS_DELETED_FILTER(0,
|
||||
"FS_DELETED_FILTER",
|
||||
"FS_DELETED_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(DeletedContent.class, "DeletedContent.fsDelFilter.text")),
|
||||
ALL_DELETED_FILTER(1,
|
||||
"ALL_DELETED_FILTER",
|
||||
"ALL_DELETED_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(DeletedContent.class, "DeletedContent.allDelFilter.text"));
|
||||
private int id;
|
||||
private String name;
|
||||
@@ -111,7 +111,7 @@ public class DeletedContent implements AutopsyVisitableItem {
|
||||
super.setName(NAME);
|
||||
super.setDisplayName(NAME);
|
||||
this.skCase = skCase;
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -173,7 +173,7 @@ public class DeletedContent implements AutopsyVisitableItem {
|
||||
|
||||
String tooltip = filter.getDisplayName();
|
||||
this.setShortDescription(tooltip);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); //NON-NLS
|
||||
|
||||
//get count of children without preloading all children nodes
|
||||
final long count = new DeletedContentChildren(filter, skCase).calculateItems();
|
||||
@@ -245,21 +245,21 @@ public class DeletedContent implements AutopsyVisitableItem {
|
||||
String query = "";
|
||||
switch (filter) {
|
||||
case FS_DELETED_FILTER:
|
||||
query = "dir_flags = " + TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC.getValue()
|
||||
+ " AND meta_flags != " + TskData.TSK_FS_META_FLAG_ENUM.ORPHAN.getValue()
|
||||
+ " AND type = " + TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType();
|
||||
query = "dir_flags = " + TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC.getValue() //NON-NLS
|
||||
+ " AND meta_flags != " + TskData.TSK_FS_META_FLAG_ENUM.ORPHAN.getValue() //NON-NLS
|
||||
+ " AND type = " + TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType(); //NON-NLS
|
||||
|
||||
break;
|
||||
case ALL_DELETED_FILTER:
|
||||
query = " ( "
|
||||
+ "( "
|
||||
+ "(dir_flags = " + TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC.getValue()
|
||||
+ " OR "
|
||||
+ "meta_flags = " + TskData.TSK_FS_META_FLAG_ENUM.ORPHAN.getValue()
|
||||
+ "(dir_flags = " + TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC.getValue() //NON-NLS
|
||||
+ " OR " //NON-NLS
|
||||
+ "meta_flags = " + TskData.TSK_FS_META_FLAG_ENUM.ORPHAN.getValue() //NON-NLS
|
||||
+ ")"
|
||||
+ " AND type = " + TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType()
|
||||
+ " AND type = " + TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType() //NON-NLS
|
||||
+ " )"
|
||||
+ " OR type = " + TskData.TSK_DB_FILES_TYPE_ENUM.CARVED.getFileType()
|
||||
+ " OR type = " + TskData.TSK_DB_FILES_TYPE_ENUM.CARVED.getFileType() //NON-NLS
|
||||
+ " )";
|
||||
//+ " AND type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS.getFileType()
|
||||
//+ " AND type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNUSED_BLOCKS.getFileType()
|
||||
@@ -270,11 +270,11 @@ public class DeletedContent implements AutopsyVisitableItem {
|
||||
break;
|
||||
|
||||
default:
|
||||
logger.log(Level.SEVERE, "Unsupported filter type to get deleted content: {0}", filter);
|
||||
logger.log(Level.SEVERE, "Unsupported filter type to get deleted content: {0}", filter); //NON-NLS
|
||||
|
||||
}
|
||||
|
||||
query += " LIMIT " + MAX_OBJECTS;
|
||||
query += " LIMIT " + MAX_OBJECTS; //NON-NLS
|
||||
return query;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public class DeletedContent implements AutopsyVisitableItem {
|
||||
try {
|
||||
ret = skCase.findAllFilesWhere(query);
|
||||
} catch (TskCoreException e) {
|
||||
logger.log(Level.SEVERE, "Error getting files for the deleted content view using: " + query, e);
|
||||
logger.log(Level.SEVERE, "Error getting files for the deleted content view using: " + query, e); //NON-NLS
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -301,7 +301,7 @@ public class DeletedContent implements AutopsyVisitableItem {
|
||||
try {
|
||||
return skCase.countFilesWhere(makeQuery());
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting deleted files search view count", ex);
|
||||
logger.log(Level.SEVERE, "Error getting deleted files search view count", ex); //NON-NLS
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,9 +56,9 @@ public class DirectoryNode extends AbstractFsContentNode<AbstractFile> {
|
||||
private void setIcon(AbstractFile dir) {
|
||||
// set name, display name, and icon
|
||||
if (dir.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-deleted.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-deleted.png"); //NON-NLS
|
||||
} else {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,15 +67,15 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
try {
|
||||
int artId = BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG.getTypeID();
|
||||
int pathAttrId = BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH.getTypeID();
|
||||
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id "
|
||||
+ "FROM blackboard_attributes,blackboard_artifacts WHERE "
|
||||
+ "attribute_type_id=" + pathAttrId
|
||||
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id"
|
||||
+ " AND blackboard_artifacts.artifact_type_id=" + artId;
|
||||
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id " //NON-NLS
|
||||
+ "FROM blackboard_attributes,blackboard_artifacts WHERE " //NON-NLS
|
||||
+ "attribute_type_id=" + pathAttrId //NON-NLS
|
||||
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS
|
||||
+ " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS
|
||||
ResultSet rs = skCase.runQuery(query);
|
||||
while (rs.next()) {
|
||||
final String path = rs.getString("value_text");
|
||||
final long artifactId = rs.getLong("artifact_id");
|
||||
final String path = rs.getString("value_text"); //NON-NLS
|
||||
final long artifactId = rs.getLong("artifact_id"); //NON-NLS
|
||||
final Map<String, String> parsedPath = parsePath(path);
|
||||
final String account = parsedPath.get(MAIL_ACCOUNT);
|
||||
final String folder = parsedPath.get(MAIL_FOLDER);
|
||||
@@ -95,7 +95,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
skCase.closeRunQuery(rs);
|
||||
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Cannot initialize email extraction", ex);
|
||||
logger.log(Level.WARNING, "Cannot initialize email extraction", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
Map<String, String> parsed = new HashMap<>();
|
||||
String[] split = path.split(MAIL_PATH_SEPARATOR);
|
||||
if (split.length < 4) {
|
||||
logger.log(Level.WARNING, "Unexpected number of tokens when parsing email PATH: {0}, will use defaults", split.length);
|
||||
logger.log(Level.WARNING, "Unexpected number of tokens when parsing email PATH: {0}, will use defaults", split.length); //NON-NLS
|
||||
parsed.put(MAIL_ACCOUNT, NbBundle.getMessage(EmailExtracted.class, "EmailExtracted.defaultAcct.text"));
|
||||
parsed.put(MAIL_FOLDER, NbBundle.getMessage(EmailExtracted.class, "EmailExtracted.defaultFolder.text"));
|
||||
return parsed;
|
||||
@@ -128,7 +128,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
super(Children.create(new EmailExtractedRootChildrenFlat(), true), Lookups.singleton(DISPLAY_NAME));
|
||||
super.setName(LABEL_NAME);
|
||||
super.setDisplayName(DISPLAY_NAME);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/mail-icon-16.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/mail-icon-16.png"); //NON-NLS
|
||||
initArtifacts();
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
//TODO: bulk artifact gettings
|
||||
tempList.add(skCase.getBlackboardArtifact(l));
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Error creating mail messages nodes", ex);
|
||||
logger.log(Level.WARNING, "Error creating mail messages nodes", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,7 +208,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
super(Children.create(new EmailExtractedRootChildren(), true), Lookups.singleton(DISPLAY_NAME));
|
||||
super.setName(LABEL_NAME);
|
||||
super.setDisplayName(DISPLAY_NAME);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/mail-icon-16.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/mail-icon-16.png"); //NON-NLS
|
||||
initArtifacts();
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
super(Children.create(new EmailExtractedAccountChildrenNode(children), true), Lookups.singleton(name));
|
||||
super.setName(name);
|
||||
super.setDisplayName(name + " (" + children.size() + ")");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/account-icon-16.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/account-icon-16.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -332,7 +332,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
super(Children.create(new EmailExtractedFolderChildrenNode(children), true), Lookups.singleton(name));
|
||||
super.setName(name);
|
||||
super.setDisplayName(name + " (" + children.size() + ")");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-16.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-16.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -383,7 +383,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
||||
//TODO: bulk artifact gettings
|
||||
tempList.add(skCase.getBlackboardArtifact(l));
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Error creating mail messages nodes", ex);
|
||||
logger.log(Level.WARNING, "Error creating mail messages nodes", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
list.addAll(tempList);
|
||||
|
||||
@@ -71,7 +71,7 @@ class ExtractedContentChildren extends ChildFactory<BlackboardArtifact.ARTIFACT_
|
||||
});
|
||||
list.addAll(inUse);
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(ExtractedContentChildren.class.getName()).log(Level.SEVERE, "Error getting list of artifacts in use: " + ex.getLocalizedMessage());
|
||||
Logger.getLogger(ExtractedContentChildren.class.getName()).log(Level.SEVERE, "Error getting list of artifacts in use: " + ex.getLocalizedMessage()); //NON-NLS
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ExtractedContentNode extends DisplayableItemNode {
|
||||
super(Children.create(new ExtractedContentChildren(skCase), true), Lookups.singleton(NAME));
|
||||
super.setName(NAME);
|
||||
super.setDisplayName(NAME);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/extracted_content.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/extracted_content.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -59,9 +59,9 @@ public class FileNode extends AbstractFsContentNode<AbstractFile> {
|
||||
// set name, display name, and icon
|
||||
if (file.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
|
||||
if (file.getType().equals(TSK_DB_FILES_TYPE_ENUM.CARVED)) {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/carved-file-icon-16.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/carved-file-icon-16.png"); //NON-NLS
|
||||
} else {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); //NON-NLS
|
||||
}
|
||||
} else {
|
||||
this.setIconBaseWithExtension(getIconForFileType(file));
|
||||
@@ -112,66 +112,66 @@ public class FileNode extends AbstractFsContentNode<AbstractFile> {
|
||||
String name = file.getName();
|
||||
int dotIndex = name.lastIndexOf(".");
|
||||
if (dotIndex == -1) {
|
||||
return "org/sleuthkit/autopsy/images/file-icon.png";
|
||||
return "org/sleuthkit/autopsy/images/file-icon.png"; //NON-NLS
|
||||
}
|
||||
String ext = name.substring(dotIndex).toLowerCase();
|
||||
|
||||
// Images
|
||||
for (String s : FileTypeExtensions.getImageExtensions()) {
|
||||
if (ext.equals(s)) {
|
||||
return "org/sleuthkit/autopsy/images/image-file.png";
|
||||
return "org/sleuthkit/autopsy/images/image-file.png"; //NON-NLS
|
||||
}
|
||||
}
|
||||
// Videos
|
||||
for (String s : FileTypeExtensions.getVideoExtensions()) {
|
||||
if (ext.equals(s)) {
|
||||
return "org/sleuthkit/autopsy/images/video-file.png";
|
||||
return "org/sleuthkit/autopsy/images/video-file.png"; //NON-NLS
|
||||
}
|
||||
}
|
||||
// Audio Files
|
||||
for (String s : FileTypeExtensions.getAudioExtensions()) {
|
||||
if (ext.equals(s)) {
|
||||
return "org/sleuthkit/autopsy/images/audio-file.png";
|
||||
return "org/sleuthkit/autopsy/images/audio-file.png"; //NON-NLS
|
||||
}
|
||||
}
|
||||
// Documents
|
||||
for (String s : FileTypeExtensions.getDocumentExtensions()) {
|
||||
if (ext.equals(s)) {
|
||||
return "org/sleuthkit/autopsy/images/doc-file.png";
|
||||
return "org/sleuthkit/autopsy/images/doc-file.png"; //NON-NLS
|
||||
}
|
||||
}
|
||||
// Executables / System Files
|
||||
for (String s : FileTypeExtensions.getExecutableExtensions()) {
|
||||
if (ext.equals(s)) {
|
||||
return "org/sleuthkit/autopsy/images/exe-file.png";
|
||||
return "org/sleuthkit/autopsy/images/exe-file.png"; //NON-NLS
|
||||
}
|
||||
}
|
||||
// Text Files
|
||||
for (String s : FileTypeExtensions.getTextExtensions()) {
|
||||
if (ext.equals(s)) {
|
||||
return "org/sleuthkit/autopsy/images/text-file.png";
|
||||
return "org/sleuthkit/autopsy/images/text-file.png"; //NON-NLS
|
||||
}
|
||||
}
|
||||
// Web Files
|
||||
for (String s : FileTypeExtensions.getWebExtensions()) {
|
||||
if (ext.equals(s)) {
|
||||
return "org/sleuthkit/autopsy/images/web-file.png";
|
||||
return "org/sleuthkit/autopsy/images/web-file.png"; //NON-NLS
|
||||
}
|
||||
}
|
||||
// PDFs
|
||||
for (String s : FileTypeExtensions.getPDFExtensions()) {
|
||||
if (ext.equals(s)) {
|
||||
return "org/sleuthkit/autopsy/images/pdf-file.png";
|
||||
return "org/sleuthkit/autopsy/images/pdf-file.png"; //NON-NLS
|
||||
}
|
||||
}
|
||||
// Archives
|
||||
for (String s : FileTypeExtensions.getArchiveExtensions()) {
|
||||
if (ext.equals(s)) {
|
||||
return "org/sleuthkit/autopsy/images/archive-file.png";
|
||||
return "org/sleuthkit/autopsy/images/archive-file.png"; //NON-NLS
|
||||
}
|
||||
}
|
||||
// Else return the default
|
||||
return "org/sleuthkit/autopsy/images/file-icon.png";
|
||||
return "org/sleuthkit/autopsy/images/file-icon.png"; //NON-NLS
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@ public class FileSize implements AutopsyVisitableItem {
|
||||
|
||||
public enum FileSizeFilter implements AutopsyVisitableItem {
|
||||
|
||||
SIZE_50_200(0, "SIZE_50_200", "50 - 200MB"),
|
||||
SIZE_200_1000(1, "SIZE_200_1GB", "200MB - 1GB"),
|
||||
SIZE_1000_(2, "SIZE_1000+", "1GB+");
|
||||
SIZE_50_200(0, "SIZE_50_200", "50 - 200MB"), //NON-NLS
|
||||
SIZE_200_1000(1, "SIZE_200_1GB", "200MB - 1GB"), //NON-NLS
|
||||
SIZE_1000_(2, "SIZE_1000+", "1GB+"); //NON-NLS
|
||||
private int id;
|
||||
private String name;
|
||||
private String displayName;
|
||||
@@ -106,7 +106,7 @@ public class FileSize implements AutopsyVisitableItem {
|
||||
super(Children.create(new FileSizeRootChildren(skCase), true), Lookups.singleton(NAME));
|
||||
super.setName(NAME);
|
||||
super.setDisplayName(NAME);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-size-16.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-size-16.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -168,7 +168,7 @@ public class FileSize implements AutopsyVisitableItem {
|
||||
|
||||
String tooltip = filter.getDisplayName();
|
||||
this.setShortDescription(tooltip);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-size-16.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-size-16.png"); //NON-NLS
|
||||
|
||||
//get count of children without preloading all children nodes
|
||||
final long count = new FileSizeChildren(filter, skCase).calculateItems();
|
||||
@@ -229,22 +229,22 @@ public class FileSize implements AutopsyVisitableItem {
|
||||
String query;
|
||||
switch (filter) {
|
||||
case SIZE_50_200:
|
||||
query = "(size >= 50000000 AND size < 200000000)";
|
||||
query = "(size >= 50000000 AND size < 200000000)"; //NON-NLS
|
||||
break;
|
||||
case SIZE_200_1000:
|
||||
query = "(size >= 200000000 AND size < 1000000000)";
|
||||
query = "(size >= 200000000 AND size < 1000000000)"; //NON-NLS
|
||||
break;
|
||||
|
||||
case SIZE_1000_:
|
||||
query = "(size >= 1000000000)";
|
||||
query = "(size >= 1000000000)"; //NON-NLS
|
||||
break;
|
||||
|
||||
default:
|
||||
logger.log(Level.SEVERE, "Unsupported filter type to get files by size: {0}", filter);
|
||||
logger.log(Level.SEVERE, "Unsupported filter type to get files by size: {0}", filter); //NON-NLS
|
||||
return null;
|
||||
}
|
||||
// ignore unalloc block files
|
||||
query = query + " AND (type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS.getFileType() + ")";
|
||||
query = query + " AND (type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS.getFileType() + ")"; //NON-NLS
|
||||
|
||||
return query;
|
||||
}
|
||||
@@ -260,7 +260,7 @@ public class FileSize implements AutopsyVisitableItem {
|
||||
try {
|
||||
ret = skCase.findAllFilesWhere(query);
|
||||
} catch (TskCoreException e) {
|
||||
logger.log(Level.SEVERE, "Error getting files for the file size view using: " + query, e);
|
||||
logger.log(Level.SEVERE, "Error getting files for the file size view using: " + query, e); //NON-NLS
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -276,7 +276,7 @@ public class FileSize implements AutopsyVisitableItem {
|
||||
try {
|
||||
return skCase.countFilesWhere(makeQuery());
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting files by size search view count", ex);
|
||||
logger.log(Level.SEVERE, "Error getting files by size search view count", ex); //NON-NLS
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,10 +61,10 @@ class FileTypeChildren extends ChildFactory<Content> {
|
||||
}
|
||||
|
||||
private String createQuery(){
|
||||
String query = "(dir_type = " + TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue() + ")"
|
||||
+ " AND (known IS NULL OR known != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ") AND (0";
|
||||
String query = "(dir_type = " + TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue() + ")" //NON-NLS
|
||||
+ " AND (known IS NULL OR known != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ") AND (0"; //NON-NLS
|
||||
for(String s : filter.getFilter()){
|
||||
query += " OR name LIKE '%" + s + "'";
|
||||
query += " OR name LIKE '%" + s + "'"; //NON-NLS
|
||||
}
|
||||
query += ')';
|
||||
// query += " LIMIT " + MAX_OBJECTS;
|
||||
@@ -77,7 +77,7 @@ class FileTypeChildren extends ChildFactory<Content> {
|
||||
try {
|
||||
list = skCase.findAllFilesWhere(createQuery());
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Couldn't get search results", ex);
|
||||
logger.log(Level.SEVERE, "Couldn't get search results", ex); //NON-NLS
|
||||
}
|
||||
|
||||
return list;
|
||||
@@ -92,7 +92,7 @@ class FileTypeChildren extends ChildFactory<Content> {
|
||||
try {
|
||||
return skCase.countFilesWhere(createQuery());
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting file search view count", ex);
|
||||
logger.log(Level.SEVERE, "Error getting file search view count", ex); //NON-NLS
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,24 +33,24 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
|
||||
// root node filters
|
||||
public enum RootFilter implements AutopsyVisitableItem,SearchFilterInterface {
|
||||
TSK_IMAGE_FILTER(0, "TSK_IMAGE_FILTER",
|
||||
TSK_IMAGE_FILTER(0, "TSK_IMAGE_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskImgFilter.text"),
|
||||
FileTypeExtensions.getImageExtensions()),
|
||||
TSK_VIDEO_FILTER(1, "TSK_VIDEO_FILTER",
|
||||
TSK_VIDEO_FILTER(1, "TSK_VIDEO_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskVideoFilter.text"),
|
||||
FileTypeExtensions.getVideoExtensions()),
|
||||
TSK_AUDIO_FILTER(2, "TSK_AUDIO_FILTER",
|
||||
TSK_AUDIO_FILTER(2, "TSK_AUDIO_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskAudioFilter.text"),
|
||||
FileTypeExtensions.getAudioExtensions()),
|
||||
TSK_ARCHIVE_FILTER(3, "TSK_ARCHIVE_FILTER",
|
||||
TSK_ARCHIVE_FILTER(3, "TSK_ARCHIVE_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskArchiveFilter.text"),
|
||||
FileTypeExtensions.getArchiveExtensions()),
|
||||
TSK_DOCUMENT_FILTER(3, "TSK_DOCUMENT_FILTER",
|
||||
TSK_DOCUMENT_FILTER(3, "TSK_DOCUMENT_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskDocumentFilter.text"),
|
||||
Arrays.asList(".doc", ".docx", ".pdf", ".xls", ".rtf", ".txt")),
|
||||
TSK_EXECUTABLE_FILTER(3, "TSK_EXECUTABLE_FILTER",
|
||||
Arrays.asList(".doc", ".docx", ".pdf", ".xls", ".rtf", ".txt")), //NON-NLS
|
||||
TSK_EXECUTABLE_FILTER(3, "TSK_EXECUTABLE_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskExecFilter.text"),
|
||||
Arrays.asList(".exe", ".dll", ".bat", ".cmd", ".com"));
|
||||
Arrays.asList(".exe", ".dll", ".bat", ".cmd", ".com")); //NON-NLS
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
@@ -92,21 +92,21 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
|
||||
// document sub-node filters
|
||||
public enum DocumentFilter implements AutopsyVisitableItem,SearchFilterInterface {
|
||||
AUT_DOC_HTML(0, "AUT_DOC_HTML",
|
||||
AUT_DOC_HTML(0, "AUT_DOC_HTML", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autDocHtmlFilter.text"),
|
||||
Arrays.asList(".htm", ".html")),
|
||||
AUT_DOC_OFFICE(1, "AUT_DOC_OFFICE",
|
||||
Arrays.asList(".htm", ".html")), //NON-NLS
|
||||
AUT_DOC_OFFICE(1, "AUT_DOC_OFFICE", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autDocOfficeFilter.text"),
|
||||
Arrays.asList(".doc", ".docx", ".odt", ".xls", ".xlsx", ".ppt", ".pptx")),
|
||||
AUT_DOC_PDF(2, "AUT_DOC_PDF",
|
||||
Arrays.asList(".doc", ".docx", ".odt", ".xls", ".xlsx", ".ppt", ".pptx")), //NON-NLS
|
||||
AUT_DOC_PDF(2, "AUT_DOC_PDF", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autoDocPdfFilter.text"),
|
||||
Arrays.asList(".pdf")),
|
||||
AUT_DOC_TXT(3, "AUT_DOC_TXT",
|
||||
Arrays.asList(".pdf")), //NON-NLS
|
||||
AUT_DOC_TXT(3, "AUT_DOC_TXT", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autDocTxtFilter.text"),
|
||||
Arrays.asList(".txt")),
|
||||
AUT_DOC_RTF(4, "AUT_DOC_RTF",
|
||||
Arrays.asList(".txt")), //NON-NLS
|
||||
AUT_DOC_RTF(4, "AUT_DOC_RTF", //NON-NLS
|
||||
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autDocRtfFilter.text"),
|
||||
Arrays.asList(".rtf"));
|
||||
Arrays.asList(".rtf")); //NON-NLS
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
@@ -149,11 +149,11 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
|
||||
// executable sub-node filters
|
||||
public enum ExecutableFilter implements AutopsyVisitableItem,SearchFilterInterface {
|
||||
ExecutableFilter_EXE(0, "ExecutableFilter_EXE", ".exe", Arrays.asList(".exe")),
|
||||
ExecutableFilter_DLL(1, "ExecutableFilter_DLL", ".dll", Arrays.asList(".dll")),
|
||||
ExecutableFilter_BAT(2, "ExecutableFilter_BAT", ".bat", Arrays.asList(".bat")),
|
||||
ExecutableFilter_CMD(3, "ExecutableFilter_CMD", ".cmd", Arrays.asList(".cmd")),
|
||||
ExecutableFilter_COM(4, "ExecutableFilter_COM", ".com", Arrays.asList(".com"));
|
||||
ExecutableFilter_EXE(0, "ExecutableFilter_EXE", ".exe", Arrays.asList(".exe")), //NON-NLS
|
||||
ExecutableFilter_DLL(1, "ExecutableFilter_DLL", ".dll", Arrays.asList(".dll")), //NON-NLS
|
||||
ExecutableFilter_BAT(2, "ExecutableFilter_BAT", ".bat", Arrays.asList(".bat")), //NON-NLS
|
||||
ExecutableFilter_CMD(3, "ExecutableFilter_CMD", ".cmd", Arrays.asList(".cmd")), //NON-NLS
|
||||
ExecutableFilter_COM(4, "ExecutableFilter_COM", ".com", Arrays.asList(".com")); //NON-NLS
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
|
||||
@@ -26,17 +26,17 @@ import java.util.List;
|
||||
* and 'getters' to obtain them.
|
||||
*/
|
||||
public class FileTypeExtensions {
|
||||
private final static List<String> IMAGE_EXTENSIONS = Arrays.asList(".jpg", ".jpeg", ".png", ".psd", ".nef", ".tiff", ".bmp");
|
||||
private final static List<String> VIDEO_EXTENSIONS = Arrays.asList(".aaf", ".3gp", ".asf", ".avi", ".m1v", ".m2v",
|
||||
".m4v", ".mp4", ".mov", ".mpeg", ".mpg", ".mpe", ".mp4", ".rm", ".wmv", ".mpv", ".flv", ".swf");
|
||||
private final static List<String> AUDIO_EXTENSIONS = Arrays.asList(".aiff", ".aif", ".flac", ".wav", ".m4a", ".ape",
|
||||
".wma", ".mp2", ".mp1", ".mp3", ".aac", ".mp4", ".m4p", ".m1a", ".m2a", ".m4r", ".mpa", ".m3u", ".mid", ".midi", ".ogg");
|
||||
private final static List<String> DOCUMENT_EXTENSIONS = Arrays.asList(".doc", ".docx", ".odt", ".xls", ".xlsx", ".ppt", ".pptx");
|
||||
private final static List<String> EXECUTABLE_EXTENSIONS = Arrays.asList(".exe", ".msi", ".cmd", ".com", ".bat", ".reg", ".scr", ".dll", ".ini");
|
||||
private final static List<String> TEXT_EXTENSIONS = Arrays.asList(".txt", ".rtf", ".log", ".text", ".xml");
|
||||
private final static List<String> WEB_EXTENSIONS = Arrays.asList(".html", ".htm", ".css", ".js", ".php", ".aspx");
|
||||
private final static List<String> PDF_EXTENSIONS = Arrays.asList(".pdf");
|
||||
private final static List<String> ARCHIVE_EXTENSIONS = Arrays.asList(".zip", ".rar", ".7zip", ".7z", ".arj", ".tar", ".gzip", ".bzip", ".bzip2", ".cab", ".jar", ".cpio", ".ar", ".gz", ".tgz");
|
||||
private final static List<String> IMAGE_EXTENSIONS = Arrays.asList(".jpg", ".jpeg", ".png", ".psd", ".nef", ".tiff", ".bmp"); //NON-NLS
|
||||
private final static List<String> VIDEO_EXTENSIONS = Arrays.asList(".aaf", ".3gp", ".asf", ".avi", ".m1v", ".m2v", //NON-NLS
|
||||
".m4v", ".mp4", ".mov", ".mpeg", ".mpg", ".mpe", ".mp4", ".rm", ".wmv", ".mpv", ".flv", ".swf"); //NON-NLS
|
||||
private final static List<String> AUDIO_EXTENSIONS = Arrays.asList(".aiff", ".aif", ".flac", ".wav", ".m4a", ".ape", //NON-NLS
|
||||
".wma", ".mp2", ".mp1", ".mp3", ".aac", ".mp4", ".m4p", ".m1a", ".m2a", ".m4r", ".mpa", ".m3u", ".mid", ".midi", ".ogg"); //NON-NLS
|
||||
private final static List<String> DOCUMENT_EXTENSIONS = Arrays.asList(".doc", ".docx", ".odt", ".xls", ".xlsx", ".ppt", ".pptx"); //NON-NLS
|
||||
private final static List<String> EXECUTABLE_EXTENSIONS = Arrays.asList(".exe", ".msi", ".cmd", ".com", ".bat", ".reg", ".scr", ".dll", ".ini"); //NON-NLS
|
||||
private final static List<String> TEXT_EXTENSIONS = Arrays.asList(".txt", ".rtf", ".log", ".text", ".xml"); //NON-NLS
|
||||
private final static List<String> WEB_EXTENSIONS = Arrays.asList(".html", ".htm", ".css", ".js", ".php", ".aspx"); //NON-NLS
|
||||
private final static List<String> PDF_EXTENSIONS = Arrays.asList(".pdf"); //NON-NLS
|
||||
private final static List<String> ARCHIVE_EXTENSIONS = Arrays.asList(".zip", ".rar", ".7zip", ".7z", ".arj", ".tar", ".gzip", ".bzip", ".bzip2", ".cab", ".jar", ".cpio", ".ar", ".gz", ".tgz"); //NON-NLS
|
||||
|
||||
public static List<String> getImageExtensions() {
|
||||
return IMAGE_EXTENSIONS;
|
||||
|
||||
@@ -45,7 +45,7 @@ public class FileTypeNode extends DisplayableItemNode {
|
||||
//final long count = getChildren().getNodesCount(true);
|
||||
super.setDisplayName(filter.getDisplayName() + " (" + count + ")");
|
||||
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-filter-icon.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-filter-icon.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,7 +48,7 @@ public class FileTypesNode extends DisplayableItemNode {
|
||||
super.setName(filter.getName());
|
||||
super.setDisplayName(filter.getDisplayName());
|
||||
}
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file_types.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file_types.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -62,15 +62,15 @@ public class HashsetHits implements AutopsyVisitableItem {
|
||||
try {
|
||||
int setNameId = BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID();
|
||||
int artId = BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID();
|
||||
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id "
|
||||
+ "FROM blackboard_attributes,blackboard_artifacts WHERE "
|
||||
+ "attribute_type_id=" + setNameId
|
||||
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id"
|
||||
+ " AND blackboard_artifacts.artifact_type_id=" + artId;
|
||||
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id " //NON-NLS
|
||||
+ "FROM blackboard_attributes,blackboard_artifacts WHERE " //NON-NLS
|
||||
+ "attribute_type_id=" + setNameId //NON-NLS
|
||||
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS
|
||||
+ " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS
|
||||
rs = skCase.runQuery(query);
|
||||
while (rs.next()) {
|
||||
String value = rs.getString("value_text");
|
||||
long artifactId = rs.getLong("artifact_id");
|
||||
String value = rs.getString("value_text"); //NON-NLS
|
||||
long artifactId = rs.getLong("artifact_id"); //NON-NLS
|
||||
if (!hashSetHitsMap.containsKey(value)) {
|
||||
hashSetHitsMap.put(value, new HashSet<Long>());
|
||||
}
|
||||
@@ -79,13 +79,13 @@ public class HashsetHits implements AutopsyVisitableItem {
|
||||
}
|
||||
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "SQL Exception occurred: ", ex);
|
||||
logger.log(Level.WARNING, "SQL Exception occurred: ", ex); //NON-NLS
|
||||
} finally {
|
||||
if (rs != null) {
|
||||
try {
|
||||
skCase.closeRunQuery(rs);
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Error closing result set after getting hashset hits", ex);
|
||||
logger.log(Level.WARNING, "Error closing result set after getting hashset hits", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public class HashsetHits implements AutopsyVisitableItem {
|
||||
super(Children.create(new HashsetHitsRootChildren(), true), Lookups.singleton(DISPLAY_NAME));
|
||||
super.setName(HASHSET_HITS);
|
||||
super.setDisplayName(DISPLAY_NAME);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/hashset_hits.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/hashset_hits.png"); //NON-NLS
|
||||
initArtifacts();
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ public class HashsetHits implements AutopsyVisitableItem {
|
||||
super(Children.create(new HashsetHitsSetChildren(children), true), Lookups.singleton(name));
|
||||
super.setName(name);
|
||||
super.setDisplayName(name + " (" + children.size() + ")");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/hashset_hits.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/hashset_hits.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -204,7 +204,7 @@ public class HashsetHits implements AutopsyVisitableItem {
|
||||
//TODO: bulk artifact gettings
|
||||
list.add(skCase.getBlackboardArtifact(l));
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "TSK Exception occurred", ex);
|
||||
logger.log(Level.WARNING, "TSK Exception occurred", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ImageNode extends AbstractContentNode<Image> {
|
||||
// set name, display name, and icon
|
||||
String imgName = nameForImage(img);
|
||||
this.setDisplayName(imgName);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/hard-drive-icon.jpg");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/hard-drive-icon.jpg"); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -68,11 +68,11 @@ public class Installer extends ModuleInstall {
|
||||
} else if (skVersion.length() == 0) {
|
||||
throw new Exception(NbBundle.getMessage(this.getClass(), "Installer.exception.taskVerStringBang.msg"));
|
||||
} else {
|
||||
logger.log(Level.CONFIG, "Sleuth Kit Version: {0}", skVersion);
|
||||
logger.log(Level.CONFIG, "Sleuth Kit Version: {0}", skVersion); //NON-NLS
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Error calling Sleuth Kit library (test call failed)", e);
|
||||
logger.log(Level.SEVERE, "Error calling Sleuth Kit library (test call failed)", e); //NON-NLS
|
||||
|
||||
|
||||
// Normal error box log handler won't be loaded yet, so show error here.
|
||||
|
||||
@@ -70,29 +70,29 @@ public class InterestingHits implements AutopsyVisitableItem {
|
||||
try {
|
||||
int setNameId = BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID();
|
||||
int artId = artType.getTypeID();
|
||||
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id "
|
||||
+ "FROM blackboard_attributes,blackboard_artifacts WHERE "
|
||||
+ "attribute_type_id=" + setNameId
|
||||
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id"
|
||||
+ " AND blackboard_artifacts.artifact_type_id=" + artId;
|
||||
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id " //NON-NLS
|
||||
+ "FROM blackboard_attributes,blackboard_artifacts WHERE " //NON-NLS
|
||||
+ "attribute_type_id=" + setNameId //NON-NLS
|
||||
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS
|
||||
+ " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS
|
||||
rs = skCase.runQuery(query);
|
||||
while (rs.next()) {
|
||||
String value = rs.getString("value_text");
|
||||
long artifactId = rs.getLong("artifact_id");
|
||||
String value = rs.getString("value_text"); //NON-NLS
|
||||
long artifactId = rs.getLong("artifact_id"); //NON-NLS
|
||||
if (!interestingItemsMap.containsKey(value)) {
|
||||
interestingItemsMap.put(value, new HashSet<Long>());
|
||||
}
|
||||
interestingItemsMap.get(value).add(artifactId);
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "SQL Exception occurred: ", ex);
|
||||
logger.log(Level.WARNING, "SQL Exception occurred: ", ex); //NON-NLS
|
||||
}
|
||||
finally {
|
||||
if (rs != null) {
|
||||
try {
|
||||
skCase.closeRunQuery(rs);
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Error closing result set after getting artifacts", ex);
|
||||
logger.log(Level.WARNING, "Error closing result set after getting artifacts", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class InterestingHits implements AutopsyVisitableItem {
|
||||
super(Children.create(new InterestingHitsRootChildren(), true), Lookups.singleton(DISPLAY_NAME));
|
||||
super.setName(INTERESTING_ITEMS);
|
||||
super.setDisplayName(DISPLAY_NAME);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/interesting_item.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/interesting_item.png"); //NON-NLS
|
||||
initArtifacts();
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class InterestingHits implements AutopsyVisitableItem {
|
||||
super(Children.create(new InterestingHitsSetChildren(children), true), Lookups.singleton(name));
|
||||
super.setName(name);
|
||||
super.setDisplayName(name + " (" + children.size() + ")");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/interesting_item.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/interesting_item.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -210,7 +210,7 @@ public class InterestingHits implements AutopsyVisitableItem {
|
||||
try {
|
||||
list.add(skCase.getBlackboardArtifact(l));
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "TSK Exception occurred", ex);
|
||||
logger.log(Level.WARNING, "TSK Exception occurred", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -58,7 +58,7 @@ public class KeyValueNode extends AbstractNode {
|
||||
if (af != null) {
|
||||
// set name, display name, and icon
|
||||
if (af.isDir()) {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
|
||||
} else {
|
||||
this.setIconBaseWithExtension(FileNode.getIconForFileType(af));
|
||||
}
|
||||
|
||||
@@ -118,18 +118,18 @@ public class KeywordHits implements AutopsyVisitableItem {
|
||||
int wordId = BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID();
|
||||
int regexId = BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD_REGEXP.getTypeID();
|
||||
int artId = BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID();
|
||||
String query = "SELECT blackboard_attributes.value_text,blackboard_attributes.artifact_id,"
|
||||
+ "blackboard_attributes.attribute_type_id FROM blackboard_attributes,blackboard_artifacts WHERE "
|
||||
+ "(blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id AND "
|
||||
+ "blackboard_artifacts.artifact_type_id=" + artId
|
||||
+ ") AND (attribute_type_id=" + setId + " OR "
|
||||
+ "attribute_type_id=" + wordId + " OR "
|
||||
+ "attribute_type_id=" + regexId + ")";
|
||||
String query = "SELECT blackboard_attributes.value_text,blackboard_attributes.artifact_id," //NON-NLS
|
||||
+ "blackboard_attributes.attribute_type_id FROM blackboard_attributes,blackboard_artifacts WHERE " //NON-NLS
|
||||
+ "(blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id AND " //NON-NLS
|
||||
+ "blackboard_artifacts.artifact_type_id=" + artId //NON-NLS
|
||||
+ ") AND (attribute_type_id=" + setId + " OR " //NON-NLS
|
||||
+ "attribute_type_id=" + wordId + " OR " //NON-NLS
|
||||
+ "attribute_type_id=" + regexId + ")"; //NON-NLS
|
||||
rs = skCase.runQuery(query);
|
||||
while (rs.next()) {
|
||||
String value = rs.getString("value_text");
|
||||
long artifactId = rs.getLong("artifact_id");
|
||||
long typeId = rs.getLong("attribute_type_id");
|
||||
String value = rs.getString("value_text"); //NON-NLS
|
||||
long artifactId = rs.getLong("artifact_id"); //NON-NLS
|
||||
long typeId = rs.getLong("attribute_type_id"); //NON-NLS
|
||||
if (!artifacts.containsKey(artifactId)) {
|
||||
artifacts.put(artifactId, new LinkedHashMap<Long, String>());
|
||||
}
|
||||
@@ -140,13 +140,13 @@ public class KeywordHits implements AutopsyVisitableItem {
|
||||
}
|
||||
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "SQL Exception occurred: ", ex);
|
||||
logger.log(Level.WARNING, "SQL Exception occurred: ", ex); //NON-NLS
|
||||
} finally {
|
||||
if (rs != null) {
|
||||
try {
|
||||
skCase.closeRunQuery(rs);
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Error closing result set after getting keyword hits", ex);
|
||||
logger.log(Level.WARNING, "Error closing result set after getting keyword hits", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class KeywordHits implements AutopsyVisitableItem {
|
||||
super(Children.create(new KeywordHitsRootChildren(), true), Lookups.singleton(KEYWORD_HITS));
|
||||
super.setName(NAME);
|
||||
super.setDisplayName(KEYWORD_HITS);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/keyword_hits.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/keyword_hits.png"); //NON-NLS
|
||||
initArtifacts();
|
||||
initMaps();
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public class KeywordHits implements AutopsyVisitableItem {
|
||||
totalDescendants += grandChildren.size();
|
||||
}
|
||||
super.setDisplayName(name + " (" + totalDescendants + ")");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/keyword_hits.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/keyword_hits.png"); //NON-NLS
|
||||
this.name = name;
|
||||
this.children = children;
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public class KeywordHits implements AutopsyVisitableItem {
|
||||
super(Children.create(new KeywordHitsKeywordChildren(children), true), Lookups.singleton(name));
|
||||
super.setName(name);
|
||||
super.setDisplayName(name + " (" + children.size() + ")");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/keyword_hits.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/keyword_hits.png"); //NON-NLS
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ public class KeywordHits implements AutopsyVisitableItem {
|
||||
//TODO: bulk artifact gettings
|
||||
tempList.add(skCase.getBlackboardArtifact(l));
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "TSK Exception occurred", ex);
|
||||
logger.log(Level.WARNING, "TSK Exception occurred", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
list.addAll(tempList);
|
||||
@@ -359,7 +359,7 @@ public class KeywordHits implements AutopsyVisitableItem {
|
||||
try {
|
||||
file = artifact.getSleuthkitCase().getAbstractFileById(artifact.getObjectID());
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "TskCoreException while constructing BlackboardArtifact Node from KeywordHitsKeywordChildren");
|
||||
logger.log(Level.SEVERE, "TskCoreException while constructing BlackboardArtifact Node from KeywordHitsKeywordChildren"); //NON-NLS
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ import org.sleuthkit.datamodel.TskData;
|
||||
public class KnownFileFilterNode extends FilterNode {
|
||||
|
||||
/** Preference key values. */
|
||||
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false
|
||||
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true
|
||||
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false NON-NLS
|
||||
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true NON-NLS
|
||||
|
||||
/** True if Nodes selected from the Views Node should filter Known Files. */
|
||||
private static boolean filterFromViews = true;
|
||||
@@ -128,7 +128,7 @@ public class KnownFileFilterNode extends FilterNode {
|
||||
}
|
||||
|
||||
private void addPreferenceListener() {
|
||||
Preferences prefs = NbPreferences.root().node("/org/sleuthkit/autopsy/core");
|
||||
Preferences prefs = NbPreferences.root().node("/org/sleuthkit/autopsy/core"); //NON-NLS
|
||||
// Initialize with values stored in preferences
|
||||
filterFromViews = prefs.getBoolean(VIEWS_HIDE_KNOWN, filterFromViews);
|
||||
filterFromDataSources = prefs.getBoolean(DS_HIDE_KNOWN, filterFromDataSources);
|
||||
|
||||
@@ -58,9 +58,9 @@ public class LayoutFileNode extends AbstractAbstractFileNode<LayoutFile> {
|
||||
this.setDisplayName(nameForLayoutFile(lf));
|
||||
|
||||
if (lf.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.CARVED)) {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/carved-file-icon-16.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/carved-file-icon-16.png"); //NON-NLS
|
||||
} else {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class LocalFileNode extends AbstractAbstractFileNode<AbstractFile> {
|
||||
|
||||
// set name, display name, and icon
|
||||
if (af.isDir()) {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
|
||||
} else {
|
||||
this.setIconBaseWithExtension(FileNode.getIconForFileType(af));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class NodeProperty<T> extends PropertySupport.ReadOnly<T> {
|
||||
@SuppressWarnings("unchecked")
|
||||
public NodeProperty(String name, String displayName, String desc, T value) {
|
||||
super(name, (Class<T>) value.getClass(), displayName, desc);
|
||||
setValue("suppressCustomEditor", Boolean.TRUE); // remove the "..." (editing) button
|
||||
setValue("suppressCustomEditor", Boolean.TRUE); // remove the "..." (editing) button NON-NLS
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,19 +29,19 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
SleuthkitCase skCase;
|
||||
|
||||
public enum RecentFilesFilter implements AutopsyVisitableItem {
|
||||
AUT_0DAY_FILTER(0, "AUT_0DAY_FILTER",
|
||||
AUT_0DAY_FILTER(0, "AUT_0DAY_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(RecentFiles.class, "RecentFiles.aut0DayFilter.displayName.text"), 0),
|
||||
AUT_1DAY_FILTER(0, "AUT_1DAY_FILTER",
|
||||
AUT_1DAY_FILTER(0, "AUT_1DAY_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(RecentFiles.class, "RecentFiles.aut1dayFilter.displayName.text"), 1),
|
||||
AUT_2DAY_FILTER(0, "AUT_2DAY_FILTER",
|
||||
AUT_2DAY_FILTER(0, "AUT_2DAY_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(RecentFiles.class, "RecentFiles.aut2dayFilter.displayName.text"), 2),
|
||||
AUT_3DAY_FILTER(0, "AUT_3DAY_FILTER",
|
||||
AUT_3DAY_FILTER(0, "AUT_3DAY_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(RecentFiles.class, "RecentFiles.aut3dayFilter.displayName.text"), 3),
|
||||
AUT_4DAY_FILTER(0, "AUT_4DAY_FILTER",
|
||||
AUT_4DAY_FILTER(0, "AUT_4DAY_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(RecentFiles.class, "RecentFiles.aut4dayFilter.displayName.text"), 4),
|
||||
AUT_5DAY_FILTER(0, "AUT_5DAY_FILTER",
|
||||
AUT_5DAY_FILTER(0, "AUT_5DAY_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(RecentFiles.class, "RecentFiles.aut5dayFilter.displayName.text"), 5),
|
||||
AUT_6DAY_FILTER(0, "AUT_6DAY_FILTER",
|
||||
AUT_6DAY_FILTER(0, "AUT_6DAY_FILTER", //NON-NLS
|
||||
NbBundle.getMessage(RecentFiles.class, "RecentFiles.aut6dayFilter.displayName.text"), 6);
|
||||
|
||||
private int id;
|
||||
|
||||
@@ -62,11 +62,11 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
}
|
||||
|
||||
private long getLastTime() {
|
||||
String query = createMaxQuery("crtime");
|
||||
String query = createMaxQuery("crtime"); //NON-NLS
|
||||
long maxcr = runTimeQuery(query);
|
||||
query = createMaxQuery("ctime");
|
||||
query = createMaxQuery("ctime"); //NON-NLS
|
||||
long maxc = runTimeQuery(query);
|
||||
query = createMaxQuery("mtime");
|
||||
query = createMaxQuery("mtime"); //NON-NLS
|
||||
long maxm = runTimeQuery(query);
|
||||
//query = createMaxQuery("atime");
|
||||
//long maxa = runTimeQuery(query);
|
||||
@@ -76,7 +76,7 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
|
||||
//TODO add a generic query to SleuthkitCase
|
||||
private String createMaxQuery(String attr) {
|
||||
return "SELECT MAX(" + attr + ") from tsk_files WHERE " + attr + " < " + System.currentTimeMillis() / 1000;
|
||||
return "SELECT MAX(" + attr + ") from tsk_files WHERE " + attr + " < " + System.currentTimeMillis() / 1000; //NON-NLS
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@@ -87,13 +87,13 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
rs = skCase.runQuery(query);
|
||||
result = rs.getLong(1);
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get recent files results", ex);
|
||||
logger.log(Level.WARNING, "Couldn't get recent files results", ex); //NON-NLS
|
||||
} finally {
|
||||
if (rs != null) {
|
||||
try {
|
||||
skCase.closeRunQuery(rs);
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Error closing result set after getting recent files results", ex);
|
||||
logger.log(Level.WARNING, "Error closing result set after getting recent files results", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,16 +67,16 @@ import org.sleuthkit.datamodel.TskData;
|
||||
|
||||
private String createQuery() {
|
||||
Calendar prevDayQuery = (Calendar) prevDay.clone();
|
||||
String query = "(dir_type = " + TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue() + ")"
|
||||
+ " AND (known IS NULL OR known != 1) AND (";
|
||||
String query = "(dir_type = " + TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue() + ")" //NON-NLS
|
||||
+ " AND (known IS NULL OR known != 1) AND ("; //NON-NLS
|
||||
long lowerLimit = prevDayQuery.getTimeInMillis() / 1000;
|
||||
prevDayQuery.add(Calendar.DATE, 1);
|
||||
prevDayQuery.add(Calendar.MILLISECOND, -1);
|
||||
long upperLimit = prevDayQuery.getTimeInMillis() / 1000;
|
||||
query += "(crtime BETWEEN " + lowerLimit + " AND " + upperLimit + ") OR ";
|
||||
query += "(ctime BETWEEN " + lowerLimit + " AND " + upperLimit + ") OR ";
|
||||
query += "(crtime BETWEEN " + lowerLimit + " AND " + upperLimit + ") OR "; //NON-NLS
|
||||
query += "(ctime BETWEEN " + lowerLimit + " AND " + upperLimit + ") OR "; //NON-NLS
|
||||
//query += "(atime BETWEEN " + lowerLimit + " AND " + upperLimit + ") OR ";
|
||||
query += "(mtime BETWEEN " + lowerLimit + " AND " + upperLimit + "))";
|
||||
query += "(mtime BETWEEN " + lowerLimit + " AND " + upperLimit + "))"; //NON-NLS
|
||||
//query += " LIMIT " + MAX_OBJECTS;
|
||||
return query;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ import org.sleuthkit.datamodel.TskData;
|
||||
}
|
||||
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get search results", ex);
|
||||
logger.log(Level.WARNING, "Couldn't get search results", ex); //NON-NLS
|
||||
}
|
||||
return ret;
|
||||
|
||||
@@ -104,7 +104,7 @@ import org.sleuthkit.datamodel.TskData;
|
||||
try {
|
||||
return skCase.countFilesWhere(createQuery());
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting recent files search view count", ex);
|
||||
logger.log(Level.SEVERE, "Error getting recent files search view count", ex); //NON-NLS
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class RecentFilesFilterNode extends DisplayableItemNode {
|
||||
+ prevDay.get(Calendar.DATE) + ", "
|
||||
+ prevDay.get(Calendar.YEAR);
|
||||
this.setShortDescription(tooltip);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/recent_files.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/recent_files.png"); //NON-NLS
|
||||
|
||||
//get count of children without preloading all children nodes
|
||||
final long count = new RecentFilesFilterChildren(filter, skCase, lastDay).calculateItems();
|
||||
|
||||
@@ -37,7 +37,7 @@ public class RecentFilesNode extends DisplayableItemNode {
|
||||
super.setName(NAME);
|
||||
super.setDisplayName(NAME);
|
||||
this.skCase = skCase;
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/recent_files.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/recent_files.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ResultsNode extends DisplayableItemNode {
|
||||
new TagsNodeKey())), Lookups.singleton(NAME));
|
||||
setName(NAME);
|
||||
setDisplayName(NAME);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/results.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/results.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,8 +39,8 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*/
|
||||
public class TagNameNode extends DisplayableItemNode {
|
||||
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png";
|
||||
private static final String BOOKMARK_TAG_ICON_PATH = "org/sleuthkit/autopsy/images/star-bookmark-icon-16.png";
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png"; //NON-NLS
|
||||
private static final String BOOKMARK_TAG_ICON_PATH = "org/sleuthkit/autopsy/images/star-bookmark-icon-16.png"; //NON-NLS
|
||||
private final TagName tagName;
|
||||
private static final String CONTENT_TAG_TYPE_NODE_KEY = NbBundle.getMessage(TagNameNode.class,
|
||||
"TagNameNode.contentTagTypeNodeKey.text");
|
||||
@@ -57,7 +57,7 @@ public class TagNameNode extends DisplayableItemNode {
|
||||
tagsCount = Case.getCurrentCase().getServices().getTagsManager().getContentTagsCountByTagName(tagName);
|
||||
tagsCount += Case.getCurrentCase().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagName(tagName);
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(TagNameNode.class.getName()).log(Level.SEVERE, "Failed to get tags count for " + tagName.getDisplayName() + " tag name", ex);
|
||||
Logger.getLogger(TagNameNode.class.getName()).log(Level.SEVERE, "Failed to get tags count for " + tagName.getDisplayName() + " tag name", ex); //NON-NLS
|
||||
}
|
||||
|
||||
super.setName(tagName.getDisplayName());
|
||||
@@ -130,7 +130,7 @@ public class TagNameNode extends DisplayableItemNode {
|
||||
} else if (BLACKBOARD_ARTIFACT_TAG_TYPE_NODE_KEY.equals(key)) {
|
||||
return new BlackboardArtifactTagTypeNode(tagName);
|
||||
} else {
|
||||
Logger.getLogger(TagNameNode.class.getName()).log(Level.SEVERE, "{0} not a recognized key", key);
|
||||
Logger.getLogger(TagNameNode.class.getName()).log(Level.SEVERE, "{0} not a recognized key", key); //NON-NLS
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
class TagsNode extends DisplayableItemNode {
|
||||
|
||||
private static final String DISPLAY_NAME = NbBundle.getMessage(TagsNode.class, "TagsNode.displayName.text");
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png";
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png"; //NON-NLS
|
||||
|
||||
public TagsNode() {
|
||||
super(Children.create(new TagNameNodeFactory(), true), Lookups.singleton(DISPLAY_NAME));
|
||||
@@ -83,7 +83,7 @@ class TagsNode extends DisplayableItemNode {
|
||||
try {
|
||||
keys.addAll(Case.getCurrentCase().getServices().getTagsManager().getTagNamesInUse());
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(TagNameNodeFactory.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex);
|
||||
Logger.getLogger(TagNameNodeFactory.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ViewsNode extends DisplayableItemNode {
|
||||
Lookups.singleton(NAME));
|
||||
setName(NAME);
|
||||
setDisplayName(NAME);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/views.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/views.png"); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,7 +39,7 @@ public class VirtualDirectoryNode extends AbstractAbstractFileNode<VirtualDirect
|
||||
|
||||
private static Logger logger = Logger.getLogger(VirtualDirectoryNode.class.getName());
|
||||
//prefix for special VirtualDirectory root nodes grouping local files
|
||||
public final static String LOGICAL_FILE_SET_PREFIX = "LogicalFileSet";
|
||||
public final static String LOGICAL_FILE_SET_PREFIX = "LogicalFileSet"; //NON-NLS
|
||||
|
||||
public static String nameForLayoutFile(VirtualDirectory ld) {
|
||||
return ld.getName();
|
||||
@@ -54,13 +54,13 @@ public class VirtualDirectoryNode extends AbstractAbstractFileNode<VirtualDirect
|
||||
|
||||
//set icon for name, special case for some built-ins
|
||||
if (name.equals(VirtualDirectory.NAME_UNALLOC)) {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-deleted.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-deleted.png"); //NON-NLS
|
||||
} else if (name.startsWith(LOGICAL_FILE_SET_PREFIX)) {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/fileset-icon-16.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/fileset-icon-16.png"); //NON-NLS
|
||||
} else if (name.equals(VirtualDirectory.NAME_CARVED)) {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //TODO
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //TODO NON-NLS
|
||||
} else {
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class VolumeNode extends AbstractContentNode<Volume> {
|
||||
* @return short name for the Volume
|
||||
*/
|
||||
static String nameForVolume(Volume vol) {
|
||||
return "vol" + Long.toString(vol.getAddr());
|
||||
return "vol" + Long.toString(vol.getAddr()); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,7 @@ public class VolumeNode extends AbstractContentNode<Volume> {
|
||||
String tempVolName = volName + " (" + vol.getDescription() + ": " + vol.getStart() + "-" + end + ")";
|
||||
this.setDisplayName(tempVolName);
|
||||
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/vol-icon.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/vol-icon.png"); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
public class BlackboardArtifactTagTypeNode extends DisplayableItemNode {
|
||||
private static final String DISPLAY_NAME = NbBundle.getMessage(BlackboardArtifactTagTypeNode.class,
|
||||
"BlackboardArtifactTagTypeNode.displayName.text");
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png";
|
||||
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png"; //NON-NLS
|
||||
|
||||
public BlackboardArtifactTagTypeNode(TagName tagName) {
|
||||
super(Children.create(new BlackboardArtifactTagNodeFactory(tagName), true), Lookups.singleton(tagName.getDisplayName() + " " + DISPLAY_NAME));
|
||||
@@ -55,7 +55,7 @@ public class BlackboardArtifactTagTypeNode extends DisplayableItemNode {
|
||||
tagsCount = Case.getCurrentCase().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagName(tagName);
|
||||
}
|
||||
catch (TskCoreException ex) {
|
||||
Logger.getLogger(BlackboardArtifactTagTypeNode.class.getName()).log(Level.SEVERE, "Failed to get blackboard artifact tags count for " + tagName.getDisplayName() + " tag name", ex);
|
||||
Logger.getLogger(BlackboardArtifactTagTypeNode.class.getName()).log(Level.SEVERE, "Failed to get blackboard artifact tags count for " + tagName.getDisplayName() + " tag name", ex); //NON-NLS
|
||||
}
|
||||
|
||||
super.setName(DISPLAY_NAME);
|
||||
@@ -105,7 +105,7 @@ public class BlackboardArtifactTagTypeNode extends DisplayableItemNode {
|
||||
keys.addAll(Case.getCurrentCase().getServices().getTagsManager().getBlackboardArtifactTagsByTagName(tagName));
|
||||
}
|
||||
catch (TskCoreException ex) {
|
||||
Logger.getLogger(BlackboardArtifactTagTypeNode.BlackboardArtifactTagNodeFactory.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex);
|
||||
Logger.getLogger(BlackboardArtifactTagTypeNode.BlackboardArtifactTagNodeFactory.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ public class DataResultFilterNode extends FilterNode {
|
||||
}
|
||||
}
|
||||
} catch (TskException ex) {
|
||||
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Error getting linked file", ex);
|
||||
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Error getting linked file", ex); //NON-NLS
|
||||
}
|
||||
return c;
|
||||
}
|
||||
@@ -555,7 +555,7 @@ public class DataResultFilterNode extends FilterNode {
|
||||
sourceEm.setExploredContextAndSelection(newSelection, new Node[]{newSelection});
|
||||
} catch (PropertyVetoException ex) {
|
||||
Logger logger = Logger.getLogger(DataResultFilterNode.class.getName());
|
||||
logger.log(Level.WARNING, "Error: can't open the selected directory.", ex);
|
||||
logger.log(Level.WARNING, "Error: can't open the selected directory.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -580,7 +580,7 @@ public class DataResultFilterNode extends FilterNode {
|
||||
sourceEm.setSelectedNodes(new Node[]{parentNode});
|
||||
} catch (PropertyVetoException ex) {
|
||||
Logger logger = Logger.getLogger(DataResultFilterNode.class.getName());
|
||||
logger.log(Level.WARNING, "Error: can't open the parent directory.", ex);
|
||||
logger.log(Level.WARNING, "Error: can't open the parent directory.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,7 +114,7 @@ class DirectoryTreeFilterChildren extends FilterNode.Children {
|
||||
}
|
||||
} catch (TskException ex) {
|
||||
Logger.getLogger(DirectoryTreeFilterChildren.class.getName())
|
||||
.log(Level.WARNING, "Error getting directory children", ex);
|
||||
.log(Level.WARNING, "Error getting directory children", ex); //NON-NLS
|
||||
return false;
|
||||
}
|
||||
return ret;
|
||||
@@ -138,7 +138,7 @@ class DirectoryTreeFilterChildren extends FilterNode.Children {
|
||||
|
||||
} catch (TskException ex) {
|
||||
Logger.getLogger(DirectoryTreeFilterChildren.class.getName())
|
||||
.log(Level.WARNING, "Error getting volume children", ex);
|
||||
.log(Level.WARNING, "Error getting volume children", ex); //NON-NLS
|
||||
return false;
|
||||
}
|
||||
return ret;
|
||||
@@ -198,7 +198,7 @@ class DirectoryTreeFilterChildren extends FilterNode.Children {
|
||||
return false;
|
||||
}
|
||||
} catch (TskCoreException e) {
|
||||
logger.log(Level.SEVERE, "Error checking if file node is leaf.", e);
|
||||
logger.log(Level.SEVERE, "Error checking if file node is leaf.", e); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class DirectoryTreeFilterNode extends FilterNode {
|
||||
final int numChildren = file.getChildrenCount();
|
||||
name = name + " (" + numChildren + ")";
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting children count to display for file: " + file, ex);
|
||||
logger.log(Level.SEVERE, "Error getting children count to display for file: " + file, ex); //NON-NLS
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
* path to the icon used by the component and its open action
|
||||
*/
|
||||
// static final String ICON_PATH = "SET/PATH/TO/ICON/HERE";
|
||||
private static final String PREFERRED_ID = "DirectoryTreeTopComponent";
|
||||
private static final String PREFERRED_ID = "DirectoryTreeTopComponent"; //NON-NLS
|
||||
private PropertyChangeSupport pcs;
|
||||
// for error handling
|
||||
private JPanel caller;
|
||||
@@ -161,32 +161,32 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
|
||||
jScrollPane1.setBorder(null);
|
||||
|
||||
backButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_back.png"))); // NOI18N
|
||||
backButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
org.openide.awt.Mnemonics.setLocalizedText(backButton, org.openide.util.NbBundle.getMessage(DirectoryTreeTopComponent.class, "DirectoryTreeTopComponent.backButton.text")); // NOI18N
|
||||
backButton.setBorderPainted(false);
|
||||
backButton.setContentAreaFilled(false);
|
||||
backButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_back_disabled.png"))); // NOI18N
|
||||
backButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_back_disabled.png"))); // NOI18N NON-NLS
|
||||
backButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
backButton.setMaximumSize(new java.awt.Dimension(55, 100));
|
||||
backButton.setMinimumSize(new java.awt.Dimension(5, 5));
|
||||
backButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
backButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_back_hover.png"))); // NOI18N
|
||||
backButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
backButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
backButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
forwardButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_forward.png"))); // NOI18N
|
||||
forwardButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_forward.png"))); // NOI18N NON-NLS
|
||||
org.openide.awt.Mnemonics.setLocalizedText(forwardButton, org.openide.util.NbBundle.getMessage(DirectoryTreeTopComponent.class, "DirectoryTreeTopComponent.forwardButton.text")); // NOI18N
|
||||
forwardButton.setBorderPainted(false);
|
||||
forwardButton.setContentAreaFilled(false);
|
||||
forwardButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_forward_disabled.png"))); // NOI18N
|
||||
forwardButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
|
||||
forwardButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
forwardButton.setMaximumSize(new java.awt.Dimension(55, 100));
|
||||
forwardButton.setMinimumSize(new java.awt.Dimension(5, 5));
|
||||
forwardButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
forwardButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_forward_hover.png"))); // NOI18N
|
||||
forwardButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/directorytree/btn_step_forward_hover.png"))); // NOI18N NON-NLS
|
||||
forwardButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
forwardButtonActionPerformed(evt);
|
||||
@@ -295,15 +295,15 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
TopComponent win = winManager.findTopComponent(PREFERRED_ID);
|
||||
if (win == null) {
|
||||
logger.warning(
|
||||
"Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system.");
|
||||
"Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system."); //NON-NLS
|
||||
return getDefault();
|
||||
}
|
||||
if (win instanceof DirectoryTreeTopComponent) {
|
||||
return (DirectoryTreeTopComponent) win;
|
||||
}
|
||||
logger.warning(
|
||||
"There seem to be multiple components with the '" + PREFERRED_ID
|
||||
+ "' ID. That is a potential source of errors and unexpected behavior.");
|
||||
"There seem to be multiple components with the '" + PREFERRED_ID //NON-NLS
|
||||
+ "' ID. That is a potential source of errors and unexpected behavior."); //NON-NLS
|
||||
return getDefault();
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
try {
|
||||
em.setSelectedNodes(new Node[]{childNodes.getNodeAt(0)});
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Error setting default selected node.", ex);
|
||||
logger.log(Level.SEVERE, "Error setting default selected node.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
try {
|
||||
displayName = content.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for node: " + originNode);
|
||||
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for node: " + originNode); //NON-NLS
|
||||
}
|
||||
} else if (originNode.getLookup().lookup(String.class) != null) {
|
||||
displayName = originNode.getLookup().lookup(String.class);
|
||||
@@ -783,13 +783,13 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
Children rootChildren = em.getRootContext().getChildren();
|
||||
Node dataSourcesFilterNode = rootChildren.findChild(DataSourcesNode.NAME);
|
||||
if (dataSourcesFilterNode == null) {
|
||||
logger.log(Level.SEVERE, "Cannot find data sources filter node, won't refresh the content tree");
|
||||
logger.log(Level.SEVERE, "Cannot find data sources filter node, won't refresh the content tree"); //NON-NLS
|
||||
return;
|
||||
}
|
||||
OriginalNode imagesNodeOrig = dataSourcesFilterNode.getLookup().lookup(OriginalNode.class);
|
||||
|
||||
if (imagesNodeOrig == null) {
|
||||
logger.log(Level.SEVERE, "Cannot find data sources node, won't refresh the content tree");
|
||||
logger.log(Level.SEVERE, "Cannot find data sources node, won't refresh the content tree"); //NON-NLS
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -822,7 +822,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
Node results = dirChilds.findChild(ResultsNode.NAME);
|
||||
|
||||
if (results == null) {
|
||||
logger.log(Level.SEVERE, "Cannot find Results filter node, won't refresh the bb tree");
|
||||
logger.log(Level.SEVERE, "Cannot find Results filter node, won't refresh the bb tree"); //NON-NLS
|
||||
return;
|
||||
}
|
||||
OriginalNode original = results.getLookup().lookup(OriginalNode.class);
|
||||
@@ -888,7 +888,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
for (int i = 0; i < previouslySelectedNodePath.length; ++i) {
|
||||
nodePath.append(previouslySelectedNodePath[i]).append("/");
|
||||
}
|
||||
logger.log(Level.WARNING, "Failed to find any nodes to select on path " + nodePath.toString(), ex);
|
||||
logger.log(Level.WARNING, "Failed to find any nodes to select on path " + nodePath.toString(), ex); //NON-NLS
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -903,7 +903,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
try {
|
||||
em.setExploredContextAndSelection(selectedNode, new Node[]{selectedNode});
|
||||
} catch (PropertyVetoException ex) {
|
||||
logger.log(Level.WARNING, "Property veto from ExplorerManager setting selection to " + selectedNode.getName(), ex);
|
||||
logger.log(Level.WARNING, "Property veto from ExplorerManager setting selection to " + selectedNode.getName(), ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -942,7 +942,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
}
|
||||
treeNode = hashsetRootChilds.findChild(setName);
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Error retrieving attributes", ex);
|
||||
logger.log(Level.WARNING, "Error retrieving attributes", ex); //NON-NLS
|
||||
}
|
||||
} else if (type.equals(BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT)) {
|
||||
Node keywordRootNode = resultsChilds.findChild(type.getLabel());
|
||||
@@ -963,7 +963,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
Children listChildren = listNode.getChildren();
|
||||
treeNode = listChildren.findChild(keywordName);
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Error retrieving attributes", ex);
|
||||
logger.log(Level.WARNING, "Error retrieving attributes", ex); //NON-NLS
|
||||
}
|
||||
} else if (type.equals(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT)
|
||||
|| type.equals(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT)) {
|
||||
@@ -980,7 +980,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
}
|
||||
treeNode = interestingItemsRootChildren.findChild(setName);
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Error retrieving attributes", ex);
|
||||
logger.log(Level.WARNING, "Error retrieving attributes", ex); //NON-NLS
|
||||
}
|
||||
} else {
|
||||
Node extractedContent = resultsChilds.findChild(ExtractedContentNode.NAME);
|
||||
@@ -990,7 +990,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
try {
|
||||
em.setExploredContextAndSelection(treeNode, new Node[]{treeNode});
|
||||
} catch (PropertyVetoException ex) {
|
||||
logger.log(Level.WARNING, "Property Veto: ", ex);
|
||||
logger.log(Level.WARNING, "Property Veto: ", ex); //NON-NLS
|
||||
}
|
||||
|
||||
// Another thread is needed because we have to wait for dataResult to populate
|
||||
@@ -1029,7 +1029,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
try {
|
||||
firePropertyChange(BlackboardResultViewer.FINISHED_DISPLAY_EVT, 0, 1);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "DirectoryTreeTopComponent listener threw exception", e);
|
||||
logger.log(Level.SEVERE, "DirectoryTreeTopComponent listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "DirectoryTreeTopComponent.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"DirectoryTreeTopComponent.moduleErr.msg"),
|
||||
|
||||
@@ -331,15 +331,15 @@ public class ExplorerNodeActionVisitor extends ContentVisitor.Default<List<? ext
|
||||
popUpWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2);
|
||||
|
||||
String[] columnNames = new String[]{
|
||||
"fs_id",
|
||||
"img_offset",
|
||||
"par_id",
|
||||
"fs_type",
|
||||
"block_size",
|
||||
"block_count",
|
||||
"root_inum",
|
||||
"first_inum",
|
||||
"last_inum"
|
||||
"fs_id", //NON-NLS
|
||||
"img_offset", //NON-NLS
|
||||
"par_id", //NON-NLS
|
||||
"fs_type", //NON-NLS
|
||||
"block_size", //NON-NLS
|
||||
"block_count", //NON-NLS
|
||||
"root_inum", //NON-NLS
|
||||
"first_inum", //NON-NLS
|
||||
"last_inum" //NON-NLS
|
||||
};
|
||||
|
||||
Object[][] rowValues = new Object[1][9];
|
||||
@@ -394,7 +394,7 @@ public class ExplorerNodeActionVisitor extends ContentVisitor.Default<List<? ext
|
||||
|
||||
popUpWindow.add(fsdPanel);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(ExplorerNodeActionVisitor.class.getName()).log(Level.WARNING, "Error setting up File System Details panel.", ex);
|
||||
Logger.getLogger(ExplorerNodeActionVisitor.class.getName()).log(Level.WARNING, "Error setting up File System Details panel.", ex); //NON-NLS
|
||||
}
|
||||
|
||||
popUpWindow.pack();
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ExternalViewerAction extends AbstractAction {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(ExternalViewerAction.class.getName());
|
||||
private org.sleuthkit.datamodel.AbstractFile fileObject;
|
||||
final static String[] EXECUTABLE_EXT = {".exe", ".dll", ".com", ".bat", ".msi", ".reg", ".scr"};
|
||||
final static String[] EXECUTABLE_EXT = {".exe", ".dll", ".com", ".bat", ".msi", ".reg", ".scr"}; //NON-NLS
|
||||
|
||||
public ExternalViewerAction(String title, Node fileNode) {
|
||||
super(title);
|
||||
@@ -86,14 +86,14 @@ public class ExternalViewerAction extends AbstractAction {
|
||||
ContentUtils.writeToFile(fileObject, tempFile);
|
||||
} catch (IOException ex) {
|
||||
// throw an error here
|
||||
logger.log(Level.WARNING, "Can't save to temporary file.", ex);
|
||||
logger.log(Level.WARNING, "Can't save to temporary file.", ex); //NON-NLS
|
||||
}
|
||||
|
||||
try {
|
||||
Desktop.getDesktop().open(tempFile);
|
||||
} catch (IOException ex) {
|
||||
// if can't open the file, throw the error saying: "File type not supported."
|
||||
logger.log(Level.WARNING, "File type not supported.", ex);
|
||||
logger.log(Level.WARNING, "File type not supported.", ex); //NON-NLS
|
||||
}
|
||||
|
||||
// delete the file on exit
|
||||
|
||||
@@ -115,7 +115,7 @@ public final class ExtractAction extends AbstractAction {
|
||||
catch (Exception ex) {
|
||||
JOptionPane.showMessageDialog((Component) e.getSource(), NbBundle.getMessage(this.getClass(),
|
||||
"ExtractAction.extractFiles.cantCreateFolderErr.msg"));
|
||||
logger.log(Level.INFO, "Unable to create folder(s) for user " + destinationFolder.getAbsolutePath(), ex);
|
||||
logger.log(Level.INFO, "Unable to create folder(s) for user " + destinationFolder.getAbsolutePath(), ex); //NON-NLS
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ public final class ExtractAction extends AbstractAction {
|
||||
extracter.execute();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.log(Level.WARNING, "Unable to start background file extraction thread", ex);
|
||||
logger.log(Level.WARNING, "Unable to start background file extraction thread", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -240,7 +240,7 @@ public final class ExtractAction extends AbstractAction {
|
||||
super.get();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Fatal error during file extraction", ex);
|
||||
logger.log(Level.SEVERE, "Fatal error during file extraction", ex); //NON-NLS
|
||||
MessageNotifyUtil.Message.info(
|
||||
NbBundle.getMessage(this.getClass(), "ExtractAction.done.notifyMsg.extractErr", ex.getMessage()));
|
||||
msgDisplayed = true;
|
||||
@@ -268,7 +268,7 @@ public final class ExtractAction extends AbstractAction {
|
||||
}
|
||||
}
|
||||
catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Could not get children of content", ex);
|
||||
logger.log(Level.SEVERE, "Could not get children of content", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
return workUnits;
|
||||
|
||||
@@ -149,7 +149,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
uw.execute();
|
||||
}
|
||||
} else {
|
||||
logger.log(Level.WARNING, "Tried to get unallocated content from volume ID but " + u.VolumeId + u.llf == null ? "its list of unallocated files was null" : "the volume is locked" );
|
||||
logger.log(Level.WARNING, "Tried to get unallocated content from volume ID but " + u.VolumeId + u.llf == null ? "its list of unallocated files was null" : "the volume is locked" ); //NON-NLS
|
||||
}
|
||||
}
|
||||
if (isImage && !copyList.isEmpty()) {
|
||||
@@ -176,7 +176,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
return unallocFiles.get(0).accept(uv); //Launching it on the root directory
|
||||
}
|
||||
} catch (TskCoreException tce) {
|
||||
logger.log(Level.WARNING, "Couldn't get a list of Unallocated Files, failed at sending out the visitor ", tce);
|
||||
logger.log(Level.WARNING, "Couldn't get a list of Unallocated Files, failed at sending out the visitor ", tce); //NON-NLS
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -233,7 +233,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
NbBundle.getMessage(this.getClass(), "ExtractUnallocAction.progress.extractUnalloc.title"), new Cancellable() {
|
||||
@Override
|
||||
public boolean cancel() {
|
||||
logger.log(Level.INFO, "Canceling extraction of unallocated space");
|
||||
logger.log(Level.INFO, "Canceling extraction of unallocated space"); //NON-NLS
|
||||
canceled = true;
|
||||
if (progress != null) {
|
||||
progress.setDisplayName(NbBundle.getMessage(this.getClass(),
|
||||
@@ -252,7 +252,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
int mbs = 0; //Increments every 128th tick of kbs
|
||||
for (UnallocStruct u : this.lus) {
|
||||
currentlyProcessing = u.getFile();
|
||||
logger.log(Level.INFO, "Writing Unalloc file to " + currentlyProcessing.getPath());
|
||||
logger.log(Level.INFO, "Writing Unalloc file to " + currentlyProcessing.getPath()); //NON-NLS
|
||||
OutputStream dos = new FileOutputStream(currentlyProcessing);
|
||||
long bytes = 0;
|
||||
int i = 0;
|
||||
@@ -279,19 +279,19 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
|
||||
if (canceled) {
|
||||
u.getFile().delete();
|
||||
logger.log(Level.INFO, "Canceled extraction of " + u.getFileName() + " and deleted file");
|
||||
logger.log(Level.INFO, "Canceled extraction of " + u.getFileName() + " and deleted file"); //NON-NLS
|
||||
} else {
|
||||
logger.log(Level.INFO, "Finished writing unalloc file " + u.getFile().getPath());
|
||||
logger.log(Level.INFO, "Finished writing unalloc file " + u.getFile().getPath()); //NON-NLS
|
||||
}
|
||||
}
|
||||
progress.finish();
|
||||
|
||||
|
||||
} catch (IOException ioe) {
|
||||
logger.log(Level.WARNING, "Could not create Unalloc File; error writing file", ioe);
|
||||
logger.log(Level.WARNING, "Could not create Unalloc File; error writing file", ioe); //NON-NLS
|
||||
return -1;
|
||||
} catch (TskCoreException tce) {
|
||||
logger.log(Level.WARNING, "Could not create Unalloc File; error getting image info", tce);
|
||||
logger.log(Level.WARNING, "Could not create Unalloc File; error getting image info", tce); //NON-NLS
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
@@ -335,7 +335,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
try {
|
||||
return (img.getChildren().get(0) instanceof VolumeSystem);
|
||||
} catch (TskCoreException tce) {
|
||||
logger.log(Level.WARNING, "Unable to determine if image has a volume system, extraction may be incomplete", tce);
|
||||
logger.log(Level.WARNING, "Unable to determine if image has a volume system, extraction may be incomplete", tce); //NON-NLS
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -356,7 +356,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
}
|
||||
}
|
||||
} catch (TskCoreException tce) {
|
||||
logger.log(Level.WARNING, "Could not get volume information from image. Extraction may be incomplete", tce);
|
||||
logger.log(Level.WARNING, "Could not get volume information from image. Extraction may be incomplete", tce); //NON-NLS
|
||||
}
|
||||
return lstVol;
|
||||
}
|
||||
@@ -400,7 +400,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
}
|
||||
}
|
||||
} catch (TskCoreException tce) {
|
||||
logger.log(Level.WARNING, "Couldn't get a list of Unallocated Files, failed at visiting FileSystem " + fs.getId(), tce);
|
||||
logger.log(Level.WARNING, "Couldn't get a list of Unallocated Files, failed at visiting FileSystem " + fs.getId(), tce); //NON-NLS
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -421,7 +421,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
}
|
||||
return lflst;
|
||||
} catch (TskCoreException tce) {
|
||||
logger.log(Level.WARNING, "Could not get list of Layout Files, failed at visiting Layout Directory", tce);
|
||||
logger.log(Level.WARNING, "Could not get list of Layout Files, failed at visiting Layout Directory", tce); //NON-NLS
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -443,7 +443,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
}
|
||||
}
|
||||
} catch (TskCoreException tce) {
|
||||
logger.log(Level.WARNING, "Couldn't get a list of Unallocated Files, failed at visiting Directory " + dir.getId(), tce);
|
||||
logger.log(Level.WARNING, "Couldn't get a list of Unallocated Files, failed at visiting Directory " + dir.getId(), tce); //NON-NLS
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -499,7 +499,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
this.VolumeId = 0;
|
||||
this.ImageId = img.getId();
|
||||
this.ImageName = img.getName();
|
||||
this.FileName = this.ImageName + "-Unalloc-" + this.ImageId + "-" + 0 + ".dat";
|
||||
this.FileName = this.ImageName + "-Unalloc-" + this.ImageId + "-" + 0 + ".dat"; //NON-NLS
|
||||
this.FileInstance = new File(Case.getCurrentCase().getCaseDirectory() + File.separator + "Export" + File.separator + this.FileName);
|
||||
this.SizeInBytes = calcSizeInBytes();
|
||||
}
|
||||
@@ -515,11 +515,11 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
this.ImageId = volu.getImage().getId();
|
||||
this.VolumeId = volu.getId();
|
||||
} catch (TskCoreException tce) {
|
||||
logger.log(Level.WARNING, "Unable to properly create ExtractUnallocAction, extraction may be incomplete", tce);
|
||||
logger.log(Level.WARNING, "Unable to properly create ExtractUnallocAction, extraction may be incomplete", tce); //NON-NLS
|
||||
this.ImageName = "";
|
||||
this.ImageId = 0;
|
||||
}
|
||||
this.FileName = this.ImageName + "-Unalloc-" + this.ImageId + "-" + VolumeId + ".dat";
|
||||
this.FileName = this.ImageName + "-Unalloc-" + this.ImageId + "-" + VolumeId + ".dat"; //NON-NLS
|
||||
this.FileInstance = new File(Case.getCurrentCase().getCaseDirectory() + File.separator + "Export" + File.separator + this.FileName);
|
||||
this.llf = getUnallocFiles(volu);
|
||||
Collections.sort(llf, new SortObjId());
|
||||
|
||||
@@ -107,7 +107,7 @@ import java.awt.event.ActionListener;
|
||||
|
||||
lastInumValue.setText(org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class, "FileSystemDetailsPanel.lastInumValue.text")); // NOI18N
|
||||
|
||||
genInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
|
||||
genInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N NON-NLS
|
||||
genInfoLabel.setText(org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class, "FileSystemDetailsPanel.genInfoLabel.text")); // NOI18N
|
||||
|
||||
jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
|
||||
@@ -210,7 +210,7 @@ import java.awt.event.ActionListener;
|
||||
detailInfoPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
detailInfoPanel.setPreferredSize(new java.awt.Dimension(516, 293));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
|
||||
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N NON-NLS
|
||||
jLabel1.setText(org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class, "FileSystemDetailsPanel.jLabel1.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout detailInfoPanelLayout = new javax.swing.GroupLayout(detailInfoPanel);
|
||||
|
||||
@@ -60,7 +60,7 @@ class ImageDetailsPanel extends javax.swing.JPanel {
|
||||
imgHashLabel = new javax.swing.JLabel();
|
||||
imgHashValue = new javax.swing.JLabel();
|
||||
|
||||
imageInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
|
||||
imageInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N NON-NLS
|
||||
imageInfoLabel.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imageInfoLabel.text")); // NOI18N
|
||||
|
||||
imgNameLabel.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgNameLabel.text")); // NOI18N
|
||||
|
||||
@@ -49,7 +49,7 @@ public class NewWindowViewAction extends AbstractAction{
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Logger.noteAction(this.getClass());
|
||||
|
||||
String name = "DataContent";
|
||||
String name = "DataContent"; //NON-NLS
|
||||
String s = contentNode.getLookup().lookup(String.class);
|
||||
if (s != null) {
|
||||
name = s;
|
||||
@@ -59,14 +59,14 @@ public class NewWindowViewAction extends AbstractAction{
|
||||
try {
|
||||
name = c.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Except while calling Content.getUniquePath() on " + c);
|
||||
logger.log(Level.SEVERE, "Except while calling Content.getUniquePath() on " + c); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final DataContentTopComponent dctc = DataContentTopComponent.createUndocked(name, null);
|
||||
|
||||
Mode m = WindowManager.getDefault().findMode("outputFloat");
|
||||
Mode m = WindowManager.getDefault().findMode("outputFloat"); //NON-NLS
|
||||
m.dockInto(dctc);
|
||||
dctc.open();
|
||||
|
||||
|
||||
@@ -115,14 +115,14 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
final SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
|
||||
final long artId = art.getArtifactID();
|
||||
try {
|
||||
ResultSet rs = skCase.runQuery("DELETE from blackboard_attributes where artifact_id = " + Long.toString(artId));
|
||||
ResultSet rs = skCase.runQuery("DELETE from blackboard_attributes where artifact_id = " + Long.toString(artId)); //NON-NLS
|
||||
skCase.closeRunQuery(rs);
|
||||
|
||||
rs = skCase.runQuery("DELETE from blackboard_artifacts where artifact_id = " + Long.toString(artId));
|
||||
rs = skCase.runQuery("DELETE from blackboard_artifacts where artifact_id = " + Long.toString(artId)); //NON-NLS
|
||||
skCase.closeRunQuery(rs);
|
||||
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Could not delete artifact by id: " + artId, ex);
|
||||
logger.log(Level.WARNING, "Could not delete artifact by id: " + artId, ex); //NON-NLS
|
||||
}
|
||||
|
||||
}
|
||||
@@ -138,14 +138,14 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
//first to select to get artifact ids to delete
|
||||
//then join delete attrs
|
||||
//then delete arts by id
|
||||
rs = skCase.runQuery("DELETE FROM blackboard_attributes WHERE artifact_id IN "
|
||||
+ "(SELECT blackboard_artifacts.artifact_id FROM blackboard_artifacts "
|
||||
+ "INNER JOIN blackboard_attributes ON (blackboard_attributes.artifact_id = blackboard_artifacts.artifact_id) "
|
||||
+ "WHERE blackboard_artifacts.artifact_type_id = "
|
||||
rs = skCase.runQuery("DELETE FROM blackboard_attributes WHERE artifact_id IN " //NON-NLS
|
||||
+ "(SELECT blackboard_artifacts.artifact_id FROM blackboard_artifacts " //NON-NLS
|
||||
+ "INNER JOIN blackboard_attributes ON (blackboard_attributes.artifact_id = blackboard_artifacts.artifact_id) " //NON-NLS
|
||||
+ "WHERE blackboard_artifacts.artifact_type_id = " //NON-NLS
|
||||
+ Integer.toString(artType.getTypeID())
|
||||
+ " AND blackboard_attributes.attribute_type_id = " + Integer.toString(attrType.getTypeID())
|
||||
+ " AND blackboard_attributes.value_type = " + BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING.getType()
|
||||
+ " AND blackboard_attributes.value_text = '" + value + "'"
|
||||
+ " AND blackboard_attributes.attribute_type_id = " + Integer.toString(attrType.getTypeID()) //NON-NLS
|
||||
+ " AND blackboard_attributes.value_type = " + BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING.getType() //NON-NLS
|
||||
+ " AND blackboard_attributes.value_text = '" + value + "'" //NON-NLS
|
||||
+ ")");
|
||||
|
||||
|
||||
@@ -154,14 +154,14 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
//skCase.closeRunQuery(rs);
|
||||
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Could not delete artifacts by type id: " + artType.getTypeID(), ex);
|
||||
logger.log(Level.WARNING, "Could not delete artifacts by type id: " + artType.getTypeID(), ex); //NON-NLS
|
||||
}
|
||||
finally {
|
||||
if (rs != null) {
|
||||
try {
|
||||
skCase.closeRunQuery(rs);
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Error closing result set after deleting", ex);
|
||||
logger.log(Level.WARNING, "Error closing result set after deleting", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -174,20 +174,20 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
// SELECT * from blackboard_attributes INNER JOIN blackboard_artifacts ON blackboard_artifacts.artifact_id = blackboard_attributes.artifact_ID AND blackboard_artifacts.artifact_type_id = 9;
|
||||
final SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
|
||||
try {
|
||||
ResultSet rs = skCase.runQuery("DELETE FROM blackboard_attributes WHERE artifact_id IN "
|
||||
+ "(SELECT blackboard_artifacts.artifact_id FROM blackboard_artifacts "
|
||||
+ "INNER JOIN blackboard_attributes ON (blackboard_attributes.artifact_id = blackboard_artifacts.artifact_id) "
|
||||
+ "WHERE blackboard_artifacts.artifact_type_id = "
|
||||
ResultSet rs = skCase.runQuery("DELETE FROM blackboard_attributes WHERE artifact_id IN " //NON-NLS
|
||||
+ "(SELECT blackboard_artifacts.artifact_id FROM blackboard_artifacts " //NON-NLS
|
||||
+ "INNER JOIN blackboard_attributes ON (blackboard_attributes.artifact_id = blackboard_artifacts.artifact_id) " //NON-NLS
|
||||
+ "WHERE blackboard_artifacts.artifact_type_id = " //NON-NLS
|
||||
+ Integer.toString(artType.getTypeID())
|
||||
+ ")");
|
||||
skCase.closeRunQuery(rs);
|
||||
|
||||
rs = skCase.runQuery("DELETE from blackboard_artifacts where artifact_type_id = "
|
||||
rs = skCase.runQuery("DELETE from blackboard_artifacts where artifact_type_id = " //NON-NLS
|
||||
+ Integer.toString(artType.getTypeID()));
|
||||
skCase.closeRunQuery(rs);
|
||||
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Could not delete artifacts by type id: " + artType.getTypeID(), ex);
|
||||
logger.log(Level.WARNING, "Could not delete artifacts by type id: " + artType.getTypeID(), ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class ViewContextAction extends AbstractAction {
|
||||
dirTreeExplorerManager.setExploredContextAndSelection(dirExplored, new Node[]{dirExplored});
|
||||
}
|
||||
} catch (PropertyVetoException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't set selected node", ex);
|
||||
logger.log(Level.WARNING, "Couldn't set selected node", ex); //NON-NLS
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ public class ViewContextAction extends AbstractAction {
|
||||
try {
|
||||
nodesDisplayedInDataResultViewer = get();
|
||||
} catch (InterruptedException | ExecutionException ex) {
|
||||
logger.log(Level.WARNING, "Failed to get nodes in selection worker.", ex);
|
||||
logger.log(Level.WARNING, "Failed to get nodes in selection worker.", ex); //NON-NLS
|
||||
return;
|
||||
}
|
||||
// catch and ignore if we were cancelled
|
||||
@@ -224,7 +224,7 @@ public class ViewContextAction extends AbstractAction {
|
||||
try {
|
||||
parent = content.getParent();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get parent of Content object: " + content);
|
||||
logger.log(Level.WARNING, "Couldn't get parent of Content object: " + content); //NON-NLS
|
||||
}
|
||||
return parent == null ? ret : parent.accept(this);
|
||||
}
|
||||
@@ -236,7 +236,7 @@ public class ViewContextAction extends AbstractAction {
|
||||
try {
|
||||
parent = content.getParent();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get parent of Content object: " + content);
|
||||
logger.log(Level.WARNING, "Couldn't get parent of Content object: " + content); //NON-NLS
|
||||
}
|
||||
return parent == null ? ret : parent.accept(this);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class VolumeDetailsPanel extends javax.swing.JPanel {
|
||||
|
||||
lengthLabel.setText(org.openide.util.NbBundle.getMessage(VolumeDetailsPanel.class, "VolumeDetailsPanel.lengthLabel.text")); // NOI18N
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18));
|
||||
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); //NON-NLS
|
||||
jLabel1.setText(org.openide.util.NbBundle.getMessage(VolumeDetailsPanel.class, "VolumeDetailsPanel.jLabel1.text")); // NOI18N
|
||||
|
||||
volumeIDLabel.setText(org.openide.util.NbBundle.getMessage(VolumeDetailsPanel.class, "VolumeDetailsPanel.volumeIDLabel.text")); // NOI18N
|
||||
|
||||
@@ -50,7 +50,7 @@ class DateSearchFilter extends AbstractFileSearchFilter<DateSearchPanel> {
|
||||
|
||||
private static final String NONE_SELECTED_MESSAGE = NbBundle.getMessage(DateSearchFilter.class, "DateSearchFilter.noneSelectedMsg.text");
|
||||
private static final DateFormat DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy");
|
||||
private static final String SEPARATOR = "SEPARATOR";
|
||||
private static final String SEPARATOR = "SEPARATOR"; //NON-NLS
|
||||
|
||||
/**
|
||||
* New DateSearchFilter with the default panel
|
||||
@@ -88,7 +88,7 @@ class DateSearchFilter extends AbstractFileSearchFilter<DateSearchPanel> {
|
||||
sdf.setTimeZone(selectedTZ); // get the time in the selected timezone
|
||||
Date temp = sdf.parse(startDateValue);
|
||||
|
||||
startDate = Calendar.getInstance(new SimpleTimeZone(0, "GMT"));
|
||||
startDate = Calendar.getInstance(new SimpleTimeZone(0, "GMT")); //NON-NLS
|
||||
startDate.setTime(temp); // convert to GMT
|
||||
} catch (ParseException ex) {
|
||||
// for now, no need to show the error message to the user her
|
||||
@@ -107,7 +107,7 @@ class DateSearchFilter extends AbstractFileSearchFilter<DateSearchPanel> {
|
||||
sdf.setTimeZone(selectedTZ); // get the time in the selected timezone
|
||||
Date temp2 = sdf.parse(endDateValue);
|
||||
|
||||
endDate = Calendar.getInstance(new SimpleTimeZone(0, "GMT"));
|
||||
endDate = Calendar.getInstance(new SimpleTimeZone(0, "GMT")); //NON-NLS
|
||||
endDate.setTime(temp2); // convert to GMT
|
||||
endDate.set(Calendar.HOUR, endDate.get(Calendar.HOUR) + 24); // get the next 24 hours
|
||||
} catch (ParseException ex) {
|
||||
@@ -130,22 +130,22 @@ class DateSearchFilter extends AbstractFileSearchFilter<DateSearchPanel> {
|
||||
String subQuery = "0";
|
||||
|
||||
if (modifiedChecked) {
|
||||
subQuery += " or mtime between " + fromDate + " and " + toDate;
|
||||
subQuery += " or mtime between " + fromDate + " and " + toDate; //NON-NLS
|
||||
}
|
||||
|
||||
if (changedChecked) {
|
||||
subQuery += " or ctime between " + fromDate + " and " + toDate;
|
||||
subQuery += " or ctime between " + fromDate + " and " + toDate; //NON-NLS
|
||||
}
|
||||
|
||||
if (accessedChecked) {
|
||||
subQuery += " or atime between " + fromDate + " and " + toDate;
|
||||
subQuery += " or atime between " + fromDate + " and " + toDate; //NON-NLS
|
||||
}
|
||||
|
||||
if (createdChecked) {
|
||||
subQuery += " or crtime between " + fromDate + " and " + toDate;
|
||||
subQuery += " or crtime between " + fromDate + " and " + toDate; //NON-NLS
|
||||
}
|
||||
|
||||
addQuery += " and (" + subQuery + ")";
|
||||
addQuery += " and (" + subQuery + ")"; //NON-NLS
|
||||
} else {
|
||||
throw new FilterValidationException(NONE_SELECTED_MESSAGE);
|
||||
}
|
||||
@@ -173,7 +173,7 @@ class DateSearchFilter extends AbstractFileSearchFilter<DateSearchPanel> {
|
||||
int offset = zone.getRawOffset() / 1000;
|
||||
int hour = offset / 3600;
|
||||
int minutes = (offset % 3600) / 60;
|
||||
String item = String.format("(GMT%+d:%02d) %s", hour, minutes, zone.getID());
|
||||
String item = String.format("(GMT%+d:%02d) %s", hour, minutes, zone.getID()); //NON-NLS
|
||||
timeZones.add(item);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ class DateSearchFilter extends AbstractFileSearchFilter<DateSearchPanel> {
|
||||
int offset = zone.getRawOffset() / 1000;
|
||||
int hour = offset / 3600;
|
||||
int minutes = (offset % 3600) / 60;
|
||||
String item = String.format("(GMT%+d:%02d) %s", hour, minutes, id);
|
||||
String item = String.format("(GMT%+d:%02d) %s", hour, minutes, id); //NON-NLS
|
||||
timeZones.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
} catch (TskCoreException ex) {
|
||||
Logger logger = Logger.getLogger(this.getClass().getName());
|
||||
logger.log(Level.WARNING, "Error while trying to get the number of matches.", ex);
|
||||
logger.log(Level.WARNING, "Error while trying to get the number of matches.", ex); //NON-NLS
|
||||
}
|
||||
|
||||
if (contentList == null) {
|
||||
@@ -209,7 +209,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
String query = " 1";
|
||||
|
||||
for (FileSearchFilter f : this.getEnabledFilters()) {
|
||||
query += " and (" + f.getPredicate() + ")";
|
||||
query += " and (" + f.getPredicate() + ")"; //NON-NLS
|
||||
}
|
||||
|
||||
return query;
|
||||
|
||||
@@ -58,13 +58,13 @@ class KnownStatusSearchFilter extends AbstractFileSearchFilter<KnownStatusSearch
|
||||
|
||||
String expr = "0";
|
||||
if (unknown) {
|
||||
expr += " or " + predicateHelper(FileKnown.UNKNOWN);
|
||||
expr += " or " + predicateHelper(FileKnown.UNKNOWN); //NON-NLS
|
||||
}
|
||||
if (known) {
|
||||
expr += " or " + predicateHelper(FileKnown.KNOWN);
|
||||
expr += " or " + predicateHelper(FileKnown.KNOWN); //NON-NLS
|
||||
}
|
||||
if (knownBad) {
|
||||
expr += " or " + predicateHelper(FileKnown.BAD);
|
||||
expr += " or " + predicateHelper(FileKnown.BAD); //NON-NLS
|
||||
}
|
||||
return expr;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ class KnownStatusSearchFilter extends AbstractFileSearchFilter<KnownStatusSearch
|
||||
* @return un-padded SQL boolean expression
|
||||
*/
|
||||
private String predicateHelper(FileKnown knownStatus) {
|
||||
return "known is " + knownStatus.getFileKnownValue();
|
||||
return "known is " + knownStatus.getFileKnownValue(); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -56,7 +56,7 @@ class NameSearchFilter extends AbstractFileSearchFilter<NameSearchPanel> {
|
||||
keyword.replace("'", "''"); // escape quotes in string
|
||||
//TODO: escaping might not be enough, would ideally be part of a prepared statement
|
||||
|
||||
return "name like '%" + keyword + "%'";
|
||||
return "name like '%" + keyword + "%'"; //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -113,7 +113,7 @@ class NameSearchPanel extends javax.swing.JPanel {
|
||||
}
|
||||
});
|
||||
|
||||
noteNameLabel.setFont(new java.awt.Font("Tahoma", 0, 10));
|
||||
noteNameLabel.setFont(new java.awt.Font("Tahoma", 0, 10)); //NON-NLS
|
||||
noteNameLabel.setText(org.openide.util.NbBundle.getMessage(NameSearchPanel.class, "NameSearchPanel.noteNameLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
|
||||
@@ -50,7 +50,7 @@ class SizeSearchFilter extends AbstractFileSearchFilter<SizeSearchPanel> {
|
||||
int unit = this.getComponent().getSizeUnitComboBox().getSelectedIndex();
|
||||
int divider = (int) Math.pow(2, (unit * 10));
|
||||
size = size * divider;
|
||||
return "size " + operator + " " + size;
|
||||
return "size " + operator + " " + size; //NON-NLS
|
||||
}
|
||||
|
||||
private String compareComboBoxToOperator(JComboBox<String> compare) {
|
||||
|
||||
@@ -112,7 +112,7 @@ class SizeSearchPanel extends javax.swing.JPanel {
|
||||
selectAllMenuItem.setText(org.openide.util.NbBundle.getMessage(SizeSearchPanel.class, "SizeSearchPanel.selectAllMenuItem.text")); // NOI18N
|
||||
rightClickMenu.add(selectAllMenuItem);
|
||||
|
||||
sizeUnitComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "Byte(s)", "KB", "MB", "GB", "TB" }));
|
||||
sizeUnitComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "Byte(s)", "KB", "MB", "GB", "TB" })); //NON-NLS
|
||||
|
||||
sizeTextField.setValue(0);
|
||||
sizeTextField.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
|
||||
@@ -79,7 +79,7 @@ abstract class GetFilesContentVisitor implements ContentVisitor<Collection<Abstr
|
||||
all.addAll(child.accept(this));
|
||||
}
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting Content children", ex);
|
||||
logger.log(Level.SEVERE, "Error getting Content children", ex); //NON-NLS
|
||||
}
|
||||
|
||||
return all;
|
||||
|
||||
@@ -182,7 +182,7 @@ class IngestJobConfigurationPanel extends javax.swing.JPanel {
|
||||
descriptionLabel.setEditable(false);
|
||||
descriptionLabel.setBackground(new java.awt.Color(240, 240, 240));
|
||||
descriptionLabel.setColumns(20);
|
||||
descriptionLabel.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
|
||||
descriptionLabel.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N NON-NLS
|
||||
descriptionLabel.setLineWrap(true);
|
||||
descriptionLabel.setRows(5);
|
||||
descriptionLabel.setWrapStyleWord(true);
|
||||
|
||||
@@ -32,9 +32,9 @@ import org.sleuthkit.datamodel.Content;
|
||||
*/
|
||||
public final class IngestJobLauncher {
|
||||
|
||||
private static final String ENABLED_INGEST_MODULES_KEY = "Enabled_Ingest_Modules";
|
||||
private static final String DISABLED_INGEST_MODULES_KEY = "Disabled_Ingest_Modules";
|
||||
private static final String PARSE_UNALLOC_SPACE_KEY = "Process_Unallocated_Space";
|
||||
private static final String ENABLED_INGEST_MODULES_KEY = "Enabled_Ingest_Modules"; //NON-NLS
|
||||
private static final String DISABLED_INGEST_MODULES_KEY = "Disabled_Ingest_Modules"; //NON-NLS
|
||||
private static final String PARSE_UNALLOC_SPACE_KEY = "Process_Unallocated_Space"; //NON-NLS
|
||||
private final String launcherContext;
|
||||
private final List<String> warnings = new ArrayList<>();
|
||||
private IngestJobConfigurationPanel ingestConfigPanel;
|
||||
@@ -78,7 +78,7 @@ public final class IngestJobLauncher {
|
||||
for (String moduleName : missingModuleNames) {
|
||||
enabledModuleNames.remove(moduleName);
|
||||
disabledModuleNames.remove(moduleName);
|
||||
warnings.add(String.format("Previously loaded %s module could not be found", moduleName));
|
||||
warnings.add(String.format("Previously loaded %s module could not be found", moduleName)); //NON-NLS
|
||||
}
|
||||
|
||||
// Create ingest module templates.
|
||||
@@ -111,7 +111,7 @@ public final class IngestJobLauncher {
|
||||
// Get the process unallocated space flag setting. If the setting does
|
||||
// not exist yet, default it to false.
|
||||
if (ModuleSettings.settingExists(launcherContext, PARSE_UNALLOC_SPACE_KEY) == false) {
|
||||
ModuleSettings.setConfigSetting(launcherContext, PARSE_UNALLOC_SPACE_KEY, "false");
|
||||
ModuleSettings.setConfigSetting(launcherContext, PARSE_UNALLOC_SPACE_KEY, "false"); //NON-NLS
|
||||
}
|
||||
boolean processUnallocatedSpace = Boolean.parseBoolean(ModuleSettings.getConfigSetting(launcherContext, PARSE_UNALLOC_SPACE_KEY));
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import java.util.prefs.Preferences;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.sleuthkit.autopsy.ingest.IngestScheduler.FileIngestScheduler.FileIngestTask;
|
||||
|
||||
@@ -47,7 +48,7 @@ import org.sleuthkit.autopsy.ingest.IngestScheduler.FileIngestScheduler.FileInge
|
||||
*/
|
||||
public class IngestManager {
|
||||
|
||||
private static final String NUMBER_OF_FILE_INGEST_THREADS_KEY = "NumberOfFileingestThreads";
|
||||
private static final String NUMBER_OF_FILE_INGEST_THREADS_KEY = "NumberOfFileingestThreads"; //NON-NLS
|
||||
private static final int MIN_NUMBER_OF_FILE_INGEST_THREADS = 1;
|
||||
private static final int MAX_NUMBER_OF_FILE_INGEST_THREADS = 4;
|
||||
private static final int DEFAULT_NUMBER_OF_FILE_INGEST_THREADS = 2;
|
||||
@@ -198,7 +199,7 @@ public class IngestManager {
|
||||
try {
|
||||
pcs.firePropertyChange(eventType, jobId, null);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e);
|
||||
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
|
||||
NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr.errListenToUpdates.msg"),
|
||||
MessageNotifyUtil.MessageType.ERROR);
|
||||
@@ -214,7 +215,7 @@ public class IngestManager {
|
||||
try {
|
||||
pcs.firePropertyChange(IngestEvent.FILE_DONE.toString(), fileId, null);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e);
|
||||
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
|
||||
NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr.errListenToUpdates.msg"),
|
||||
MessageNotifyUtil.MessageType.ERROR);
|
||||
@@ -231,7 +232,7 @@ public class IngestManager {
|
||||
try {
|
||||
pcs.firePropertyChange(IngestEvent.DATA.toString(), moduleDataEvent, null);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e);
|
||||
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
|
||||
NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr.errListenToUpdates.msg"),
|
||||
MessageNotifyUtil.MessageType.ERROR);
|
||||
@@ -248,7 +249,7 @@ public class IngestManager {
|
||||
try {
|
||||
pcs.firePropertyChange(IngestEvent.CONTENT_CHANGED.toString(), moduleContentEvent, null);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e);
|
||||
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
|
||||
NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr.errListenToUpdates.msg"),
|
||||
MessageNotifyUtil.MessageType.ERROR);
|
||||
@@ -394,28 +395,23 @@ public class IngestManager {
|
||||
List<IngestModuleError> errors = ingestJob.startUpIngestPipelines();
|
||||
if (!errors.isEmpty()) {
|
||||
// Report the error to the user.
|
||||
StringBuilder failedModules = new StringBuilder();
|
||||
StringBuilder errorMessages = new StringBuilder();
|
||||
for (int i = 0; i < errors.size(); ++i) {
|
||||
IngestModuleError error = errors.get(i);
|
||||
StringBuilder moduleStartUpErrors = new StringBuilder();
|
||||
for (IngestModuleError error : errors) {
|
||||
String moduleName = error.getModuleDisplayName();
|
||||
logger.log(Level.SEVERE, "The " + moduleName + " module failed to start up", error.getModuleError());
|
||||
failedModules.append(moduleName);
|
||||
errorMessages.append(error.getModuleError().getMessage());
|
||||
if ((errors.size() > 1) && (i != (errors.size() - 1))) {
|
||||
failedModules.append(",");
|
||||
errorMessages.append("\n\n");
|
||||
}
|
||||
logger.log(Level.SEVERE, "The " + moduleName + " module failed to start up", error.getModuleError()); //NON-NLS
|
||||
moduleStartUpErrors.append(moduleName);
|
||||
moduleStartUpErrors.append(": ");
|
||||
moduleStartUpErrors.append(error.getModuleError().getLocalizedMessage());
|
||||
moduleStartUpErrors.append("\n");
|
||||
}
|
||||
StringBuilder notifyMessage = new StringBuilder();
|
||||
notifyMessage.append("Failed to start the following ingest modules: ");
|
||||
notifyMessage.append(failedModules.toString());
|
||||
notifyMessage.append(".\n\nNo ingest modules will be run. Please disable the failed modules ");
|
||||
notifyMessage.append("or fix the error and restart ingest by right clicking on ");
|
||||
notifyMessage.append("the data source and selecting Run Ingest Modules.\n\n");
|
||||
notifyMessage.append("Errors\n\n: ");
|
||||
notifyMessage.append(errorMessages.toString());
|
||||
MessageNotifyUtil.Message.error(notifyMessage.toString());
|
||||
notifyMessage.append("Unable to start up one or more ingest modules, ingest job cancelled.\n");
|
||||
notifyMessage.append("Please disable the failed modules or fix the errors and then restart ingest\n");
|
||||
notifyMessage.append("by right clicking on the data source and selecting Run Ingest Modules.\n");
|
||||
notifyMessage.append("Errors:\n\n");
|
||||
notifyMessage.append(moduleStartUpErrors.toString());
|
||||
notifyMessage.append("\n\n");
|
||||
JOptionPane.showMessageDialog(null, notifyMessage.toString(), "Ingest Failure", JOptionPane.ERROR_MESSAGE);
|
||||
|
||||
// Jettison the ingest job and move on to the next one.
|
||||
synchronized (IngestManager.this) {
|
||||
@@ -442,7 +438,7 @@ public class IngestManager {
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
String message = String.format("StartIngestJobsTask (id=%d) caught exception", id);
|
||||
String message = String.format("StartIngestJobsTask (id=%d) caught exception", id); //NON-NLS
|
||||
logger.log(Level.SEVERE, message, ex);
|
||||
MessageNotifyUtil.Message.error(
|
||||
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.catchException.msg"));
|
||||
@@ -474,7 +470,7 @@ public class IngestManager {
|
||||
job = scheduler.getNextTask();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
String message = String.format("RunDataSourceIngestModulesTask (id=%d) caught exception", id);
|
||||
String message = String.format("RunDataSourceIngestModulesTask (id=%d) caught exception", id); //NON-NLS
|
||||
logger.log(Level.SEVERE, message, ex);
|
||||
} finally {
|
||||
reportRunIngestModulesTaskDone(id);
|
||||
@@ -505,7 +501,7 @@ public class IngestManager {
|
||||
task = fileScheduler.getNextTask();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
String message = String.format("RunFileSourceIngestModulesTask (id=%d) caught exception", id);
|
||||
String message = String.format("RunFileSourceIngestModulesTask (id=%d) caught exception", id); //NON-NLS
|
||||
logger.log(Level.SEVERE, message, ex);
|
||||
} finally {
|
||||
reportRunIngestModulesTaskDone(id);
|
||||
@@ -527,7 +523,7 @@ public class IngestManager {
|
||||
super.get();
|
||||
} catch (CancellationException | InterruptedException ex) {
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Error while cancelling ingest jobs", ex);
|
||||
logger.log(Level.SEVERE, "Error while cancelling ingest jobs", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class IngestMessageDetailsPanel extends javax.swing.JPanel {
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
messageDetailsPane.setContentType("text/html");
|
||||
messageDetailsPane.setContentType("text/html"); //NON-NLS
|
||||
viewArtifactButton.setEnabled(false);
|
||||
viewContentButton.setEnabled(false);
|
||||
HTMLEditorKit kit = new HTMLEditorKit();
|
||||
@@ -58,12 +58,12 @@ class IngestMessageDetailsPanel extends javax.swing.JPanel {
|
||||
StyleSheet styleSheet = kit.getStyleSheet();
|
||||
/* I tried to define the font-size only on body to have it inherit,
|
||||
* it didn't work in all cases. */
|
||||
styleSheet.addRule("body {font-family:Arial;font-size:10pt;}");
|
||||
styleSheet.addRule("p {font-family:Arial;font-size:10pt;}");
|
||||
styleSheet.addRule("li {font-family:Arial;font-size:10pt;}");
|
||||
styleSheet.addRule("table {table-layout:fixed;}");
|
||||
styleSheet.addRule("td {white-space:pre-wrap;overflow:hidden;}");
|
||||
styleSheet.addRule("th {font-weight:bold;}");
|
||||
styleSheet.addRule("body {font-family:Arial;font-size:10pt;}"); //NON-NLS
|
||||
styleSheet.addRule("p {font-family:Arial;font-size:10pt;}"); //NON-NLS
|
||||
styleSheet.addRule("li {font-family:Arial;font-size:10pt;}"); //NON-NLS
|
||||
styleSheet.addRule("table {table-layout:fixed;}"); //NON-NLS
|
||||
styleSheet.addRule("td {white-space:pre-wrap;overflow:hidden;}"); //NON-NLS
|
||||
styleSheet.addRule("th {font-weight:bold;}"); //NON-NLS
|
||||
|
||||
BlackboardResultViewer v = Lookup.getDefault().lookup(BlackboardResultViewer.class);
|
||||
v.addOnFinishedListener(new PropertyChangeListener() {
|
||||
@@ -124,22 +124,22 @@ class IngestMessageDetailsPanel extends javax.swing.JPanel {
|
||||
messageDetailsPane.setBackground(new java.awt.Color(221, 221, 235));
|
||||
messageDetailsPane.setBorder(null);
|
||||
messageDetailsPane.setContentType(org.openide.util.NbBundle.getMessage(IngestMessageDetailsPanel.class, "IngestMessageDetailsPanel.messageDetailsPane.contentType")); // NOI18N
|
||||
messageDetailsPane.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
messageDetailsPane.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N NON-NLS
|
||||
messageDetailsPane.setToolTipText(org.openide.util.NbBundle.getMessage(IngestMessageDetailsPanel.class, "IngestMessageDetailsPanel.messageDetailsPane.toolTipText")); // NOI18N
|
||||
jScrollPane1.setViewportView(messageDetailsPane);
|
||||
|
||||
jToolBar1.setFloatable(false);
|
||||
jToolBar1.setRollover(true);
|
||||
|
||||
backButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/btn_step_back.png"))); // NOI18N
|
||||
backButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
backButton.setText(org.openide.util.NbBundle.getMessage(IngestMessageDetailsPanel.class, "IngestMessageDetailsPanel.backButton.text")); // NOI18N
|
||||
backButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
backButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
|
||||
backButton.setMaximumSize(new java.awt.Dimension(23, 23));
|
||||
backButton.setMinimumSize(new java.awt.Dimension(23, 23));
|
||||
backButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
backButton.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/btn_step_back_hover.png"))); // NOI18N
|
||||
backButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/btn_step_back_hover.png"))); // NOI18N
|
||||
backButton.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
backButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
backButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
backButtonActionPerformed(evt);
|
||||
@@ -148,7 +148,7 @@ class IngestMessageDetailsPanel extends javax.swing.JPanel {
|
||||
jToolBar1.add(backButton);
|
||||
jToolBar1.add(filler1);
|
||||
|
||||
viewArtifactButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/goto_res.png"))); // NOI18N
|
||||
viewArtifactButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/goto_res.png"))); // NOI18N NON-NLS
|
||||
viewArtifactButton.setText(org.openide.util.NbBundle.getMessage(IngestMessageDetailsPanel.class, "IngestMessageDetailsPanel.viewArtifactButton.text")); // NOI18N
|
||||
viewArtifactButton.setIconTextGap(2);
|
||||
viewArtifactButton.setPreferredSize(new java.awt.Dimension(93, 23));
|
||||
@@ -159,7 +159,7 @@ class IngestMessageDetailsPanel extends javax.swing.JPanel {
|
||||
});
|
||||
jToolBar1.add(viewArtifactButton);
|
||||
|
||||
viewContentButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/goto_dir.png"))); // NOI18N
|
||||
viewContentButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/ingest/goto_dir.png"))); // NOI18N NON-NLS
|
||||
viewContentButton.setText(org.openide.util.NbBundle.getMessage(IngestMessageDetailsPanel.class, "IngestMessageDetailsPanel.viewContentButton.text")); // NOI18N
|
||||
viewContentButton.setIconTextGap(2);
|
||||
viewContentButton.setPreferredSize(new java.awt.Dimension(111, 23));
|
||||
@@ -260,10 +260,10 @@ class IngestMessageDetailsPanel extends javax.swing.JPanel {
|
||||
String details = messageGroup.getDetails();
|
||||
if (details != null) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
if (details.startsWith("<html><body>") == false) {
|
||||
b.append("<html><body>");
|
||||
if (details.startsWith("<html><body>") == false) { //NON-NLS
|
||||
b.append("<html><body>"); //NON-NLS
|
||||
b.append(details);
|
||||
b.append("</body></html>");
|
||||
b.append("</body></html>"); //NON-NLS
|
||||
}
|
||||
else {
|
||||
b.append(details);
|
||||
|
||||
@@ -31,8 +31,8 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
private IngestMessageDetailsPanel detailsPanel;
|
||||
private Logger logger = Logger.getLogger(IngestMessageMainPanel.class.getName());
|
||||
//the 2 layer names
|
||||
private static final String MESSAGES_VIEWER_LAYER = "MESSAGES";
|
||||
private static final String DETAILS_VIEWER_LAYER = "DETAILS";
|
||||
private static final String MESSAGES_VIEWER_LAYER = "MESSAGES"; //NON-NLS
|
||||
private static final String DETAILS_VIEWER_LAYER = "DETAILS"; //NON-NLS
|
||||
|
||||
/**
|
||||
* Creates new form IngestMessageMainPanel
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user