diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index a6420390c7..9a711047a8 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -108,13 +108,12 @@ AddImageWizardIterator.stepXofN=Step {0} of {1} AddLocalFilesTask.localFileAdd.progress.text=Adding\: {0}/{1} Case.getCurCase.exception.noneOpen=Cannot get the current case; there is no case open\! Case.create.exception.msg=Error creating a case\: {0} in dir {1} -Case.databaseConnectionInfo.error.msg=Error accessing case database connection info +Case.databaseConnectionInfo.error.msg=Error accessing database server connection info. See Tools, Options, Multi-user. Case.open.exception.blankCase.msg=Case name is blank. Case.open.msgDlg.updated.msg=Updated case database schema.\nA backup copy of the database with the following path has been made\:\n {0} Case.open.msgDlg.updated.title=Case Database Schema Update -Case.open.exception.checkFile.msg=Check that you selected the correct case file (usually with {0} extension) +Case.open.exception.checkFile.msg=Case file must have {0} extension. Case.open.exception.multiUserCaseNotEnabled=Cannot open a multi-user case if multi-user cases are not enabled. See Tools, Options, Multi-user. -Case.open.exception.gen.msg=Error opening the case Case.checkImgExist.confDlg.doesntExist.msg={0} has detected that one of the images associated with \n\ this case are missing. Would you like to search for them now?\n\ Previously, the image was located at\:\n\ @@ -140,6 +139,9 @@ Case.createCaseDir.exception.gen=Could not create case directory\: {0} Case.CollaborationSetup.FailNotify.ErrMsg=Failed to connect to any other nodes that may be collaborating on this case. Case.CollaborationSetup.FailNotify.Title=Connection Failure Case.GetCaseTypeGivenPath.Failure=Unable to get case type +Case.metaDataFileCorrupt.exception.msg=The case metadata file (.aut) is corrupted. +Case.deleteReports.deleteFromDiskException.log.msg=Unable to delete the report from the disk. +Case.deleteReports.deleteFromDiskException.msg=Unable to delete the report {0} from the disk.\nYou may manually delete it from {1} CaseDeleteAction.closeConfMsg.text=Are you sure want to close and delete this case? \n\ Case Name\: {0}\n\ Case Directory\: {1} @@ -209,14 +211,11 @@ NewCaseWizardPanel1.validate.errMsg.cantCreateDir=Error\: Could not create direc NewCaseWizardPanel1.validate.errMsg.invalidBaseDir.msg=ERROR\: The Base Directory that you entered is not valid.\nPlease enter a valid Base Directory. NewCaseWizardPanel1.createDir.errMsg.cantCreateDir.msg=ERROR\: Could not create the case directory. \nPlease enter a valid Case Name and Directory. NewCaseWizardPanel2.validate.errCreateCase.msg=Error creating case -OpenRecentCasePanel.openCase.msgDlg.caseDoesntExist.msg=Error\: Case {0} does not exist. -OpenRecentCasePanel.openCase.msgDlg.err=Error OpenRecentCasePanel.colName.caseName=Case Name OpenRecentCasePanel.colName.path=Path RecentCases.exception.caseIdxOutOfRange.msg=Recent case index {0} is out of range. RecentCases.getName.text=Clear Recent Cases -RecentItems.openRecentCase.msgDlg.text=Error\: Case {0} does not exist. -RecentItems.openRecentCase.msgDlg.err=Error +RecentItems.openRecentCase.msgDlg.text=Case {0} no longer exists. StartupWindow.title.text=Welcome UpdateRecentCases.menuItem.clearRecentCases.text=Clear Recent Cases UpdateRecentCases.menuItem.empty=-Empty- @@ -241,17 +240,14 @@ NewCaseVisualPanel1.caseParentDirWarningLabel.text= NewCaseVisualPanel1.multiUserCaseRadioButton.text=Multi-user NewCaseVisualPanel1.singleUserCaseRadioButton.text=Single-user NewCaseVisualPanel1.caseTypeLabel.text=Case Type: -Case.deleteReports.deleteFromDiskException.log.msg=Unable to delete the report from the disk. -Case.deleteReports.deleteFromDiskException.msg=Unable to delete the report {0} from the disk.\nYou may manually delete it from {1} CasePropertiesForm.lbDbType.text=Case Type: CasePropertiesForm.tbDbType.text= CasePropertiesForm.lbDbName.text=Database Name: CasePropertiesForm.tbDbName.text= -CaseExceptionWarning.CheckMultiUserOptions=Check Multi-user options. SingleUserCaseConverter.BadDatabaseFileName=Database file does not exist! SingleUserCaseConverter.AlreadyMultiUser=Case is already multi-user! SingleUserCaseConverter.NonUniqueDatabaseName=Database name not unique. SingleUserCaseConverter.UnableToCopySourceImages=Unable to copy source images SingleUserCaseConverter.CanNotOpenDatabase=Unable to open database CloseCaseWhileIngesting.Warning=Ingest is running. Are you sure you want to close the case? -CloseCaseWhileIngesting.Warning.title=Warning\: This will close the current case +CloseCaseWhileIngesting.Warning.title=Warning\: This will close the current case \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties index 4fd28db906..e61c8bf1cb 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties @@ -109,7 +109,6 @@ Case.open.msgDlg.updated.msg=\u30b1\u30fc\u30b9\u30c7\u30fc\u30bf\u30d9\u30fc\u3 {0} Case.open.msgDlg.updated.title=\u30b1\u30fc\u30b9\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30ad\u30fc\u30de\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8 Case.open.exception.checkFile.msg=\u6b63\u3057\u3044\u30b1\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3057\u305f\u304b\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\uff08\u901a\u5e38\u62e1\u5f35\u5b50{0}\u3092\u6301\u3064\uff09 -Case.open.exception.gen.msg=\u30b1\u30fc\u30b9\u3092\u958b\u304f\u306e\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f Case.checkImgExist.confDlg.doesntExist.msg={0} \u304c\u3053\u306e\u30b1\u30fc\u30b9\u306b\u95a2\u9023\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u306e\uff11\u500b\u304c\u6b20\u843d\u3057\u3066\u3044\u308b\u306e\u3092\u691c\u51fa\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u3089\u3092\u4eca\u304b\u3089\u691c\u7d22\u3057\u307e\u3059\u304b\uff1f\n\n\ \u4ee5\u524d\u3001\u30a4\u30e1\u30fc\u30b8\u306f\u4e0b\u8a18\u306b\u3042\u308a\u307e\u3057\u305f\uff1a\n\ {1}\n\ @@ -193,14 +192,11 @@ NewCaseWizardPanel1.validate.errMsg.cantCreateDir=\u30a8\u30e9\u30fc\uff1a\u30c7 NewCaseWizardPanel1.validate.errMsg.invalidBaseDir.msg=\u30a8\u30e9\u30fc\uff1a\u5165\u529b\u3057\u305f\u30d9\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u6709\u52b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\n\u6709\u52b9\u306a\u30d9\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002 NewCaseWizardPanel1.createDir.errMsg.cantCreateDir.msg=\u30a8\u30e9\u30fc\uff1a\u30b1\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\n\u6709\u52b9\u306a\u30b1\u30fc\u30b9\u540d\u304a\u3088\u3073\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002 NewCaseWizardPanel2.validate.errCreateCase.msg=\u30b1\u30fc\u30b9\u4f5c\u6210\u30a8\u30e9\u30fc -OpenRecentCasePanel.openCase.msgDlg.caseDoesntExist.msg=\u30a8\u30e9\u30fc\uff1a\u30b1\u30fc\u30b9{0}\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002 -OpenRecentCasePanel.openCase.msgDlg.err=\u30a8\u30e9\u30fc OpenRecentCasePanel.colName.caseName=\u30b1\u30fc\u30b9\u540d OpenRecentCasePanel.colName.path=\u30d1\u30b9 RecentCases.exception.caseIdxOutOfRange.msg=\u6700\u8fd1\u306e\u30b1\u30fc\u30b9\u30a4\u30f3\u30c7\u30c3\u30af\u30b9{0}\u306f\u7bc4\u56f2\u5916\u3067\u3059\u3002 RecentCases.getName.text=\u6700\u8fd1\u958b\u3044\u305f\u30b1\u30fc\u30b9\u3092\u30af\u30ea\u30a2 RecentItems.openRecentCase.msgDlg.text=\u30a8\u30e9\u30fc\uff1a\u30b1\u30fc\u30b9{0}\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002 -RecentItems.openRecentCase.msgDlg.err=\u30a8\u30e9\u30fc StartupWindow.title.text=\u3088\u3046\u3053\u305d UpdateRecentCases.menuItem.clearRecentCases.text=\u6700\u8fd1\u958b\u3044\u305f\u30b1\u30fc\u30b9\u3092\u30af\u30ea\u30a2 UpdateRecentCases.menuItem.empty=-\u7a7a\u767d- diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index a5e5ebb9bd..b9d67f8746 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -384,7 +384,8 @@ public class Case implements SleuthkitCase.ErrorObserver { @Override public void receiveError(String context, String errorMessage) { - /* NOTE: We are accessing tskErrorReporter from two different threads. + /* + * NOTE: We are accessing tskErrorReporter from two different threads. * This is ok as long as we only read the value of tskErrorReporter * because tskErrorReporter is declared as volatile. */ @@ -398,63 +399,87 @@ public class Case implements SleuthkitCase.ErrorObserver { } /** - * Creates a new case (create the XML config file and database). Overload - * for API consistency, defaults to a single-user case. + * Creates a single-user new case. * - * @param caseDir The directory to store case data in. Will be created if - * it doesn't already exist. If it exists, it should have - * all of the needed sub dirs that createCaseDirectory() - * will create. - * @param caseName the name of case - * @param caseNumber the case number - * @param examiner the examiner for this case + * @param caseDir The full path of the case directory. It will be created + * if it doesn't already exist; if it exists, it should + * have been created using Case.createCaseDirectory() to + * ensure that the required sub-directories aere created. + * @param caseName The name of case. + * @param caseNumber The case number, can be the empty string. + * @param examiner The examiner to associate with the case, can be the + * empty string. * - * @throws org.sleuthkit.autopsy.casemodule.CaseActionException + * @throws CaseActionException if there is a problem creating the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. If so, + * CaseActionException.getCause will return a + * Throwable (null otherwise). */ public static void create(String caseDir, String caseName, String caseNumber, String examiner) throws CaseActionException { create(caseDir, caseName, caseNumber, examiner, CaseType.SINGLE_USER_CASE); } /** - * Creates a new case (create the XML config file and database) + * Creates a new case. * - * @param caseDir The directory to store case data in. Will be created if - * it doesn't already exist. If it exists, it should have - * all of the needed sub dirs that createCaseDirectory() - * will create. - * @param caseName the name of case - * @param caseNumber the case number - * @param examiner the examiner for this case - * @param caseType the type of case, single-user or multi-user + * @param caseDir The full path of the case directory. It will be created + * if it doesn't already exist; if it exists, it should + * have been created using Case.createCaseDirectory() to + * ensure that the required sub-directories aere created. + * @param caseName The name of case. + * @param caseNumber The case number, can be the empty string. + * @param examiner The examiner to associate with the case, can be the + * empty string. + * @param caseType The type of case (single-user or multi-user). The + * exception will have a user-friendly message and may be + * a wrapper for a lower-level exception. If so, + * CaseActionException.getCause will return a Throwable + * (null otherwise). + * + * @throws CaseActionException if there is a problem creating the case. */ public static void create(String caseDir, String caseName, String caseNumber, String examiner, CaseType caseType) throws CaseActionException { - logger.log(Level.INFO, "Creating new case.\ncaseDir: {0}\ncaseName: {1}", new Object[]{caseDir, caseName}); //NON-NLS + logger.log(Level.INFO, "Creating case with case directory {0}, caseName {1}", new Object[]{caseDir, caseName}); //NON-NLS - // create case directory if it doesn't already exist. + /* + * Create case directory if it doesn't already exist. + */ if (new File(caseDir).exists() == false) { Case.createCaseDirectory(caseDir, caseType); } - String configFilePath = caseDir + File.separator + caseName + CASE_DOT_EXTENSION; - - XMLCaseManagement xmlcm = new XMLCaseManagement(); - + /* + * Sanitize the case name, create a unique keyword search index name, + * and create a standard (single-user) or unique (multi-user) case + * database name. + */ + String santizedCaseName = sanitizeCaseName(caseName); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); Date date = new Date(); - String santizedCaseName = sanitizeCaseName(caseName); String indexName = santizedCaseName + "_" + dateFormat.format(date); String dbName = null; - - // figure out the database name and index name for text extraction if (caseType == CaseType.SINGLE_USER_CASE) { dbName = caseDir + File.separator + "autopsy.db"; //NON-NLS } else if (caseType == CaseType.MULTI_USER_CASE) { dbName = indexName; } - xmlcm.create(caseDir, caseName, examiner, caseNumber, caseType, dbName, indexName); // create a new XML config file + /* + * Create the case metadata (.aut) file. + * + * TODO (AUT-1885): Replace use of obsolete and unsafe XMLCaseManagement + * class with use of CaseMetadata class. + */ + String configFilePath = caseDir + File.separator + caseName + CASE_DOT_EXTENSION; + XMLCaseManagement xmlcm = new XMLCaseManagement(); + xmlcm.create(caseDir, caseName, examiner, caseNumber, caseType, dbName, indexName); xmlcm.writeFile(); + /* + * Create the case database. + */ SleuthkitCase db = null; try { if (caseType == CaseType.SINGLE_USER_CASE) { @@ -463,24 +488,23 @@ public class Case implements SleuthkitCase.ErrorObserver { db = SleuthkitCase.newCase(dbName, UserPreferences.getDatabaseConnectionInfo(), caseDir); } } catch (TskCoreException ex) { - logger.log(Level.SEVERE, "Error creating a case: " + caseName + " in dir " + caseDir + " " + ex.getMessage(), ex); //NON-NLS + logger.log(Level.SEVERE, String.format("Error creating a case %s in %s ", caseName, caseDir), ex); //NON-NLS SwingUtilities.invokeLater(() -> { WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }); + /* + * SleuthkitCase.newCase throws TskCoreExceptions with user-friendly + * messages, so propagate the exception message. + */ throw new CaseActionException(ex.getMessage(), ex); //NON-NLS } catch (UserPreferencesException ex) { logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS SwingUtilities.invokeLater(() -> { WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }); - throw new CaseActionException( - NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); + throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); } - /** - * Two-stage initialization to avoid leaking reference to "this" in - * constructor. - */ Case newCase = new Case(caseName, caseNumber, examiner, configFilePath, xmlcm, db, caseType); changeCase(newCase); } @@ -549,24 +573,28 @@ public class Case implements SleuthkitCase.ErrorObserver { /** * Opens an existing case. * - * @param caseMetadataFilePath The path of the case metadata file for the - * case to be opened. + * @param caseMetadataFilePath The path of the case metadata file. * - * @throws CaseActionException - */ - /** - * TODO: Deprecate this and throw a more general exception. + * @throws CaseActionException if there is a problem opening the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. If so, + * CaseActionException.getCause will return a + * Throwable (null otherwise). */ public static void open(String caseMetadataFilePath) throws CaseActionException { + logger.log(Level.INFO, "Opening case with metadata file path {0}", caseMetadataFilePath); //NON-NLS + /* + * Verify the extension of the case metadata file. + */ if (!caseMetadataFilePath.endsWith(CASE_DOT_EXTENSION)) { throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.open.exception.checkFile.msg", CASE_DOT_EXTENSION)); } - logger.log(Level.INFO, "Opening case, case metadata file path: {0}", caseMetadataFilePath); //NON-NLS try { - /** - * Get the case metadata from the file. + /* + * Get the case metadata required to open the case database. */ CaseMetadata metadata = new CaseMetadata(Paths.get(caseMetadataFilePath)); String caseName = metadata.getCaseName(); @@ -575,7 +603,7 @@ public class Case implements SleuthkitCase.ErrorObserver { CaseType caseType = metadata.getCaseType(); String caseDir = metadata.getCaseDirectory(); - /** + /* * Open the case database. */ SleuthkitCase db; @@ -589,41 +617,57 @@ public class Case implements SleuthkitCase.ErrorObserver { try { db = SleuthkitCase.openCase(metadata.getCaseDatabaseName(), UserPreferences.getDatabaseConnectionInfo(), caseDir); } catch (UserPreferencesException ex) { - logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS - throw new CaseActionException( - NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); + throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); } } - /** - * Do things that require a UI. + /* + * Check for the presence of the UI and do things that can only be + * done with user interaction. */ if (RuntimeProperties.coreComponentsAreActive()) { - /** + /* * If the case database was upgraded for a new schema, notify * the user. */ if (null != db.getBackupDatabasePath()) { SwingUtilities.invokeLater(() -> { - JOptionPane.showMessageDialog(null, - NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.msg", - db.getBackupDatabasePath()), + JOptionPane.showMessageDialog( + WindowManager.getDefault().getMainWindow(), + NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.msg", db.getBackupDatabasePath()), NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.title"), JOptionPane.INFORMATION_MESSAGE); }); } - /** - * TODO: This currently has no value if it there is no user to - * interact with a fid missing images dialog. + /* + * Look for the files for the data sources listed in the case + * database and give the user the opportunity to locate any that + * are missing. */ - checkImagesExist(db); + Map imgPaths = getImagePaths(db); + for (Map.Entry entry : imgPaths.entrySet()) { + long obj_id = entry.getKey(); + String path = entry.getValue(); + boolean fileExists = (pathExists(path) || driveExists(path)); + if (!fileExists) { + int ret = JOptionPane.showConfirmDialog( + WindowManager.getDefault().getMainWindow(), + NbBundle.getMessage(Case.class, "Case.checkImgExist.confDlg.doesntExist.msg", getAppName(), path), + NbBundle.getMessage(Case.class, "Case.checkImgExist.confDlg.doesntExist.title"), + JOptionPane.YES_NO_OPTION); + if (ret == JOptionPane.YES_OPTION) { + MissingImageDialog.makeDialog(obj_id, db); + } else { + logger.log(Level.WARNING, "Selected image files don't match old files!"); //NON-NLS + } + } + } } - /** - * Two-stage initialization to avoid leaking reference to "this" in - * constructor. TODO: Remove use of obsolete XMLCaseManagement - * class. + /* + * TODO (AUT-1885): Replace use of obsolete and unsafe + * XMLCaseManagement class with use of CaseMetadata class. */ XMLCaseManagement xmlcm = new XMLCaseManagement(); xmlcm.open(caseMetadataFilePath); @@ -631,28 +675,16 @@ public class Case implements SleuthkitCase.ErrorObserver { changeCase(openedCase); } catch (CaseMetadataException ex) { - /** - * Clean-up the case if it was actually opened. TODO: Do this - * better. - */ - try { - Case badCase = Case.getCurrentCase(); - badCase.closeCase(); - } catch (IllegalStateException unused) { - // Already logged. - } - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.open.exception.gen.msg") + ": " + ex.getMessage(), ex); //NON-NLS + throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.metaDataFileCorrupt.exception.msg"), ex); //NON-NLS } catch (TskCoreException ex) { - try { - Case badCase = Case.getCurrentCase(); - badCase.closeCase(); - } catch (CaseActionException | IllegalStateException unused) { - // Already logged. - } SwingUtilities.invokeLater(() -> { WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }); - throw new CaseActionException(ex.getMessage(), ex); //NON-NLS + /* + * SleuthkitCase.openCase throws TskCoreExceptions with + * user-friendly messages, so propagate the exception message. + */ + throw new CaseActionException(ex.getMessage(), ex); } } @@ -671,35 +703,6 @@ public class Case implements SleuthkitCase.ErrorObserver { return imgPaths; } - /** - * Ensure that all image paths point to valid image files - */ - private static void checkImagesExist(SleuthkitCase db) { - Map imgPaths = getImagePaths(db); - for (Map.Entry entry : imgPaths.entrySet()) { - long obj_id = entry.getKey(); - String path = entry.getValue(); - boolean fileExists = (pathExists(path) || driveExists(path)); - if (!fileExists) { - int ret = JOptionPane.showConfirmDialog(null, - NbBundle.getMessage(Case.class, - "Case.checkImgExist.confDlg.doesntExist.msg", - getAppName(), path), - NbBundle.getMessage(Case.class, - "Case.checkImgExist.confDlg.doesntExist.title"), - JOptionPane.YES_NO_OPTION); - if (ret == JOptionPane.YES_OPTION) { - - MissingImageDialog.makeDialog(obj_id, db); - - } else { - logger.log(Level.WARNING, "Selected image files don't match old files!"); //NON-NLS - } - - } - } - } - /** * Adds the image to the current case after it has been added to the DB. * Sends out event and reopens windows if needed. @@ -1590,10 +1593,10 @@ public class Case implements SleuthkitCase.ErrorObserver { if (RuntimeProperties.coreComponentsAreActive()) { // enable these menus - CallableSystemAction.get(AddImageAction.class).setEnabled(true); - CallableSystemAction.get(CaseCloseAction.class).setEnabled(true); - CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true); - CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu + CallableSystemAction.get(AddImageAction.class).setEnabled(true); + CallableSystemAction.get(CaseCloseAction.class).setEnabled(true); + CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true); + CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu if (toChangeTo.hasData()) { // open all top components diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseMetadata.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseMetadata.java index c43b981db2..81e53a1fc9 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseMetadata.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseMetadata.java @@ -59,25 +59,53 @@ public final class CaseMetadata { try { /* * TODO (RC): This class should eventually replace the non-public - * XMLCaseManagement class altogether. + * and unsafe XMLCaseManagement class altogether. */ XMLCaseManagement metadata = new XMLCaseManagement(); metadata.open(metadataFilePath.toString()); - caseType = metadata.getCaseType(); - caseName = metadata.getCaseName(); - if (caseName.isEmpty()) { - throw new CaseMetadataException("Case name missing"); + try { + caseType = metadata.getCaseType(); + } catch (NullPointerException unused) { + throw new CaseMetadataException("Case type element missing"); } - caseNumber = metadata.getCaseNumber(); - examiner = metadata.getCaseExaminer(); - caseDirectory = metadata.getCaseDirectory(); - if (caseDirectory.isEmpty()) { - throw new CaseMetadataException("Case directory missing"); + try { + caseName = metadata.getCaseName(); + if (caseName.isEmpty()) { + throw new CaseMetadataException("Case name missing"); + } + } catch (NullPointerException unused) { + throw new CaseMetadataException("Case name element missing"); } - caseDatabaseName = metadata.getDatabaseName(); - caseTextIndexName = metadata.getTextIndexName(); - if (Case.CaseType.MULTI_USER_CASE == caseType && caseDatabaseName.isEmpty()) { - throw new CaseMetadataException("Case database name missing"); + try { + caseNumber = metadata.getCaseNumber(); + } catch (NullPointerException unused) { + throw new CaseMetadataException("Case number element missing"); + } + try { + examiner = metadata.getCaseExaminer(); + } catch (NullPointerException unused) { + throw new CaseMetadataException("Examiner element missing"); + } + try { + caseDirectory = metadata.getCaseDirectory(); + if (caseDirectory.isEmpty()) { + throw new CaseMetadataException("Case directory missing"); + } + } catch (NullPointerException unused) { + throw new CaseMetadataException("Case directory element missing"); + } + try { + caseDatabaseName = metadata.getDatabaseName(); + } catch (NullPointerException unused) { + throw new CaseMetadataException("Case database element missing"); + } + try { + caseTextIndexName = metadata.getTextIndexName(); + if (Case.CaseType.MULTI_USER_CASE == caseType && caseDatabaseName.isEmpty()) { + throw new CaseMetadataException("Case keyword search index name missing"); + } + } catch (NullPointerException unused) { + throw new CaseMetadataException("Case keyword search index name missing"); } } catch (CaseActionException ex) { throw new CaseMetadataException(ex.getLocalizedMessage(), ex); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java index 7c5a5ca9e0..f879393558 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java @@ -45,6 +45,7 @@ import org.sleuthkit.autopsy.ingest.IngestManager; @ServiceProvider(service = CaseOpenAction.class) public final class CaseOpenAction implements ActionListener { + private static final Logger logger = Logger.getLogger(CaseOpenAction.class.getName()); private static final String PROP_BASECASE = "LBL_BaseCase_PATH"; //NON-NLS private final JFileChooser fileChooser = new JFileChooser(); private final FileFilter caseMetadataFileFilter; @@ -64,30 +65,36 @@ public final class CaseOpenAction implements ActionListener { } /** - * Pops up a file chooser to allow the user to select a case meta data file + * Pops up a file chooser to allow the user to select a case metadata file * (.aut file) and attempts to open the case described by the file. * * @param e The action event. */ @Override public void actionPerformed(ActionEvent e) { - /* - * If ingest is running, do a dialog to warn the user and confirm - * abandoning the ingest. + * If ingest is running, do a dialog to warn the user and confirm the + * intent to close the current case and leave the ingest process + * incomplete. */ if (IngestManager.getInstance().isIngestRunning()) { - String closeCurrentCase = NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"); - NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation(closeCurrentCase, + NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation( + NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"), NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning.title"), NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); descriptor.setValue(NotifyDescriptor.NO_OPTION); Object res = DialogDisplayer.getDefault().notify(descriptor); if (res != null && res == DialogDescriptor.YES_OPTION) { + Case currentCase = null; try { - Case.getCurrentCase().closeCase(); - } catch (Exception ex) { - Logger.getLogger(NewCaseWizardAction.class.getName()).log(Level.WARNING, "Error closing case", ex); //NON-NLS + currentCase = Case.getCurrentCase(); + currentCase.closeCase(); + } catch (IllegalStateException ignored) { + /* + * No current case. + */ + } catch (CaseActionException ex) { + logger.log(Level.SEVERE, String.format("Error closing case at %s while ingest was running", (null != currentCase ? currentCase.getCaseDirectory() : "?")), ex); //NON-NLS } } else { return; @@ -100,17 +107,13 @@ public final class CaseOpenAction implements ActionListener { */ int retval = fileChooser.showOpenDialog(WindowManager.getDefault().getMainWindow()); if (retval == JFileChooser.APPROVE_OPTION) { - /** - * This is a bit of a hack, but close the startup window, if it was - * the source of the action invocation. + /* + * Close the startup window, if it is open. */ - try { - StartupWindowProvider.getInstance().close(); - } catch (Exception unused) { - } + StartupWindowProvider.getInstance().close(); - /** - * Try to open the case associated with the case meta data file the + /* + * Try to open the case associated with the case metadata file the * user selected. */ final String path = fileChooser.getSelectedFile().getPath(); @@ -121,11 +124,14 @@ public final class CaseOpenAction implements ActionListener { try { Case.open(path); } catch (CaseActionException ex) { + logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", path), ex); //NON-NLS SwingUtilities.invokeLater(() -> { WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), ex.getMessage() + " " - + NbBundle.getMessage(this.getClass(), "CaseExceptionWarning.CheckMultiUserOptions"), - NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), JOptionPane.ERROR_MESSAGE); //NON-NLS + JOptionPane.showMessageDialog( + WindowManager.getDefault().getMainWindow(), + ex.getMessage(), // Should be user-friendly + NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), //NON-NLS + JOptionPane.ERROR_MESSAGE); if (!Case.isCaseOpen()) { StartupWindowProvider.getInstance().open(); } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java index 491f66ba5e..39f831c5a1 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2016 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -37,70 +37,65 @@ import org.openide.util.actions.SystemAction; import org.sleuthkit.autopsy.coreutils.Logger; import javax.swing.JOptionPane; import org.sleuthkit.autopsy.casemodule.Case.CaseType; -import org.sleuthkit.autopsy.core.UserPreferences; -import org.sleuthkit.datamodel.CaseDbConnectionInfo; import org.openide.windows.WindowManager; import java.awt.Cursor; +import java.util.concurrent.ExecutionException; import org.sleuthkit.autopsy.ingest.IngestManager; /** - * Action to open the New Case wizard. + * An action that creates and runs the new case wizard. */ final class NewCaseWizardAction extends CallableSystemAction { private static final long serialVersionUID = 1L; - - private WizardDescriptor.Panel[] panels; - private static final Logger logger = Logger.getLogger(NewCaseWizardAction.class.getName()); + private WizardDescriptor.Panel[] panels; @Override public void performAction() { - - // if ingest is ongoing, warn and get confirmaion before opening a different case + /* + * If ingest is running, do a dialog to warn the user and confirm the + * intent to close the current case and leave the ingest process + * incomplete. + */ if (IngestManager.getInstance().isIngestRunning()) { - // show the confirmation first to close the current case and open the "New Case" wizard panel - String closeCurrentCase = NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"); - NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation(closeCurrentCase, + NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation( + NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"), NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning.title"), NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); descriptor.setValue(NotifyDescriptor.NO_OPTION); - Object res = DialogDisplayer.getDefault().notify(descriptor); if (res != null && res == DialogDescriptor.YES_OPTION) { + Case currentCase = null; try { - Case.getCurrentCase().closeCase(); // close the current case - } catch (Exception ex) { - Logger.getLogger(NewCaseWizardAction.class.getName()).log(Level.WARNING, "Error closing case.", ex); //NON-NLS + currentCase = Case.getCurrentCase(); + currentCase.closeCase(); + } catch (IllegalStateException ignored) { + /* + * No current case. + */ + } catch (CaseActionException ex) { + logger.log(Level.SEVERE, String.format("Error closing case at %s while ingest was running", (null != currentCase ? currentCase.getCaseDirectory() : "?")), ex); //NON-NLS } } else { return; } } - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - newCaseAction(); // start the new case creation process + runNewCaseWizard(); } - /** - * The method to perform new case creation - */ - private void newCaseAction() { - final WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels()); - // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName() + private void runNewCaseWizard() { + final WizardDescriptor wizardDescriptor = new WizardDescriptor(getNewCaseWizardPanels()); wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle(NbBundle.getMessage(this.getClass(), "NewCaseWizardAction.newCase.windowTitle.text")); Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); dialog.setVisible(true); dialog.toFront(); - if (wizardDescriptor.getValue() == WizardDescriptor.FINISH_OPTION) { new SwingWorker() { - @Override protected Void doInBackground() throws Exception { - // Create case. - String caseNumber = (String) wizardDescriptor.getProperty("caseNumber"); //NON-NLS String examiner = (String) wizardDescriptor.getProperty("caseExaminer"); //NON-NLS final String caseName = (String) wizardDescriptor.getProperty("caseName"); //NON-NLS @@ -112,25 +107,19 @@ final class NewCaseWizardAction extends CallableSystemAction { @Override protected void done() { - final String caseName = (String) wizardDescriptor.getProperty("caseName"); //NON-NLS try { get(); - CaseType currentCaseType = CaseType.values()[(int) wizardDescriptor.getProperty("caseType")]; //NON-NLS - CaseDbConnectionInfo info = UserPreferences.getDatabaseConnectionInfo(); AddImageAction addImageAction = SystemAction.get(AddImageAction.class); addImageAction.actionPerformed(null); } catch (Exception ex) { - logger.log(Level.SEVERE, "Error creating case", ex); //NON-NLS + logger.log(Level.SEVERE, String.format("Error creating case %s", wizardDescriptor.getProperty("caseName")), ex); //NON-NLS SwingUtilities.invokeLater(() -> { - JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), ex.getCause().getMessage() + " " - + NbBundle.getMessage(this.getClass(), "CaseExceptionWarning.CheckMultiUserOptions"), - NbBundle.getMessage(this.getClass(), "CaseCreateAction.msgDlg.cantCreateCase.msg"), - JOptionPane.ERROR_MESSAGE); //NON-NLS - - try { - StartupWindowProvider.getInstance().close(); - } catch (Exception unused) { - } + JOptionPane.showMessageDialog( + WindowManager.getDefault().getMainWindow(), + (ex instanceof ExecutionException ? ex.getCause().getMessage() : ex.getMessage()), + NbBundle.getMessage(this.getClass(), "CaseCreateAction.msgDlg.cantCreateCase.msg"), //NON-NLS + JOptionPane.ERROR_MESSAGE); + StartupWindowProvider.getInstance().close(); // RC: Why close and open? if (!Case.isCaseOpen()) { StartupWindowProvider.getInstance().open(); } @@ -148,9 +137,7 @@ final class NewCaseWizardAction extends CallableSystemAction { private void doFailedCaseCleanup(WizardDescriptor wizardDescriptor) { String createdDirectory = (String) wizardDescriptor.getProperty("createdDirectory"); //NON-NLS - if (createdDirectory != null) { - logger.log(Level.INFO, "Deleting a created case directory due to an error, dir: {0}", createdDirectory); //NON-NLS Case.deleteCaseDirectory(new File(createdDirectory)); } SwingUtilities.invokeLater(() -> { @@ -159,11 +146,10 @@ final class NewCaseWizardAction extends CallableSystemAction { } /** - * Initialize panels representing individual wizard's steps and sets various - * properties for them influencing wizard appearance. + * Creates the new case wizard panels. */ @SuppressWarnings({"unchecked", "rawtypes"}) - private WizardDescriptor.Panel[] getPanels() { + private WizardDescriptor.Panel[] getNewCaseWizardPanels() { if (panels == null) { panels = new WizardDescriptor.Panel[]{ new NewCaseWizardPanel1(), @@ -194,21 +180,33 @@ final class NewCaseWizardAction extends CallableSystemAction { return panels; } + /** + * @inheritDoc + */ @Override public String getName() { return NbBundle.getMessage(this.getClass(), "NewCaseWizardAction.getName.text"); } + /** + * @inheritDoc + */ @Override public String iconResource() { return null; } + /** + * @inheritDoc + */ @Override public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; } + /** + * @inheritDoc + */ @Override protected boolean asynchronous() { return false; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java index 00b4b600c3..07706cc798 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2016 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,25 +32,50 @@ import org.openide.windows.WindowManager; import java.awt.Cursor; /** - * Panel show from the splash dialog that shows recent cases and allows them to - * be opened. + * Panel used by the the open recent case option of the start window. */ class OpenRecentCasePanel extends javax.swing.JPanel { - static String[] caseNames; - static String[] casePaths; + private static final long serialVersionUID = 1L; private static final Logger logger = Logger.getLogger(OpenRecentCasePanel.class.getName()); private static OpenRecentCasePanel instance; + private static String[] caseNames; + private static String[] casePaths; private RecentCasesTableModel model; + /** + * Constructs a panel used by the the open recent case option of the start + * window. + */ private OpenRecentCasePanel() { initComponents(); } + /* + * Gets the singleton instance of the panel used by the the open recent case + * option of the start window. + */ + static OpenRecentCasePanel getInstance() { + if (instance == null) { + instance = new OpenRecentCasePanel(); + } + instance.refreshRecentCasesTable(); + return instance; + } + + /** + * Adds an action listener to the cancel button. + * + * @param listener An action listener. + */ + void setCloseButtonActionListener(ActionListener listener) { + this.cancelButton.addActionListener(listener); + } + /** * Retrieves all the recent cases and adds them to the table. */ - private void generateRecentCases() { + private void refreshRecentCasesTable() { caseNames = RecentCases.getInstance().getRecentCaseNames(); casePaths = RecentCases.getInstance().getRecentCasePaths(); model = new RecentCasesTableModel(); @@ -69,12 +94,159 @@ class OpenRecentCasePanel extends javax.swing.JPanel { } } - static OpenRecentCasePanel getInstance() { - if (instance == null) { - instance = new OpenRecentCasePanel(); + /* + * Opens the selected case. + */ + private void openCase() { + if (casePaths.length < 1) { + return; + } + final String casePath = casePaths[imagesTable.getSelectedRow()]; + final String caseName = caseNames[imagesTable.getSelectedRow()]; + if (!casePath.equals("")) { + try { + StartupWindowProvider.getInstance().close(); + CueBannerPanel.closeOpenRecentCasesWindow(); + } catch (Exception ex) { + logger.log(Level.SEVERE, "Error closing start up window", ex); //NON-NLS + } + + /* + * Open the case. + */ + if (caseName.equals("") || casePath.equals("") || (!new File(casePath).exists())) { + JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), + NbBundle.getMessage(this.getClass(), "RecentItems.openRecentCase.msgDlg.text", caseName), + NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), + JOptionPane.ERROR_MESSAGE); + RecentCases.getInstance().removeRecentCase(caseName, casePath); // remove the recent case if it doesn't exist anymore + if (Case.isCaseOpen() == false) { + StartupWindowProvider.getInstance().open(); + } + } else { + SwingUtilities.invokeLater(() -> { + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + }); + new Thread(() -> { + try { + Case.open(casePath); + } catch (CaseActionException ex) { + SwingUtilities.invokeLater(() -> { + logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", casePath), ex); //NON-NLS + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + JOptionPane.showMessageDialog( + WindowManager.getDefault().getMainWindow(), + ex.getMessage(), // Should be user-friendly + NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), //NON-NLS + JOptionPane.ERROR_MESSAGE); + if (!Case.isCaseOpen()) { + StartupWindowProvider.getInstance().open(); + } + }); + } + }).start(); + } + } + } + + /** + * Table model to keep track of recent cases. + */ + private class RecentCasesTableModel extends AbstractTableModel { + + private static final long serialVersionUID = 1L; + + /** + * @inheritDoc + */ + @Override + public int getRowCount() { + int count = 0; + for (String s : caseNames) { + if (!s.equals("")) { + count++; + } + } + return count; + } + + /** + * @inheritDoc + */ + @Override + public int getColumnCount() { + return 2; + } + + /** + * @inheritDoc + */ + @Override + public String getColumnName(int column) { + String colName = null; + switch (column) { + case 0: + colName = NbBundle.getMessage(OpenRecentCasePanel.class, "OpenRecentCasePanel.colName.caseName"); + break; + case 1: + colName = NbBundle.getMessage(OpenRecentCasePanel.class, "OpenRecentCasePanel.colName.path"); + break; + default: + break; + } + return colName; + } + + /** + * @inheritDoc + */ + @Override + public Object getValueAt(int rowIndex, int columnIndex) { + Object ret = null; + switch (columnIndex) { + case 0: + ret = caseNames[rowIndex]; + break; + case 1: + ret = shortenPath(casePaths[rowIndex]); + break; + default: + logger.log(Level.SEVERE, "Invalid table column index: {0}", columnIndex); //NON-NLS + break; + } + return ret; + } + + /** + * @inheritDoc + */ + @Override + public boolean isCellEditable(int rowIndex, int columnIndex) { + return false; + } + + /** + * @inheritDoc + */ + @Override + public void setValueAt(Object aValue, int rowIndex, int columnIndex) { + } + + /** + * Shortens a path to fit the display. + * + * @param path The path to shorten. + * + * @return The shortened path. + */ + private String shortenPath(String path) { + String shortenedPath = path; + if (shortenedPath.length() > 50) { + shortenedPath = path.substring(0, 10 + path.substring(10).indexOf(File.separator) + 1) + "..." + + path.substring((path.length() - 20) + path.substring(path.length() - 20).indexOf(File.separator)); + } + return shortenedPath; } - instance.generateRecentCases(); // refresh the case list - return instance; } /** @@ -180,59 +352,6 @@ class OpenRecentCasePanel extends javax.swing.JPanel { } }//GEN-LAST:event_imagesTableKeyPressed - // Open the selected case - private void openCase() { - if (casePaths.length < 1) { - logger.log(Level.INFO, "No Case paths exist, cannot open the case"); //NON-NLS - return; - } - final String casePath = casePaths[imagesTable.getSelectedRow()]; - final String caseName = caseNames[imagesTable.getSelectedRow()]; - if (!casePath.equals("")) { - // Close the startup menu - try { - StartupWindowProvider.getInstance().close(); - CueBannerPanel.closeOpenRecentCasesWindow(); - } catch (Exception ex) { - logger.log(Level.WARNING, "Error: couldn't open case: " + caseName, ex); //NON-NLS - } - // Open the recent cases - if (caseName.equals("") || casePath.equals("") || (!new File(casePath).exists())) { - JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), - NbBundle.getMessage(this.getClass(), - "OpenRecentCasePanel.openCase.msgDlg.caseDoesntExist.msg", - caseName), - NbBundle.getMessage(this.getClass(), - "OpenRecentCasePanel.openCase.msgDlg.err"), - JOptionPane.ERROR_MESSAGE); - RecentCases.getInstance().removeRecentCase(caseName, casePath); // remove the recent case if it doesn't exist anymore - - //if case is not opened, open the start window - if (Case.isCaseOpen() == false) { - StartupWindowProvider.getInstance().open(); - } - - } else { - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - }); - new Thread(() -> { - try { - Case.open(casePath); - } catch (CaseActionException ex) { - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), ex.getMessage(), - NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), JOptionPane.ERROR_MESSAGE); //NON-NLS - if (!Case.isCaseOpen()) { - StartupWindowProvider.getInstance().open(); - } - }); - } - }).start(); - } - } - } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton cancelButton; private javax.swing.JTable imagesTable; @@ -241,86 +360,4 @@ class OpenRecentCasePanel extends javax.swing.JPanel { private javax.swing.JScrollPane tableScrollPane; // End of variables declaration//GEN-END:variables - /** - * Sets the Close button action listener. - * - * @param e the action listener - */ - public void setCloseButtonActionListener(ActionListener e) { - this.cancelButton.addActionListener(e); - } - - /** - * Table model to keep track of recent cases. - */ - private class RecentCasesTableModel extends AbstractTableModel { - - @Override - public int getRowCount() { - int count = 0; - for (String s : caseNames) { - if (!s.equals("")) { - count++; - } - } - return count; - } - - @Override - public int getColumnCount() { - return 2; - } - - @Override - public String getColumnName(int column) { - String colName = null; - - switch (column) { - case 0: - colName = NbBundle.getMessage(OpenRecentCasePanel.class, "OpenRecentCasePanel.colName.caseName"); - break; - case 1: - colName = NbBundle.getMessage(OpenRecentCasePanel.class, "OpenRecentCasePanel.colName.path"); - break; - default: - ; - - } - return colName; - } - - @Override - public Object getValueAt(int rowIndex, int columnIndex) { - Object ret = null; - switch (columnIndex) { - case 0: - ret = caseNames[rowIndex]; - break; - case 1: - ret = shortenPath(casePaths[rowIndex]); - break; - default: - logger.log(Level.SEVERE, "Invalid table column index: {0}", columnIndex); //NON-NLS - break; - } - return ret; - } - - @Override - public boolean isCellEditable(int rowIndex, int columnIndex) { - return false; - } - - @Override - public void setValueAt(Object aValue, int rowIndex, int columnIndex) { - } - - private String shortenPath(String path) { - if (path.length() > 50) { - path = path.substring(0, 10 + path.substring(10).indexOf(File.separator) + 1) + "..." - + path.substring((path.length() - 20) + path.substring(path.length() - 20).indexOf(File.separator)); - } - return path; - } - } } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/RecentItems.java b/Core/src/org/sleuthkit/autopsy/casemodule/RecentItems.java index 8e9c989d5a..2df4401ad9 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/RecentItems.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/RecentItems.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2016 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,7 +23,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import javax.swing.JOptionPane; -import javax.swing.JPanel; import javax.swing.SwingUtilities; import org.openide.util.NbBundle; import org.openide.windows.WindowManager; @@ -36,21 +35,23 @@ import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.ingest.IngestManager; /** - * This class is used to add the action to the recent case menu item. When the - * the recent case menu is pressed, it should open that selected case. + * An action listener that opens a recent case. */ class RecentItems implements ActionListener { - final String caseName; - final String casePath; - private JPanel caller; // for error handling + private static final Logger logger = Logger.getLogger(RecentItems.class.getName()); + private final String caseName; + private final String caseMetaDataFilePath; /** - * the constructor + * Constructs an action listener that opens a recent case. + * + * @param caseName The name of the case. + * @param caseMetaDataFilePath The path to the case metadata file. */ - public RecentItems(String caseName, String casePath) { + public RecentItems(String caseName, String caseMetaDataFilePath) { this.caseName = caseName; - this.casePath = casePath; + this.caseMetaDataFilePath = caseMetaDataFilePath; } /** @@ -60,58 +61,65 @@ class RecentItems implements ActionListener { */ @Override public void actionPerformed(ActionEvent e) { - - // if ingest is ongoing, warn and get confirmaion before opening a different case + /* + * If ingest is running, do a dialog to warn the user and confirm the + * intent to close the current case and leave the ingest process + * incomplete. + */ if (IngestManager.getInstance().isIngestRunning()) { - // show the confirmation first to close the current case and open the "New Case" wizard panel - String closeCurrentCase = NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"); - NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation(closeCurrentCase, + NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation( + NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"), NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning.title"), NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); descriptor.setValue(NotifyDescriptor.NO_OPTION); - Object res = DialogDisplayer.getDefault().notify(descriptor); if (res != null && res == DialogDescriptor.YES_OPTION) { + Case currentCase = null; try { - Case.getCurrentCase().closeCase(); // close the current case - } catch (Exception ex) { - Logger.getLogger(NewCaseWizardAction.class.getName()).log(Level.WARNING, "Error closing case.", ex); //NON-NLS + currentCase = Case.getCurrentCase(); + currentCase.closeCase(); + } catch (IllegalStateException ignored) { + /* + * No current case. + */ + } catch (CaseActionException ex) { + logger.log(Level.SEVERE, String.format("Error closing case at %s while ingest was running", (null!= currentCase ? currentCase.getCaseDirectory() : "?")),ex); //NON-NLS } } else { return; } } - // check if the file exists - if (caseName.equals("") || casePath.equals("") || (!new File(casePath).exists())) { - // throw an error here - JOptionPane.showMessageDialog(caller, - NbBundle.getMessage(this.getClass(), "RecentItems.openRecentCase.msgDlg.text", - caseName), - NbBundle.getMessage(this.getClass(), "RecentItems.openRecentCase.msgDlg.err"), + /* + * Open the case. + */ + if (caseName.equals("") || caseMetaDataFilePath.equals("") || (!new File(caseMetaDataFilePath).exists())) { + JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), + NbBundle.getMessage(this.getClass(), "RecentItems.openRecentCase.msgDlg.text", caseName), + NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), JOptionPane.ERROR_MESSAGE); - RecentCases.getInstance().removeRecentCase(caseName, casePath); // remove the recent case if it doesn't exist anymore - - //if case is not opened, open the start window + RecentCases.getInstance().removeRecentCase(caseName, caseMetaDataFilePath); if (Case.isCaseOpen() == false) { EventQueue.invokeLater(() -> { StartupWindowProvider.getInstance().open(); }); - } } else { SwingUtilities.invokeLater(() -> { WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); }); new Thread(() -> { - // Create case. try { - Case.open(casePath); + Case.open(caseMetaDataFilePath); } catch (CaseActionException ex) { SwingUtilities.invokeLater(() -> { + logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", caseMetaDataFilePath), ex); //NON-NLS WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), ex.getMessage(), - NbBundle.getMessage(RecentItems.this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), JOptionPane.ERROR_MESSAGE); //NON-NLS + JOptionPane.showMessageDialog( + WindowManager.getDefault().getMainWindow(), + ex.getMessage(), // Should be user-friendly + NbBundle.getMessage(RecentItems.this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), //NON-NLS + JOptionPane.ERROR_MESSAGE); if (!Case.isCaseOpen()) { StartupWindowProvider.getInstance().open(); } diff --git a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties index 913f6d8c82..8ba6b8f14e 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties @@ -23,4 +23,9 @@ ServicesMonitor.unknownServiceName.excepton.txt=Requested service name {0} is un TextConverter.convert.exception.txt=Unable to convert text {0} to hex text TextConverter.convertFromHex.exception.txt=Unable to convert hex text to text ServicesMonitor.KeywordSearchNull=Cannot find Keyword Search service -ServicesMonitor.InvalidPortNumber=Invalid port number. \ No newline at end of file +ServicesMonitor.InvalidPortNumber=Invalid port number. +ServicesMonitor.remoteCaseDatabase.displayName.text=Multi-user case database service +ServicesMonitor.remoteKeywordSearch.displayName.text=Multi-user keyword search service +ServicesMonitor.messaging.displayName.text=Messaging service +ServicesMonitor.databaseConnectionInfo.error.msg=Error accessing case database connection info +ServicesMonitor.messagingService.connErr.text=Error accessing messaging service connection info \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index 2c5493d38d..8809bb549f 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -123,9 +123,9 @@ public class Installer extends ModuleInstall { } // This library name is different in 32-bit versus 64-bit - String libintlName = "libintl-8"; + String libintlName = "libintl-8"; //NON-NLS if (PlatformUtil.is64BitJVM() == false) { - libintlName = "intl"; + libintlName = "intl"; //NON-NLS } try { System.loadLibrary(libintlName); //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java b/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java index 4c1fb92989..70857146d4 100644 --- a/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java +++ b/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java @@ -52,7 +52,7 @@ public class ServicesMonitor { private static final Logger logger = Logger.getLogger(ServicesMonitor.class.getName()); private final ScheduledThreadPoolExecutor periodicTasksExecutor; - private static final String PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d"; + private static final String PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d"; //NON-NLS private static final int NUMBER_OF_PERIODIC_TASK_THREADS = 1; private static final long CRASH_DETECTION_INTERVAL_MINUTES = 2; @@ -84,18 +84,18 @@ public class ServicesMonitor { * changes. New value is set to updated ServiceStatus, old value is * null. */ - REMOTE_CASE_DATABASE("Multi-user case database service"), + REMOTE_CASE_DATABASE(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.remoteCaseDatabase.displayName.text")), /** * Property change event fired when remote keyword search service status * changes. New value is set to updated ServiceStatus, old value is * null. */ - REMOTE_KEYWORD_SEARCH("Multi-user keyword search service"), + REMOTE_KEYWORD_SEARCH(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.remoteKeywordSearch.displayName.text")), /** * Property change event fired when messaging service status changes. * New value is set to updated ServiceStatus, old value is null. */ - MESSAGING("Messaging service"); + MESSAGING(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.messaging.displayName.text")); private final String displayName; @@ -244,7 +244,7 @@ public class ServicesMonitor { info = UserPreferences.getDatabaseConnectionInfo(); } catch (UserPreferencesException ex) { logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS - setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.DOWN.toString(), "Error accessing case database connection info"); + setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.DOWN.toString(), NbBundle.getMessage(this.getClass(), "ServicesMonitor.databaseConnectionInfo.error.msg")); return; } try { @@ -289,7 +289,7 @@ public class ServicesMonitor { info = UserPreferences.getMessageServiceConnectionInfo(); } catch (UserPreferencesException ex) { logger.log(Level.SEVERE, "Error accessing messaging service connection info", ex); //NON-NLS - setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.DOWN.toString(), "Error accessing messaging service connection info"); + setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.DOWN.toString(), NbBundle.getMessage(this.getClass(), "ServicesMonitor.messagingService.connErr.text")); return; } diff --git a/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java b/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java index 03c97a0479..0cfaddf97b 100755 --- a/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java +++ b/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java @@ -147,7 +147,7 @@ public final class UserPreferences { public static CaseDbConnectionInfo getDatabaseConnectionInfo() throws UserPreferencesException { DbType dbType; try { - dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "POSTGRESQL")); + dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "POSTGRESQL")); //NON-NLS } catch (Exception ex) { dbType = DbType.SQLITE; } @@ -290,7 +290,7 @@ public final class UserPreferences { */ static final class TextConverter { - private static final char[] TMP = "hgleri21auty84fwe".toCharArray(); + private static final char[] TMP = "hgleri21auty84fwe".toCharArray(); //NON-NLS private static final byte[] SALT = { (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12, (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,}; @@ -306,9 +306,9 @@ public final class UserPreferences { */ static String convertTextToHexText(String property) throws UserPreferencesException { try { - SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); //NON-NLS SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP)); - Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); + Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); //NON-NLS pbeCipher.init(Cipher.ENCRYPT_MODE, key, new PBEParameterSpec(SALT, 20)); return base64Encode(pbeCipher.doFinal(property.getBytes("UTF-8"))); } catch (Exception ex) { @@ -332,9 +332,9 @@ public final class UserPreferences { */ static String convertHexTextToText(String property) throws UserPreferencesException { try { - SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); //NON-NLS SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP)); - Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); + Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); //NON-NLS pbeCipher.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(SALT, 20)); return new String(pbeCipher.doFinal(base64Decode(property)), "UTF-8"); } catch (Exception ex) { diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index 57f1a3452a..174a7f0e19 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -30,15 +30,10 @@ import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; -import java.util.logging.Level; import javax.swing.Action; import javax.swing.JTable; import javax.swing.ListSelectionModel; import javax.swing.SwingUtilities; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.TableColumnModelEvent; -import javax.swing.event.TableColumnModelListener; import org.netbeans.swing.outline.DefaultOutlineModel; import org.openide.explorer.ExplorerManager; import org.openide.explorer.view.OutlineView; @@ -53,10 +48,7 @@ import org.openide.nodes.NodeMemberEvent; import org.openide.nodes.NodeReorderEvent; import org.openide.nodes.Sheet; import org.openide.util.NbBundle; -import org.openide.util.NbPreferences; -import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer; -import org.sleuthkit.autopsy.coreutils.Logger; /** * DataResult sortable table viewer @@ -101,52 +93,66 @@ public class DataResultViewerTable extends AbstractDataResultViewer { // don't show the root node ov.getOutline().setRootVisible(false); ov.getOutline().setDragEnabled(false); - - ov.getOutline().getColumnModel().addColumnModelListener(new TableColumnModelListener() { - @Override - public void columnAdded(TableColumnModelEvent e) {} - @Override - public void columnRemoved(TableColumnModelEvent e) {} - @Override - public void columnMarginChanged(ChangeEvent e) {} - @Override - public void columnSelectionChanged(ListSelectionEvent e) {} - @Override - public void columnMoved(TableColumnModelEvent e) { - // change the order of the column in the array/hashset - List> props = new ArrayList<>(propertiesAcc); - Node.Property prop = props.remove(e.getFromIndex()); - props.add(e.getToIndex(), prop); - - propertiesAcc.clear(); - for (int j = 0; j < props.size(); ++j) { - propertiesAcc.add(props.get(j)); - } - } - }); + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * The following lines of code were added for this feature. + */ +// ov.getOutline().getColumnModel().addColumnModelListener(new TableColumnModelListener() { +// @Override +// public void columnAdded(TableColumnModelEvent e) {} +// @Override +// public void columnRemoved(TableColumnModelEvent e) {} +// @Override +// public void columnMarginChanged(ChangeEvent e) {} +// @Override +// public void columnSelectionChanged(ListSelectionEvent e) {} +// +// @Override +// public void columnMoved(TableColumnModelEvent e) { +// // change the order of the column in the array/hashset +// List> props = new ArrayList<>(propertiesAcc); +// Node.Property prop = props.remove(e.getFromIndex()); +// props.add(e.getToIndex(), prop); +// +// propertiesAcc.clear(); +// for (int j = 0; j < props.size(); ++j) { +// propertiesAcc.add(props.get(j)); +// } +// } +// }); /** - * Add mouse listener to perform action on double-click - * A somewhat hacky way to perform action even if the column clicked - * is not the first one. + * Add mouse listener to perform action on double-click A somewhat hacky + * way to perform action even if the column clicked is not the first + * one. */ ov.getOutline().addMouseListener(new MouseListener() { @Override - public void mousePressed(MouseEvent e) {} + public void mousePressed(MouseEvent e) { + } + @Override - public void mouseReleased(MouseEvent e) {} + public void mouseReleased(MouseEvent e) { + } + @Override - public void mouseEntered(MouseEvent e) {} + public void mouseEntered(MouseEvent e) { + } + @Override - public void mouseExited(MouseEvent e) {} + public void mouseExited(MouseEvent e) { + } + @Override public void mouseClicked(MouseEvent e) { - if(e.getClickCount() == 2) { + if (e.getClickCount() == 2) { Node[] nodes = DataResultViewerTable.this.em.getSelectedNodes(); - for(Node node : nodes) { + for (Node node : nodes) { Action action = node.getPreferredAction(); - if(action != null) + if (action != null) { action.actionPerformed(null); + } } } } @@ -354,12 +360,20 @@ public class DataResultViewerTable extends AbstractDataResultViewer { if (ov == null) { return; } - - storeState(); - + + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * The next three lines of code replaced the three lines of code that + * follow + */ +// storeState(); // set the new root as current - currentRoot = root; - List> props = loadState(); +// currentRoot = root; +// List> props = loadState(); + propertiesAcc.clear(); + DataResultViewerTable.this.getAllChildPropertyHeadersRec(root, 100); + List> props = new ArrayList<>(propertiesAcc); /* * OutlineView makes the first column be the result of @@ -423,7 +437,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer { ov.getOutline().getColumnModel().getColumn(colIndex).setPreferredWidth(colWidth); } } - + // if there's no content just auto resize all columns if (content.length <= 0) { // turn on the auto resize @@ -431,65 +445,70 @@ public class DataResultViewerTable extends AbstractDataResultViewer { } } } - + + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * The following three methods were added for this feature + */ // Store the state of current root Node. - private void storeState() { - if(currentRoot == null || propertiesAcc.isEmpty()) - return; - - TableFilterNode tfn; - if(currentRoot instanceof TableFilterNode) - tfn = (TableFilterNode) currentRoot; - else - return; - - List> props = new ArrayList<>(propertiesAcc); - for (int i = 0; i < props.size(); i++) { - Property prop = props.get(i); - NbPreferences.forModule(this.getClass()).put(getUniqueColName(prop, tfn.getItemType()), String.valueOf(i)); - } - } - +// private void storeState() { +// if(currentRoot == null || propertiesAcc.isEmpty()) +// return; +// +// TableFilterNode tfn; +// if(currentRoot instanceof TableFilterNode) +// tfn = (TableFilterNode) currentRoot; +// else +// return; +// +// List> props = new ArrayList<>(propertiesAcc); +// for (int i = 0; i < props.size(); i++) { +// Property prop = props.get(i); +// NbPreferences.forModule(this.getClass()).put(getUniqueColName(prop, tfn.getItemType()), String.valueOf(i)); +// } +// } // Load the state of current root Node if exists. - private List> loadState() { - propertiesAcc.clear(); - this.getAllChildPropertyHeadersRec(currentRoot, 100); - List> props = new ArrayList<>(propertiesAcc); - - // If node is not table filter node, use default order for columns - TableFilterNode tfn; - if(currentRoot instanceof TableFilterNode) { - tfn = (TableFilterNode) currentRoot; - } - else { - Logger.getLogger(DataResultViewerTable.class.getName()).log(Level.INFO, - "Node {0} is not TableFilterNode, columns are going to be in default order", currentRoot.getName()); - return props; - } - - List> orderedProps = new ArrayList<>(propertiesAcc); - for (Property prop : props) { - Integer value = Integer.valueOf(NbPreferences.forModule(this.getClass()).get(getUniqueColName(prop, tfn.getItemType()), "-1")); - if (value >= 0) { - /** - * The original contents of orderedProps do not matter when setting the new ordered values. The reason - * we copy propertiesAcc into it first is to give it the currect size so we can set() in any index. - */ - orderedProps.set(value, prop); - } - } - propertiesAcc.clear(); - for (Property prop : orderedProps) { - propertiesAcc.add(prop); - } - return orderedProps; - } - - // Get unique name for node and it's property. - private String getUniqueColName(Property prop, String type) { - return Case.getCurrentCase().getName() + "." + type + "." - + prop.getName().replaceAll("[^a-zA-Z0-9_]", "") + ".columnOrder"; - } +// private List> loadState() { +// propertiesAcc.clear(); +// this.getAllChildPropertyHeadersRec(currentRoot, 100); +// List> props = new ArrayList<>(propertiesAcc); +// +// // If node is not table filter node, use default order for columns +// TableFilterNode tfn; +// if (currentRoot instanceof TableFilterNode) { +// tfn = (TableFilterNode) currentRoot; +// } else { +// Logger.getLogger(DataResultViewerTable.class.getName()).log(Level.INFO, +// "Node {0} is not TableFilterNode, columns are going to be in default order", currentRoot.getName()); +// return props; +// } +// +// List> orderedProps = new ArrayList<>(propertiesAcc); +// for (Property prop : props) { +// Integer value = Integer.valueOf(NbPreferences.forModule(this.getClass()).get(getUniqueColName(prop, tfn.getItemType()), "-1")); +// if (value >= 0) { +// /** +// * The original contents of orderedProps do not matter when +// * setting the new ordered values. The reason we copy +// * propertiesAcc into it first is to give it the currect size so +// * we can set() in any index. +// */ +// orderedProps.set(value, prop); +// } +// } +// propertiesAcc.clear(); +// for (Property prop : orderedProps) { +// propertiesAcc.add(prop); +// } +// return orderedProps; +// } +// +// // Get unique name for node and it's property. +// private String getUniqueColName(Property prop, String type) { +// return Case.getCurrentCase().getName() + "." + type + "." +// + prop.getName().replaceAll("[^a-zA-Z0-9_]", "") + ".columnOrder"; +// } // Populate a two-dimensional array with rows of property values for up // to maxRows children of the node passed in. diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java b/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java index c2e989635e..9121ad4d23 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2016 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -43,8 +43,9 @@ import org.sleuthkit.autopsy.coreutils.Logger; */ public class Installer extends ModuleInstall { - private static Installer instance; + private static final long serialVersionUID = 1L; private static final Logger logger = Logger.getLogger(Installer.class.getName()); + private static Installer instance; public synchronized static Installer getDefault() { if (instance == null) { @@ -61,13 +62,15 @@ public class Installer extends ModuleInstall { public void restored() { super.restored(); - setupLAF(); + setLookAndFeel(); UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI"); UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder()); UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0)); /* - * Open the passed in case, if an aut file was double clicked. + * Open the case if a case metadata file was double-clicked. This only + * works if the user has associated files with ".aut" extensions with + * Autopsy. */ WindowManager.getDefault().invokeWhenUIReady(() -> { Collection processors = Lookup.getDefault().lookupAll(OptionProcessor.class); @@ -77,18 +80,17 @@ public class Installer extends ModuleInstall { final String caseFile = argsProcessor.getDefaultArg(); if (caseFile != null && !caseFile.equals("") && caseFile.endsWith(".aut") && new File(caseFile).exists()) { //NON-NLS new Thread(() -> { - // Create case. try { Case.open(caseFile); } catch (Exception ex) { - logger.log(Level.SEVERE, "Error opening case: ", ex); //NON-NLS + logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", caseFile), ex); //NON-NLS } }).start(); return; } } } - Case.invokeStartupDialog(); // bring up the startup dialog + Case.invokeStartupDialog(); }); } @@ -101,26 +103,27 @@ public class Installer extends ModuleInstall { @Override public void close() { new Thread(() -> { + String caseDirName = null; try { if (Case.isCaseOpen()) { - Case.getCurrentCase().closeCase(); + Case currentCase = Case.getCurrentCase(); + caseDirName = currentCase.getCaseDirectory(); + currentCase.closeCase(); } - } catch (CaseActionException | IllegalStateException unused) { - // Exception already logged. Shutting down, no need to do popup. + } catch (CaseActionException ex) { + logger.log(Level.SEVERE, String.format("Error closing case with case directory %s", (null != caseDirName ? caseDirName : "?")), ex); //NON-NLS + } catch (IllegalStateException ignored) { + /* + * No current case. Case.isCaseOpen is not reliable. + */ } }).start(); } - private void setupLAF() { - - //TODO apply custom skinning - //UIManager.put("nimbusBase", new Color()); - //UIManager.put("nimbusBlueGrey", new Color()); - //UIManager.put("control", new Color()); + private void setLookAndFeel() { if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS - setupMacOsXLAF(); + setOSXLookAndFeel(); } - } /** @@ -128,37 +131,33 @@ public class Installer extends ModuleInstall { * dependent elements that set the Menu Bar to be in the correct place on * Mac OS X. */ - private void setupMacOsXLAF() { + private void setOSXLookAndFeel() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { - logger.log(Level.WARNING, "Unable to set theme. ", ex); //NON-NLS + logger.log(Level.WARNING, "Error setting OS-X look-and-feel", ex); //NON-NLS } - final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI", //NON-NLS - }; - - Map uiEntries = new TreeMap<>(); - // Store the keys that deal with menu items + final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI",}; //NON-NLS + Map uiEntries = new TreeMap<>(); for (String key : UI_MENU_ITEM_KEYS) { uiEntries.put(key, UIManager.get(key)); } - //use Metal if available + // Use Metal if available. for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { 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); //NON-NLS + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { + logger.log(Level.WARNING, "Error setting OS-X look-and-feel", ex); //NON-NLS } break; } } - // Overwrite the Metal menu item keys to use the Aqua versions + // Overwrite the Metal menu item keys to use the Aqua versions. uiEntries.entrySet().stream().forEach((entry) -> { UIManager.put(entry.getKey(), entry.getValue()); }); diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties b/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties index d63b55a2cc..2202e10ecb 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties @@ -21,4 +21,7 @@ PlatformUtil.getAllMemUsageInfo.usageText={0}\n\ {1}\n\ Process Virtual Memory\: {2} StringExtract.illegalStateException.cannotInit.msg=Unicode table not properly initialized, cannot instantiate StringExtract - +ImageUtils.GetOrGenerateThumbnailTask.loadingThumbnailFor=Loading thumbnail for {0} +ImageUtils.GetOrGenerateThumbnailTask.generatingPreviewFor=Generating preview for {0} +ImageUtils.ReadImageTask.mesage.text=Reading image: {0} +VideoUtils.genVideoThumb.progress.text=extracting temporary file {0} diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java b/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java index b1d1c33c51..4c742acfac 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2012-2015 Basis Technology Corp. + * Copyright 2012-2016 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -31,7 +31,8 @@ import java.nio.file.Path; public class FileUtil { private static final Logger logger = Logger.getLogger(FileUtil.class.getName()); - private static String TEMP_FILE_PREFIX = "Autopsy"; + private static final String TEMP_FILE_NAME = "Autopsy"; //NON-NLS + private static final String TEMP_FILE_EXT = null; //NON-NLS /** * Recursively delete all of the files and sub-directories in a directory. @@ -172,16 +173,17 @@ public class FileUtil { } /** - * Test if the current user has read and write access to the path. + * Test if the current user has read and write access to the dirPath. * - * @param path The path to test for read and write access. + * @param dirPath The path to the directory to test for read and write + * access. * * @return True if we have both read and write access, false otherwise. */ - public static boolean hasReadWriteAccess(Path path) { + public static boolean hasReadWriteAccess(Path dirPath) { Path p = null; try { - p = Files.createTempFile(path, TEMP_FILE_PREFIX, null); + p = Files.createTempFile(dirPath, TEMP_FILE_NAME, TEMP_FILE_EXT); return (p.toFile().canRead() && p.toFile().canWrite()); } catch (IOException ex) { return false; @@ -194,4 +196,10 @@ public class FileUtil { } } } + + /** + * Prevents instantiation of this utility class. + */ + private FileUtil() { + } } diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java b/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java index 04df8cf403..be29d789c9 100755 --- a/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java @@ -67,16 +67,16 @@ import org.sleuthkit.datamodel.ReadContentInputStream; import org.sleuthkit.datamodel.TskCoreException; /** - * Utilities for working with image files and creating thumbnails. Reuses + * Utilities for working with image files and creating thumbnails. Re-uses * thumbnails by storing them in the case's cache directory. */ public class ImageUtils { private static final Logger LOGGER = Logger.getLogger(ImageUtils.class.getName()); - private static final String COULD_NOT_WRITE_CACHE_THUMBNAIL = "Could not write cache thumbnail: "; //NOI18N - private static final String COULD_NOT_CREATE_IMAGE_INPUT_STREAM = "Could not create ImageInputStream."; //NOI18N - private static final String NO_IMAGE_READER_FOUND_FOR_ = "No ImageReader found for "; //NOI18N + private static final String COULD_NOT_WRITE_CACHE_THUMBNAIL = "Could not write cache thumbnail: "; //NOI18N NON-NLS + private static final String COULD_NOT_CREATE_IMAGE_INPUT_STREAM = "Could not create ImageInputStream."; //NOI18N NON-NLS + private static final String NO_IMAGE_READER_FOUND_FOR_ = "No ImageReader found for "; //NOI18N NON-NLS /** * save thumbnails to disk as this format @@ -89,12 +89,12 @@ public class ImageUtils { private static final BufferedImage DEFAULT_THUMBNAIL; - private static final String IMAGE_GIF_MIME = "image/gif"; //NOI18N + private static final String IMAGE_GIF_MIME = "image/gif"; //NOI18N NON-NLS private static final SortedSet GIF_MIME_SET = ImmutableSortedSet.copyOf(new String[]{IMAGE_GIF_MIME}); private static final List SUPPORTED_IMAGE_EXTENSIONS; private static final SortedSet SUPPORTED_IMAGE_MIME_TYPES; - private static final List CONDITIONAL_MIME_TYPES = Arrays.asList("audio/x-aiff", "application/octet-stream"); //NOI18N + private static final List CONDITIONAL_MIME_TYPES = Arrays.asList("audio/x-aiff", "application/octet-stream"); //NOI18N NON-NLS private static final boolean openCVLoaded; @@ -104,7 +104,7 @@ public class ImageUtils { try { tempImage = ImageIO.read(ImageUtils.class.getResourceAsStream("/org/sleuthkit/autopsy/images/file-icon.png"));//NON-NLS //NOI18N } catch (IOException ex) { - LOGGER.log(Level.SEVERE, "Failed to load default icon.", ex); //NOI18N + LOGGER.log(Level.SEVERE, "Failed to load default icon.", ex); //NOI18N NON-NLS tempImage = null; } DEFAULT_THUMBNAIL = tempImage; @@ -113,16 +113,16 @@ public class ImageUtils { boolean openCVLoadedTemp; try { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); - if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) { //NOI18N - System.loadLibrary("opencv_ffmpeg248_64"); //NOI18N + if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) { //NOI18N NON-NLS + System.loadLibrary("opencv_ffmpeg248_64"); //NOI18N NON-NLS } else { - System.loadLibrary("opencv_ffmpeg248"); //NOI18N + System.loadLibrary("opencv_ffmpeg248"); //NOI18N NON-NLS } openCVLoadedTemp = true; } catch (UnsatisfiedLinkError e) { openCVLoadedTemp = false; - LOGGER.log(Level.SEVERE, "OpenCV Native code library failed to load", e); //NOI18N + LOGGER.log(Level.SEVERE, "OpenCV Native code library failed to load", e); //NOI18N NON-NLS //TODO: show warning bubble } @@ -136,12 +136,12 @@ public class ImageUtils { * with ImageIO automatically */ SUPPORTED_IMAGE_MIME_TYPES.addAll(Arrays.asList( - "image/x-rgb", - "image/x-ms-bmp", - "image/x-portable-graymap", - "image/x-portable-bitmap", - "application/x-123")); //TODO: is this correct? -jm //NOI18N - SUPPORTED_IMAGE_MIME_TYPES.removeIf("application/octet-stream"::equals); //NOI18N + "image/x-rgb", //NON-NLS + "image/x-ms-bmp", //NON-NLS + "image/x-portable-graymap", //NON-NLS + "image/x-portable-bitmap", //NON-NLS + "application/x-123")); //TODO: is this correct? -jm //NOI18N NON-NLS + SUPPORTED_IMAGE_MIME_TYPES.removeIf("application/octet-stream"::equals); //NOI18N NON-NLS } /** @@ -154,7 +154,7 @@ public class ImageUtils { */ private static final Executor imageSaver = Executors.newSingleThreadExecutor(new BasicThreadFactory.Builder() - .namingPattern("icon saver-%d").build()); //NOI18N + .namingPattern("icon saver-%d").build()); //NOI18N NON-NLS public static List getSupportedImageExtensions() { return Collections.unmodifiableList(SUPPORTED_IMAGE_EXTENSIONS); @@ -240,22 +240,22 @@ public class ImageUtils { return IMAGE_GIF_MIME.equalsIgnoreCase(fileType); } } catch (FileTypeDetectorInitException ex) { - LOGGER.log(Level.WARNING, "Failed to initialize FileTypeDetector.", ex); //NOI18N + LOGGER.log(Level.WARNING, "Failed to initialize FileTypeDetector.", ex); //NOI18N NON-NLS } catch (TskCoreException ex) { - if (ex.getMessage().contains("An SQLException was provoked by the following failure: java.lang.InterruptedException")) { - LOGGER.log(Level.WARNING, "Mime type look up with FileTypeDetector was interupted."); //NOI18N} + if (ex.getMessage().contains("An SQLException was provoked by the following failure: java.lang.InterruptedException")) { //NON-NLS + LOGGER.log(Level.WARNING, "Mime type look up with FileTypeDetector was interupted."); //NOI18N} NON-NLS return "gif".equalsIgnoreCase(file.getNameExtension()); //NOI18N } else { - LOGGER.log(Level.SEVERE, "Failed to get mime type of " + getContentPathSafe(file) + " with FileTypeDetector.", ex); //NOI18N} + LOGGER.log(Level.SEVERE, "Failed to get mime type of " + getContentPathSafe(file) + " with FileTypeDetector.", ex); //NOI18N} NON-NLS } } - LOGGER.log(Level.WARNING, "Falling back on direct mime type check for {0}.", getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Falling back on direct mime type check for {0}.", getContentPathSafe(file)); //NOI18N NON-NLS switch (file.isMimeType(GIF_MIME_SET)) { case TRUE: return true; case UNDEFINED: - LOGGER.log(Level.WARNING, "Falling back on extension check."); //NOI18N + LOGGER.log(Level.WARNING, "Falling back on extension check."); //NOI18N NON-NLS return "gif".equalsIgnoreCase(file.getNameExtension()); //NOI18N case FALSE: default: @@ -294,8 +294,8 @@ public class ImageUtils { || (conditionalMimes.contains(mimeType.toLowerCase()) && supportedExtension.contains(extension)); } } catch (FileTypeDetector.FileTypeDetectorInitException | TskCoreException ex) { - LOGGER.log(Level.WARNING, "Failed to look up mimetype for {0} using FileTypeDetector:{1}", new Object[]{getContentPathSafe(file), ex.toString()}); //NOI18N - LOGGER.log(Level.INFO, "Falling back on AbstractFile.isMimeType"); //NOI18N + LOGGER.log(Level.WARNING, "Failed to look up mimetype for {0} using FileTypeDetector:{1}", new Object[]{getContentPathSafe(file), ex.toString()}); //NOI18N NON-NLS + LOGGER.log(Level.INFO, "Falling back on AbstractFile.isMimeType"); //NOI18N NON-NLS AbstractFile.MimeMatchEnum mimeMatch = file.isMimeType(supportedMimeTypes); if (mimeMatch == AbstractFile.MimeMatchEnum.TRUE) { return true; @@ -360,7 +360,7 @@ public class ImageUtils { try { return SwingFXUtils.fromFXImage(thumbnailTask.get(), null); } catch (InterruptedException | ExecutionException ex) { - LOGGER.log(Level.WARNING, "Failed to get thumbnail for {0}: " + ex.toString(), getContentPathSafe(content)); + LOGGER.log(Level.WARNING, "Failed to get thumbnail for {0}: " + ex.toString(), getContentPathSafe(content)); //NON-NLS return DEFAULT_THUMBNAIL; } } else { @@ -435,9 +435,9 @@ public class ImageUtils { private static File getCachedThumbnailLocation(long fileID) { try { String cacheDirectory = Case.getCurrentCase().getCacheDirectory(); - return Paths.get(cacheDirectory, "thumbnails", fileID + ".png").toFile(); //NOI18N + return Paths.get(cacheDirectory, "thumbnails", fileID + ".png").toFile(); //NOI18N NON-NLS } catch (IllegalStateException e) { - LOGGER.log(Level.WARNING, "Could not get cached thumbnail location. No case is open."); + LOGGER.log(Level.WARNING, "Could not get cached thumbnail location. No case is open."); //NON-NLS return null; } @@ -532,7 +532,7 @@ public class ImageUtils { */ static public int getImageWidth(AbstractFile file) throws IOException { return getImageProperty(file, - "ImageIO could not determine width of {0}: ", //NOI18N + "ImageIO could not determine width of {0}: ", //NOI18N NON-NLS imageReader -> imageReader.getWidth(0) ); } @@ -549,7 +549,7 @@ public class ImageUtils { */ static public int getImageHeight(AbstractFile file) throws IOException { return getImageProperty(file, - "ImageIO could not determine height of {0}: ", //NOI18N + "ImageIO could not determine height of {0}: ", //NOI18N NON-NLS imageReader -> imageReader.getHeight(0) ); } @@ -646,18 +646,18 @@ public class ImageUtils { */ static private class GetThumbnailTask extends ReadImageTaskBase { - private static final String FAILED_TO_READ_IMAGE_FOR_THUMBNAIL_GENERATION = "Failed to read image for thumbnail generation."; //NOI18N + private static final String FAILED_TO_READ_IMAGE_FOR_THUMBNAIL_GENERATION = "Failed to read image for thumbnail generation."; //NOI18N NON-NLS private final int iconSize; private final File cacheFile; private final boolean defaultOnFailure; - @NbBundle.Messages({"# {0} - file name", - "GetOrGenerateThumbnailTask.loadingThumbnailFor=Loading thumbnail for {0}", "# {0} - file name", - "GetOrGenerateThumbnailTask.generatingPreviewFor=Generating preview for {0}"}) +// @NbBundle.Messages({"# {0} - file name", +// "GetOrGenerateThumbnailTask.loadingThumbnailFor=Loading thumbnail for {0}", "# {0} - file name", +// "GetOrGenerateThumbnailTask.generatingPreviewFor=Generating preview for {0}"}) private GetThumbnailTask(AbstractFile file, int iconSize, boolean defaultOnFailure) { super(file); - updateMessage(Bundle.GetOrGenerateThumbnailTask_loadingThumbnailFor(file.getName())); + updateMessage(NbBundle.getMessage(this.getClass(), "ImageUtils.GetOrGenerateThumbnailTask.loadingThumbnailFor", file.getName())); this.iconSize = iconSize; this.defaultOnFailure = defaultOnFailure; this.cacheFile = getCachedThumbnailLocation(file.getId()); @@ -679,7 +679,7 @@ public class ImageUtils { return SwingFXUtils.toFXImage(cachedThumbnail, null); } } catch (IOException ex) { - LOGGER.log(Level.WARNING, "ImageIO had a problem reading thumbnail for image {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "ImageIO had a problem reading thumbnail for image {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS } } @@ -691,7 +691,7 @@ public class ImageUtils { if (VideoUtils.isVideoThumbnailSupported(file)) { if (openCVLoaded) { - updateMessage(Bundle.GetOrGenerateThumbnailTask_generatingPreviewFor(file.getName())); + updateMessage(NbBundle.getMessage(this.getClass(), "ImageUtils.GetOrGenerateThumbnailTask.generatingPreviewFor", file.getName())); thumbnail = VideoUtils.generateVideoThumbnail(file, iconSize); } if (null == thumbnail) { @@ -716,7 +716,7 @@ public class ImageUtils { thumbnail = ScalrWrapper.resizeFast(bufferedImage, iconSize); } catch (IllegalArgumentException | OutOfMemoryError e) { // if resizing does not work due to extreme aspect ratio or oom, crop the image instead. - LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString() + ". Attemptying to crop {0} instead", ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString() + ". Attemptying to crop {0} instead", ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS final int height = bufferedImage.getHeight(); final int width = bufferedImage.getWidth(); @@ -727,12 +727,12 @@ public class ImageUtils { try { thumbnail = ScalrWrapper.cropImage(bufferedImage, cropWidth, cropHeight); } catch (Exception cropException) { - LOGGER.log(Level.WARNING, "Could not crop image {0}: " + cropException.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Could not crop image {0}: " + cropException.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS throw cropException; } } } catch (Exception e) { - LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS throw e; } } @@ -765,7 +765,7 @@ public class ImageUtils { } ImageIO.write(thumbnail, FORMAT, cacheFile); } catch (IllegalArgumentException | IOException ex) { - LOGGER.log(Level.WARNING, "Could not write thumbnail for {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Could not write thumbnail for {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS } }); } @@ -794,13 +794,13 @@ public class ImageUtils { ReadImageTask(AbstractFile file) { super(file); - updateMessage(Bundle.LoadImageTask_mesageText(file.getName())); + updateMessage(NbBundle.getMessage(this.getClass(), "ImageUtils.ReadImageTask.mesage.text", file.getName())); } +// @NbBundle.Messages({ +// "# {0} - file name", +// "LoadImageTask.mesageText=Reading image: {0}"}) @Override - @NbBundle.Messages({ - "# {0} - file name", - "LoadImageTask.mesageText=Reading image: {0}"}) protected javafx.scene.image.Image call() throws Exception { return readImage(); } @@ -811,7 +811,7 @@ public class ImageUtils { */ static private abstract class ReadImageTaskBase extends Task implements IIOReadProgressListener { - private static final String IMAGE_UTILS_COULD_NOT_READ_UNSUPPORTE_OR_CORRUPT = "ImageUtils could not read {0}. It may be unsupported or corrupt"; //NOI18N + private static final String IMAGE_UTILS_COULD_NOT_READ_UNSUPPORTE_OR_CORRUPT = "ImageUtils could not read {0}. It may be unsupported or corrupt"; //NOI18N NON-NLS final AbstractFile file; private ImageReader reader; @@ -955,7 +955,7 @@ public class ImageUtils { return content.getUniquePath(); } catch (TskCoreException tskCoreException) { String contentName = content.getName(); - LOGGER.log(Level.SEVERE, "Failed to get unique path for " + contentName, tskCoreException); //NOI18N + LOGGER.log(Level.SEVERE, "Failed to get unique path for " + contentName, tskCoreException); //NOI18N NON-NLS return contentName; } } diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/NetworkUtils.java b/Core/src/org/sleuthkit/autopsy/coreutils/NetworkUtils.java index 5564fa3f59..af41bc1980 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/NetworkUtils.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/NetworkUtils.java @@ -34,10 +34,10 @@ public class NetworkUtils { } catch (UnknownHostException ex) { // getLocalHost().getHostName() can fail in some situations. // Use environment variable if so. - hostName = System.getenv("COMPUTERNAME"); + hostName = System.getenv("COMPUTERNAME"); //NON-NLS } if (hostName == null || hostName.isEmpty()) { - hostName = System.getenv("COMPUTERNAME"); + hostName = System.getenv("COMPUTERNAME"); //NON-NLS } return hostName; } diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/PlatformUtil.java b/Core/src/org/sleuthkit/autopsy/coreutils/PlatformUtil.java index 1736e08e82..b715d8ce35 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/PlatformUtil.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/PlatformUtil.java @@ -50,7 +50,7 @@ import org.sleuthkit.datamodel.TskCoreException; */ public class PlatformUtil { - private static final String PYTHON_MODULES_SUBDIRECTORY = "python_modules"; + private static final String PYTHON_MODULES_SUBDIRECTORY = "python_modules"; //NON-NLS private static String javaPath = null; public static final String OS_NAME_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.nameUnknown"); public static final String OS_VERSION_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.verUnknown"); @@ -80,13 +80,13 @@ public class PlatformUtil { File coreFolder = InstalledFileLocator.getDefault().locate("core", PlatformUtil.class.getPackage().getName(), false); //NON-NLS File rootPath = coreFolder.getParentFile(); - String modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; + String modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; //NON-NLS File modulesPathF = new File(modulesPath); if (modulesPathF.exists() && modulesPathF.isDirectory()) { return modulesPath; } else { rootPath = rootPath.getParentFile(); - modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; + modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; //NON-NLS modulesPathF = new File(modulesPath); if (modulesPathF.exists() && modulesPathF.isDirectory()) { return modulesPath; @@ -104,7 +104,7 @@ public class PlatformUtil { * not found */ public static String getUserModulesPath() { - return getUserDirectory().getAbsolutePath() + File.separator + "modules"; + return getUserDirectory().getAbsolutePath() + File.separator + "modules"; //NON-NLS } /** diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java b/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java index ba353f8401..103a94013c 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java @@ -36,7 +36,7 @@ public class UNCPathUtilities { private static Map drives; private static final String MAPPED_DRIVES = "_mapped_drives.txt"; //NON-NLS - private static final String TEMP_FOLDER = "TEMP"; + private static final String TEMP_FOLDER = "TEMP"; //NON-NLS private static final String DATA_TRIGGER = "----------"; //NON-NLS private static final String OK_TXT = "OK"; //NON-NLS private static final String COLON = ":"; //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/VideoUtils.java b/Core/src/org/sleuthkit/autopsy/coreutils/VideoUtils.java index eeedf64915..dc06b75019 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/VideoUtils.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/VideoUtils.java @@ -32,6 +32,7 @@ import org.netbeans.api.progress.ProgressHandle; import org.netbeans.api.progress.ProgressHandleFactory; import org.opencv.core.Mat; import org.opencv.highgui.VideoCapture; +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.corelibs.ScalrWrapper; import static org.sleuthkit.autopsy.coreutils.ImageUtils.isMediaThumbnailSupported; @@ -44,24 +45,24 @@ import org.sleuthkit.datamodel.AbstractFile; public class VideoUtils { private static final List SUPPORTED_VIDEO_EXTENSIONS = - Arrays.asList("mov", "m4v", "flv", "mp4", "3gp", "avi", "mpg", - "mpeg", "asf", "divx", "rm", "moov", "wmv", "vob", "dat", - "m1v", "m2v", "m4v", "mkv", "mpe", "yop", "vqa", "xmv", - "mve", "wtv", "webm", "vivo", "vc1", "seq", "thp", "san", - "mjpg", "smk", "vmd", "sol", "cpk", "sdp", "sbg", "rtsp", - "rpl", "rl2", "r3d", "mlp", "mjpeg", "hevc", "h265", "265", - "h264", "h263", "h261", "drc", "avs", "pva", "pmp", "ogg", - "nut", "nuv", "nsv", "mxf", "mtv", "mvi", "mxg", "lxf", - "lvf", "ivf", "mve", "cin", "hnm", "gxf", "fli", "flc", - "flx", "ffm", "wve", "uv2", "dxa", "dv", "cdxl", "cdg", - "bfi", "jv", "bik", "vid", "vb", "son", "avs", "paf", "mm", + Arrays.asList("mov", "m4v", "flv", "mp4", "3gp", "avi", "mpg", //NON-NLS + "mpeg", "asf", "divx", "rm", "moov", "wmv", "vob", "dat", //NON-NLS + "m1v", "m2v", "m4v", "mkv", "mpe", "yop", "vqa", "xmv", //NON-NLS + "mve", "wtv", "webm", "vivo", "vc1", "seq", "thp", "san", //NON-NLS + "mjpg", "smk", "vmd", "sol", "cpk", "sdp", "sbg", "rtsp", //NON-NLS + "rpl", "rl2", "r3d", "mlp", "mjpeg", "hevc", "h265", "265", //NON-NLS + "h264", "h263", "h261", "drc", "avs", "pva", "pmp", "ogg", //NON-NLS + "nut", "nuv", "nsv", "mxf", "mtv", "mvi", "mxg", "lxf", //NON-NLS + "lvf", "ivf", "mve", "cin", "hnm", "gxf", "fli", "flc", //NON-NLS + "flx", "ffm", "wve", "uv2", "dxa", "dv", "cdxl", "cdg", //NON-NLS + "bfi", "jv", "bik", "vid", "vb", "son", "avs", "paf", "mm", //NON-NLS "flm", "tmv", "4xm"); //NON-NLS private static final SortedSet SUPPORTED_VIDEO_MIME_TYPES = new TreeSet<>( - Arrays.asList("application/x-shockwave-flash", "video/x-m4v", "video/x-flv", "video/quicktime", "video/avi", "video/msvideo", "video/x-msvideo", + Arrays.asList("application/x-shockwave-flash", "video/x-m4v", "video/x-flv", "video/quicktime", "video/avi", "video/msvideo", "video/x-msvideo", //NON-NLS "video/mp4", "video/x-ms-wmv", "video/mpeg", "video/asf")); //NON-NLS - private static final List CONDITIONAL_MIME_TYPES = Arrays.asList("application/octet-stream"); + private static final List CONDITIONAL_MIME_TYPES = Arrays.asList("application/octet-stream"); //NON-NLS public static List getSupportedVideoExtensions() { return SUPPORTED_VIDEO_EXTENSIONS; @@ -83,7 +84,7 @@ public class VideoUtils { } public static File getTempVideoFile(AbstractFile file) { - return Paths.get(Case.getCurrentCase().getTempDirectory(), "videos", file.getId() + "." + file.getNameExtension()).toFile(); + return Paths.get(Case.getCurrentCase().getTempDirectory(), "videos", file.getId() + "." + file.getNameExtension()).toFile(); //NON-NLS } public static boolean isVideoThumbnailSupported(AbstractFile file) { @@ -96,7 +97,7 @@ public class VideoUtils { try { if (tempFile.exists() == false || tempFile.length() < file.getSize()) { com.google.common.io.Files.createParentDirs(tempFile); - ProgressHandle progress = ProgressHandleFactory.createHandle("extracting temporary file " + file.getName()); + ProgressHandle progress = ProgressHandleFactory.createHandle(NbBundle.getMessage(VideoUtils.class, "VideoUtils.genVideoThumb.progress.text", file.getName())); progress.start(100); try { ContentUtils.writeToFile(file, tempFile, progress, null, true); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index fcce21eaaa..198baaf923 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -414,8 +414,13 @@ public class BlackboardArtifactNode extends DisplayableItemNode { return true; } - @Override - public String getItemType() { - return "BlackboardArtifact"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "BlackboardArtifact"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactTagNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactTagNode.java index 64868e4dd1..257f8ddde1 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactTagNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactTagNode.java @@ -108,8 +108,13 @@ public class BlackboardArtifactTagNode extends DisplayableItemNode { return true; } - @Override - public String getItemType() { - return "BlackboardArtifactTag"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "BlackboardArtifactTag"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java index 669214eb8c..8be6cda9f4 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java @@ -122,8 +122,13 @@ class ContentTagNode extends DisplayableItemNode { return true; } - @Override - public String getItemType() { - return "ContentTag"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "ContentTag"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DataSourcesNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/DataSourcesNode.java index 6669afbfc7..48bfc74443 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DataSourcesNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DataSourcesNode.java @@ -56,10 +56,15 @@ public class DataSourcesNode extends DisplayableItemNode { this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/image.png"); //NON-NLS } - @Override - public String getItemType() { - return "DataSources"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "DataSources"; //NON-NLS +// } /* * Custom Keys implementation that listens for new data sources being added. diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java index a1bcfe3168..f2b86f8d28 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java @@ -147,10 +147,15 @@ public class DeletedContent implements AutopsyVisitableItem { return s; } - @Override - public String getItemType() { - return "DeletedContent"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "DeletedContent"; //NON-NLS +// } } public static class DeletedContentsChildren extends ChildFactory { @@ -280,11 +285,16 @@ public class DeletedContent implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "DeletedContentChildren"; - } - + /* + * TODO (AUT-1849): Correct or remove peristent column reordering + * code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "DeletedContentChildren"; //NON-NLS +// } // update the display name when new events are fired private class DeletedContentNodeObserver implements Observer { @@ -347,7 +357,6 @@ public class DeletedContent implements AutopsyVisitableItem { private final Observer observer = new DeletedContentChildrenObserver(); // Cause refresh of children if there are changes - private class DeletedContentChildrenObserver implements Observer { @Override diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java index cf8e88c7b3..303ca71f15 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java @@ -101,8 +101,13 @@ public class DirectoryNode extends AbstractFsContentNode { return false; } - @Override - public String getItemType() { - return "Directory"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "Directory"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DisplayableItemNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/DisplayableItemNode.java index d5a4de315e..40f7d52b62 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DisplayableItemNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DisplayableItemNode.java @@ -40,6 +40,11 @@ public abstract class DisplayableItemNode extends AbstractNode { public abstract boolean isLeafTypeNode(); public abstract T accept(DisplayableItemNodeVisitor v); - - public abstract String getItemType(); + + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// public abstract String getItemType(); } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/EmailExtracted.java b/Core/src/org/sleuthkit/autopsy/datamodel/EmailExtracted.java index cb87b1fa53..fecf47d7cd 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/EmailExtracted.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/EmailExtracted.java @@ -191,10 +191,15 @@ public class EmailExtracted implements AutopsyVisitableItem { return s; } - @Override - public String getItemType() { - return "EmailExtractedRoot"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "EmailExtractedRoot"; //NON-NLS +// } } /** @@ -346,10 +351,15 @@ public class EmailExtracted implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "EmailExtractedAccount"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "EmailExtractedAccount"; //NON-NLS +// } } /** @@ -437,10 +447,15 @@ public class EmailExtracted implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "EmailExtractedFolder"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "EmailExtractedFolder"; //NON-NLS +// } } /** diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java index 2e03c39a03..146c4c72e5 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java @@ -85,7 +85,7 @@ public class ExtractedContent implements AutopsyVisitableItem { } static String getIconFilePath(int typeID) { - String filePath = "org/sleuthkit/autopsy/images/"; + String filePath = "org/sleuthkit/autopsy/images/"; //NON-NLS if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID()) { return filePath + "bookmarks.png"; //NON-NLS } else if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()) { @@ -183,10 +183,15 @@ public class ExtractedContent implements AutopsyVisitableItem { return s; } - @Override - public String getItemType() { - return "ExtractedContentRoot"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "ExtractedContentRoot"; //NON-NLS +// } } /** @@ -400,10 +405,15 @@ public class ExtractedContent implements AutopsyVisitableItem { return true; } - @Override - public String getItemType() { - return type.getDisplayName(); - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return type.getDisplayName(); +// } } /** diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java index 53c9270494..d740149ffe 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java @@ -184,8 +184,13 @@ public class FileNode extends AbstractFsContentNode { return true; } - @Override - public String getItemType() { - return "File"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "File"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileSize.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileSize.java index 587037fb24..c5fee7d696 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileSize.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileSize.java @@ -144,10 +144,15 @@ public class FileSize implements AutopsyVisitableItem { return s; } - @Override - public String getItemType() { - return "FileSizeRoot"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "FileSizeRoot"; //NON-NLS +// } } /* @@ -286,11 +291,16 @@ public class FileSize implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "FileSize"; - } - + /* + * TODO (AUT-1849): Correct or remove peristent column reordering + * code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "FileSize"; //NON-NLS +// } // update the display name when new events are fired private class FileSizeNodeObserver implements Observer { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeNode.java index d2cb20d2c6..e1b7553aba 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeNode.java @@ -82,10 +82,15 @@ public class FileTypeNode extends DisplayableItemNode { this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-filter-icon.png"); //NON-NLS } - @Override - public String getItemType() { - return "FileType"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "FileType"; //NON-NLS +// } // update the display name when new events are fired private class FileTypeNodeObserver implements Observer { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypesNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypesNode.java index 24e7cd18f5..3bbbf0b63c 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypesNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypesNode.java @@ -104,16 +104,21 @@ public class FileTypesNode extends DisplayableItemNode { return s; } - @Override - public String getItemType() { - if(filter == null) - return "FileTypes"; - if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_DOCUMENT_FILTER)) - return "FileTypesDoc"; - if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_EXECUTABLE_FILTER)) - return "FileTypesExe"; - return "FileTypes"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// if(filter == null) +// return "FileTypes"; //NON-NLS +// if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_DOCUMENT_FILTER)) +// return "FileTypesDoc"; //NON-NLS +// if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_EXECUTABLE_FILTER)) +// return "FileTypesExe"; //NON-NLS +// return "FileTypes"; //NON-NLS +// } /** * diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java b/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java index 60855fe8a0..6ecaec6258 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java @@ -169,10 +169,15 @@ public class HashsetHits implements AutopsyVisitableItem { return s; } - @Override - public String getItemType() { - return "HashsetRoot"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "HashsetRoot"; //NON-NLS +// } } /** @@ -327,10 +332,15 @@ public class HashsetHits implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "HashsetName"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "HashsetName"; //NON-NLS +// } } /** diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ImageNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ImageNode.java index 49ec5214c9..4a822aec09 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ImageNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ImageNode.java @@ -110,8 +110,13 @@ public class ImageNode extends AbstractContentNode { return v.visit(this); } - @Override - public String getItemType() { - return "Image"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "Image"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java b/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java index e69dfd75b5..8faec30ab7 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java @@ -162,10 +162,15 @@ public class InterestingHits implements AutopsyVisitableItem { return s; } - @Override - public String getItemType() { - return "InterestingHitsRoot"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "InterestingHitsRoot"; //NON-NLS +// } } private class SetNameFactory extends ChildFactory.Detachable implements Observer { @@ -313,10 +318,15 @@ public class InterestingHits implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "InterestingHitsSetName"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "InterestingHitsSetName"; //NON-NLS +// } } private class HitFactory extends ChildFactory implements Observer { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java b/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java index 77be04dd6d..987cf72caa 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java @@ -73,7 +73,6 @@ public class KeywordHits implements AutopsyVisitableItem { private final class KeywordResults extends Observable { // Map from listName/Type to Map of keyword to set of artifact Ids - private final Map>> topLevelMap; KeywordResults() { @@ -240,10 +239,15 @@ public class KeywordHits implements AutopsyVisitableItem { return s; } - @Override - public String getItemType() { - return "KeywordRoot"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "KeywordRoot"; //NON-NLS +// } } private class ListFactory extends ChildFactory.Detachable implements Observer { @@ -395,10 +399,15 @@ public class KeywordHits implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "KeywordList"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "KeywordList"; //NON-NLS +// } } private class TermFactory extends ChildFactory.Detachable implements Observer { @@ -493,10 +502,15 @@ public class KeywordHits implements AutopsyVisitableItem { return s; } - @Override - public String getItemType() { - return "KeywordTerm"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "KeywordTerm"; //NON-NLS +// } } public class HitsFactory extends ChildFactory.Detachable implements Observer { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java index ef6ab09c02..0192f37912 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java @@ -38,11 +38,15 @@ import org.sleuthkit.datamodel.TskData; */ public class LayoutFileNode extends AbstractAbstractFileNode { - @Override - public String getItemType() { - return "LayoutFile"; - } - + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "LayoutFile"; //NON-NLS +// } public static enum LayoutContentPropertyType { PARTS { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java index 04c542bfc7..45c9dd492b 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java @@ -116,8 +116,13 @@ public class LocalFileNode extends AbstractAbstractFileNode { return true; //!this.hasContentChildren(); } - @Override - public String getItemType() { - return "LocalFile"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "LocalFile"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterNode.java index 832d385cfe..e9d8fe6b63 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterNode.java @@ -83,8 +83,13 @@ public class RecentFilesFilterNode extends DisplayableItemNode { return true; } - @Override - public String getItemType() { - return "RecentFilesFilter"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "RecentFilesFilter"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesNode.java index 8fcb72d7cb..21751acdbc 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesNode.java @@ -66,8 +66,13 @@ public class RecentFilesNode extends DisplayableItemNode { return s; } - @Override - public String getItemType() { - return "RecentFiles"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "RecentFiles"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/Reports.java b/Core/src/org/sleuthkit/autopsy/datamodel/Reports.java index bcf5d7b266..e3715787cf 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/Reports.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/Reports.java @@ -89,10 +89,15 @@ public final class Reports implements AutopsyVisitableItem { return visitor.visit(this); } - @Override - public String getItemType() { - return "ReportsList"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "ReportsList"; //NON-NLS +// } } /** @@ -214,11 +219,15 @@ public final class Reports implements AutopsyVisitableItem { return new OpenReportAction(); } - @Override - public String getItemType() { - return "Reports"; - } - + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "Reports"; //NON-NLS +// } private static class DeleteReportAction extends AbstractAction { private static DeleteReportAction instance; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java index 46e4853e0b..737a931097 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java @@ -69,8 +69,13 @@ public class ResultsNode extends DisplayableItemNode { return s; } - @Override - public String getItemType() { - return "Results"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "Results"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java b/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java index 1b013baf5c..16f0ac7084 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java @@ -109,10 +109,15 @@ public class Tags implements AutopsyVisitableItem { return propertySheet; } - @Override - public String getItemType() { - return "TagsRoots"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "TagsRoots"; //NON-NLS +// } } private class TagNameNodeFactory extends ChildFactory.Detachable implements Observer { @@ -271,10 +276,15 @@ public class Tags implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "TagsName"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "TagsName"; //NON-NLS +// } } /** @@ -371,10 +381,15 @@ public class Tags implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "TagsContentType"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "TagsContentType"; //NON-NLS +// } } private class ContentTagNodeFactory extends ChildFactory implements Observer { @@ -469,10 +484,15 @@ public class Tags implements AutopsyVisitableItem { updateDisplayName(); } - @Override - public String getItemType() { - return "TagsBlackboardArtifact"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "TagsBlackboardArtifact"; //NON-NLS +// } } private class BlackboardArtifactTagNodeFactory extends ChildFactory implements Observer { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ViewsNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ViewsNode.java index 08c2e6b806..4919594378 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ViewsNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ViewsNode.java @@ -73,8 +73,13 @@ public class ViewsNode extends DisplayableItemNode { return s; } - @Override - public String getItemType() { - return "Views"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "Views"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java index 5900487444..16bb0b591d 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java @@ -149,8 +149,13 @@ public class VirtualDirectoryNode extends AbstractAbstractFileNode { // Listen for case events so that we can detect when case is closed Case.addPropertyChangeListener(pcl); } - + private void removeListeners() { IngestManager.getInstance().removeIngestModuleEventListener(pcl); Case.removePropertyChangeListener(pcl); @@ -190,8 +190,13 @@ public class VolumeNode extends AbstractContentNode { return v.visit(this); } - @Override - public String getItemType() { - return "Volume"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "Volume"; //NON-NLS +// } } diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java index 1fa77f5940..cabc5cc3d4 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java @@ -631,11 +631,18 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat //set node, wrap in filter node first to filter out children Node drfn = new DataResultFilterNode(originNode, DirectoryTreeTopComponent.this.em); Node kffn = new KnownFileFilterNode(drfn, KnownFileFilterNode.getSelectionContext(originNode)); - if(originNode instanceof DisplayableItemNode) { - dataResult.setNode(new TableFilterNode(kffn, true, ((DisplayableItemNode) originNode).getItemType())); - } else { - dataResult.setNode(new TableFilterNode(kffn, true)); - } + /* + * TODO (AUT-1849): Correct or remove peristent column + * reordering code + * + * The following conditional was added to support this + * feature. + */ +// if(originNode instanceof DisplayableItemNode) { +// dataResult.setNode(new TableFilterNode(kffn, true, ((DisplayableItemNode) originNode).getItemType())); +// } else { + dataResult.setNode(new TableFilterNode(kffn, true)); +// } String displayName = ""; Content content = originNode.getLookup().lookup(Content.class); @@ -772,7 +779,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat Node imagesNode = imagesNodeOrig.getNode(); - DataSourcesNode.DataSourcesNodeChildren contentRootChildren = (DataSourcesNode.DataSourcesNodeChildren) imagesNode.getChildren(); + DataSourcesNode.DataSourcesNodeChildren contentRootChildren = (DataSourcesNode.DataSourcesNodeChildren) imagesNode.getChildren(); contentRootChildren.refreshContentKeys(); //final TreeView tree = getTree(); diff --git a/Core/src/org/sleuthkit/autopsy/events/LocalEventPublisher.java b/Core/src/org/sleuthkit/autopsy/events/LocalEventPublisher.java index 3972bed895..fea68754e5 100644 --- a/Core/src/org/sleuthkit/autopsy/events/LocalEventPublisher.java +++ b/Core/src/org/sleuthkit/autopsy/events/LocalEventPublisher.java @@ -107,7 +107,7 @@ final class LocalEventPublisher { try { subscriber.propertyChange(event); } catch (Exception ex) { - logger.log(Level.SEVERE, "Exception thrown by subscriber", ex); + logger.log(Level.SEVERE, "Exception thrown by subscriber", ex); //NON-NLS } } } diff --git a/Core/src/org/sleuthkit/autopsy/events/MessageServiceConnectionInfo.java b/Core/src/org/sleuthkit/autopsy/events/MessageServiceConnectionInfo.java index 487e06c61f..9db745b09b 100644 --- a/Core/src/org/sleuthkit/autopsy/events/MessageServiceConnectionInfo.java +++ b/Core/src/org/sleuthkit/autopsy/events/MessageServiceConnectionInfo.java @@ -35,10 +35,10 @@ import org.openide.util.NbBundle; @Immutable public final class MessageServiceConnectionInfo { - private static final String MESSAGE_SERVICE_URI = "tcp://%s:%s?wireFormat.maxInactivityDuration=0"; - private static final String CONNECTION_TIMED_OUT = "connection timed out"; - private static final String CONNECTION_REFUSED = "connection refused"; - private static final String PASSWORD_OR_USERNAME_BAD = "user name ["; + private static final String MESSAGE_SERVICE_URI = "tcp://%s:%s?wireFormat.maxInactivityDuration=0"; //NON-NLS + private static final String CONNECTION_TIMED_OUT = "connection timed out"; //NON-NLS + private static final String CONNECTION_REFUSED = "connection refused"; //NON-NLS + private static final String PASSWORD_OR_USERNAME_BAD = "user name ["; //NON-NLS private static final int IS_REACHABLE_TIMEOUT_MS = 1000; private final String userName; private final String password; diff --git a/Core/src/org/sleuthkit/autopsy/events/RemoteEventPublisher.java b/Core/src/org/sleuthkit/autopsy/events/RemoteEventPublisher.java index 58a567e415..6a83f2ef32 100644 --- a/Core/src/org/sleuthkit/autopsy/events/RemoteEventPublisher.java +++ b/Core/src/org/sleuthkit/autopsy/events/RemoteEventPublisher.java @@ -43,7 +43,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; final class RemoteEventPublisher { private static final Logger logger = Logger.getLogger(RemoteEventPublisher.class.getName()); - private static final String ALL_MESSAGE_SELECTOR = "All"; + private static final String ALL_MESSAGE_SELECTOR = "All"; //NON-NLS private final LocalEventPublisher localPublisher; private final Connection connection; private final Session session; @@ -76,11 +76,11 @@ final class RemoteEventPublisher { Topic topic = session.createTopic(eventChannelName); producer = session.createProducer(topic); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); - consumer = session.createConsumer(topic, "events = '" + ALL_MESSAGE_SELECTOR + "'", true); + consumer = session.createConsumer(topic, "events = '" + ALL_MESSAGE_SELECTOR + "'", true); //NON-NLS receiver = new MessageReceiver(); consumer.setMessageListener(receiver); } catch (URISyntaxException | JMSException ex) { - logger.log(Level.SEVERE, "Failed to connect to event channel", ex); + logger.log(Level.SEVERE, "Failed to connect to event channel", ex); //NON-NLS try { stop(); } catch (JMSException ignored) { @@ -121,7 +121,7 @@ final class RemoteEventPublisher { */ synchronized void publish(AutopsyEvent event) throws JMSException { ObjectMessage message = session.createObjectMessage(); - message.setStringProperty("events", ALL_MESSAGE_SELECTOR); + message.setStringProperty("events", ALL_MESSAGE_SELECTOR); //NON-NLS message.setObject(event); producer.send(message); } @@ -151,7 +151,7 @@ final class RemoteEventPublisher { } } } catch (Exception ex) { - logger.log(Level.SEVERE, "Error receiving message", ex); + logger.log(Level.SEVERE, "Error receiving message", ex); //NON-NLS } } } diff --git a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java index 568f45f680..f2f7f39797 100644 --- a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java +++ b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java @@ -148,19 +148,19 @@ public final class ExternalResultsImporter { if (attributeType == null) { switch (attributeData.getValueType()) { case "text": //NON-NLS - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("String"), attributeData.getType()); + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("String"), attributeData.getType()); //NON-NLS break; case "int32": //NON-NLS - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Integer"), attributeData.getType()); + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Integer"), attributeData.getType()); //NON-NLS break; case "int64": //NON-NLS - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Long"), attributeData.getType()); + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Long"), attributeData.getType()); //NON-NLS break; case "double": //NON-NLS - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Double"), attributeData.getType()); + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Double"), attributeData.getType()); //NON-NLS break; - case "datetime": - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("DateTime"), attributeData.getType()); + case "datetime": //NON-NLS + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("DateTime"), attributeData.getType()); //NON-NLS } } @@ -180,7 +180,7 @@ public final class ExternalResultsImporter { double doubleValue = Double.parseDouble(attributeData.getValue()); attributes.add(new BlackboardAttribute(attributeType, attributeData.getSourceModule(), doubleValue)); break; - case "datetime": + case "datetime": //NON-NLS long dateTimeValue = Long.parseLong(attributeData.getValue()); attributes.add(new BlackboardAttribute(attributeType, attributeData.getSourceModule(), dateTimeValue)); break; diff --git a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsXMLParser.java b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsXMLParser.java index 5bcfc51dc1..8443e6b71a 100644 --- a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsXMLParser.java +++ b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsXMLParser.java @@ -101,7 +101,7 @@ public final class ExternalResultsXMLParser implements ExternalResultsParser { VALUE_TYPE_INT32("int32"), //NON-NLS VALUE_TYPE_INT64("int64"), //NON-NLS VALUE_TYPE_DOUBLE("double"), //NON-NLS - VALUE_TYPE_DATETIME("datetime"); + VALUE_TYPE_DATETIME("datetime"); //NON-NLS private final String text; private AttributeValues(final String text) { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties index 309fbab41b..ba1e445d8a 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties @@ -109,3 +109,11 @@ IngestManager.cancellingIngest.msgDlg.text=Cancelling all currently running inge IngestManager.serviceIsDown.msgDlg.text={0} is down RunIngestSubMenu.menuItem.empty=-Empty- RunIngestModulesMenu.getName.text=Run Ingest Modules +DataSourceIngestPipeline.moduleError.title.text={0} Error +FileIngestPipeline.moduleError.title.text={0} Error +IngestJob.cancelReason.notCancelled.text=Not cancelled +IngestJob.cancelReason.cancelledByUser.text=Cancelled by user +IngestJob.cancelReason.ingestModStartFail.text=Ingest modules startup failed +IngestJob.cancelReason.outOfDiskSpace.text=Out of disk space +IngestJob.cancelReason.servicesDown.text=Not cancelled +IngestJob.cancelReason.caseClosed.text=Case closed diff --git a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java index a84f262988..2004674df7 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java @@ -360,10 +360,10 @@ final class DataSourceIngestJob { List errors = startUpIngestPipelines(); if (errors.isEmpty()) { if (this.hasFirstStageDataSourceIngestPipeline() || this.hasFileIngestPipeline()) { - logger.log(Level.INFO, "Starting first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Starting first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS this.startFirstStage(); } else if (this.hasSecondStageDataSourceIngestPipeline()) { - logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1}), no first stage configured", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1}), no first stage configured", new Object[]{dataSource.getName(), this.id}); //NON-NLS this.startSecondStage(); } } @@ -450,13 +450,13 @@ final class DataSourceIngestJob { * Schedule the first stage tasks. */ if (this.hasFirstStageDataSourceIngestPipeline() && this.hasFileIngestPipeline()) { - logger.log(Level.INFO, "Scheduling first stage data source and file level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Scheduling first stage data source and file level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS DataSourceIngestJob.taskScheduler.scheduleIngestTasks(this); } else if (this.hasFirstStageDataSourceIngestPipeline()) { - logger.log(Level.INFO, "Scheduling first stage data source level analysis tasks for {0} (jobId={1}), no file level analysis configured", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Scheduling first stage data source level analysis tasks for {0} (jobId={1}), no file level analysis configured", new Object[]{dataSource.getName(), this.id}); //NON-NLS DataSourceIngestJob.taskScheduler.scheduleDataSourceIngestTask(this); } else { - logger.log(Level.INFO, "Scheduling file level analysis tasks for {0} (jobId={1}), no first stage data source level analysis configured", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Scheduling file level analysis tasks for {0} (jobId={1}), no first stage data source level analysis configured", new Object[]{dataSource.getName(), this.id}); //NON-NLS DataSourceIngestJob.taskScheduler.scheduleFileIngestTasks(this); /** @@ -475,7 +475,7 @@ final class DataSourceIngestJob { * Starts the second stage of this ingest job. */ private void startSecondStage() { - logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS this.stage = DataSourceIngestJob.Stages.SECOND; if (this.doUI) { this.startDataSourceIngestProgressBar(); @@ -483,7 +483,7 @@ final class DataSourceIngestJob { synchronized (this.dataSourceIngestPipelineLock) { this.currentDataSourceIngestPipeline = this.secondStageDataSourceIngestPipeline; } - logger.log(Level.INFO, "Scheduling second stage data source level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Scheduling second stage data source level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS DataSourceIngestJob.taskScheduler.scheduleDataSourceIngestTask(this); } @@ -572,7 +572,7 @@ final class DataSourceIngestJob { * job and starts the second stage, if appropriate. */ private void finishFirstStage() { - logger.log(Level.INFO, "Finished first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Finished first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS // Shut down the file ingest pipelines. Note that no shut down is // required for the data source ingest pipeline because data source @@ -622,7 +622,7 @@ final class DataSourceIngestJob { * Shuts down the ingest pipelines and progress bars for this job. */ private void finish() { - logger.log(Level.INFO, "Finished analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Finished analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS this.stage = DataSourceIngestJob.Stages.FINALIZATION; if (this.doUI) { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java index c10d1436d2..4c27c201d5 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java @@ -109,9 +109,9 @@ final class DataSourceIngestPipeline { this.job.updateDataSourceIngestProgressBarDisplayName(displayName); this.job.switchDataSourceIngestProgressBarToIndeterminate(); DataSourceIngestPipeline.ingestManager.setIngestTaskProgress(task, module.getDisplayName()); - logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) starting", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); + logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) starting", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); //NON-NLS module.process(dataSource, new DataSourceIngestModuleProgress(this.job)); - logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) finished", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); + logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) finished", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); //NON-NLS } catch (Throwable ex) { // Catch-all exception firewall errors.add(new IngestModuleError(module.getDisplayName(), ex)); String msg = ex.getMessage(); @@ -119,7 +119,7 @@ final class DataSourceIngestPipeline { if (msg == null) { msg = ex.toString(); } - MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); + MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "DataSourceIngestPipeline.moduleError.title.text", module.getDisplayName()), msg); } if (this.job.isCancelled()) { break; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java index 251e0bbf08..9f1cc0aaa5 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java @@ -21,6 +21,8 @@ package org.sleuthkit.autopsy.ingest; import java.util.ArrayList; import java.util.Date; import java.util.List; + +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.datamodel.AbstractFile; @@ -128,7 +130,7 @@ final class FileIngestPipeline { if (msg == null) { msg = ex.toString(); } - MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); + MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "FileIngestPipeline.moduleError.title.text", module.getDisplayName()), msg); } if (this.job.isCancelled()) { break; @@ -161,7 +163,7 @@ final class FileIngestPipeline { if (msg == null) { msg = ex.toString(); } - MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); + MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "FileIngestPipeline.moduleError.title.text", module.getDisplayName()), msg); } } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java index 0958eb8d5f..14c0f12430 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java @@ -27,6 +27,8 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; + +import org.openide.util.NbBundle; import org.sleuthkit.datamodel.Content; /** @@ -42,12 +44,12 @@ public final class IngestJob { */ public enum CancellationReason { - NOT_CANCELLED("Not cancelled"), - USER_CANCELLED("Cancelled by user"), - INGEST_MODULES_STARTUP_FAILED("Ingest modules startup failed"), - OUT_OF_DISK_SPACE("Out of disk space"), - SERVICES_DOWN("Not cancelled"), - CASE_CLOSED("Case closed"); + NOT_CANCELLED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.notCancelled.text")), + USER_CANCELLED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.cancelledByUser.text")), + INGEST_MODULES_STARTUP_FAILED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.ingestModStartFail.text")), + OUT_OF_DISK_SPACE(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.outOfDiskSpace.text")), + SERVICES_DOWN(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.servicesDown.text")), + CASE_CLOSED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.caseClosed.text")); private final String displayName; @@ -128,7 +130,7 @@ public final class IngestJob { synchronized List start() { List errors = new ArrayList<>(); if (started) { - errors.add(new IngestModuleError("IngestJob", new IllegalStateException("Job already started"))); + errors.add(new IngestModuleError("IngestJob", new IllegalStateException("Job already started"))); //NON-NLS return errors; } started = true; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java index 98a307d544..de15f82949 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java @@ -55,7 +55,7 @@ public class IngestJobSettings { private final String executionContext; private final IngestType ingestType; private String moduleSettingsFolderPath; - private static final CharSequence pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1); + private static final CharSequence pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1); //NON-NLS private final List moduleTemplates; private boolean processUnallocatedSpace; private final List warnings; @@ -337,7 +337,7 @@ public class IngestJobSettings { moduleNames.add("E01 Verifier"); //NON-NLS break; case "Archive Extractor": //NON-NLS - moduleNames.add("Embedded File Extractor"); + moduleNames.add("Embedded File Extractor"); //NON-NLS break; default: moduleNames.add(name); @@ -454,7 +454,7 @@ public class IngestJobSettings { if (isPythonModuleSettingsFile(moduleSettingsFilePath)) { // compiled python modules have variable instance number as a part of their file name. // This block of code gets rid of that variable instance number and helps maitains constant module name over multiple runs. - moduleSettingsFilePath = moduleSettingsFilePath.replaceAll("[$][\\d]+.settings$", "\\$.settings"); + moduleSettingsFilePath = moduleSettingsFilePath.replaceAll("[$][\\d]+.settings$", "\\$.settings"); //NON-NLS NON-NLS } try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(moduleSettingsFilePath))) { out.writeObject(settings); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index 926ad71d78..f528cba6e6 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -106,8 +106,8 @@ public class IngestManager { private int numberOfFileIngestThreads; private final ExecutorService fileIngestThreadPool; - private static final String JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"; - private static final String MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"; + private static final String JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"; //NON-NLS + private static final String MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"; //NON-NLS private static final Set jobEventNames = Stream.of(IngestJobEvent.values()) .map(IngestJobEvent::toString) .collect(Collectors.toSet()); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java index 1a895d9b92..f1cad5531c 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java @@ -64,7 +64,7 @@ public final class IngestMonitor { MONITOR_LOGGER.setUseParentHandlers(false); MONITOR_LOGGER.addHandler(monitorLogHandler); } catch (IOException | SecurityException ex) { - logger.log(Level.SEVERE, "Failed to create memory usage logger", ex); + logger.log(Level.SEVERE, "Failed to create memory usage logger", ex); //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestSubMenu.java b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestSubMenu.java index f4db5d47e8..a0472a8f7c 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestSubMenu.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestSubMenu.java @@ -52,7 +52,7 @@ final class RunIngestSubMenu extends JMenuItem implements DynamicMenuContent { // No open Cases, create a disabled empty menu return getEmpty(); } catch (TskCoreException e) { - System.out.println("Exception getting images: " + e.getMessage()); + System.out.println("Exception getting images: " + e.getMessage()); //NON-NLS } JComponent[] comps = new JComponent[images.size()]; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/events/BlackboardPostEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/events/BlackboardPostEvent.java index a63b3893e9..f793e33e07 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/events/BlackboardPostEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/events/BlackboardPostEvent.java @@ -99,7 +99,7 @@ public final class BlackboardPostEvent extends AutopsyEvent implements Serializa eventData = new ModuleDataEvent(data.moduleName, data.artifactTypeId, !artifacts.isEmpty() ? artifacts : null); return eventData; } catch (IllegalStateException | TskCoreException ex) { - logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); + logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS return null; } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/events/ContentChangedEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/events/ContentChangedEvent.java index 3ff37f4be1..7370d90586 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/events/ContentChangedEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/events/ContentChangedEvent.java @@ -89,7 +89,7 @@ public final class ContentChangedEvent extends AutopsyEvent implements Serializa eventData = new ModuleContentEvent(data.moduleName, content); return eventData; } catch (IllegalStateException | TskCoreException ex) { - logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); + logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS return null; } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/events/DataSourceAnalysisEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/events/DataSourceAnalysisEvent.java index f401285044..c508d3e276 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/events/DataSourceAnalysisEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/events/DataSourceAnalysisEvent.java @@ -99,7 +99,7 @@ public abstract class DataSourceAnalysisEvent extends AutopsyEvent implements Se dataSource = Case.getCurrentCase().getSleuthkitCase().getContentById(id); return dataSource; } catch (IllegalStateException | TskCoreException ex) { - logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); + logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS return null; } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/events/FileAnalyzedEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/events/FileAnalyzedEvent.java index ca629bf261..afc8c0a996 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/events/FileAnalyzedEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/events/FileAnalyzedEvent.java @@ -79,7 +79,7 @@ public final class FileAnalyzedEvent extends AutopsyEvent implements Serializabl file = Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(id); return file; } catch (IllegalStateException | TskCoreException ex) { - logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); + logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS return null; } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/Bundle_ja.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModule.java index 00888bd11f..5eb00425ee 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModule.java @@ -1,14 +1,25 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy Forensic Browser + * + * Copyright 2011-2016 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.modules.UserArtifacts; import com.sun.media.jfxmedia.logging.Logger; import java.util.List; -import org.openide.util.Exceptions; -import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.services.Blackboard.BlackboardException; import org.sleuthkit.autopsy.casemodule.services.FileManager; @@ -17,24 +28,18 @@ import org.sleuthkit.autopsy.ingest.DataSourceIngestModuleProgress; import org.sleuthkit.autopsy.ingest.IngestJobContext; import org.sleuthkit.autopsy.ingest.IngestMessage; import org.sleuthkit.autopsy.ingest.IngestServices; -import org.sleuthkit.autopsy.modules.hashdatabase.HashDbIngestModule; -import org.sleuthkit.autopsy.modules.hashdatabase.HashLookupModuleFactory; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardAttribute; -import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE; import org.sleuthkit.datamodel.BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.TskCoreException; -import org.sleuthkit.datamodel.TskDataException; /** - * - * @author oliver + * Test module that creates new artifact and attribute types. */ public class UserArtifactIngestModule implements DataSourceIngestModule { - private IngestJobContext context = null; private BlackboardArtifact.Type type1, type2; @Override @@ -42,8 +47,8 @@ public class UserArtifactIngestModule implements DataSourceIngestModule { progressBar.switchToDeterminate(2); try { FileManager manager = Case.getCurrentCase().getServices().getFileManager(); - List file1 = manager.findFiles("Sunset.jpg"); - List file2 = manager.findFiles("Winter.jpg"); + List file1 = manager.findFiles("Sunset.jpg"); //NON-NLS + List file2 = manager.findFiles("Winter.jpg"); //NON-NLS BlackboardArtifact art1; BlackboardArtifact art2; if (!file1.isEmpty()) { @@ -65,27 +70,24 @@ public class UserArtifactIngestModule implements DataSourceIngestModule { UserArtifactIngestModuleFactory.getModuleName(), "abatecombo")); progressBar.progress(1); IngestServices.getInstance().postMessage(IngestMessage.createDataMessage( - "name", + "name", // NON-NLS UserArtifactIngestModuleFactory.getModuleName(), - "Test Results", - "Test", + "Test Results", //NON-NLS + "Test", //NON-NLS art1)); return ProcessResult.OK; - } catch (TskCoreException ex) { - return ProcessResult.ERROR; - } catch (BlackboardException ex) { + } catch (TskCoreException | BlackboardException ex) { return ProcessResult.ERROR; } } @Override public void startUp(IngestJobContext context) throws IngestModuleException { - this.context = context; try { - type1 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("This is", "a test"); - type2 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("Another", "kinda test"); + type1 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("This is", "a test"); //NON-NLS + type2 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("Another", "kinda test"); //NON-NLS } catch (BlackboardException ex) { - Logger.logMsg(Logger.ERROR, "Startup failed"); + Logger.logMsg(Logger.ERROR, "Startup failed"); //NON-NLS } } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModuleFactory.java b/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModuleFactory.java index eeb500a522..b63d9f928a 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModuleFactory.java +++ b/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModuleFactory.java @@ -1,25 +1,35 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy Forensic Browser + * + * Copyright 2011-2016 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.modules.UserArtifacts; import org.openide.util.NbBundle; -import org.openide.util.lookup.ServiceProvider; import org.python.apache.xmlcommons.Version; import org.sleuthkit.autopsy.ingest.DataSourceIngestModule; -import org.sleuthkit.autopsy.ingest.IngestModuleFactory; import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings; /** - * - * @author oliver + * Factory for test module that creates new artifact and attribute types. */ -@ServiceProvider(service = IngestModuleFactory.class) +//@ServiceProvider(service = IngestModuleFactory.class) public class UserArtifactIngestModuleFactory extends IngestModuleFactoryAdapter { - + static String getModuleName() { return NbBundle.getMessage(UserArtifactIngestModuleFactory.class, "UserArtifactIngestModuleFactory.moduleName"); } @@ -33,16 +43,17 @@ public class UserArtifactIngestModuleFactory extends IngestModuleFactoryAdapter public String getModuleDescription() { return NbBundle.getMessage(UserArtifactIngestModuleFactory.class, "UserArtifactIngestModuleFactory.moduleDescription"); } - + @Override public String getModuleVersionNumber() { return Version.getVersion(); } - + @Override public DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings ingestOptions) { return new UserArtifactIngestModule(); } + @Override public boolean isDataSourceIngestModuleFactory() { return true; diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java index f2b6fc4bce..266bf09469 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java @@ -58,7 +58,7 @@ class CacheLocationAnalyzer { blackboard = Case.getCurrentCase().getServices().getBlackboard(); try { List abstractFiles = fileManager.findFiles(dataSource, "cache.cell"); //NON-NLS - abstractFiles.addAll(fileManager.findFiles(dataSource, "cache.wifi")); + abstractFiles.addAll(fileManager.findFiles(dataSource, "cache.wifi")); //NON-NLS for (AbstractFile abstractFile : abstractFiles) { try { diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties index c91965d14b..3523597a00 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties @@ -38,4 +38,6 @@ EmbeddedFileExtractorIngestModule.ImageExtractor.xlsxContainer.init.err=Xlsx con EmbeddedFileExtractorIngestModule.ImageExtractor.extractImage.addToDB.exception.msg=Unable to add the derived files to the database. EmbeddedFileExtractorIngestModule.ImageExtractor.getOutputFolderPath.exception.msg=Could not get path for image extraction from Abstract File: {0} EmbeddedFileExtractorIngestModule.ImageExtractor.getOutputFolderPath.exception.msg=Could not get path for image extraction from Abstract File: {0} -EmbeddedFileExtractorIngestModule.ArchiveExtractor.UnpackStream.write.noSpace.msg=Unable to write content to disk. Not enough space. \ No newline at end of file +EmbeddedFileExtractorIngestModule.ArchiveExtractor.UnpackStream.write.noSpace.msg=Unable to write content to disk. Not enough space. +SevenZipContentReadStream.seek.exception.invalidOrigin=Invalid origin {0} +SevenZipContentReadStream.read.exception.errReadStream=Error reading stream diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle_ja.properties index 9f25567758..dd4f49b9b6 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle_ja.properties @@ -9,23 +9,3 @@ OpenIDE-Module-Name=7Zip OpenIDE-Module-Short-Description=7Zip\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb SevenZipContentReadStream.seek.exception.invalidOrigin=\u7121\u52b9\u306a\u30b7\u30fc\u30af\u30aa\u30ea\u30b8\u30f3\uff1a {0} SevenZipContentReadStream.read.exception.errReadStream=\u30b3\u30f3\u30c6\u30f3\u30c4\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u8aad\u307f\u53d6\u308a\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -SevenZipIngestModule.moduleName=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a8\u30af\u30b9\u30c8\u30e9\u30af\u30bf\u30fc -SevenZipIngestModule.moduleDesc.text=\u30a2\u30fc\u30ab\u30a4\u30d6\u30d5\u30a1\u30a4\u30eb(zip, rar, arj, 7z, gzip, bzip2, tar)\u3092\u62bd\u51fa\u3057\u3001\u73fe\u5728\u306e\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u306b\u30ea\u30b9\u30b1\u3057\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30c4\u30ea\u30fc\u306b\u65b0\u898f\u30d5\u30a1\u30a4\u30eb\u3092\u6295\u5165\u3057\u307e\u3059\u3002 -SevenZipIngestModule.encryptionFileLevel=\u30d5\u30a1\u30a4\u30eb\u30ec\u30d9\u30eb\u6697\u53f7\u5316 -SevenZipIngestModule.encryptionFull=\u5168\u4f53\u6697\u53f7\u5316 -SevenZipIngestModule.init.errInitModule.msg={0}\u306e\u521d\u671f\u5316\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -SevenZipIngestModule.init.errInitModule.details=\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\: {0}\: {1}\u306e\u521d\u671f\u5316\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -SevenZipIngestModule.init.errCantInitLib=7-Zip\u30e9\u30a4\u30d6\u30e9\u30ea\: {0}\u3092\u521d\u671f\u5316\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f -SevenZipIngestModule.isZipBombCheck.warnMsg=Zip\u7206\u5f3e\u306e\u53ef\u80fd\u6027\u304c\u3042\u308b\u3082\u306e\u304c\u30a2\u30fc\u30ab\u30a4\u30d6\: {0}, item\: {1}\u306b\u691c\u51fa\u3055\u308c\u307e\u3057\u305f -SevenZipIngestModule.isZipBombCheck.warnDetails=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306e\u5727\u7e2e\u7387\u306f{0}\u3001\u3053\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306e\u51e6\u7406\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002{1} -SevenZipIngestModule.unpack.warnMsg.zipBomb=Zip\u7206\u5f3e\u306e\u53ef\u80fd\u6027\u304c\u3042\u308b\u3082\u306e\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\uff1a {0} -SevenZipIngestModule.unpack.warnDetails.zipBomb=\u30a2\u30fc\u30ab\u30a4\u30d6\u306f {0}\u30ec\u30d9\u30eb\u306e\u6df1\u3055\u3067\u3059\u3001\u3053\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3068\u305d\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u51e6\u7406\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059 {1} -SevenZipIngestModule.unpack.unknownPath.msg=\u30a2\u30fc\u30ab\u30a4\u30d6\: {0}\u306b\u4e0d\u660e\u306e\u30a2\u30a4\u30c6\u30e0\u30d1\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3001{1}\u3092\u4f7f\u7528\u3057\u307e\u3059 -SevenZipIngestModule.unpack.notEnoughDiskSpace.msg=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\: {0}, {1}\u3092\u89e3\u51cd\u3059\u308b\u306e\u306b\u5341\u5206\u306a\u30c7\u30a3\u30b9\u30af\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093 -SevenZipIngestModule.unpack.notEnoughDiskSpace.details=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306f\u89e3\u51cd\u3059\u308b\u306e\u306b\u5927\u304d\u3059\u304e\u307e\u3059\u3001\u3053\u306e\u30a2\u30a4\u30c6\u30e0\u306e\u89e3\u51cd\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002 -SevenZipIngestModule.unpack.errUnpacking.msg={0}\u89e3\u51cd\u30a8\u30e9\u30fc -SevenZipIngestModule.unpack.errUnpacking.details={0}. {1}\u306e\u89e3\u51cd\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -SevenZipIngestModule.unpack.encrFileDetected.msg=\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u6697\u53f7\u5316\u30d5\u30a1\u30a4\u30eb\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002 -SevenZipIngestModule.unpack.encrFileDetected.details=\u30a2\u30fc\u30ab\u30a4\u30d6\: {0}\u306e\u4e00\u90e8\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u6697\u53f7\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002{1}\u30a8\u30af\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u306f\u3053\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u304b\u3089\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -SevenZipIngestModule.UnpackStream.write.exception.msg=\u89e3\u51cd\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u4e0b\u8a18\u3078\u306e\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\: {0} -SevenZipIngestModule.UnpackedTree.exception.msg=\u6d3e\u751f\u30d5\u30a1\u30a4\u30eb\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\:{0}\u306b\u8ffd\u52a0\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/ImageExtractor.java b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/ImageExtractor.java index 12550f4601..c916aa7f55 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/ImageExtractor.java +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/ImageExtractor.java @@ -57,7 +57,7 @@ class ImageExtractor { private static final Logger logger = Logger.getLogger(ImageExtractor.class.getName()); private final IngestJobContext context; private String parentFileName; - private final String UNKNOWN_NAME_PREFIX = "image_"; + private final String UNKNOWN_NAME_PREFIX = "image_"; //NON-NLS private final FileTypeDetector fileTypeDetector; private String moduleDirRelative; @@ -68,12 +68,12 @@ class ImageExtractor { */ enum SupportedImageExtractionFormats { - DOC("application/msword"), - DOCX("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), - PPT("application/vnd.ms-powerpoint"), - PPTX("application/vnd.openxmlformats-officedocument.presentationml.presentation"), - XLS("application/vnd.ms-excel"), - XLSX("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + DOC("application/msword"), //NON-NLS + DOCX("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), //NON-NLS + PPT("application/vnd.ms-powerpoint"), //NON-NLS + PPTX("application/vnd.openxmlformats-officedocument.presentationml.presentation"), //NON-NLS + XLS("application/vnd.ms-excel"), //NON-NLS + XLSX("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); //NON-NLS private final String mimeType; @@ -266,7 +266,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } listOfExtractedImages = new ArrayList<>(); @@ -309,7 +309,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } @@ -379,7 +379,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } @@ -428,7 +428,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } @@ -473,7 +473,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java index e739a6db34..44052df224 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java @@ -99,13 +99,13 @@ class SevenZipExtractor { */ private enum SupportedArchiveExtractionFormats { - ZIP("application/zip"), - SEVENZ("application/x-7z-compressed"), - GZIP("application/gzip"), - XGZIP("application/x-gzip"), - XBZIP2("application/x-bzip2"), - XTAR("application/x-tar"), - XGTAR("application/x-gtar"); + ZIP("application/zip"), //NON-NLS + SEVENZ("application/x-7z-compressed"), //NON-NLS + GZIP("application/gzip"), //NON-NLS + XGZIP("application/x-gzip"), //NON-NLS + XBZIP2("application/x-bzip2"), //NON-NLS + XTAR("application/x-tar"), //NON-NLS + XGTAR("application/x-gtar"); //NON-NLS private final String mimeType; diff --git a/Core/src/org/sleuthkit/autopsy/modules/exif/ExifParserFileIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/exif/ExifParserFileIngestModule.java index 2e1ba91472..de946ffd0f 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/exif/ExifParserFileIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/exif/ExifParserFileIngestModule.java @@ -79,9 +79,9 @@ public final class ExifParserFileIngestModule implements FileIngestModule { private Blackboard blackboard; ExifParserFileIngestModule() { - supportedMimeTypes.add("audio/x-wav"); - supportedMimeTypes.add("image/jpeg"); - supportedMimeTypes.add("image/tiff"); + supportedMimeTypes.add("audio/x-wav"); //NON-NLS + supportedMimeTypes.add("image/jpeg"); //NON-NLS + supportedMimeTypes.add("image/tiff"); //NON-NLS } @Override diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchSettingsPanel.java index f44a9e7c0b..fa0a090fdc 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchSettingsPanel.java @@ -166,7 +166,7 @@ final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel jPanel1.setPreferredSize(new java.awt.Dimension(687, 450)); - saveButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/fileextmismatch/save16.png"))); // NOI18N + saveButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/fileextmismatch/save16.png"))); // NOI18N NON-NLS saveButton.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.saveButton.text")); // NOI18N saveButton.setEnabled(false); saveButton.addActionListener(new java.awt.event.ActionListener() { diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java index e0653b5947..0b277672a2 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java @@ -444,10 +444,10 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane filesSetNameTextField.setText(org.openide.util.NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.filesSetNameTextField.text")); // NOI18N - ingestRunningWarningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/filetypeid/warning16.png"))); // NOI18N + ingestRunningWarningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/filetypeid/warning16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(ingestRunningWarningLabel, org.openide.util.NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.ingestRunningWarningLabel.text")); // NOI18N - jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N + jLabel1.setFont(jLabel1.getFont().deriveFont(Font.BOLD, 11)); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.jLabel1.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.jLabel2.text")); // NOI18N @@ -624,7 +624,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane byte[] signatureBytes; if (FileType.Signature.Type.RAW == sigType) { try { - sigString = sigString.replaceAll("\\s", ""); + sigString = sigString.replaceAll("\\s", ""); //NON-NLS signatureBytes = DatatypeConverter.parseHexBinary(sigString); } catch (IllegalArgumentException ex) { JOptionPane.showMessageDialog(null, diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/UserDefinedFileTypesManager.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/UserDefinedFileTypesManager.java index c1b0dfe969..5dd48f58f2 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/UserDefinedFileTypesManager.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/UserDefinedFileTypesManager.java @@ -68,7 +68,7 @@ final class UserDefinedFileTypesManager { private static final String SIGNATURE_TYPE_ATTRIBUTE = "type"; //NON-NLS private static final String BYTES_TAG_NAME = "Bytes"; //NON-NLS private static final String OFFSET_TAG_NAME = "Offset"; //NON-NLS - private static final String RELATIVE_ATTRIBUTE = "RelativeToStart"; + private static final String RELATIVE_ATTRIBUTE = "RelativeToStart"; //NON-NLS private static final String INTERESTING_FILES_SET_TAG_NAME = "InterestingFileSset"; //NON-NLS private static final String ALERT_ATTRIBUTE = "alert"; //NON-NLS private static final String ENCODING_FOR_XML_FILE = "UTF-8"; //NON-NLS @@ -230,8 +230,8 @@ final class UserDefinedFileTypesManager { fileTypes.add(fileType); // Add rule for .tga - byteArray = DatatypeConverter.parseHexBinary("54525545564953494F4E2D5846494C452E00"); - fileType = new FileType("image/x-tga", new Signature(byteArray, 17, false), "", false); + byteArray = DatatypeConverter.parseHexBinary("54525545564953494F4E2D5846494C452E00"); //NON-NLS + fileType = new FileType("image/x-tga", new Signature(byteArray, 17, false), "", false); //NON-NLS fileTypes.add(fileType); } // parseHexBinary() throws this if the argument passed in is not Hex diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java index f55ab6ba68..6d336b290b 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java @@ -506,7 +506,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.jLabel6.text")); // NOI18N - jButton3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jButton3.setFont(jButton3.getFont().deriveFont(Font.PLAIN, 14)); org.openide.awt.Mnemonics.setLocalizedText(jButton3, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.jButton3.text")); // NOI18N setMinimumSize(new java.awt.Dimension(700, 430)); @@ -514,7 +514,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan jPanel1.setPreferredSize(new java.awt.Dimension(671, 430)); - ingestWarningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/warning16.png"))); // NOI18N + ingestWarningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/warning16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(ingestWarningLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.ingestWarningLabel.text")); // NOI18N hashSetTable.setModel(new javax.swing.table.DefaultTableModel( @@ -534,7 +534,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan }); jScrollPane1.setViewportView(hashSetTable); - deleteDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/delete16.png"))); // NOI18N + deleteDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/delete16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(deleteDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.deleteDatabaseButton.text")); // NOI18N deleteDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25)); deleteDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25)); @@ -545,7 +545,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan } }); - importDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/import16.png"))); // NOI18N + importDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/import16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(importDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.importDatabaseButton.text")); // NOI18N importDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25)); importDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25)); @@ -593,7 +593,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan org.openide.awt.Mnemonics.setLocalizedText(optionsLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.optionsLabel.text")); // NOI18N - createDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/new16.png"))); // NOI18N + createDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/new16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(createDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.createDatabaseButton.text")); // NOI18N createDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25)); createDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25)); diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle.properties index 183b0ba88a..8909d23e0e 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle.properties @@ -1,2 +1,5 @@ iOSModuleFactory.moduleName=iOS Analyzer iOSModuleFactory.moduleDescription=Extracts system and 3rd party app data +TextMessageAnalyzer.bbAttribute.incoming=Incoming +TextMessageAnalyzer.bbAttribute.outgoing=Outgoing +TextMessageAnalyzer.bbAttribute.smsMessage=SMS Message diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java index 0412e2e303..44c08ae0cf 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java @@ -116,17 +116,17 @@ class TextMessageAnalyzer { // @@@ NEed to put into more specific TO or FROM if (type.equals("1")) { - bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION, moduleName, "Incoming")); + bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION, moduleName, NbBundle.getMessage(this.getClass(), "TextMessageAnalyzer.bbAttribute.incoming"))); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM, moduleName, address)); } else { - bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION, moduleName, "Outgoing")); + bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION, moduleName, NbBundle.getMessage(this.getClass(), "TextMessageAnalyzer.bbAttribute.outgoing"))); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO, moduleName, address)); } bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME, moduleName, date)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION, moduleName, type)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SUBJECT, moduleName, subject)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT, moduleName, body)); - bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE, moduleName, "SMS Message")); + bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE, moduleName, NbBundle.getMessage(this.getClass(), "TextMessageAnalyzer.bbAttribute.smsMessage"))); try { // index the artifact for keyword search diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle_ja.properties index ae17fa6dc4..e84363de1c 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle_ja.properties @@ -14,7 +14,6 @@ FilesSetRulePanel.jLabel1.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\uFF1A FilesSetRulePanel.jLabel2.text=\u30CD\u30FC\u30E0\u30D1\u30BF\u30FC\u30F3\uFF1A FilesSetRulePanel.jLabel3.text=\u30D1\u30B9\u30D1\u30BF\u30FC\u30F3\uFF1A FilesSetRulePanel.messages.emptyNameFilter=\u7591\u308F\u3057\u3044\u30D5\u30A1\u30A4\u30EB\u30BB\u30C3\u30C8\u30EB\u30FC\u30EB\u306F\u691C\u7D22\u3059\u308B\u540D\u524D\u304C\u5FC5\u8981\u3067\u3059\u3002 -FilesSetRulePanel.messages.filesSetRulesMustBeNamed=\u7591\u308F\u3057\u3044\u30D5\u30A1\u30A4\u30EB\u30BB\u30C3\u30C8\u30EB\u30FC\u30EB\u306F\u540D\u524D\u304C\u5FC5\u8981\u3067\u3059\u3002 FilesSetRulePanel.messages.invalidCharInName=\u6B63\u898F\u8868\u73FE\u4EE5\u5916\u306F\\\u3001/\u3001\:\u3001*\u3001?\u3001"\u3001<\u3001>\u3092\u540D\u524D\u306B\u542B\u3081\u307E\u305B\u3093\u3002 FilesSetRulePanel.messages.invalidCharInPath=\u6B63\u898F\u8868\u73FE\u4EE5\u5916\u306F\\\u3001\:\u3001*\u3001?\u3001"\u3001<\u3001>\u3092\u30D1\u30B9\u306B\u542B\u3081\u307E\u305B\u3093\u3002 FilesSetRulePanel.messages.invalidNameRegex=\u6B63\u898F\u8868\u73FE\u306F\u6709\u52B9\u306A\u540D\u524D\u3067\u306F\u3042\u308A\u307E\u305B\u3093\uFF1A\n\n{0} diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesIdentifierIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesIdentifierIngestModule.java index bb89fba38f..ae93cbbc74 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesIdentifierIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesIdentifierIngestModule.java @@ -130,7 +130,7 @@ final class FilesIdentifierIngestModule implements FileIngestModule { IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(moduleName, BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, Collections.singletonList(artifact))); } catch (TskCoreException ex) { - FilesIdentifierIngestModule.logger.log(Level.SEVERE, "Error posting to the blackboard", ex); //NOI18N + FilesIdentifierIngestModule.logger.log(Level.SEVERE, "Error posting to the blackboard", ex); //NOI18N NON-NLS } } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetRulePanel.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetRulePanel.java index 4a77379207..f45b4e8287 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetRulePanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetRulePanel.java @@ -403,7 +403,7 @@ final class FilesSetRulePanel extends javax.swing.JPanel { org.openide.awt.Mnemonics.setLocalizedText(pathRegexCheckBox, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathRegexCheckBox.text")); // NOI18N - pathSeparatorInfoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/info-icon-16.png"))); // NOI18N + pathSeparatorInfoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/info-icon-16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(pathSeparatorInfoLabel, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathSeparatorInfoLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.jLabel4.text")); // NOI18N diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsManager.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsManager.java index 3a09b34045..781846cabe 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsManager.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsManager.java @@ -258,11 +258,11 @@ final class InterestingItemDefsManager extends Observable { if (!rules.containsKey(rule.getUuid())) { rules.put(rule.getUuid(), rule); } else { - logger.log(Level.SEVERE, "Found duplicate rule {0} for set named {1} in interesting file sets definition file at {2}, discarding malformed set", new Object[]{rule.getUuid(), setName, filePath}); //NOI18N + logger.log(Level.SEVERE, "Found duplicate rule {0} for set named {1} in interesting file sets definition file at {2}, discarding malformed set", new Object[]{rule.getUuid(), setName, filePath}); //NOI18N NON-NLS return; } } else { - logger.log(Level.SEVERE, "Found malformed rule for set named {0} in interesting file sets definition file at {1}, discarding malformed set", new Object[]{setName, filePath}); //NOI18N + logger.log(Level.SEVERE, "Found malformed rule for set named {0} in interesting file sets definition file at {1}, discarding malformed set", new Object[]{setName, filePath}); //NOI18N NON-NLS return; } } @@ -294,7 +294,7 @@ final class InterestingItemDefsManager extends Observable { String content = elem.getTextContent(); FilesSet.Rule.FullNameFilter nameFilter; String regex = elem.getAttribute(FilesSetXML.REGEX_ATTR); - if ((!regex.isEmpty() && regex.equalsIgnoreCase("true")) || content.contains("*")) { // NON_NLS + if ((!regex.isEmpty() && regex.equalsIgnoreCase("true")) || content.contains("*")) { // NON-NLS Pattern pattern = compileRegex(content); if (pattern != null) { nameFilter = new FilesSet.Rule.FullNameFilter(pattern); @@ -352,7 +352,7 @@ final class InterestingItemDefsManager extends Observable { String content = elem.getTextContent(); FilesSet.Rule.ExtensionFilter extFilter; String regex = elem.getAttribute(FilesSetXML.REGEX_ATTR); - if ((!regex.isEmpty() && regex.equalsIgnoreCase("true")) || content.contains("*")) { // NON_NLS + if ((!regex.isEmpty() && regex.equalsIgnoreCase("true")) || content.contains("*")) { // NON-NLS Pattern pattern = compileRegex(content); if (pattern != null) { extFilter = new FilesSet.Rule.ExtensionFilter(pattern); diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsPanel.java index b4e6d5ad89..6e4cd91148 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsPanel.java @@ -418,7 +418,7 @@ final class InterestingItemDefsPanel extends IngestModuleGlobalSettingsPanel imp org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.jLabel6.text")); // NOI18N - newRuleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/add16.png"))); // NOI18N + newRuleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/add16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(newRuleButton, org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.newRuleButton.text")); // NOI18N newRuleButton.setEnabled(false); newRuleButton.addActionListener(new java.awt.event.ActionListener() { @@ -431,7 +431,7 @@ final class InterestingItemDefsPanel extends IngestModuleGlobalSettingsPanel imp org.openide.awt.Mnemonics.setLocalizedText(filesRadioButton, org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.filesRadioButton.text")); // NOI18N filesRadioButton.setEnabled(false); - editRuleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/edit16.png"))); // NOI18N + editRuleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/edit16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(editRuleButton, org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.editRuleButton.text")); // NOI18N editRuleButton.setEnabled(false); editRuleButton.addActionListener(new java.awt.event.ActionListener() { @@ -452,7 +452,7 @@ final class InterestingItemDefsPanel extends IngestModuleGlobalSettingsPanel imp setDescriptionTextArea.setRows(2); setDescScrollPanel.setViewportView(setDescriptionTextArea); - editSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/edit16.png"))); // NOI18N + editSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/edit16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(editSetButton, org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.editSetButton.text")); // NOI18N editSetButton.setEnabled(false); editSetButton.addActionListener(new java.awt.event.ActionListener() { @@ -500,7 +500,7 @@ final class InterestingItemDefsPanel extends IngestModuleGlobalSettingsPanel imp org.openide.awt.Mnemonics.setLocalizedText(bothRadioButton, org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.bothRadioButton.text")); // NOI18N bothRadioButton.setEnabled(false); - deleteSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N + deleteSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(deleteSetButton, org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.deleteSetButton.text")); // NOI18N deleteSetButton.setEnabled(false); deleteSetButton.addActionListener(new java.awt.event.ActionListener() { @@ -509,7 +509,7 @@ final class InterestingItemDefsPanel extends IngestModuleGlobalSettingsPanel imp } }); - deleteRuleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N + deleteRuleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(deleteRuleButton, org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.deleteRuleButton.text")); // NOI18N deleteRuleButton.setEnabled(false); deleteRuleButton.addActionListener(new java.awt.event.ActionListener() { @@ -518,7 +518,7 @@ final class InterestingItemDefsPanel extends IngestModuleGlobalSettingsPanel imp } }); - newSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/add16.png"))); // NOI18N + newSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/add16.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(newSetButton, org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.newSetButton.text")); // NOI18N newSetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -546,7 +546,7 @@ final class InterestingItemDefsPanel extends IngestModuleGlobalSettingsPanel imp jTextArea1.setEditable(false); jTextArea1.setBackground(new java.awt.Color(240, 240, 240)); jTextArea1.setColumns(20); - jTextArea1.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N + jTextArea1.setFont(jTextArea1.getFont().deriveFont(Font.PLAIN, 11)); jTextArea1.setLineWrap(true); jTextArea1.setRows(3); jTextArea1.setText(org.openide.util.NbBundle.getMessage(InterestingItemDefsPanel.class, "InterestingItemDefsPanel.jTextArea1.text")); // NOI18N diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java index bb8d8ed62f..f848838d02 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java @@ -214,7 +214,7 @@ final class PhotoRecCarverFileIngestModule implements FileIngestModule { "\"" + outputDirPath.toAbsolutePath() + File.separator + PHOTOREC_RESULTS_BASE + "\"", "/cmd", // NON-NLS "\"" + tempFilePath.toFile() + "\"", - "search"); // NON_NLS + "search"); // NON-NLS // Add environment variable to force PhotoRec to run with the same permissions Autopsy uses processAndSettings.environment().put("__COMPAT_LAYER", "RunAsInvoker"); //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverOutputParser.java b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverOutputParser.java index fabb91e94f..caff08b50c 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverOutputParser.java +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverOutputParser.java @@ -149,7 +149,7 @@ class PhotoRecCarverOutputParser { } return fileManager.addCarvedFiles(carvedFileContainer); } catch (NumberFormatException | TskCoreException ex) { - logger.log(Level.SEVERE, "Error parsing PhotoRec output and inserting it into the database: {0}", ex); //NON_NLS + logger.log(Level.SEVERE, "Error parsing PhotoRec output and inserting it into the database: {0}", ex); //NON-NLS } List empty = Collections.emptyList(); diff --git a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalFileObj.java b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalFileObj.java index 74cda734bf..1d2925060e 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalFileObj.java +++ b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalFileObj.java @@ -173,7 +173,7 @@ class EvalFileObj extends EvaluatableObject { if (h.getSimpleHashValue() != null) { if (h.getType().getValue().equals("MD5")) { //NON-NLS String newClause = ""; - if (h.getSimpleHashValue().getValue().toString().toLowerCase().contains("##comma##")) { + if (h.getSimpleHashValue().getValue().toString().toLowerCase().contains("##comma##")) { //NON-NLS String[] parts = h.getSimpleHashValue().getValue().toString().toLowerCase().split("##comma##"); //NON-NLS String hashList = ""; for (String s : parts) { @@ -182,7 +182,7 @@ class EvalFileObj extends EvaluatableObject { } hashList += "\'" + s + "\'"; } - newClause = "md5 IN (" + hashList + ")"; + newClause = "md5 IN (" + hashList + ")"; //NON-NLS } else { newClause = "md5=\'" + h.getSimpleHashValue().getValue().toString().toLowerCase() + "\'"; //NON-NLS } diff --git a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/Bundle.properties index 3d27e2869b..7d56265f3d 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/Bundle.properties @@ -5,4 +5,8 @@ VMExtractorIngestModule.cannotCreateOutputDir.message=Unable to create output di VMExtractorIngestModule.addedVirtualMachineImage.message=Added virtual machine image {0} VMExtractorIngestModule.searchingImage.message=Searching image for virtual machine files VMExtractorIngestModule.exportingToDisk.message=Exporting virtual machine files to disk -VMExtractorIngestModule.queuingIngestJobs.message=Queuing ingest jobs for extracted virtual machines \ No newline at end of file +VMExtractorIngestModule.queuingIngestJobs.message=Queuing ingest jobs for extracted virtual machines +VMExtractorIngestModule.msgNotify.failedExtractVM.title.txt=Failed to extract virtual machine file +VMExtractorIngestModule.msgNotify.failedExtractVM.msg.txt=Failed to write virtual machine file {0} to disk. +VMExtractorIngestModule.msgNotify.failedIngestVM.title.txt=Failed to ingest virtual machine +VMExtractorIngestModule.msgNotify.failedIngestVM.msg.txt=Failed to ingest virtual machine file {0} \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/Bundle_ja.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VMExtractorIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VMExtractorIngestModule.java index 73fdf77989..c94dc2e2a8 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VMExtractorIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VMExtractorIngestModule.java @@ -81,7 +81,7 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { } } if (null == parentDataSourceId) { - throw new IngestModuleException(String.format("Data source %s missing unique id", context.getDataSource().getName())); + throw new IngestModuleException(String.format("Data source %s missing unique id", context.getDataSource().getName())); //NON-NLS } SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss"); String timeStamp = dateFormat.format(Calendar.getInstance().getTime()); @@ -108,19 +108,19 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { // Not sure how long it will take for search to complete. progressBar.switchToIndeterminate(); - logger.log(Level.INFO, "Looking for virtual machine files in data source {0}", dataSource.getName()); + logger.log(Level.INFO, "Looking for virtual machine files in data source {0}", dataSource.getName()); //NON-NLS try { // look for all VM files vmFiles = findVirtualMachineFiles(dataSource); } catch (TskCoreException ex) { - logger.log(Level.SEVERE, "Error querying case database", ex); + logger.log(Level.SEVERE, "Error querying case database", ex); //NON-NLS return ProcessResult.ERROR; } if (vmFiles.isEmpty()) { // no VM files found - logger.log(Level.INFO, "No virtual machine files found in data source {0}", dataSource.getName()); + logger.log(Level.INFO, "No virtual machine files found in data source {0}", dataSource.getName()); //NON-NLS return ProcessResult.OK; } // display progress for saving each VM file to disk @@ -133,7 +133,7 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { break; } - logger.log(Level.INFO, "Saving virtual machine file {0} to disk", vmFile.getName()); + logger.log(Level.INFO, "Saving virtual machine file {0} to disk", vmFile.getName()); //NON-NLS // get vmFolderPathInsideTheImage to the folder where VM is located String vmFolderPathInsideTheImage = vmFile.getParentPath(); @@ -155,15 +155,16 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { try { writeVirtualMachineToDisk(vmFile, outputFolderForThisVM); } catch (Exception ex) { - logger.log(Level.SEVERE, "Failed to write virtual machine file "+vmFile.getName()+" to folder "+outputFolderForThisVM, ex); - MessageNotifyUtil.Notify.error("Failed to extract virtual machine file", String.format("Failed to write virtual machine file %s to disk", vmFile.getName())); + logger.log(Level.SEVERE, "Failed to write virtual machine file "+vmFile.getName()+" to folder "+outputFolderForThisVM, ex); //NON-NLS + MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "VMExtractorIngestModule.msgNotify.failedExtractVM.title.txt"), + NbBundle.getMessage(this.getClass(), "VMExtractorIngestModule.msgNotify.failedExtractVM.msg.txt", vmFile.getName())); } // Update progress bar numFilesSaved++; progressBar.progress(NbBundle.getMessage(this.getClass(), "VMExtractorIngestModule.exportingToDisk.message"), numFilesSaved); } - logger.log(Level.INFO, "Finished saving virtual machine files to disk"); + logger.log(Level.INFO, "Finished saving virtual machine files to disk"); //NON-NLS // update progress bar progressBar.switchToDeterminate(imageFolderToOutputFolder.size()); @@ -180,26 +181,27 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { List vmFilesToIngest = VirtualMachineFinder.identifyVirtualMachines(Paths.get(folder)); for (String file : vmFilesToIngest) { try { - logger.log(Level.INFO, "Ingesting virtual machine file {0} in folder {1}", new Object[]{file, folder}); + logger.log(Level.INFO, "Ingesting virtual machine file {0} in folder {1}", new Object[]{file, folder}); //NON-NLS // for extracted virtual machines there is no manifest XML file to read data source ID from so we need to create one numDataSourcesQueued++; - String dataSourceID = parentDataSourceId + "-VM" + numDataSourcesQueued; + String dataSourceID = parentDataSourceId + "-VM" + numDataSourcesQueued; //NON-NLS // ingest the data sources ingestVirtualMachineImage(Paths.get(folder, file), dataSourceID); - logger.log(Level.INFO, "Ingest complete for virtual machine file {0} in folder {1}", new Object[]{file, folder}); + logger.log(Level.INFO, "Ingest complete for virtual machine file {0} in folder {1}", new Object[]{file, folder}); //NON-NLS } catch (InterruptedException ex) { - logger.log(Level.INFO, "Interrupted while ingesting virtual machine file "+file+" in folder "+folder, ex); + logger.log(Level.INFO, "Interrupted while ingesting virtual machine file "+file+" in folder "+folder, ex); //NON-NLS } catch (IOException ex) { - logger.log(Level.SEVERE, "Failed to ingest virtual machine file "+file+" in folder "+folder, ex); - MessageNotifyUtil.Notify.error("Failed to ingest virtual machine", String.format("Failed to ingest virtual machine file %s", file)); + logger.log(Level.SEVERE, "Failed to ingest virtual machine file "+file+" in folder "+folder, ex); //NON-NLS + MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "VMExtractorIngestModule.msgNotify.failedIngestVM.title.txt"), + NbBundle.getMessage(this.getClass(), "VMExtractorIngestModule.msgNotify.failedIngestVM.msg.txt", file)); } } // Update progress bar numJobsQueued++; progressBar.progress(NbBundle.getMessage(this.getClass(), "VMExtractorIngestModule.queuingIngestJobs.message"), numJobsQueued); } - logger.log(Level.INFO, "VMExtractorIngestModule completed processing of data source {0}", dataSource.getName()); + logger.log(Level.INFO, "VMExtractorIngestModule completed processing of data source {0}", dataSource.getName()); //NON-NLS return ProcessResult.OK; } @@ -278,7 +280,7 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { List dataSourceContent = new ArrayList<>(dspCallback.vmDataSources); IngestJobSettings ingestJobSettings = new IngestJobSettings(context.getExecutionContext()); for (String warning : ingestJobSettings.getWarnings()) { - logger.log(Level.WARNING, String.format("Ingest job settings warning for virtual machine file %s : %s", vmFile.toString(), warning)); + logger.log(Level.WARNING, String.format("Ingest job settings warning for virtual machine file %s : %s", vmFile.toString(), warning)); //NON-NLS } IngestServices.getInstance().postMessage(IngestMessage.createMessage(IngestMessage.MessageType.INFO, VMExtractorIngestModuleFactory.getModuleName(), @@ -333,7 +335,7 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { @Override public void done(DataSourceProcessorCallback.DataSourceProcessorResult result, List errList, List content) { for (String error : errList) { - String logMessage = String.format("Data source processor error for virtual machine file %s: %s", vmFile.toString(), error); + String logMessage = String.format("Data source processor error for virtual machine file %s: %s", vmFile.toString(), error); //NON-NLS if (DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS == result) { logger.log(Level.SEVERE, logMessage); } else { diff --git a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VirtualMachineFinder.java b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VirtualMachineFinder.java index c971d63392..19f51d8ab6 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VirtualMachineFinder.java +++ b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VirtualMachineFinder.java @@ -50,7 +50,7 @@ public final class VirtualMachineFinder { vmFiltersList.add(virtualMachineFilter); } - private static final List VMDK_EXTS = Arrays.asList(new String[]{".vmdk"}); + private static final List VMDK_EXTS = Arrays.asList(new String[]{".vmdk"}); //NON-NLS private static final GeneralFilter vmdkFilter = new GeneralFilter(VMDK_EXTS, ""); private static final List vmdkFiltersList = new ArrayList<>(); @@ -135,7 +135,7 @@ public final class VirtualMachineFinder { // line doesn't have enough fields, can't be an extent descriptor continue; } - if (splited[0].equals("RW") || splited[0].equals("RDONLY") || splited[0].equals("NOACCESS")) { + if (splited[0].equals("RW") || splited[0].equals("RDONLY") || splited[0].equals("NOACCESS")) { //NON-NLS // found an extent descriptor // remove quotation marks around the file name String extentFileName = splited[FILE_NAME_FIELD_INDX_IN_EXTENT_DESCRIPTOR].replace("\"", ""); @@ -145,7 +145,7 @@ public final class VirtualMachineFinder { } } } catch (Exception ex) { - logger.log(Level.WARNING, String.format("Error while parsing vmdk descriptor file %s", file.toString()), ex); + logger.log(Level.WARNING, String.format("Error while parsing vmdk descriptor file %s", file.toString()), ex); //NON-NLS } return extentFiles; } diff --git a/Core/src/org/sleuthkit/autopsy/python/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/python/Bundle_ja.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java index 93bd39d5d9..c9175f3754 100755 --- a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java +++ b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java @@ -74,7 +74,7 @@ public final class JythonModuleLoader { // add python modules from 'autospy/build/cluster/InternalPythonModules' folder // which are copied from 'autopsy/*/release/InternalPythonModules' folders. - for (File f : InstalledFileLocator.getDefault().locateAll("InternalPythonModules", JythonModuleLoader.class.getPackage().getName(), false)) { + for (File f : InstalledFileLocator.getDefault().locateAll("InternalPythonModules", JythonModuleLoader.class.getPackage().getName(), false)) { //NON-NLS Collections.addAll(pythonModuleDirs, f.listFiles()); } // add python modules from 'testuserdir/python_modules' folder @@ -127,7 +127,7 @@ public final class JythonModuleLoader { interpreter.exec("reload(" + moduleName + ")"); //NON-NLS // Importing the appropriate class from the Py Script which contains multiple classes. - interpreter.exec("from " + moduleName + " import " + className); + interpreter.exec("from " + moduleName + " import " + className); //NON-NLS interpreter.exec("obj = " + className + "()"); //NON-NLS T obj = interpreter.get("obj", interfaceClass); //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/report/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/report/Bundle_ja.properties index 254310d0c5..c6c931baad 100644 --- a/Core/src/org/sleuthkit/autopsy/report/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/report/Bundle_ja.properties @@ -11,11 +11,9 @@ ReportVisualPanel2.advancedButton.text=\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7 ArtifactSelectionDialog.deselectAllButton.text=\u3059\u3079\u3066\u9078\u629E\u89E3\u9664 ArtifactSelectionDialog.selectAllButton.text=\u3059\u3079\u3066\u9078\u629E ReportGenerationPanel.closeButton.text=\u9589\u3058\u308B -ReportGenerationPanel.cancelAllButton.text=\u3059\u3079\u3066\u30AD\u30E3\u30F3\u30BB\u30EB ReportProgressPanel.reportLabel.text=\u30EC\u30DD\u30FC\u30C8\u30E9\u30D9\u30EB ReportProgressPanel.pathLabel.text=\u30D1\u30B9\u30E9\u30D9\u30EB ReportProgressPanel.separationLabel.text=- -ReportProgressPanel.cancelButton.toolTipText=\u30AD\u30E5\u30FC\u30A4\u30F3\u30B0 ReportProgressPanel.processingLabel.text=\u30D7\u30ED\u30BB\u30B7\u30F3\u30B0\u30E9\u30D9\u30EB ReportGenerationPanel.titleLabel.text=\u30EC\u30DD\u30FC\u30C8\u751F\u6210\u30D7\u30ED\u30B0\u30EC\u30B9 ReportVisualPanel2.taggedResultsRadioButton.text=\u30BF\u30B0\u4ED8\u3051\u3055\u308C\u305F\u7D50\u679C @@ -59,7 +57,6 @@ ReportExcel.cellVal.examiner=\u8ABF\u67FB\u62C5\u5F53\u8005\uFF1A ReportExcel.cellVal.numImages=\u30A4\u30E1\u30FC\u30B8\u6570\uFF1A ReportGenerationPanel.confDlg.sureToClose.msg=\u3053\u306E\u30C0\u30A4\u30A2\u30ED\u30B0\u3092\u672C\u5F53\u306B\u9589\u3058\u307E\u3059\u304B\uFF1F\n\u5168\u3066\u306E\u30EC\u30DD\u30FC\u30C8\u304C\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3059\u3002 ReportGenerationPanel.confDlg.title.closing=\u9589\u3058\u3066\u3044\u307E\u3059 -ReportGenerationPanel.confDlg.cancelReports.msg=\u5168\u3066\u306E\u30EC\u30DD\u30FC\u30C8\u3092\u672C\u5F53\u306B\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3059\u304B\uFF1F ReportGenerator.displayProgress.title.text=\u30EC\u30DD\u30FC\u30C8\u751F\u6210\u30D7\u30ED\u30B0\u30EC\u30B9\u2026 ReportGenerator.progress.queryingDb.text=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u30AF\u30A8\u30EA\u3092\u5B9F\u884C\u4E2D\u2026 ReportGenerator.progress.processingFile.text={0}\u3092\u51E6\u7406\u4E2D @@ -180,7 +177,6 @@ ReportWizardPanel1.finishButton.text=\u7D42\u4E86 ReportWizardPanel2.finishButton.text=\u7D42\u4E86 ReportHTML.writeSum.reportGenOn.text={0}\u306BHTML\u30EC\u30DD\u30FC\u30C8\u306F\u751F\u6210\u3055\u308C\u307E\u3057\u305F ReportHTML.writeSum.noCaseNum=\u30B1\u30FC\u30B9\u756A\u53F7\u304C\u3042\u308A\u307E\u305B\u3093 -ReportProgressPanel.cancelButton.text=\u30AD\u30E3\u30F3\u30BB\u30EB ReportGenerator.errors.reportErrorTitle=\u30EC\u30DD\u30FC\u30C8\u751F\u6210\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F ReportGenerator.errors.reportErrorText=\u30EC\u30DD\u30FC\u30C8\u751F\u6210\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\uFF1A ReportKML.getDesc.text=\u95A2\u9023\u30D5\u30A1\u30A4\u30EB\u306E\u5EA7\u6A19\u3092\u542B\u3080KML\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306E\u30EC\u30DD\u30FC\u30C8\u3002\u3053\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306FGoogle Earth\u30D3\u30E5\u30FC\u306B\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportGenerationPanel.java b/Core/src/org/sleuthkit/autopsy/report/ReportGenerationPanel.java index f486cc5b50..064f39f044 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportGenerationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportGenerationPanel.java @@ -157,7 +157,7 @@ class ReportGenerationPanel extends javax.swing.JPanel { reportScrollPane.setViewportView(reportPanel); - titleLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N + titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText(titleLabel, org.openide.util.NbBundle.getMessage(ReportGenerationPanel.class, "ReportGenerationPanel.titleLabel.text")); // NOI18N titleSeparator.setForeground(new java.awt.Color(0, 0, 0)); diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java b/Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java index 24baeafc0c..26776ee02e 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java @@ -308,12 +308,12 @@ public class ReportProgressPanel extends javax.swing.JPanel { setMinimumSize(new java.awt.Dimension(486, 68)); - reportLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N + reportLabel.setFont(reportLabel.getFont().deriveFont(Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText(reportLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.reportLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(pathLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.pathLabel.text")); // NOI18N - processingLabel.setFont(new java.awt.Font("Tahoma", 2, 10)); // NOI18N + processingLabel.setFont(processingLabel.getFont().deriveFont(Font.ITALIC, 10)); org.openide.awt.Mnemonics.setLocalizedText(processingLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.processingLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(separationLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.separationLabel.text")); // NOI18N diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.java b/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.java index 9b6acfd092..7c2bc5193c 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.java @@ -143,7 +143,7 @@ final class ReportVisualPanel1 extends JPanel implements ListSelectionListener { private void popupWarning(ReportModule module) { String moduleClassName = module.getClass().getSimpleName(); - logger.log(Level.WARNING, "Invalid ReportModule: {0}", moduleClassName); // NON_NLS + logger.log(Level.WARNING, "Invalid ReportModule: {0}", moduleClassName); // NON_NLS NON-NLS DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message( NbBundle.getMessage(ReportVisualPanel1.class, "ReportVisualPanel1.invalidModuleWarning", moduleClassName), NotifyDescriptor.ERROR_MESSAGE)); diff --git a/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventNode.java b/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventNode.java index 2a5473bb52..bd801bef17 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventNode.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventNode.java @@ -121,11 +121,15 @@ class EventNode extends DisplayableItemNode { throw new UnsupportedOperationException("Not supported yet."); // NON-NLS //To change body of generated methods, choose Tools | Templates. } - @Override - public String getItemType() { - return "Event"; - } - + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "Event"; +// } /** * We use TimeProperty instead of a normal NodeProperty to correctly display * the date/time when the user changes the timezone setting. diff --git a/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventRootNode.java b/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventRootNode.java index 401d30e336..9ad3a2bb2f 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventRootNode.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventRootNode.java @@ -70,10 +70,15 @@ public class EventRootNode extends DisplayableItemNode { return childCount; } - @Override - public String getItemType() { - return "EventRoot"; - } + /* + * TODO (AUT-1849): Correct or remove peristent column reordering code + * + * Added to support this feature. + */ +// @Override +// public String getItemType() { +// return "EventRoot"; +// } /** * The node factories used to make lists of files to send to the result diff --git a/CoreLibs/nbproject/project.properties b/CoreLibs/nbproject/project.properties index 6b1c4edae5..35f2e8e8c6 100644 --- a/CoreLibs/nbproject/project.properties +++ b/CoreLibs/nbproject/project.properties @@ -68,7 +68,7 @@ file.reference.slf4j-simple-1.6.1.jar=release/modules/ext/slf4j-simple-1.6.1.jar file.reference.stax-api-1.0.1.jar=release/modules/ext/stax-api-1.0.1.jar file.reference.xml-apis-1.0.b2.jar=release/modules/ext/xml-apis-1.0.b2.jar file.reference.xmlbeans-2.3.0.jar=release/modules/ext/xmlbeans-2.3.0.jar -javac.source=1.7 +javac.source=1.8 javac.compilerargs=-Xlint -Xlint:-serial javadoc.reference.controlsfx-8.40.10.jar=release/modules/ext/controlsfx-8.40.10-javadoc.jar javadoc.reference.guava-18.0.jar=release/modules/ext/guava-18.0-javadoc.jar diff --git a/KeywordSearch/nbproject/project.properties b/KeywordSearch/nbproject/project.properties index 999c6bd7ac..cb50270b3e 100644 --- a/KeywordSearch/nbproject/project.properties +++ b/KeywordSearch/nbproject/project.properties @@ -1,4 +1,4 @@ -javac.source=1.7 +javac.source=1.8 javac.compilerargs=-Xlint -Xlint:-serial license.file=../LICENSE-2.0.txt nbm.homepage=http://www.sleuthkit.org/autopsy/ diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties index 44e1664d25..39ce8b000a 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties @@ -294,3 +294,4 @@ SolrConnectionCheck.HostnameOrPort=Invalid hostname and/or port number. SolrConnectionCheck.Hostname=Invalid hostname. SolrConnectionCheck.Port=Invalid port number. SolrConnectionCheck.MissingHostname=Missing hostname. +RawText.getText.error.msg=Error getting text diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownListSearchPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownListSearchPanel.java index 1d91a78dd3..e3d7d6cc85 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownListSearchPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownListSearchPanel.java @@ -119,7 +119,7 @@ class DropdownListSearchPanel extends KeywordSearchPanel { @Override public void propertyChange(PropertyChangeEvent evt) { Object source = evt.getSource(); - if (source instanceof String && ((String) source).equals("LOCAL")) { + if (source instanceof String && ((String) source).equals("LOCAL")) { //NON-NLS EventQueue.invokeLater(new Runnable() { @Override public void run() { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSingleTermSearchPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSingleTermSearchPanel.java index e1f2f1540b..4f5ffe545b 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSingleTermSearchPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSingleTermSearchPanel.java @@ -154,7 +154,7 @@ public class DropdownSingleTermSearchPanel extends KeywordSearchPanel { org.openide.awt.Mnemonics.setLocalizedText(selectAllMenuItem, org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.selectAllMenuItem.text")); // NOI18N rightClickMenu.add(selectAllMenuItem); - keywordTextField.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N + keywordTextField.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N NON-NLS keywordTextField.setText(org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.keywordTextField.text")); // NOI18N keywordTextField.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(192, 192, 192), 1, true)); keywordTextField.setMinimumSize(new java.awt.Dimension(2, 25)); @@ -170,7 +170,7 @@ public class DropdownSingleTermSearchPanel extends KeywordSearchPanel { } }); - searchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/search-icon.png"))); // NOI18N + searchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/search-icon.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.searchButton.text")); // NOI18N searchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java index 87dc6b6f52..f4f2596956 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java @@ -129,7 +129,7 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis @Override public void propertyChange(PropertyChangeEvent evt) { Object source = evt.getSource(); - if (source instanceof String && ((String) source).equals("LOCAL")) { + if (source instanceof String && ((String) source).equals("LOCAL")) { //NON-NLS EventQueue.invokeLater(new Runnable() { @Override public void run() { @@ -294,13 +294,13 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis listOptionsLabel.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.listOptionsLabel.text")); // NOI18N - deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N + deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N NON-NLS deleteListButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.deleteListButton.text")); // NOI18N - saveListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/save16.png"))); // NOI18N + saveListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/save16.png"))); // NOI18N NON-NLS saveListButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.saveListButton.text")); // NOI18N - exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N + exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N NON-NLS exportButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.exportButton.text")); // NOI18N exportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java index 9c276115ce..0433f99e7e 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java @@ -75,7 +75,7 @@ public class KeywordSearch { //do not forward to the parent autopsy logger TIKA_LOGGER.setUseParentHandlers(false); } catch (IOException | SecurityException ex) { - logger.log(Level.SEVERE, "Error setting up tika logging", ex); + logger.log(Level.SEVERE, "Error setting up tika logging", ex); //NON-NLS } } @@ -125,7 +125,7 @@ public class KeywordSearch { server.closeCore(); } catch (Exception ex) { String caseName = closedCase.getName(); - logger.log(Level.SEVERE, String.format("Failed to close core for %s", caseName), ex); + logger.log(Level.SEVERE, String.format("Failed to close core for %s", caseName), ex); //NON-NLS MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.closeCore.notification.msg"), ex.getMessage()); } } @@ -135,7 +135,7 @@ public class KeywordSearch { server.openCoreForCase(openedCase); } catch (Exception ex) { String caseName = openedCase.getName(); - logger.log(Level.SEVERE, String.format("Failed to open or create core for %s", caseName), ex); + logger.log(Level.SEVERE, String.format("Failed to open or create core for %s", caseName), ex); //NON-NLS MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.openCore.notification.msg"), ex.getMessage()); } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RawText.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RawText.java index 540c3c0e21..ed4347fe4f 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RawText.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RawText.java @@ -156,7 +156,7 @@ class RawText implements IndexedText { } catch (SolrServerException | NoOpenCoreException ex) { logger.log(Level.WARNING, "Couldn't get extracted content.", ex); //NON-NLS } - return "Error getting text"; + return NbBundle.getMessage(this.getClass(), "RawText.getText.error.msg"); } @Override diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java index f59c587887..312c600d7a 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java @@ -406,10 +406,10 @@ public class Server { solrProcessBuilder.directory(solrFolder); // Redirect stdout and stderr to files to prevent blocking. - Path solrStdoutPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stdout"); + Path solrStdoutPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stdout"); //NON-NLS solrProcessBuilder.redirectOutput(solrStdoutPath.toFile()); - Path solrStderrPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stderr"); + Path solrStderrPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stderr"); //NON-NLS solrProcessBuilder.redirectError(solrStderrPath.toFile()); logger.log(Level.INFO, "Starting Solr using: {0}", solrProcessBuilder.command()); //NON-NLS diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 7c28a15aff..e86ef70c52 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -46,8 +46,8 @@ import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchServiceException; @ServiceProvider(service = KeywordSearchService.class) public class SolrSearchService implements KeywordSearchService { - private static final String BAD_IP_ADDRESS_FORMAT = "ioexception occurred when talking to server"; - private static final String SERVER_REFUSED_CONNECTION = "server refused connection"; + private static final String BAD_IP_ADDRESS_FORMAT = "ioexception occurred when talking to server"; //NON-NLS + private static final String SERVER_REFUSED_CONNECTION = "server refused connection"; //NON-NLS private static final int IS_REACHABLE_TIMEOUT_MS = 1000; @Override diff --git a/RecentActivity/nbproject/project.properties b/RecentActivity/nbproject/project.properties index a31b0c2f01..bc09675c9d 100644 --- a/RecentActivity/nbproject/project.properties +++ b/RecentActivity/nbproject/project.properties @@ -1,5 +1,5 @@ file.reference.gson-2.1.jar=release/modules/ext/gson-2.1.jar -javac.source=1.7 +javac.source=1.8 javac.compilerargs=-Xlint -Xlint:-serial license.file=../LICENSE-2.0.txt nbm.homepage=http://www.sleuthkit.org/autopsy/ diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java index f01cb02666..c55edc8adc 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java @@ -383,9 +383,9 @@ class ExtractRegistry extends Extract { String value = artnode.getTextContent().trim(); String name = artnode.getAttribute("name"); //NON-NLS - if (name.equals("ProductName")) { // NON_NLS + if (name.equals("ProductName")) { // NON-NLS version = value; - } else if (name.equals("CSDVersion")) { // NON_NLS + } else if (name.equals("CSDVersion")) { // NON-NLS // This is dependant on the fact that ProductName shows up first in the module output version = version + " " + value; } else if (name.equals("SystemRoot")) { //NON-NLS diff --git a/ScalpelCarver/nbproject/platform.properties b/ScalpelCarver/nbproject/platform.properties index d19032bb98..6894d213d1 100755 --- a/ScalpelCarver/nbproject/platform.properties +++ b/ScalpelCarver/nbproject/platform.properties @@ -1,4 +1,5 @@ branding.token=autopsy +nbplatform.active=default # Version of platform that is automatically downloaded # Note build.xml has similar definitions that should be kept in sync (manually) netbeans-plat-version=7.3.1 diff --git a/ScalpelCarver/nbproject/project.properties b/ScalpelCarver/nbproject/project.properties index cafb7bf34e..815054aa0d 100644 --- a/ScalpelCarver/nbproject/project.properties +++ b/ScalpelCarver/nbproject/project.properties @@ -1,4 +1,4 @@ -javac.source=1.7 +javac.source=1.8 javac.compilerargs=-Xlint -Xlint:-serial license.file=../LICENSE-2.0.txt nbm.homepage=http://www.sleuthkit.org/autopsy/ diff --git a/Testing/nbproject/project.properties b/Testing/nbproject/project.properties index 0735c621fa..7ec0a803eb 100644 --- a/Testing/nbproject/project.properties +++ b/Testing/nbproject/project.properties @@ -1,4 +1,4 @@ -javac.source=1.7 +javac.source=1.8 javac.compilerargs=-Xlint -Xlint:-serial license.file=../LICENSE-2.0.txt nbm.homepage=http://www.sleuthkit.org/autopsy/ diff --git a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties index f0d04d8afb..b7f65c5191 100644 --- a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties +++ b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties @@ -1,5 +1,5 @@ #Updated by build script -#Mon, 21 Dec 2015 06:26:49 -0500 +#Thu, 28 Jan 2016 15:43:18 -0500 LBL_splash_window_title=Starting Autopsy SPLASH_HEIGHT=314 SPLASH_WIDTH=538 diff --git a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties index 960ee135b3..ef07541dfb 100644 --- a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties +++ b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties @@ -1,4 +1,4 @@ #Updated by build script -#Mon, 21 Dec 2015 06:26:49 -0500 +#Thu, 28 Jan 2016 15:43:18 -0500 CTL_MainWindow_Title=Autopsy 4.0.0 CTL_MainWindow_Title_No_Project=Autopsy 4.0.0 diff --git a/thunderbirdparser/nbproject/project.properties b/thunderbirdparser/nbproject/project.properties index 0fd53bef25..fbdabd0fc1 100644 --- a/thunderbirdparser/nbproject/project.properties +++ b/thunderbirdparser/nbproject/project.properties @@ -3,7 +3,7 @@ file.reference.apache-mime4j-core-0.8.0-SNAPSHOT.jar=release/modules/ext/apache- file.reference.apache-mime4j-mbox-iterator-0.8.0-SNAPSHOT-sources.jar=release/modules/ext/apache-mime4j-mbox-iterator-0.8.0-SNAPSHOT-sources.jar file.reference.apache-mime4j-mbox-iterator-0.8.0-SNAPSHOT.jar=release/modules/ext/apache-mime4j-mbox-iterator-0.8.0-SNAPSHOT.jar file.reference.java-libpst-1.0-SNAPSHOT.jar=release/modules/ext/java-libpst-1.0-SNAPSHOT.jar -javac.source=1.7 +javac.source=1.8 javac.compilerargs=-Xlint -Xlint:-serial license.file=../LICENSE-2.0.txt nbm.homepage=http://www.sleuthkit.org/autopsy/