diff --git a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties index 913f6d8c82..8ba6b8f14e 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties @@ -23,4 +23,9 @@ ServicesMonitor.unknownServiceName.excepton.txt=Requested service name {0} is un TextConverter.convert.exception.txt=Unable to convert text {0} to hex text TextConverter.convertFromHex.exception.txt=Unable to convert hex text to text ServicesMonitor.KeywordSearchNull=Cannot find Keyword Search service -ServicesMonitor.InvalidPortNumber=Invalid port number. \ No newline at end of file +ServicesMonitor.InvalidPortNumber=Invalid port number. +ServicesMonitor.remoteCaseDatabase.displayName.text=Multi-user case database service +ServicesMonitor.remoteKeywordSearch.displayName.text=Multi-user keyword search service +ServicesMonitor.messaging.displayName.text=Messaging service +ServicesMonitor.databaseConnectionInfo.error.msg=Error accessing case database connection info +ServicesMonitor.messagingService.connErr.text=Error accessing messaging service connection info \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index 2c5493d38d..8809bb549f 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -123,9 +123,9 @@ public class Installer extends ModuleInstall { } // This library name is different in 32-bit versus 64-bit - String libintlName = "libintl-8"; + String libintlName = "libintl-8"; //NON-NLS if (PlatformUtil.is64BitJVM() == false) { - libintlName = "intl"; + libintlName = "intl"; //NON-NLS } try { System.loadLibrary(libintlName); //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java b/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java index 4c1fb92989..70857146d4 100644 --- a/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java +++ b/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java @@ -52,7 +52,7 @@ public class ServicesMonitor { private static final Logger logger = Logger.getLogger(ServicesMonitor.class.getName()); private final ScheduledThreadPoolExecutor periodicTasksExecutor; - private static final String PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d"; + private static final String PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d"; //NON-NLS private static final int NUMBER_OF_PERIODIC_TASK_THREADS = 1; private static final long CRASH_DETECTION_INTERVAL_MINUTES = 2; @@ -84,18 +84,18 @@ public class ServicesMonitor { * changes. New value is set to updated ServiceStatus, old value is * null. */ - REMOTE_CASE_DATABASE("Multi-user case database service"), + REMOTE_CASE_DATABASE(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.remoteCaseDatabase.displayName.text")), /** * Property change event fired when remote keyword search service status * changes. New value is set to updated ServiceStatus, old value is * null. */ - REMOTE_KEYWORD_SEARCH("Multi-user keyword search service"), + REMOTE_KEYWORD_SEARCH(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.remoteKeywordSearch.displayName.text")), /** * Property change event fired when messaging service status changes. * New value is set to updated ServiceStatus, old value is null. */ - MESSAGING("Messaging service"); + MESSAGING(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.messaging.displayName.text")); private final String displayName; @@ -244,7 +244,7 @@ public class ServicesMonitor { info = UserPreferences.getDatabaseConnectionInfo(); } catch (UserPreferencesException ex) { logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS - setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.DOWN.toString(), "Error accessing case database connection info"); + setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.DOWN.toString(), NbBundle.getMessage(this.getClass(), "ServicesMonitor.databaseConnectionInfo.error.msg")); return; } try { @@ -289,7 +289,7 @@ public class ServicesMonitor { info = UserPreferences.getMessageServiceConnectionInfo(); } catch (UserPreferencesException ex) { logger.log(Level.SEVERE, "Error accessing messaging service connection info", ex); //NON-NLS - setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.DOWN.toString(), "Error accessing messaging service connection info"); + setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.DOWN.toString(), NbBundle.getMessage(this.getClass(), "ServicesMonitor.messagingService.connErr.text")); return; } diff --git a/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java b/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java index 03c97a0479..0cfaddf97b 100755 --- a/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java +++ b/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java @@ -147,7 +147,7 @@ public final class UserPreferences { public static CaseDbConnectionInfo getDatabaseConnectionInfo() throws UserPreferencesException { DbType dbType; try { - dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "POSTGRESQL")); + dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "POSTGRESQL")); //NON-NLS } catch (Exception ex) { dbType = DbType.SQLITE; } @@ -290,7 +290,7 @@ public final class UserPreferences { */ static final class TextConverter { - private static final char[] TMP = "hgleri21auty84fwe".toCharArray(); + private static final char[] TMP = "hgleri21auty84fwe".toCharArray(); //NON-NLS private static final byte[] SALT = { (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12, (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,}; @@ -306,9 +306,9 @@ public final class UserPreferences { */ static String convertTextToHexText(String property) throws UserPreferencesException { try { - SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); //NON-NLS SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP)); - Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); + Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); //NON-NLS pbeCipher.init(Cipher.ENCRYPT_MODE, key, new PBEParameterSpec(SALT, 20)); return base64Encode(pbeCipher.doFinal(property.getBytes("UTF-8"))); } catch (Exception ex) { @@ -332,9 +332,9 @@ public final class UserPreferences { */ static String convertHexTextToText(String property) throws UserPreferencesException { try { - SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); //NON-NLS SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP)); - Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); + Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); //NON-NLS pbeCipher.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(SALT, 20)); return new String(pbeCipher.doFinal(base64Decode(property)), "UTF-8"); } catch (Exception ex) { diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties b/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties index d63b55a2cc..2202e10ecb 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties @@ -21,4 +21,7 @@ PlatformUtil.getAllMemUsageInfo.usageText={0}\n\ {1}\n\ Process Virtual Memory\: {2} StringExtract.illegalStateException.cannotInit.msg=Unicode table not properly initialized, cannot instantiate StringExtract - +ImageUtils.GetOrGenerateThumbnailTask.loadingThumbnailFor=Loading thumbnail for {0} +ImageUtils.GetOrGenerateThumbnailTask.generatingPreviewFor=Generating preview for {0} +ImageUtils.ReadImageTask.mesage.text=Reading image: {0} +VideoUtils.genVideoThumb.progress.text=extracting temporary file {0} diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java b/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java index b1d1c33c51..91e12a32ba 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java @@ -31,7 +31,7 @@ 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 String TEMP_FILE_PREFIX = "Autopsy"; //NON-NLS /** * Recursively delete all of the files and sub-directories in a directory. diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java b/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java index 04df8cf403..be29d789c9 100755 --- a/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java @@ -67,16 +67,16 @@ import org.sleuthkit.datamodel.ReadContentInputStream; import org.sleuthkit.datamodel.TskCoreException; /** - * Utilities for working with image files and creating thumbnails. Reuses + * Utilities for working with image files and creating thumbnails. Re-uses * thumbnails by storing them in the case's cache directory. */ public class ImageUtils { private static final Logger LOGGER = Logger.getLogger(ImageUtils.class.getName()); - private static final String COULD_NOT_WRITE_CACHE_THUMBNAIL = "Could not write cache thumbnail: "; //NOI18N - private static final String COULD_NOT_CREATE_IMAGE_INPUT_STREAM = "Could not create ImageInputStream."; //NOI18N - private static final String NO_IMAGE_READER_FOUND_FOR_ = "No ImageReader found for "; //NOI18N + private static final String COULD_NOT_WRITE_CACHE_THUMBNAIL = "Could not write cache thumbnail: "; //NOI18N NON-NLS + private static final String COULD_NOT_CREATE_IMAGE_INPUT_STREAM = "Could not create ImageInputStream."; //NOI18N NON-NLS + private static final String NO_IMAGE_READER_FOUND_FOR_ = "No ImageReader found for "; //NOI18N NON-NLS /** * save thumbnails to disk as this format @@ -89,12 +89,12 @@ public class ImageUtils { private static final BufferedImage DEFAULT_THUMBNAIL; - private static final String IMAGE_GIF_MIME = "image/gif"; //NOI18N + private static final String IMAGE_GIF_MIME = "image/gif"; //NOI18N NON-NLS private static final SortedSet GIF_MIME_SET = ImmutableSortedSet.copyOf(new String[]{IMAGE_GIF_MIME}); private static final List SUPPORTED_IMAGE_EXTENSIONS; private static final SortedSet SUPPORTED_IMAGE_MIME_TYPES; - private static final List CONDITIONAL_MIME_TYPES = Arrays.asList("audio/x-aiff", "application/octet-stream"); //NOI18N + private static final List CONDITIONAL_MIME_TYPES = Arrays.asList("audio/x-aiff", "application/octet-stream"); //NOI18N NON-NLS private static final boolean openCVLoaded; @@ -104,7 +104,7 @@ public class ImageUtils { try { tempImage = ImageIO.read(ImageUtils.class.getResourceAsStream("/org/sleuthkit/autopsy/images/file-icon.png"));//NON-NLS //NOI18N } catch (IOException ex) { - LOGGER.log(Level.SEVERE, "Failed to load default icon.", ex); //NOI18N + LOGGER.log(Level.SEVERE, "Failed to load default icon.", ex); //NOI18N NON-NLS tempImage = null; } DEFAULT_THUMBNAIL = tempImage; @@ -113,16 +113,16 @@ public class ImageUtils { boolean openCVLoadedTemp; try { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); - if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) { //NOI18N - System.loadLibrary("opencv_ffmpeg248_64"); //NOI18N + if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) { //NOI18N NON-NLS + System.loadLibrary("opencv_ffmpeg248_64"); //NOI18N NON-NLS } else { - System.loadLibrary("opencv_ffmpeg248"); //NOI18N + System.loadLibrary("opencv_ffmpeg248"); //NOI18N NON-NLS } openCVLoadedTemp = true; } catch (UnsatisfiedLinkError e) { openCVLoadedTemp = false; - LOGGER.log(Level.SEVERE, "OpenCV Native code library failed to load", e); //NOI18N + LOGGER.log(Level.SEVERE, "OpenCV Native code library failed to load", e); //NOI18N NON-NLS //TODO: show warning bubble } @@ -136,12 +136,12 @@ public class ImageUtils { * with ImageIO automatically */ SUPPORTED_IMAGE_MIME_TYPES.addAll(Arrays.asList( - "image/x-rgb", - "image/x-ms-bmp", - "image/x-portable-graymap", - "image/x-portable-bitmap", - "application/x-123")); //TODO: is this correct? -jm //NOI18N - SUPPORTED_IMAGE_MIME_TYPES.removeIf("application/octet-stream"::equals); //NOI18N + "image/x-rgb", //NON-NLS + "image/x-ms-bmp", //NON-NLS + "image/x-portable-graymap", //NON-NLS + "image/x-portable-bitmap", //NON-NLS + "application/x-123")); //TODO: is this correct? -jm //NOI18N NON-NLS + SUPPORTED_IMAGE_MIME_TYPES.removeIf("application/octet-stream"::equals); //NOI18N NON-NLS } /** @@ -154,7 +154,7 @@ public class ImageUtils { */ private static final Executor imageSaver = Executors.newSingleThreadExecutor(new BasicThreadFactory.Builder() - .namingPattern("icon saver-%d").build()); //NOI18N + .namingPattern("icon saver-%d").build()); //NOI18N NON-NLS public static List getSupportedImageExtensions() { return Collections.unmodifiableList(SUPPORTED_IMAGE_EXTENSIONS); @@ -240,22 +240,22 @@ public class ImageUtils { return IMAGE_GIF_MIME.equalsIgnoreCase(fileType); } } catch (FileTypeDetectorInitException ex) { - LOGGER.log(Level.WARNING, "Failed to initialize FileTypeDetector.", ex); //NOI18N + LOGGER.log(Level.WARNING, "Failed to initialize FileTypeDetector.", ex); //NOI18N NON-NLS } catch (TskCoreException ex) { - if (ex.getMessage().contains("An SQLException was provoked by the following failure: java.lang.InterruptedException")) { - LOGGER.log(Level.WARNING, "Mime type look up with FileTypeDetector was interupted."); //NOI18N} + if (ex.getMessage().contains("An SQLException was provoked by the following failure: java.lang.InterruptedException")) { //NON-NLS + LOGGER.log(Level.WARNING, "Mime type look up with FileTypeDetector was interupted."); //NOI18N} NON-NLS return "gif".equalsIgnoreCase(file.getNameExtension()); //NOI18N } else { - LOGGER.log(Level.SEVERE, "Failed to get mime type of " + getContentPathSafe(file) + " with FileTypeDetector.", ex); //NOI18N} + LOGGER.log(Level.SEVERE, "Failed to get mime type of " + getContentPathSafe(file) + " with FileTypeDetector.", ex); //NOI18N} NON-NLS } } - LOGGER.log(Level.WARNING, "Falling back on direct mime type check for {0}.", getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Falling back on direct mime type check for {0}.", getContentPathSafe(file)); //NOI18N NON-NLS switch (file.isMimeType(GIF_MIME_SET)) { case TRUE: return true; case UNDEFINED: - LOGGER.log(Level.WARNING, "Falling back on extension check."); //NOI18N + LOGGER.log(Level.WARNING, "Falling back on extension check."); //NOI18N NON-NLS return "gif".equalsIgnoreCase(file.getNameExtension()); //NOI18N case FALSE: default: @@ -294,8 +294,8 @@ public class ImageUtils { || (conditionalMimes.contains(mimeType.toLowerCase()) && supportedExtension.contains(extension)); } } catch (FileTypeDetector.FileTypeDetectorInitException | TskCoreException ex) { - LOGGER.log(Level.WARNING, "Failed to look up mimetype for {0} using FileTypeDetector:{1}", new Object[]{getContentPathSafe(file), ex.toString()}); //NOI18N - LOGGER.log(Level.INFO, "Falling back on AbstractFile.isMimeType"); //NOI18N + LOGGER.log(Level.WARNING, "Failed to look up mimetype for {0} using FileTypeDetector:{1}", new Object[]{getContentPathSafe(file), ex.toString()}); //NOI18N NON-NLS + LOGGER.log(Level.INFO, "Falling back on AbstractFile.isMimeType"); //NOI18N NON-NLS AbstractFile.MimeMatchEnum mimeMatch = file.isMimeType(supportedMimeTypes); if (mimeMatch == AbstractFile.MimeMatchEnum.TRUE) { return true; @@ -360,7 +360,7 @@ public class ImageUtils { try { return SwingFXUtils.fromFXImage(thumbnailTask.get(), null); } catch (InterruptedException | ExecutionException ex) { - LOGGER.log(Level.WARNING, "Failed to get thumbnail for {0}: " + ex.toString(), getContentPathSafe(content)); + LOGGER.log(Level.WARNING, "Failed to get thumbnail for {0}: " + ex.toString(), getContentPathSafe(content)); //NON-NLS return DEFAULT_THUMBNAIL; } } else { @@ -435,9 +435,9 @@ public class ImageUtils { private static File getCachedThumbnailLocation(long fileID) { try { String cacheDirectory = Case.getCurrentCase().getCacheDirectory(); - return Paths.get(cacheDirectory, "thumbnails", fileID + ".png").toFile(); //NOI18N + return Paths.get(cacheDirectory, "thumbnails", fileID + ".png").toFile(); //NOI18N NON-NLS } catch (IllegalStateException e) { - LOGGER.log(Level.WARNING, "Could not get cached thumbnail location. No case is open."); + LOGGER.log(Level.WARNING, "Could not get cached thumbnail location. No case is open."); //NON-NLS return null; } @@ -532,7 +532,7 @@ public class ImageUtils { */ static public int getImageWidth(AbstractFile file) throws IOException { return getImageProperty(file, - "ImageIO could not determine width of {0}: ", //NOI18N + "ImageIO could not determine width of {0}: ", //NOI18N NON-NLS imageReader -> imageReader.getWidth(0) ); } @@ -549,7 +549,7 @@ public class ImageUtils { */ static public int getImageHeight(AbstractFile file) throws IOException { return getImageProperty(file, - "ImageIO could not determine height of {0}: ", //NOI18N + "ImageIO could not determine height of {0}: ", //NOI18N NON-NLS imageReader -> imageReader.getHeight(0) ); } @@ -646,18 +646,18 @@ public class ImageUtils { */ static private class GetThumbnailTask extends ReadImageTaskBase { - private static final String FAILED_TO_READ_IMAGE_FOR_THUMBNAIL_GENERATION = "Failed to read image for thumbnail generation."; //NOI18N + private static final String FAILED_TO_READ_IMAGE_FOR_THUMBNAIL_GENERATION = "Failed to read image for thumbnail generation."; //NOI18N NON-NLS private final int iconSize; private final File cacheFile; private final boolean defaultOnFailure; - @NbBundle.Messages({"# {0} - file name", - "GetOrGenerateThumbnailTask.loadingThumbnailFor=Loading thumbnail for {0}", "# {0} - file name", - "GetOrGenerateThumbnailTask.generatingPreviewFor=Generating preview for {0}"}) +// @NbBundle.Messages({"# {0} - file name", +// "GetOrGenerateThumbnailTask.loadingThumbnailFor=Loading thumbnail for {0}", "# {0} - file name", +// "GetOrGenerateThumbnailTask.generatingPreviewFor=Generating preview for {0}"}) private GetThumbnailTask(AbstractFile file, int iconSize, boolean defaultOnFailure) { super(file); - updateMessage(Bundle.GetOrGenerateThumbnailTask_loadingThumbnailFor(file.getName())); + updateMessage(NbBundle.getMessage(this.getClass(), "ImageUtils.GetOrGenerateThumbnailTask.loadingThumbnailFor", file.getName())); this.iconSize = iconSize; this.defaultOnFailure = defaultOnFailure; this.cacheFile = getCachedThumbnailLocation(file.getId()); @@ -679,7 +679,7 @@ public class ImageUtils { return SwingFXUtils.toFXImage(cachedThumbnail, null); } } catch (IOException ex) { - LOGGER.log(Level.WARNING, "ImageIO had a problem reading thumbnail for image {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "ImageIO had a problem reading thumbnail for image {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS } } @@ -691,7 +691,7 @@ public class ImageUtils { if (VideoUtils.isVideoThumbnailSupported(file)) { if (openCVLoaded) { - updateMessage(Bundle.GetOrGenerateThumbnailTask_generatingPreviewFor(file.getName())); + updateMessage(NbBundle.getMessage(this.getClass(), "ImageUtils.GetOrGenerateThumbnailTask.generatingPreviewFor", file.getName())); thumbnail = VideoUtils.generateVideoThumbnail(file, iconSize); } if (null == thumbnail) { @@ -716,7 +716,7 @@ public class ImageUtils { thumbnail = ScalrWrapper.resizeFast(bufferedImage, iconSize); } catch (IllegalArgumentException | OutOfMemoryError e) { // if resizing does not work due to extreme aspect ratio or oom, crop the image instead. - LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString() + ". Attemptying to crop {0} instead", ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString() + ". Attemptying to crop {0} instead", ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS final int height = bufferedImage.getHeight(); final int width = bufferedImage.getWidth(); @@ -727,12 +727,12 @@ public class ImageUtils { try { thumbnail = ScalrWrapper.cropImage(bufferedImage, cropWidth, cropHeight); } catch (Exception cropException) { - LOGGER.log(Level.WARNING, "Could not crop image {0}: " + cropException.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Could not crop image {0}: " + cropException.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS throw cropException; } } } catch (Exception e) { - LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS throw e; } } @@ -765,7 +765,7 @@ public class ImageUtils { } ImageIO.write(thumbnail, FORMAT, cacheFile); } catch (IllegalArgumentException | IOException ex) { - LOGGER.log(Level.WARNING, "Could not write thumbnail for {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N + LOGGER.log(Level.WARNING, "Could not write thumbnail for {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS } }); } @@ -794,13 +794,13 @@ public class ImageUtils { ReadImageTask(AbstractFile file) { super(file); - updateMessage(Bundle.LoadImageTask_mesageText(file.getName())); + updateMessage(NbBundle.getMessage(this.getClass(), "ImageUtils.ReadImageTask.mesage.text", file.getName())); } +// @NbBundle.Messages({ +// "# {0} - file name", +// "LoadImageTask.mesageText=Reading image: {0}"}) @Override - @NbBundle.Messages({ - "# {0} - file name", - "LoadImageTask.mesageText=Reading image: {0}"}) protected javafx.scene.image.Image call() throws Exception { return readImage(); } @@ -811,7 +811,7 @@ public class ImageUtils { */ static private abstract class ReadImageTaskBase extends Task implements IIOReadProgressListener { - private static final String IMAGE_UTILS_COULD_NOT_READ_UNSUPPORTE_OR_CORRUPT = "ImageUtils could not read {0}. It may be unsupported or corrupt"; //NOI18N + private static final String IMAGE_UTILS_COULD_NOT_READ_UNSUPPORTE_OR_CORRUPT = "ImageUtils could not read {0}. It may be unsupported or corrupt"; //NOI18N NON-NLS final AbstractFile file; private ImageReader reader; @@ -955,7 +955,7 @@ public class ImageUtils { return content.getUniquePath(); } catch (TskCoreException tskCoreException) { String contentName = content.getName(); - LOGGER.log(Level.SEVERE, "Failed to get unique path for " + contentName, tskCoreException); //NOI18N + LOGGER.log(Level.SEVERE, "Failed to get unique path for " + contentName, tskCoreException); //NOI18N NON-NLS return contentName; } } diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/NetworkUtils.java b/Core/src/org/sleuthkit/autopsy/coreutils/NetworkUtils.java index 5564fa3f59..af41bc1980 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/NetworkUtils.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/NetworkUtils.java @@ -34,10 +34,10 @@ public class NetworkUtils { } catch (UnknownHostException ex) { // getLocalHost().getHostName() can fail in some situations. // Use environment variable if so. - hostName = System.getenv("COMPUTERNAME"); + hostName = System.getenv("COMPUTERNAME"); //NON-NLS } if (hostName == null || hostName.isEmpty()) { - hostName = System.getenv("COMPUTERNAME"); + hostName = System.getenv("COMPUTERNAME"); //NON-NLS } return hostName; } diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/PlatformUtil.java b/Core/src/org/sleuthkit/autopsy/coreutils/PlatformUtil.java index 1736e08e82..b715d8ce35 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/PlatformUtil.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/PlatformUtil.java @@ -50,7 +50,7 @@ import org.sleuthkit.datamodel.TskCoreException; */ public class PlatformUtil { - private static final String PYTHON_MODULES_SUBDIRECTORY = "python_modules"; + private static final String PYTHON_MODULES_SUBDIRECTORY = "python_modules"; //NON-NLS private static String javaPath = null; public static final String OS_NAME_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.nameUnknown"); public static final String OS_VERSION_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.verUnknown"); @@ -80,13 +80,13 @@ public class PlatformUtil { File coreFolder = InstalledFileLocator.getDefault().locate("core", PlatformUtil.class.getPackage().getName(), false); //NON-NLS File rootPath = coreFolder.getParentFile(); - String modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; + String modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; //NON-NLS File modulesPathF = new File(modulesPath); if (modulesPathF.exists() && modulesPathF.isDirectory()) { return modulesPath; } else { rootPath = rootPath.getParentFile(); - modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; + modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; //NON-NLS modulesPathF = new File(modulesPath); if (modulesPathF.exists() && modulesPathF.isDirectory()) { return modulesPath; @@ -104,7 +104,7 @@ public class PlatformUtil { * not found */ public static String getUserModulesPath() { - return getUserDirectory().getAbsolutePath() + File.separator + "modules"; + return getUserDirectory().getAbsolutePath() + File.separator + "modules"; //NON-NLS } /** diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java b/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java index ba353f8401..103a94013c 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java @@ -36,7 +36,7 @@ public class UNCPathUtilities { private static Map drives; private static final String MAPPED_DRIVES = "_mapped_drives.txt"; //NON-NLS - private static final String TEMP_FOLDER = "TEMP"; + private static final String TEMP_FOLDER = "TEMP"; //NON-NLS private static final String DATA_TRIGGER = "----------"; //NON-NLS private static final String OK_TXT = "OK"; //NON-NLS private static final String COLON = ":"; //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/VideoUtils.java b/Core/src/org/sleuthkit/autopsy/coreutils/VideoUtils.java index eeedf64915..dc06b75019 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/VideoUtils.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/VideoUtils.java @@ -32,6 +32,7 @@ import org.netbeans.api.progress.ProgressHandle; import org.netbeans.api.progress.ProgressHandleFactory; import org.opencv.core.Mat; import org.opencv.highgui.VideoCapture; +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.corelibs.ScalrWrapper; import static org.sleuthkit.autopsy.coreutils.ImageUtils.isMediaThumbnailSupported; @@ -44,24 +45,24 @@ import org.sleuthkit.datamodel.AbstractFile; public class VideoUtils { private static final List SUPPORTED_VIDEO_EXTENSIONS = - Arrays.asList("mov", "m4v", "flv", "mp4", "3gp", "avi", "mpg", - "mpeg", "asf", "divx", "rm", "moov", "wmv", "vob", "dat", - "m1v", "m2v", "m4v", "mkv", "mpe", "yop", "vqa", "xmv", - "mve", "wtv", "webm", "vivo", "vc1", "seq", "thp", "san", - "mjpg", "smk", "vmd", "sol", "cpk", "sdp", "sbg", "rtsp", - "rpl", "rl2", "r3d", "mlp", "mjpeg", "hevc", "h265", "265", - "h264", "h263", "h261", "drc", "avs", "pva", "pmp", "ogg", - "nut", "nuv", "nsv", "mxf", "mtv", "mvi", "mxg", "lxf", - "lvf", "ivf", "mve", "cin", "hnm", "gxf", "fli", "flc", - "flx", "ffm", "wve", "uv2", "dxa", "dv", "cdxl", "cdg", - "bfi", "jv", "bik", "vid", "vb", "son", "avs", "paf", "mm", + Arrays.asList("mov", "m4v", "flv", "mp4", "3gp", "avi", "mpg", //NON-NLS + "mpeg", "asf", "divx", "rm", "moov", "wmv", "vob", "dat", //NON-NLS + "m1v", "m2v", "m4v", "mkv", "mpe", "yop", "vqa", "xmv", //NON-NLS + "mve", "wtv", "webm", "vivo", "vc1", "seq", "thp", "san", //NON-NLS + "mjpg", "smk", "vmd", "sol", "cpk", "sdp", "sbg", "rtsp", //NON-NLS + "rpl", "rl2", "r3d", "mlp", "mjpeg", "hevc", "h265", "265", //NON-NLS + "h264", "h263", "h261", "drc", "avs", "pva", "pmp", "ogg", //NON-NLS + "nut", "nuv", "nsv", "mxf", "mtv", "mvi", "mxg", "lxf", //NON-NLS + "lvf", "ivf", "mve", "cin", "hnm", "gxf", "fli", "flc", //NON-NLS + "flx", "ffm", "wve", "uv2", "dxa", "dv", "cdxl", "cdg", //NON-NLS + "bfi", "jv", "bik", "vid", "vb", "son", "avs", "paf", "mm", //NON-NLS "flm", "tmv", "4xm"); //NON-NLS private static final SortedSet SUPPORTED_VIDEO_MIME_TYPES = new TreeSet<>( - Arrays.asList("application/x-shockwave-flash", "video/x-m4v", "video/x-flv", "video/quicktime", "video/avi", "video/msvideo", "video/x-msvideo", + Arrays.asList("application/x-shockwave-flash", "video/x-m4v", "video/x-flv", "video/quicktime", "video/avi", "video/msvideo", "video/x-msvideo", //NON-NLS "video/mp4", "video/x-ms-wmv", "video/mpeg", "video/asf")); //NON-NLS - private static final List CONDITIONAL_MIME_TYPES = Arrays.asList("application/octet-stream"); + private static final List CONDITIONAL_MIME_TYPES = Arrays.asList("application/octet-stream"); //NON-NLS public static List getSupportedVideoExtensions() { return SUPPORTED_VIDEO_EXTENSIONS; @@ -83,7 +84,7 @@ public class VideoUtils { } public static File getTempVideoFile(AbstractFile file) { - return Paths.get(Case.getCurrentCase().getTempDirectory(), "videos", file.getId() + "." + file.getNameExtension()).toFile(); + return Paths.get(Case.getCurrentCase().getTempDirectory(), "videos", file.getId() + "." + file.getNameExtension()).toFile(); //NON-NLS } public static boolean isVideoThumbnailSupported(AbstractFile file) { @@ -96,7 +97,7 @@ public class VideoUtils { try { if (tempFile.exists() == false || tempFile.length() < file.getSize()) { com.google.common.io.Files.createParentDirs(tempFile); - ProgressHandle progress = ProgressHandleFactory.createHandle("extracting temporary file " + file.getName()); + ProgressHandle progress = ProgressHandleFactory.createHandle(NbBundle.getMessage(VideoUtils.class, "VideoUtils.genVideoThumb.progress.text", file.getName())); progress.start(100); try { ContentUtils.writeToFile(file, tempFile, progress, null, true); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index fcce21eaaa..4a62a26b2c 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -416,6 +416,6 @@ public class BlackboardArtifactNode extends DisplayableItemNode { @Override public String getItemType() { - return "BlackboardArtifact"; + return "BlackboardArtifact"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactTagNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactTagNode.java index 64868e4dd1..f9e27a8969 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactTagNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactTagNode.java @@ -110,6 +110,6 @@ public class BlackboardArtifactTagNode extends DisplayableItemNode { @Override public String getItemType() { - return "BlackboardArtifactTag"; + return "BlackboardArtifactTag"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java index 669214eb8c..9c92e82958 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java @@ -124,6 +124,6 @@ class ContentTagNode extends DisplayableItemNode { @Override public String getItemType() { - return "ContentTag"; + return "ContentTag"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DataSourcesNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/DataSourcesNode.java index 6669afbfc7..eb0af9c01c 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DataSourcesNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DataSourcesNode.java @@ -58,7 +58,7 @@ public class DataSourcesNode extends DisplayableItemNode { @Override public String getItemType() { - return "DataSources"; + return "DataSources"; //NON-NLS } /* diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java index a1bcfe3168..b1ffc42918 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java @@ -149,7 +149,7 @@ public class DeletedContent implements AutopsyVisitableItem { @Override public String getItemType() { - return "DeletedContent"; + return "DeletedContent"; //NON-NLS } } @@ -282,7 +282,7 @@ public class DeletedContent implements AutopsyVisitableItem { @Override public String getItemType() { - return "DeletedContentChildren"; + return "DeletedContentChildren"; //NON-NLS } // update the display name when new events are fired diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java index cf8e88c7b3..baf0b51966 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java @@ -103,6 +103,6 @@ public class DirectoryNode extends AbstractFsContentNode { @Override public String getItemType() { - return "Directory"; + return "Directory"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/EmailExtracted.java b/Core/src/org/sleuthkit/autopsy/datamodel/EmailExtracted.java index cb87b1fa53..a21ceecc2e 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/EmailExtracted.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/EmailExtracted.java @@ -193,7 +193,7 @@ public class EmailExtracted implements AutopsyVisitableItem { @Override public String getItemType() { - return "EmailExtractedRoot"; + return "EmailExtractedRoot"; //NON-NLS } } @@ -348,7 +348,7 @@ public class EmailExtracted implements AutopsyVisitableItem { @Override public String getItemType() { - return "EmailExtractedAccount"; + return "EmailExtractedAccount"; //NON-NLS } } @@ -439,7 +439,7 @@ public class EmailExtracted implements AutopsyVisitableItem { @Override public String getItemType() { - return "EmailExtractedFolder"; + return "EmailExtractedFolder"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java index 2e03c39a03..5c38965bb6 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java @@ -85,7 +85,7 @@ public class ExtractedContent implements AutopsyVisitableItem { } static String getIconFilePath(int typeID) { - String filePath = "org/sleuthkit/autopsy/images/"; + String filePath = "org/sleuthkit/autopsy/images/"; //NON-NLS if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID()) { return filePath + "bookmarks.png"; //NON-NLS } else if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()) { @@ -185,7 +185,7 @@ public class ExtractedContent implements AutopsyVisitableItem { @Override public String getItemType() { - return "ExtractedContentRoot"; + return "ExtractedContentRoot"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java index 53c9270494..036e6a2de0 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java @@ -186,6 +186,6 @@ public class FileNode extends AbstractFsContentNode { @Override public String getItemType() { - return "File"; + return "File"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileSize.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileSize.java index 587037fb24..9acf789592 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileSize.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileSize.java @@ -146,7 +146,7 @@ public class FileSize implements AutopsyVisitableItem { @Override public String getItemType() { - return "FileSizeRoot"; + return "FileSizeRoot"; //NON-NLS } } @@ -288,7 +288,7 @@ public class FileSize implements AutopsyVisitableItem { @Override public String getItemType() { - return "FileSize"; + return "FileSize"; //NON-NLS } // update the display name when new events are fired diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeNode.java index d2cb20d2c6..04102bfead 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeNode.java @@ -84,7 +84,7 @@ public class FileTypeNode extends DisplayableItemNode { @Override public String getItemType() { - return "FileType"; + return "FileType"; //NON-NLS } // update the display name when new events are fired diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypesNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypesNode.java index 24e7cd18f5..2240d4ca24 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypesNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypesNode.java @@ -107,12 +107,12 @@ public class FileTypesNode extends DisplayableItemNode { @Override public String getItemType() { if(filter == null) - return "FileTypes"; + return "FileTypes"; //NON-NLS if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_DOCUMENT_FILTER)) - return "FileTypesDoc"; + return "FileTypesDoc"; //NON-NLS if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_EXECUTABLE_FILTER)) - return "FileTypesExe"; - return "FileTypes"; + return "FileTypesExe"; //NON-NLS + return "FileTypes"; //NON-NLS } /** diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java b/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java index 60855fe8a0..6e4503bec0 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java @@ -171,7 +171,7 @@ public class HashsetHits implements AutopsyVisitableItem { @Override public String getItemType() { - return "HashsetRoot"; + return "HashsetRoot"; //NON-NLS } } @@ -329,7 +329,7 @@ public class HashsetHits implements AutopsyVisitableItem { @Override public String getItemType() { - return "HashsetName"; + return "HashsetName"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ImageNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ImageNode.java index 49ec5214c9..bdf90c2e8b 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ImageNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ImageNode.java @@ -112,6 +112,6 @@ public class ImageNode extends AbstractContentNode { @Override public String getItemType() { - return "Image"; + return "Image"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java b/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java index e69dfd75b5..acc9013158 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java @@ -164,7 +164,7 @@ public class InterestingHits implements AutopsyVisitableItem { @Override public String getItemType() { - return "InterestingHitsRoot"; + return "InterestingHitsRoot"; //NON-NLS } } @@ -315,7 +315,7 @@ public class InterestingHits implements AutopsyVisitableItem { @Override public String getItemType() { - return "InterestingHitsSetName"; + return "InterestingHitsSetName"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java b/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java index 77be04dd6d..9a1290bc29 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java @@ -242,7 +242,7 @@ public class KeywordHits implements AutopsyVisitableItem { @Override public String getItemType() { - return "KeywordRoot"; + return "KeywordRoot"; //NON-NLS } } @@ -397,7 +397,7 @@ public class KeywordHits implements AutopsyVisitableItem { @Override public String getItemType() { - return "KeywordList"; + return "KeywordList"; //NON-NLS } } @@ -495,7 +495,7 @@ public class KeywordHits implements AutopsyVisitableItem { @Override public String getItemType() { - return "KeywordTerm"; + return "KeywordTerm"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java index ef6ab09c02..575695dbe7 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java @@ -40,7 +40,7 @@ public class LayoutFileNode extends AbstractAbstractFileNode { @Override public String getItemType() { - return "LayoutFile"; + return "LayoutFile"; //NON-NLS } public static enum LayoutContentPropertyType { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java index 04c542bfc7..3956bb93ac 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java @@ -118,6 +118,6 @@ public class LocalFileNode extends AbstractAbstractFileNode { @Override public String getItemType() { - return "LocalFile"; + return "LocalFile"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterNode.java index 832d385cfe..0d7d503c10 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterNode.java @@ -85,6 +85,6 @@ public class RecentFilesFilterNode extends DisplayableItemNode { @Override public String getItemType() { - return "RecentFilesFilter"; + return "RecentFilesFilter"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesNode.java index 8fcb72d7cb..dd2501e19b 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesNode.java @@ -68,6 +68,6 @@ public class RecentFilesNode extends DisplayableItemNode { @Override public String getItemType() { - return "RecentFiles"; + return "RecentFiles"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/Reports.java b/Core/src/org/sleuthkit/autopsy/datamodel/Reports.java index bcf5d7b266..327fdf1270 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/Reports.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/Reports.java @@ -91,7 +91,7 @@ public final class Reports implements AutopsyVisitableItem { @Override public String getItemType() { - return "ReportsList"; + return "ReportsList"; //NON-NLS } } @@ -216,7 +216,7 @@ public final class Reports implements AutopsyVisitableItem { @Override public String getItemType() { - return "Reports"; + return "Reports"; //NON-NLS } private static class DeleteReportAction extends AbstractAction { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java index 46e4853e0b..7f761f2b05 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java @@ -71,6 +71,6 @@ public class ResultsNode extends DisplayableItemNode { @Override public String getItemType() { - return "Results"; + return "Results"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java b/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java index 1b013baf5c..a9eabeccc6 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java @@ -111,7 +111,7 @@ public class Tags implements AutopsyVisitableItem { @Override public String getItemType() { - return "TagsRoots"; + return "TagsRoots"; //NON-NLS } } @@ -273,7 +273,7 @@ public class Tags implements AutopsyVisitableItem { @Override public String getItemType() { - return "TagsName"; + return "TagsName"; //NON-NLS } } @@ -373,7 +373,7 @@ public class Tags implements AutopsyVisitableItem { @Override public String getItemType() { - return "TagsContentType"; + return "TagsContentType"; //NON-NLS } } @@ -471,7 +471,7 @@ public class Tags implements AutopsyVisitableItem { @Override public String getItemType() { - return "TagsBlackboardArtifact"; + return "TagsBlackboardArtifact"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ViewsNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ViewsNode.java index 08c2e6b806..25314fbc00 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ViewsNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ViewsNode.java @@ -75,6 +75,6 @@ public class ViewsNode extends DisplayableItemNode { @Override public String getItemType() { - return "Views"; + return "Views"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java index 5900487444..de5c23a0d0 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java @@ -151,6 +151,6 @@ public class VirtualDirectoryNode extends AbstractAbstractFileNode { @Override public String getItemType() { - return "Volume"; + return "Volume"; //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/events/LocalEventPublisher.java b/Core/src/org/sleuthkit/autopsy/events/LocalEventPublisher.java index 3972bed895..fea68754e5 100644 --- a/Core/src/org/sleuthkit/autopsy/events/LocalEventPublisher.java +++ b/Core/src/org/sleuthkit/autopsy/events/LocalEventPublisher.java @@ -107,7 +107,7 @@ final class LocalEventPublisher { try { subscriber.propertyChange(event); } catch (Exception ex) { - logger.log(Level.SEVERE, "Exception thrown by subscriber", ex); + logger.log(Level.SEVERE, "Exception thrown by subscriber", ex); //NON-NLS } } } diff --git a/Core/src/org/sleuthkit/autopsy/events/MessageServiceConnectionInfo.java b/Core/src/org/sleuthkit/autopsy/events/MessageServiceConnectionInfo.java index 487e06c61f..9db745b09b 100644 --- a/Core/src/org/sleuthkit/autopsy/events/MessageServiceConnectionInfo.java +++ b/Core/src/org/sleuthkit/autopsy/events/MessageServiceConnectionInfo.java @@ -35,10 +35,10 @@ import org.openide.util.NbBundle; @Immutable public final class MessageServiceConnectionInfo { - private static final String MESSAGE_SERVICE_URI = "tcp://%s:%s?wireFormat.maxInactivityDuration=0"; - private static final String CONNECTION_TIMED_OUT = "connection timed out"; - private static final String CONNECTION_REFUSED = "connection refused"; - private static final String PASSWORD_OR_USERNAME_BAD = "user name ["; + private static final String MESSAGE_SERVICE_URI = "tcp://%s:%s?wireFormat.maxInactivityDuration=0"; //NON-NLS + private static final String CONNECTION_TIMED_OUT = "connection timed out"; //NON-NLS + private static final String CONNECTION_REFUSED = "connection refused"; //NON-NLS + private static final String PASSWORD_OR_USERNAME_BAD = "user name ["; //NON-NLS private static final int IS_REACHABLE_TIMEOUT_MS = 1000; private final String userName; private final String password; diff --git a/Core/src/org/sleuthkit/autopsy/events/RemoteEventPublisher.java b/Core/src/org/sleuthkit/autopsy/events/RemoteEventPublisher.java index 58a567e415..6a83f2ef32 100644 --- a/Core/src/org/sleuthkit/autopsy/events/RemoteEventPublisher.java +++ b/Core/src/org/sleuthkit/autopsy/events/RemoteEventPublisher.java @@ -43,7 +43,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; final class RemoteEventPublisher { private static final Logger logger = Logger.getLogger(RemoteEventPublisher.class.getName()); - private static final String ALL_MESSAGE_SELECTOR = "All"; + private static final String ALL_MESSAGE_SELECTOR = "All"; //NON-NLS private final LocalEventPublisher localPublisher; private final Connection connection; private final Session session; @@ -76,11 +76,11 @@ final class RemoteEventPublisher { Topic topic = session.createTopic(eventChannelName); producer = session.createProducer(topic); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); - consumer = session.createConsumer(topic, "events = '" + ALL_MESSAGE_SELECTOR + "'", true); + consumer = session.createConsumer(topic, "events = '" + ALL_MESSAGE_SELECTOR + "'", true); //NON-NLS receiver = new MessageReceiver(); consumer.setMessageListener(receiver); } catch (URISyntaxException | JMSException ex) { - logger.log(Level.SEVERE, "Failed to connect to event channel", ex); + logger.log(Level.SEVERE, "Failed to connect to event channel", ex); //NON-NLS try { stop(); } catch (JMSException ignored) { @@ -121,7 +121,7 @@ final class RemoteEventPublisher { */ synchronized void publish(AutopsyEvent event) throws JMSException { ObjectMessage message = session.createObjectMessage(); - message.setStringProperty("events", ALL_MESSAGE_SELECTOR); + message.setStringProperty("events", ALL_MESSAGE_SELECTOR); //NON-NLS message.setObject(event); producer.send(message); } @@ -151,7 +151,7 @@ final class RemoteEventPublisher { } } } catch (Exception ex) { - logger.log(Level.SEVERE, "Error receiving message", ex); + logger.log(Level.SEVERE, "Error receiving message", ex); //NON-NLS } } } diff --git a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java index 568f45f680..f2f7f39797 100644 --- a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java +++ b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java @@ -148,19 +148,19 @@ public final class ExternalResultsImporter { if (attributeType == null) { switch (attributeData.getValueType()) { case "text": //NON-NLS - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("String"), attributeData.getType()); + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("String"), attributeData.getType()); //NON-NLS break; case "int32": //NON-NLS - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Integer"), attributeData.getType()); + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Integer"), attributeData.getType()); //NON-NLS break; case "int64": //NON-NLS - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Long"), attributeData.getType()); + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Long"), attributeData.getType()); //NON-NLS break; case "double": //NON-NLS - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Double"), attributeData.getType()); + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Double"), attributeData.getType()); //NON-NLS break; - case "datetime": - attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("DateTime"), attributeData.getType()); + case "datetime": //NON-NLS + attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("DateTime"), attributeData.getType()); //NON-NLS } } @@ -180,7 +180,7 @@ public final class ExternalResultsImporter { double doubleValue = Double.parseDouble(attributeData.getValue()); attributes.add(new BlackboardAttribute(attributeType, attributeData.getSourceModule(), doubleValue)); break; - case "datetime": + case "datetime": //NON-NLS long dateTimeValue = Long.parseLong(attributeData.getValue()); attributes.add(new BlackboardAttribute(attributeType, attributeData.getSourceModule(), dateTimeValue)); break; diff --git a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsXMLParser.java b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsXMLParser.java index 5bcfc51dc1..8443e6b71a 100644 --- a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsXMLParser.java +++ b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsXMLParser.java @@ -101,7 +101,7 @@ public final class ExternalResultsXMLParser implements ExternalResultsParser { VALUE_TYPE_INT32("int32"), //NON-NLS VALUE_TYPE_INT64("int64"), //NON-NLS VALUE_TYPE_DOUBLE("double"), //NON-NLS - VALUE_TYPE_DATETIME("datetime"); + VALUE_TYPE_DATETIME("datetime"); //NON-NLS private final String text; private AttributeValues(final String text) { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties index 309fbab41b..ba1e445d8a 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties @@ -109,3 +109,11 @@ IngestManager.cancellingIngest.msgDlg.text=Cancelling all currently running inge IngestManager.serviceIsDown.msgDlg.text={0} is down RunIngestSubMenu.menuItem.empty=-Empty- RunIngestModulesMenu.getName.text=Run Ingest Modules +DataSourceIngestPipeline.moduleError.title.text={0} Error +FileIngestPipeline.moduleError.title.text={0} Error +IngestJob.cancelReason.notCancelled.text=Not cancelled +IngestJob.cancelReason.cancelledByUser.text=Cancelled by user +IngestJob.cancelReason.ingestModStartFail.text=Ingest modules startup failed +IngestJob.cancelReason.outOfDiskSpace.text=Out of disk space +IngestJob.cancelReason.servicesDown.text=Not cancelled +IngestJob.cancelReason.caseClosed.text=Case closed diff --git a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java index a84f262988..2004674df7 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java @@ -360,10 +360,10 @@ final class DataSourceIngestJob { List errors = startUpIngestPipelines(); if (errors.isEmpty()) { if (this.hasFirstStageDataSourceIngestPipeline() || this.hasFileIngestPipeline()) { - logger.log(Level.INFO, "Starting first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Starting first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS this.startFirstStage(); } else if (this.hasSecondStageDataSourceIngestPipeline()) { - logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1}), no first stage configured", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1}), no first stage configured", new Object[]{dataSource.getName(), this.id}); //NON-NLS this.startSecondStage(); } } @@ -450,13 +450,13 @@ final class DataSourceIngestJob { * Schedule the first stage tasks. */ if (this.hasFirstStageDataSourceIngestPipeline() && this.hasFileIngestPipeline()) { - logger.log(Level.INFO, "Scheduling first stage data source and file level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Scheduling first stage data source and file level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS DataSourceIngestJob.taskScheduler.scheduleIngestTasks(this); } else if (this.hasFirstStageDataSourceIngestPipeline()) { - logger.log(Level.INFO, "Scheduling first stage data source level analysis tasks for {0} (jobId={1}), no file level analysis configured", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Scheduling first stage data source level analysis tasks for {0} (jobId={1}), no file level analysis configured", new Object[]{dataSource.getName(), this.id}); //NON-NLS DataSourceIngestJob.taskScheduler.scheduleDataSourceIngestTask(this); } else { - logger.log(Level.INFO, "Scheduling file level analysis tasks for {0} (jobId={1}), no first stage data source level analysis configured", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Scheduling file level analysis tasks for {0} (jobId={1}), no first stage data source level analysis configured", new Object[]{dataSource.getName(), this.id}); //NON-NLS DataSourceIngestJob.taskScheduler.scheduleFileIngestTasks(this); /** @@ -475,7 +475,7 @@ final class DataSourceIngestJob { * Starts the second stage of this ingest job. */ private void startSecondStage() { - logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS this.stage = DataSourceIngestJob.Stages.SECOND; if (this.doUI) { this.startDataSourceIngestProgressBar(); @@ -483,7 +483,7 @@ final class DataSourceIngestJob { synchronized (this.dataSourceIngestPipelineLock) { this.currentDataSourceIngestPipeline = this.secondStageDataSourceIngestPipeline; } - logger.log(Level.INFO, "Scheduling second stage data source level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Scheduling second stage data source level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS DataSourceIngestJob.taskScheduler.scheduleDataSourceIngestTask(this); } @@ -572,7 +572,7 @@ final class DataSourceIngestJob { * job and starts the second stage, if appropriate. */ private void finishFirstStage() { - logger.log(Level.INFO, "Finished first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Finished first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS // Shut down the file ingest pipelines. Note that no shut down is // required for the data source ingest pipeline because data source @@ -622,7 +622,7 @@ final class DataSourceIngestJob { * Shuts down the ingest pipelines and progress bars for this job. */ private void finish() { - logger.log(Level.INFO, "Finished analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); + logger.log(Level.INFO, "Finished analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS this.stage = DataSourceIngestJob.Stages.FINALIZATION; if (this.doUI) { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java index c10d1436d2..4c27c201d5 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java @@ -109,9 +109,9 @@ final class DataSourceIngestPipeline { this.job.updateDataSourceIngestProgressBarDisplayName(displayName); this.job.switchDataSourceIngestProgressBarToIndeterminate(); DataSourceIngestPipeline.ingestManager.setIngestTaskProgress(task, module.getDisplayName()); - logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) starting", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); + logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) starting", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); //NON-NLS module.process(dataSource, new DataSourceIngestModuleProgress(this.job)); - logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) finished", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); + logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) finished", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); //NON-NLS } catch (Throwable ex) { // Catch-all exception firewall errors.add(new IngestModuleError(module.getDisplayName(), ex)); String msg = ex.getMessage(); @@ -119,7 +119,7 @@ final class DataSourceIngestPipeline { if (msg == null) { msg = ex.toString(); } - MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); + MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "DataSourceIngestPipeline.moduleError.title.text", module.getDisplayName()), msg); } if (this.job.isCancelled()) { break; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java index 251e0bbf08..9f1cc0aaa5 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java @@ -21,6 +21,8 @@ package org.sleuthkit.autopsy.ingest; import java.util.ArrayList; import java.util.Date; import java.util.List; + +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.datamodel.AbstractFile; @@ -128,7 +130,7 @@ final class FileIngestPipeline { if (msg == null) { msg = ex.toString(); } - MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); + MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "FileIngestPipeline.moduleError.title.text", module.getDisplayName()), msg); } if (this.job.isCancelled()) { break; @@ -161,7 +163,7 @@ final class FileIngestPipeline { if (msg == null) { msg = ex.toString(); } - MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); + MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "FileIngestPipeline.moduleError.title.text", module.getDisplayName()), msg); } } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java index 0958eb8d5f..14c0f12430 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java @@ -27,6 +27,8 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; + +import org.openide.util.NbBundle; import org.sleuthkit.datamodel.Content; /** @@ -42,12 +44,12 @@ public final class IngestJob { */ public enum CancellationReason { - NOT_CANCELLED("Not cancelled"), - USER_CANCELLED("Cancelled by user"), - INGEST_MODULES_STARTUP_FAILED("Ingest modules startup failed"), - OUT_OF_DISK_SPACE("Out of disk space"), - SERVICES_DOWN("Not cancelled"), - CASE_CLOSED("Case closed"); + NOT_CANCELLED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.notCancelled.text")), + USER_CANCELLED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.cancelledByUser.text")), + INGEST_MODULES_STARTUP_FAILED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.ingestModStartFail.text")), + OUT_OF_DISK_SPACE(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.outOfDiskSpace.text")), + SERVICES_DOWN(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.servicesDown.text")), + CASE_CLOSED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.caseClosed.text")); private final String displayName; @@ -128,7 +130,7 @@ public final class IngestJob { synchronized List start() { List errors = new ArrayList<>(); if (started) { - errors.add(new IngestModuleError("IngestJob", new IllegalStateException("Job already started"))); + errors.add(new IngestModuleError("IngestJob", new IllegalStateException("Job already started"))); //NON-NLS return errors; } started = true; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java index 98a307d544..de15f82949 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java @@ -55,7 +55,7 @@ public class IngestJobSettings { private final String executionContext; private final IngestType ingestType; private String moduleSettingsFolderPath; - private static final CharSequence pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1); + private static final CharSequence pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1); //NON-NLS private final List moduleTemplates; private boolean processUnallocatedSpace; private final List warnings; @@ -337,7 +337,7 @@ public class IngestJobSettings { moduleNames.add("E01 Verifier"); //NON-NLS break; case "Archive Extractor": //NON-NLS - moduleNames.add("Embedded File Extractor"); + moduleNames.add("Embedded File Extractor"); //NON-NLS break; default: moduleNames.add(name); @@ -454,7 +454,7 @@ public class IngestJobSettings { if (isPythonModuleSettingsFile(moduleSettingsFilePath)) { // compiled python modules have variable instance number as a part of their file name. // This block of code gets rid of that variable instance number and helps maitains constant module name over multiple runs. - moduleSettingsFilePath = moduleSettingsFilePath.replaceAll("[$][\\d]+.settings$", "\\$.settings"); + moduleSettingsFilePath = moduleSettingsFilePath.replaceAll("[$][\\d]+.settings$", "\\$.settings"); //NON-NLS NON-NLS } try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(moduleSettingsFilePath))) { out.writeObject(settings); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index 926ad71d78..f528cba6e6 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -106,8 +106,8 @@ public class IngestManager { private int numberOfFileIngestThreads; private final ExecutorService fileIngestThreadPool; - private static final String JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"; - private static final String MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"; + private static final String JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"; //NON-NLS + private static final String MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"; //NON-NLS private static final Set jobEventNames = Stream.of(IngestJobEvent.values()) .map(IngestJobEvent::toString) .collect(Collectors.toSet()); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java index 1a895d9b92..f1cad5531c 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java @@ -64,7 +64,7 @@ public final class IngestMonitor { MONITOR_LOGGER.setUseParentHandlers(false); MONITOR_LOGGER.addHandler(monitorLogHandler); } catch (IOException | SecurityException ex) { - logger.log(Level.SEVERE, "Failed to create memory usage logger", ex); + logger.log(Level.SEVERE, "Failed to create memory usage logger", ex); //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestSubMenu.java b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestSubMenu.java index f4db5d47e8..a0472a8f7c 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestSubMenu.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestSubMenu.java @@ -52,7 +52,7 @@ final class RunIngestSubMenu extends JMenuItem implements DynamicMenuContent { // No open Cases, create a disabled empty menu return getEmpty(); } catch (TskCoreException e) { - System.out.println("Exception getting images: " + e.getMessage()); + System.out.println("Exception getting images: " + e.getMessage()); //NON-NLS } JComponent[] comps = new JComponent[images.size()]; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/events/BlackboardPostEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/events/BlackboardPostEvent.java index a63b3893e9..f793e33e07 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/events/BlackboardPostEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/events/BlackboardPostEvent.java @@ -99,7 +99,7 @@ public final class BlackboardPostEvent extends AutopsyEvent implements Serializa eventData = new ModuleDataEvent(data.moduleName, data.artifactTypeId, !artifacts.isEmpty() ? artifacts : null); return eventData; } catch (IllegalStateException | TskCoreException ex) { - logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); + logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS return null; } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/events/ContentChangedEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/events/ContentChangedEvent.java index 3ff37f4be1..7370d90586 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/events/ContentChangedEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/events/ContentChangedEvent.java @@ -89,7 +89,7 @@ public final class ContentChangedEvent extends AutopsyEvent implements Serializa eventData = new ModuleContentEvent(data.moduleName, content); return eventData; } catch (IllegalStateException | TskCoreException ex) { - logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); + logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS return null; } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/events/DataSourceAnalysisEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/events/DataSourceAnalysisEvent.java index f401285044..c508d3e276 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/events/DataSourceAnalysisEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/events/DataSourceAnalysisEvent.java @@ -99,7 +99,7 @@ public abstract class DataSourceAnalysisEvent extends AutopsyEvent implements Se dataSource = Case.getCurrentCase().getSleuthkitCase().getContentById(id); return dataSource; } catch (IllegalStateException | TskCoreException ex) { - logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); + logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS return null; } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/events/FileAnalyzedEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/events/FileAnalyzedEvent.java index ca629bf261..afc8c0a996 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/events/FileAnalyzedEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/events/FileAnalyzedEvent.java @@ -79,7 +79,7 @@ public final class FileAnalyzedEvent extends AutopsyEvent implements Serializabl file = Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(id); return file; } catch (IllegalStateException | TskCoreException ex) { - logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); + logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS return null; } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java index f2b6fc4bce..266bf09469 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java @@ -58,7 +58,7 @@ class CacheLocationAnalyzer { blackboard = Case.getCurrentCase().getServices().getBlackboard(); try { List abstractFiles = fileManager.findFiles(dataSource, "cache.cell"); //NON-NLS - abstractFiles.addAll(fileManager.findFiles(dataSource, "cache.wifi")); + abstractFiles.addAll(fileManager.findFiles(dataSource, "cache.wifi")); //NON-NLS for (AbstractFile abstractFile : abstractFiles) { try { diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties index c91965d14b..3523597a00 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties @@ -38,4 +38,6 @@ EmbeddedFileExtractorIngestModule.ImageExtractor.xlsxContainer.init.err=Xlsx con EmbeddedFileExtractorIngestModule.ImageExtractor.extractImage.addToDB.exception.msg=Unable to add the derived files to the database. EmbeddedFileExtractorIngestModule.ImageExtractor.getOutputFolderPath.exception.msg=Could not get path for image extraction from Abstract File: {0} EmbeddedFileExtractorIngestModule.ImageExtractor.getOutputFolderPath.exception.msg=Could not get path for image extraction from Abstract File: {0} -EmbeddedFileExtractorIngestModule.ArchiveExtractor.UnpackStream.write.noSpace.msg=Unable to write content to disk. Not enough space. \ No newline at end of file +EmbeddedFileExtractorIngestModule.ArchiveExtractor.UnpackStream.write.noSpace.msg=Unable to write content to disk. Not enough space. +SevenZipContentReadStream.seek.exception.invalidOrigin=Invalid origin {0} +SevenZipContentReadStream.read.exception.errReadStream=Error reading stream diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle_ja.properties index 9f25567758..dd4f49b9b6 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle_ja.properties @@ -9,23 +9,3 @@ OpenIDE-Module-Name=7Zip OpenIDE-Module-Short-Description=7Zip\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb SevenZipContentReadStream.seek.exception.invalidOrigin=\u7121\u52b9\u306a\u30b7\u30fc\u30af\u30aa\u30ea\u30b8\u30f3\uff1a {0} SevenZipContentReadStream.read.exception.errReadStream=\u30b3\u30f3\u30c6\u30f3\u30c4\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u8aad\u307f\u53d6\u308a\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -SevenZipIngestModule.moduleName=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a8\u30af\u30b9\u30c8\u30e9\u30af\u30bf\u30fc -SevenZipIngestModule.moduleDesc.text=\u30a2\u30fc\u30ab\u30a4\u30d6\u30d5\u30a1\u30a4\u30eb(zip, rar, arj, 7z, gzip, bzip2, tar)\u3092\u62bd\u51fa\u3057\u3001\u73fe\u5728\u306e\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u306b\u30ea\u30b9\u30b1\u3057\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30c4\u30ea\u30fc\u306b\u65b0\u898f\u30d5\u30a1\u30a4\u30eb\u3092\u6295\u5165\u3057\u307e\u3059\u3002 -SevenZipIngestModule.encryptionFileLevel=\u30d5\u30a1\u30a4\u30eb\u30ec\u30d9\u30eb\u6697\u53f7\u5316 -SevenZipIngestModule.encryptionFull=\u5168\u4f53\u6697\u53f7\u5316 -SevenZipIngestModule.init.errInitModule.msg={0}\u306e\u521d\u671f\u5316\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -SevenZipIngestModule.init.errInitModule.details=\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\: {0}\: {1}\u306e\u521d\u671f\u5316\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -SevenZipIngestModule.init.errCantInitLib=7-Zip\u30e9\u30a4\u30d6\u30e9\u30ea\: {0}\u3092\u521d\u671f\u5316\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f -SevenZipIngestModule.isZipBombCheck.warnMsg=Zip\u7206\u5f3e\u306e\u53ef\u80fd\u6027\u304c\u3042\u308b\u3082\u306e\u304c\u30a2\u30fc\u30ab\u30a4\u30d6\: {0}, item\: {1}\u306b\u691c\u51fa\u3055\u308c\u307e\u3057\u305f -SevenZipIngestModule.isZipBombCheck.warnDetails=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306e\u5727\u7e2e\u7387\u306f{0}\u3001\u3053\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306e\u51e6\u7406\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002{1} -SevenZipIngestModule.unpack.warnMsg.zipBomb=Zip\u7206\u5f3e\u306e\u53ef\u80fd\u6027\u304c\u3042\u308b\u3082\u306e\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\uff1a {0} -SevenZipIngestModule.unpack.warnDetails.zipBomb=\u30a2\u30fc\u30ab\u30a4\u30d6\u306f {0}\u30ec\u30d9\u30eb\u306e\u6df1\u3055\u3067\u3059\u3001\u3053\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3068\u305d\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u51e6\u7406\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059 {1} -SevenZipIngestModule.unpack.unknownPath.msg=\u30a2\u30fc\u30ab\u30a4\u30d6\: {0}\u306b\u4e0d\u660e\u306e\u30a2\u30a4\u30c6\u30e0\u30d1\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3001{1}\u3092\u4f7f\u7528\u3057\u307e\u3059 -SevenZipIngestModule.unpack.notEnoughDiskSpace.msg=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\: {0}, {1}\u3092\u89e3\u51cd\u3059\u308b\u306e\u306b\u5341\u5206\u306a\u30c7\u30a3\u30b9\u30af\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093 -SevenZipIngestModule.unpack.notEnoughDiskSpace.details=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306f\u89e3\u51cd\u3059\u308b\u306e\u306b\u5927\u304d\u3059\u304e\u307e\u3059\u3001\u3053\u306e\u30a2\u30a4\u30c6\u30e0\u306e\u89e3\u51cd\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002 -SevenZipIngestModule.unpack.errUnpacking.msg={0}\u89e3\u51cd\u30a8\u30e9\u30fc -SevenZipIngestModule.unpack.errUnpacking.details={0}. {1}\u306e\u89e3\u51cd\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -SevenZipIngestModule.unpack.encrFileDetected.msg=\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u6697\u53f7\u5316\u30d5\u30a1\u30a4\u30eb\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002 -SevenZipIngestModule.unpack.encrFileDetected.details=\u30a2\u30fc\u30ab\u30a4\u30d6\: {0}\u306e\u4e00\u90e8\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u6697\u53f7\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002{1}\u30a8\u30af\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u306f\u3053\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u304b\u3089\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -SevenZipIngestModule.UnpackStream.write.exception.msg=\u89e3\u51cd\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u4e0b\u8a18\u3078\u306e\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\: {0} -SevenZipIngestModule.UnpackedTree.exception.msg=\u6d3e\u751f\u30d5\u30a1\u30a4\u30eb\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\:{0}\u306b\u8ffd\u52a0\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/ImageExtractor.java b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/ImageExtractor.java index 12550f4601..c916aa7f55 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/ImageExtractor.java +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/ImageExtractor.java @@ -57,7 +57,7 @@ class ImageExtractor { private static final Logger logger = Logger.getLogger(ImageExtractor.class.getName()); private final IngestJobContext context; private String parentFileName; - private final String UNKNOWN_NAME_PREFIX = "image_"; + private final String UNKNOWN_NAME_PREFIX = "image_"; //NON-NLS private final FileTypeDetector fileTypeDetector; private String moduleDirRelative; @@ -68,12 +68,12 @@ class ImageExtractor { */ enum SupportedImageExtractionFormats { - DOC("application/msword"), - DOCX("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), - PPT("application/vnd.ms-powerpoint"), - PPTX("application/vnd.openxmlformats-officedocument.presentationml.presentation"), - XLS("application/vnd.ms-excel"), - XLSX("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + DOC("application/msword"), //NON-NLS + DOCX("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), //NON-NLS + PPT("application/vnd.ms-powerpoint"), //NON-NLS + PPTX("application/vnd.openxmlformats-officedocument.presentationml.presentation"), //NON-NLS + XLS("application/vnd.ms-excel"), //NON-NLS + XLSX("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); //NON-NLS private final String mimeType; @@ -266,7 +266,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } listOfExtractedImages = new ArrayList<>(); @@ -309,7 +309,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } @@ -379,7 +379,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } @@ -428,7 +428,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } @@ -473,7 +473,7 @@ class ImageExtractor { outputFolderPath = getOutputFolderPath(this.parentFileName); } if (outputFolderPath == null) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); + logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS return null; } diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java index e739a6db34..44052df224 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java @@ -99,13 +99,13 @@ class SevenZipExtractor { */ private enum SupportedArchiveExtractionFormats { - ZIP("application/zip"), - SEVENZ("application/x-7z-compressed"), - GZIP("application/gzip"), - XGZIP("application/x-gzip"), - XBZIP2("application/x-bzip2"), - XTAR("application/x-tar"), - XGTAR("application/x-gtar"); + ZIP("application/zip"), //NON-NLS + SEVENZ("application/x-7z-compressed"), //NON-NLS + GZIP("application/gzip"), //NON-NLS + XGZIP("application/x-gzip"), //NON-NLS + XBZIP2("application/x-bzip2"), //NON-NLS + XTAR("application/x-tar"), //NON-NLS + XGTAR("application/x-gtar"); //NON-NLS private final String mimeType; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties index 44e1664d25..39ce8b000a 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties @@ -294,3 +294,4 @@ SolrConnectionCheck.HostnameOrPort=Invalid hostname and/or port number. SolrConnectionCheck.Hostname=Invalid hostname. SolrConnectionCheck.Port=Invalid port number. SolrConnectionCheck.MissingHostname=Missing hostname. +RawText.getText.error.msg=Error getting text diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownListSearchPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownListSearchPanel.java index 1d91a78dd3..e3d7d6cc85 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownListSearchPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownListSearchPanel.java @@ -119,7 +119,7 @@ class DropdownListSearchPanel extends KeywordSearchPanel { @Override public void propertyChange(PropertyChangeEvent evt) { Object source = evt.getSource(); - if (source instanceof String && ((String) source).equals("LOCAL")) { + if (source instanceof String && ((String) source).equals("LOCAL")) { //NON-NLS EventQueue.invokeLater(new Runnable() { @Override public void run() { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSingleTermSearchPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSingleTermSearchPanel.java index e1f2f1540b..4f5ffe545b 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSingleTermSearchPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSingleTermSearchPanel.java @@ -154,7 +154,7 @@ public class DropdownSingleTermSearchPanel extends KeywordSearchPanel { org.openide.awt.Mnemonics.setLocalizedText(selectAllMenuItem, org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.selectAllMenuItem.text")); // NOI18N rightClickMenu.add(selectAllMenuItem); - keywordTextField.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N + keywordTextField.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N NON-NLS keywordTextField.setText(org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.keywordTextField.text")); // NOI18N keywordTextField.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(192, 192, 192), 1, true)); keywordTextField.setMinimumSize(new java.awt.Dimension(2, 25)); @@ -170,7 +170,7 @@ public class DropdownSingleTermSearchPanel extends KeywordSearchPanel { } }); - searchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/search-icon.png"))); // NOI18N + searchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/search-icon.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.searchButton.text")); // NOI18N searchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java index 87dc6b6f52..f4f2596956 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java @@ -129,7 +129,7 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis @Override public void propertyChange(PropertyChangeEvent evt) { Object source = evt.getSource(); - if (source instanceof String && ((String) source).equals("LOCAL")) { + if (source instanceof String && ((String) source).equals("LOCAL")) { //NON-NLS EventQueue.invokeLater(new Runnable() { @Override public void run() { @@ -294,13 +294,13 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis listOptionsLabel.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.listOptionsLabel.text")); // NOI18N - deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N + deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N NON-NLS deleteListButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.deleteListButton.text")); // NOI18N - saveListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/save16.png"))); // NOI18N + saveListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/save16.png"))); // NOI18N NON-NLS saveListButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.saveListButton.text")); // NOI18N - exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N + exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N NON-NLS exportButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.exportButton.text")); // NOI18N exportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java index 9c276115ce..0433f99e7e 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java @@ -75,7 +75,7 @@ public class KeywordSearch { //do not forward to the parent autopsy logger TIKA_LOGGER.setUseParentHandlers(false); } catch (IOException | SecurityException ex) { - logger.log(Level.SEVERE, "Error setting up tika logging", ex); + logger.log(Level.SEVERE, "Error setting up tika logging", ex); //NON-NLS } } @@ -125,7 +125,7 @@ public class KeywordSearch { server.closeCore(); } catch (Exception ex) { String caseName = closedCase.getName(); - logger.log(Level.SEVERE, String.format("Failed to close core for %s", caseName), ex); + logger.log(Level.SEVERE, String.format("Failed to close core for %s", caseName), ex); //NON-NLS MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.closeCore.notification.msg"), ex.getMessage()); } } @@ -135,7 +135,7 @@ public class KeywordSearch { server.openCoreForCase(openedCase); } catch (Exception ex) { String caseName = openedCase.getName(); - logger.log(Level.SEVERE, String.format("Failed to open or create core for %s", caseName), ex); + logger.log(Level.SEVERE, String.format("Failed to open or create core for %s", caseName), ex); //NON-NLS MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.openCore.notification.msg"), ex.getMessage()); } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RawText.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RawText.java index 540c3c0e21..ed4347fe4f 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RawText.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RawText.java @@ -156,7 +156,7 @@ class RawText implements IndexedText { } catch (SolrServerException | NoOpenCoreException ex) { logger.log(Level.WARNING, "Couldn't get extracted content.", ex); //NON-NLS } - return "Error getting text"; + return NbBundle.getMessage(this.getClass(), "RawText.getText.error.msg"); } @Override diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java index f59c587887..312c600d7a 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java @@ -406,10 +406,10 @@ public class Server { solrProcessBuilder.directory(solrFolder); // Redirect stdout and stderr to files to prevent blocking. - Path solrStdoutPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stdout"); + Path solrStdoutPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stdout"); //NON-NLS solrProcessBuilder.redirectOutput(solrStdoutPath.toFile()); - Path solrStderrPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stderr"); + Path solrStderrPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stderr"); //NON-NLS solrProcessBuilder.redirectError(solrStderrPath.toFile()); logger.log(Level.INFO, "Starting Solr using: {0}", solrProcessBuilder.command()); //NON-NLS diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 7c28a15aff..e86ef70c52 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -46,8 +46,8 @@ import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchServiceException; @ServiceProvider(service = KeywordSearchService.class) public class SolrSearchService implements KeywordSearchService { - private static final String BAD_IP_ADDRESS_FORMAT = "ioexception occurred when talking to server"; - private static final String SERVER_REFUSED_CONNECTION = "server refused connection"; + private static final String BAD_IP_ADDRESS_FORMAT = "ioexception occurred when talking to server"; //NON-NLS + private static final String SERVER_REFUSED_CONNECTION = "server refused connection"; //NON-NLS private static final int IS_REACHABLE_TIMEOUT_MS = 1000; @Override diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java index f01cb02666..c55edc8adc 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java @@ -383,9 +383,9 @@ class ExtractRegistry extends Extract { String value = artnode.getTextContent().trim(); String name = artnode.getAttribute("name"); //NON-NLS - if (name.equals("ProductName")) { // NON_NLS + if (name.equals("ProductName")) { // NON-NLS version = value; - } else if (name.equals("CSDVersion")) { // NON_NLS + } else if (name.equals("CSDVersion")) { // NON-NLS // This is dependant on the fact that ProductName shows up first in the module output version = version + " " + value; } else if (name.equals("SystemRoot")) { //NON-NLS