Merge branch 'develop' of github.com:sleuthkit/autopsy into 1501-ja-scalpelcarver

This commit is contained in:
Nick Davis 2016-02-02 14:25:28 -05:00
commit 8748283c42
121 changed files with 1283 additions and 907 deletions

View File

@ -108,11 +108,11 @@ 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.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\
@ -139,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}
@ -208,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-
@ -240,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

View File

@ -192,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-

View File

@ -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,20 +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
* @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();
@ -571,7 +603,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
CaseType caseType = metadata.getCaseType();
String caseDir = metadata.getCaseDirectory();
/**
/*
* Open the case database.
*/
SleuthkitCase db;
@ -585,40 +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);
}
}
/**
* 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<Long, String> imgPaths = getImagePaths(db);
for (Map.Entry<Long, String> 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);
@ -626,28 +675,16 @@ public class Case implements SleuthkitCase.ErrorObserver {
changeCase(openedCase);
} catch (CaseMetadataException ex) {
/**
* Attempt clean up.
*/
try {
Case badCase = Case.getCurrentCase();
badCase.closeCase();
} catch (IllegalStateException ignored) {
}
throw new CaseActionException(ex.getMessage(), ex); //NON-NLS
throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.metaDataFileCorrupt.exception.msg"), ex); //NON-NLS
} catch (TskCoreException ex) {
/**
* Attempt clean up.
*/
try {
Case badCase = Case.getCurrentCase();
badCase.closeCase();
} catch (IllegalStateException ignored) {
}
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);
}
}
@ -666,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<Long, String> imgPaths = getImagePaths(db);
for (Map.Entry<Long, String> 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.
@ -1585,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

View File

@ -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);

View File

