@Test public void testMadeUpTargetFileNameFix228ExpectOnlyLastExtensionWillBeReplaced() { String madeUpFileName = EncryptOnePm.makeUpTargetFileName("File.ext1.ext2", "/some/path"); assertEquals("/some/path/File.ext1.pgp", madeUpFileName); }
protected static String makeUpTargetFileName(String sourceFileName, String targetBasedPath) { String fileNameOnlyWoPathAndExtension = FilenameUtils.getBaseName(sourceFileName); return targetBasedPath + File.separator + fileNameOnlyWoPathAndExtension + "." + ENCRYPTED_FILE_EXTENSION; }
EncryptOnePm extends PresentationModelBase<EncryptOneHost, String> { protected static String makeUpTargetFileName(String sourceFileName, String targetBasedPath) { String fileNameOnlyWoPathAndExtension = FilenameUtils.getBaseName(sourceFileName); return targetBasedPath + File.separator + fileNameOnlyWoPathAndExtension + "." + ENCRYPTED_FILE_EXTENSION; } }
EncryptOnePm extends PresentationModelBase<EncryptOneHost, String> { protected static String makeUpTargetFileName(String sourceFileName, String targetBasedPath) { String fileNameOnlyWoPathAndExtension = FilenameUtils.getBaseName(sourceFileName); return targetBasedPath + File.separator + fileNameOnlyWoPathAndExtension + "." + ENCRYPTED_FILE_EXTENSION; }  }
EncryptOnePm extends PresentationModelBase<EncryptOneHost, String> { protected static String makeUpTargetFileName(String sourceFileName, String targetBasedPath) { String fileNameOnlyWoPathAndExtension = FilenameUtils.getBaseName(sourceFileName); return targetBasedPath + File.separator + fileNameOnlyWoPathAndExtension + "." + ENCRYPTED_FILE_EXTENSION; }  @Override boolean init(ActionEvent originAction, EncryptOneHost host, String optionalSource); SaveFileChooserDialog getTargetFileChooser(); ExistingFileChooserDialog getSourceFileChooser(); ModelPropertyAccessor<Boolean> getIsDeleteSourceAfter(); ModelPropertyAccessor<Boolean> getIsOpenTargetFolderAfter(); ModelPropertyAccessor<Boolean> getIsUseSameFolder(); ModelMultSelInListProperty<Key> getSelectedRecipients(); ModelPropertyAccessor<String> getSourceFile(); ModelPropertyAccessor<String> getTargetFile(); ModelPropertyAccessor<Boolean> getTargetFileEnabled(); static boolean isItLooksLikeYourSourceFile(String file); ModelPropertyAccessor<Boolean> getIsProgressVisible(); ModelPropertyAccessor<Integer> getProgressValue(); ModelPropertyAccessor<String> getProgressNote(); ModelPropertyAccessor<Boolean> getIsDisableControls(); ModelPropertyAccessor<Boolean> getIsNoPrivateKeysSelected(); }
EncryptOnePm extends PresentationModelBase<EncryptOneHost, String> { protected static String makeUpTargetFileName(String sourceFileName, String targetBasedPath) { String fileNameOnlyWoPathAndExtension = FilenameUtils.getBaseName(sourceFileName); return targetBasedPath + File.separator + fileNameOnlyWoPathAndExtension + "." + ENCRYPTED_FILE_EXTENSION; }  @Override boolean init(ActionEvent originAction, EncryptOneHost host, String optionalSource); SaveFileChooserDialog getTargetFileChooser(); ExistingFileChooserDialog getSourceFileChooser(); ModelPropertyAccessor<Boolean> getIsDeleteSourceAfter(); ModelPropertyAccessor<Boolean> getIsOpenTargetFolderAfter(); ModelPropertyAccessor<Boolean> getIsUseSameFolder(); ModelMultSelInListProperty<Key> getSelectedRecipients(); ModelPropertyAccessor<String> getSourceFile(); ModelPropertyAccessor<String> getTargetFile(); ModelPropertyAccessor<Boolean> getTargetFileEnabled(); static boolean isItLooksLikeYourSourceFile(String file); ModelPropertyAccessor<Boolean> getIsProgressVisible(); ModelPropertyAccessor<Integer> getProgressValue(); ModelPropertyAccessor<String> getProgressNote(); ModelPropertyAccessor<Boolean> getIsDisableControls(); ModelPropertyAccessor<Boolean> getIsNoPrivateKeysSelected();  }