@ -65,7 +65,7 @@ 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.
@ -73,21 +73,28 @@ public final class CaseOpenAction implements ActionListener {
@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.log(Level.SEVERE, "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,12 +124,14 @@ public final class CaseOpenAction implements ActionListener {
try {
Case.open(path);
} catch (CaseActionException ex) {
logger.log(Level.SEVERE, String.format("Could not open case at %s", path), 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(), "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();
}

View File

@ -39,10 +39,11 @@ import javax.swing.JOptionPane;
import org.sleuthkit.autopsy.casemodule.Case.CaseType;
import org.openide.windows.WindowManager;
import java.awt.Cursor;
import java.util.concurrent.ExecutionException;
import org.sleuthkit.autopsy.ingest.IngestManager;
/**
* An action that runs the new case wizard.
* An action that creates and runs the new case wizard.
*/
final class NewCaseWizardAction extends CallableSystemAction {
@ -53,32 +54,39 @@ final class NewCaseWizardAction extends CallableSystemAction {
@Override
public void performAction() {
/*
* 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;
}
}
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
newCaseAction();
runNewCaseWizard();
}
private void newCaseAction() {
final WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels());
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);
@ -104,21 +112,14 @@ final class NewCaseWizardAction extends CallableSystemAction {
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
/**
* This is a bit of a hack, but close the startup
* window, if it was the source of the action
* invocation.
*/
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();
}
@ -137,7 +138,6 @@ 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(() -> {
@ -146,10 +146,10 @@ final class NewCaseWizardAction extends CallableSystemAction {
}
/**
* Initializes the new case wizard panels.
* Creates the new case wizard panels.
*/
@SuppressWarnings({"unchecked", "rawtypes"})
private WizardDescriptor.Panel<WizardDescriptor>[] getPanels() {
private WizardDescriptor.Panel<WizardDescriptor>[] getNewCaseWizardPanels() {
if (panels == null) {
panels = new WizardDescriptor.Panel[]{
new NewCaseWizardPanel1(),
@ -180,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;

View File

@ -32,26 +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.
*/
final class OpenRecentCasePanel extends javax.swing.JPanel {
class OpenRecentCasePanel extends javax.swing.JPanel {
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 static final Logger logger = Logger.getLogger(OpenRecentCasePanel.class.getName());
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();
@ -70,46 +94,35 @@ final class OpenRecentCasePanel extends javax.swing.JPanel {
}
}
static OpenRecentCasePanel getInstance() {
if (instance == null) {
instance = new OpenRecentCasePanel();
}
instance.generateRecentCases(); // refresh the case list
return instance;
}
// Open the selected case
/*
* Opens 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
logger.log(Level.SEVERE, "Error closing start up window", ex); //NON-NLS
}
// Open the recent cases
/*
* Open the case.
*/
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"),
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
if (Case.isCaseOpen() == false) {
StartupWindowProvider.getInstance().open();
}
} else {
SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
@ -119,9 +132,13 @@ final class OpenRecentCasePanel extends javax.swing.JPanel {
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(),
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();
}
@ -132,15 +149,6 @@ final class OpenRecentCasePanel extends javax.swing.JPanel {
}
}
/**
* 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.
*/
@ -148,6 +156,9 @@ final class OpenRecentCasePanel extends javax.swing.JPanel {
private static final long serialVersionUID = 1L;
/**
* @inheritDoc
*/
@Override
public int getRowCount() {
int count = 0;
@ -159,11 +170,17 @@ final class OpenRecentCasePanel extends javax.swing.JPanel {
return count;
}
/**
* @inheritDoc
*/
@Override
public int getColumnCount() {
return 2;
}
/**
* @inheritDoc
*/
@Override
public String getColumnName(int column) {
String colName = null;
@ -180,6 +197,9 @@ final class OpenRecentCasePanel extends javax.swing.JPanel {
return colName;
}
/**
* @inheritDoc
*/
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
Object ret = null;
@ -197,15 +217,28 @@ final class OpenRecentCasePanel extends javax.swing.JPanel {
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) {

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011-2015 Basis Technology Corp.
* Copyright 2011-2016 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> 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();
}

View File

@ -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.
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

View File

@ -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

View File

@ -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;
}

View File

@ -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) {

View File

@ -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<Node.Property<?>> 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<Node.Property<?>> 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<Node.Property<?>> props = loadState();
// currentRoot = root;
// List<Node.Property<?>> props = loadState();
propertiesAcc.clear();
DataResultViewerTable.this.getAllChildPropertyHeadersRec(root, 100);
List<Node.Property<?>> 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<Node.Property<?>> 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<Node.Property<?>> 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<Node.Property<?>> loadState() {
propertiesAcc.clear();
this.getAllChildPropertyHeadersRec(currentRoot, 100);
List<Node.Property<?>> 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<Node.Property<?>> 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<Node.Property<?>> loadState() {
// propertiesAcc.clear();
// this.getAllChildPropertyHeadersRec(currentRoot, 100);
// List<Node.Property<?>> 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<Node.Property<?>> 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.

View File

@ -83,14 +83,14 @@ public class Installer extends ModuleInstall {
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();
});
}
@ -103,12 +103,19 @@ 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 ex) {
logger.log(Level.SEVERE, "Error closing case", ex); //NON-NLS
} 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();
}
@ -128,7 +135,7 @@ public class Installer extends ModuleInstall {
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
}
// Store the keys that deal with menu items
@ -138,20 +145,19 @@ public class Installer extends ModuleInstall {
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());
});

View File

@ -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}

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2012-2015 Basis Technology Corp.
* Copyright 2012-2016 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> 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() {
}
}

View File

@ -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<String> GIF_MIME_SET = ImmutableSortedSet.copyOf(new String[]{IMAGE_GIF_MIME});
private static final List<String> SUPPORTED_IMAGE_EXTENSIONS;
private static final SortedSet<String> SUPPORTED_IMAGE_MIME_TYPES;
private static final List<String> CONDITIONAL_MIME_TYPES = Arrays.asList("audio/x-aiff", "application/octet-stream"); //NOI18N
private static final List<String> 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<String> 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<javafx.scene.image.Image> 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;
}
}

View File

@ -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;
}

View File

@ -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
}
/**

View File

@ -36,7 +36,7 @@ public class UNCPathUtilities {
private static Map<String, String> 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

View File

@ -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<String> 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<String> 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<String> CONDITIONAL_MIME_TYPES = Arrays.asList("application/octet-stream");
private static final List<String> CONDITIONAL_MIME_TYPES = Arrays.asList("application/octet-stream"); //NON-NLS
public static List<String> 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);

View File

@ -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
// }
}

View File

@ -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
// }
}

View File

@ -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
// }
}

View File

@ -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.

View File

@ -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<DeletedContent.DeletedContentFilter> {
@ -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

View File

@ -101,8 +101,13 @@ public class DirectoryNode extends AbstractFsContentNode<AbstractFile> {
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
// }
}

View File

@ -40,6 +40,11 @@ public abstract class DisplayableItemNode extends AbstractNode {
public abstract boolean isLeafTypeNode();
public abstract <T> T accept(DisplayableItemNodeVisitor<T> v);
public abstract String getItemType();
/*
* TODO (AUT-1849): Correct or remove peristent column reordering code
*
* Added to support this feature.
*/
// public abstract String getItemType();
}

View File

@ -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
// }
}
/**

View File

@ -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();
// }
}
/**

View File

@ -184,8 +184,13 @@ public class FileNode extends AbstractFsContentNode<AbstractFile> {
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
// }
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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
// }
/**
*

View File

@ -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
// }
}
/**

View File

@ -110,8 +110,13 @@ public class ImageNode extends AbstractContentNode<Image> {
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
// }
}

View File

@ -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<String> 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<Long> implements Observer {

View File

@ -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<String, Map<String, Set<Long>>> 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<String> 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<String> 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<Long> implements Observer {

View File

@ -38,11 +38,15 @@ import org.sleuthkit.datamodel.TskData;
*/
public class LayoutFileNode extends AbstractAbstractFileNode<LayoutFile> {
@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 {

View File

@ -116,8 +116,13 @@ public class LocalFileNode extends AbstractAbstractFileNode<AbstractFile> {
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
// }
}

View File

@ -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
// }
}

View File

@ -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
// }
}

View File

@ -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;

View File

@ -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
// }
}

View File

@ -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<TagName> 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<ContentTag> 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<BlackboardArtifactTag> implements Observer {

View File

@ -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
// }
}

View File

@ -149,8 +149,13 @@ public class VirtualDirectoryNode extends AbstractAbstractFileNode<VirtualDirect
return result;
}
@Override
public String getItemType() {
return "VirtualDirectory";
}
/*
* TODO (AUT-1849): Correct or remove peristent column reordering code
*
* Added to support this feature.
*/
// @Override
// public String getItemType() {
// return "VirtualDirectory"; //NON-NLS
// }
}

View File

@ -74,7 +74,7 @@ public class VolumeNode extends AbstractContentNode<Volume> {
// 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<Volume> {
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
// }
}

View File

@ -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();

View File

@ -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
}
}
}

View File

@ -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;

View File

@ -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
}
}
}

View File

@ -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;

View File

@ -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) {

View File

@ -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

View File

@ -360,10 +360,10 @@ final class DataSourceIngestJob {
List<IngestModuleError> 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) {

View File

@ -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;

View File

@ -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);
}
}
}

View File

@ -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<IngestModuleError> start() {
List<IngestModuleError> 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;

View File

@ -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<IngestModuleTemplate> moduleTemplates;
private boolean processUnallocatedSpace;
private final List<String> 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);

View File

@ -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<String> jobEventNames = Stream.of(IngestJobEvent.values())
.map(IngestJobEvent::toString)
.collect(Collectors.toSet());

View File

@ -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
}
}

View File

@ -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()];

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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 <at> sleuthkit <dot> 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<AbstractFile> file1 = manager.findFiles("Sunset.jpg");
List<AbstractFile> file2 = manager.findFiles("Winter.jpg");
List<AbstractFile> file1 = manager.findFiles("Sunset.jpg"); //NON-NLS
List<AbstractFile> file2 = manager.findFiles("Winter.jpg"); //NON-NLS
BlackboardArtifact art1;
BlackboardArtifact art2;
if (!file1.isEmpty()) {
@ -56,8 +61,8 @@ public class UserArtifactIngestModule implements DataSourceIngestModule {
} else {
art2 = dataSource.newArtifact(type2.getTypeID());
}
BlackboardAttribute.Type attributeType = Case.getCurrentCase().getServices().getBlackboard().addAttributeType("Test", TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG, "2");
BlackboardAttribute.Type attributeType2 = Case.getCurrentCase().getServices().getBlackboard().addAttributeType("Test2", TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE, "3");
BlackboardAttribute.Type attributeType = Case.getCurrentCase().getServices().getBlackboard().addAttributeType("Test", TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG, "2"); //NON-NLS
BlackboardAttribute.Type attributeType2 = Case.getCurrentCase().getServices().getBlackboard().addAttributeType("Test2", TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE, "3"); //NON-NLS
art1.addAttribute(new BlackboardAttribute(attributeType,
UserArtifactIngestModuleFactory.getModuleName(), -1L));
progressBar.progress(1);
@ -65,27 +70,24 @@ public class UserArtifactIngestModule implements DataSourceIngestModule {
UserArtifactIngestModuleFactory.getModuleName(), new byte[7]));
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
}
}
}

View File

@ -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 <at> sleuthkit <dot> 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)
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;

View File

@ -58,7 +58,7 @@ class CacheLocationAnalyzer {
blackboard = Case.getCurrentCase().getServices().getBlackboard();
try {
List<AbstractFile> 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 {

View File

@ -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.
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

View File

@ -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

View File

@ -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;
}

View File

@ -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;

View File

@ -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

View File

@ -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() {

View File

@ -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,

View File

@ -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

View File

@ -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));

View File

@ -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

View File

@ -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

View File

@ -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}

View File

@ -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
}
}
}

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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<LayoutFile> empty = Collections.emptyList();

View File

@ -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
}

View File

@ -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
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}

View File

@ -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<String> 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<Content> 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<String> errList, List<Content> 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 {

View File

@ -50,7 +50,7 @@ public final class VirtualMachineFinder {
vmFiltersList.add(virtualMachineFilter);
}
private static final List<String> VMDK_EXTS = Arrays.asList(new String[]{".vmdk"});
private static final List<String> VMDK_EXTS = Arrays.asList(new String[]{".vmdk"}); //NON-NLS
private static final GeneralFilter vmdkFilter = new GeneralFilter(VMDK_EXTS, "");
private static final List<FileFilter> 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;
}

View File

@ -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

View File

@ -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=<i>\u30B1\u30FC\u30B9\u756A\u53F7\u304C\u3042\u308A\u307E\u305B\u3093</i>
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

View File

@ -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));

View File

@ -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

View File

@ -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));

Some files were not shown because too many files have changed in this diff Show More