summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-06 12:33:33 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-06 12:33:33 +0200
commite4767bccc7324d4b61a334bf6c0558d0080045e2 (patch)
tree728a5df44f02ca10f760b979873c990cd4c0d265 /pdf-over-gui/src/main/java/at/asit/pdfover/gui
parent3422e5eb2819f5de304f25dc622f5284813bb9b4 (diff)
downloadpdf-over-e4767bccc7324d4b61a334bf6c0558d0080045e2.tar.gz
pdf-over-e4767bccc7324d4b61a334bf6c0558d0080045e2.tar.bz2
pdf-over-e4767bccc7324d4b61a334bf6c0558d0080045e2.zip
remove NON-NLS comments, cleanup whitespace
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java22
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java60
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java58
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java32
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java28
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java74
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java278
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java160
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java54
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java108
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUStatus.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java34
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java36
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java22
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java18
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java10
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java32
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java16
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java10
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java16
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java26
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java58
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java70
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java68
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java64
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java38
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java40
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java98
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java34
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java18
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java20
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java52
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java164
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java108
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java74
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ClickableCanvas.java22
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java52
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarEndButton.java10
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarMiddleButton.java24
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java54
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java58
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/PasswordInputDialog.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java10
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java98
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/LocaleSerializer.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java46
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java10
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java20
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSigner.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSignerImpl.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java20
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java40
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java26
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java70
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java146
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java40
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java48
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java16
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java10
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java10
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java22
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java36
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java70
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java26
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java20
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java26
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java108
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java36
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java24
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java10
115 files changed, 1808 insertions, 1808 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
index 1a9b7830..0ed31443 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
@@ -41,7 +41,7 @@ public class Main {
/**
* @param args
- * @throws IOException
+ * @throws IOException
*/
public static void main(String[] args) throws IOException {
@@ -50,7 +50,7 @@ public class Main {
"running on " + System.getProperty("os.arch") + " " + System.getProperty("os.name") + ", " +
"powered by "+ System.getProperty("java.vendor") + " Java " + System.getProperty("java.version") + ".");
File configDir = new File(Constants.CONFIG_DIRECTORY);
-
+
if (!configDir.exists()) {
configDir.mkdir();
}
@@ -62,19 +62,19 @@ public class Main {
System.setProperty("javax.net.ssl.trustStoreType", "jks");
StateMachineImpl stateMachine = new StateMachineImpl(args);
-
- log.debug("Starting stateMachine ..."); //$NON-NLS-1$
+
+ log.debug("Starting stateMachine ..."); //
stateMachine.start();
-
-
- log.debug("Ended stateMachine ..."); //$NON-NLS-1$
+
+
+ log.debug("Ended stateMachine ..."); //
}
catch (Throwable e) {
-
- log.error("Unhandled error", e); //$NON-NLS-1$
-
+
+ log.error("Unhandled error", e); //
+
JOptionPane.showMessageDialog(null,
- "Error occured " + e.getMessage(), //$NON-NLS-1$
+ "Error occured " + e.getMessage(), //
null, JOptionPane.ERROR_MESSAGE);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
index 6af00889..5c3df2df 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
@@ -132,7 +132,7 @@ public class MainWindow {
*/
public void setTopControl(Control ctrl) {
if(ctrl != null)
- log.debug("Top control: " + ctrl.toString()); //$NON-NLS-1$
+ log.debug("Top control: " + ctrl.toString()); //
this.stack.topControl = ctrl;
this.doLayout();
}
@@ -143,7 +143,7 @@ public class MainWindow {
public void doLayout() {
Control ctrl = this.stack.topControl;
if (this.container.isDisposed()) {
- //Note: if the conainter is disposed, we are finished here
+ //Note: if the conainter is disposed, we are finished here
return;
}
this.container.layout(true, true);
@@ -178,19 +178,19 @@ public class MainWindow {
* Reload the localization
*/
public void reloadLocalization() {
- this.btn_config.setText(Messages.getString("main.configuration")); //$NON-NLS-1$
- this.btn_config.setToolTipText(Messages.getString("main.configuration")); //$NON-NLS-1$
- this.btn_open.setText(Messages.getString("common.open")); //$NON-NLS-1$
- this.btn_open.setToolTipText(Messages.getString("common.open")); //$NON-NLS-1$
+ this.btn_config.setText(Messages.getString("main.configuration")); //
+ this.btn_config.setToolTipText(Messages.getString("main.configuration")); //
+ this.btn_open.setText(Messages.getString("common.open")); //
+ this.btn_open.setToolTipText(Messages.getString("common.open")); //
- this.btn_position.setText(Messages.getString("main.position")); //$NON-NLS-1$
- this.btn_position.setToolTipText(Messages.getString("main.position")); //$NON-NLS-1$
+ this.btn_position.setText(Messages.getString("main.position")); //
+ this.btn_position.setToolTipText(Messages.getString("main.position")); //
- this.btn_sign.setText(Messages.getString("main.signature")); //$NON-NLS-1$
- this.btn_sign.setToolTipText(Messages.getString("main.signature")); //$NON-NLS-1$
+ this.btn_sign.setText(Messages.getString("main.signature")); //
+ this.btn_sign.setToolTipText(Messages.getString("main.signature")); //
- this.btn_end.setText(Messages.getString("main.done")); //$NON-NLS-1$
- this.btn_end.setToolTipText(Messages.getString("main.done")); //$NON-NLS-1$
+ this.btn_end.setText(Messages.getString("main.done")); //
+ this.btn_end.setToolTipText(Messages.getString("main.done")); //
Control ctrl = this.stack.topControl;
if (ctrl instanceof StateComposite) {
@@ -207,8 +207,8 @@ public class MainWindow {
protected void createContents() {
this.shell = new Shell();
getShell().setSize(this.stateMachine.getConfigProvider().getMainWindowSize());
- if (System.getProperty("os.name").toLowerCase().contains("mac")) { //$NON-NLS-1$ //$NON-NLS-2$
- if (System.getProperty("os.name").contains("OS X")) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (System.getProperty("os.name").toLowerCase().contains("mac")) { // //
+ if (System.getProperty("os.name").contains("OS X")) { // //
hookupOSXMenu();
}
}
@@ -222,7 +222,7 @@ public class MainWindow {
bounds.y + (bounds.height - main.height) / 2);
}
catch (SWTError e) {
- log.debug("Cannot get display", e); //$NON-NLS-1$
+ log.debug("Cannot get display", e); //
}
Display.setAppVersion(Constants.APP_VERSION);
getShell().setText(Constants.APP_NAME);
@@ -230,12 +230,12 @@ public class MainWindow {
getShell().addShellListener(new ShellAdapter() {
@Override
public void shellClosed(ShellEvent e) {
- log.debug("Closing main window"); //$NON-NLS-1$
+ log.debug("Closing main window"); //
MainWindow.this.stateMachine.getConfigManipulator().setMainWindowSize(getShell().getSize());
try {
MainWindow.this.stateMachine.getConfigManipulator().saveCurrentConfiguration();
} catch (IOException e1) {
- log.error("Error saving configuration", e); //$NON-NLS-1$
+ log.error("Error saving configuration", e); //
}
}
});
@@ -263,9 +263,9 @@ public class MainWindow {
fd_btn_config.top = new FormAttachment(0);
fd_btn_config.left = new FormAttachment(0);
this.btn_config.setLayoutData(fd_btn_config);
- this.btn_config.setText(Messages.getString("main.configuration")); //$NON-NLS-1$
+ this.btn_config.setText(Messages.getString("main.configuration")); //
this.btn_config
- .setToolTipText(Messages.getString("main.configuration")); //$NON-NLS-1$
+ .setToolTipText(Messages.getString("main.configuration")); //
this.btn_config.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
@@ -299,8 +299,8 @@ public class MainWindow {
fd_btn_open.top = new FormAttachment(0);
fd_btn_open.bottom = new FormAttachment(100);
this.btn_open.setLayoutData(fd_btn_open);
- this.btn_open.setText(Messages.getString("common.open")); //$NON-NLS-1$
- this.btn_open.setToolTipText(Messages.getString("common.open")); //$NON-NLS-1$
+ this.btn_open.setText(Messages.getString("common.open")); //
+ this.btn_open.setToolTipText(Messages.getString("common.open")); //
this.btn_open.addMouseListener(new MouseAdapter() {
@Override
@@ -323,8 +323,8 @@ public class MainWindow {
fd_btn_position.top = new FormAttachment(0);
fd_btn_position.bottom = new FormAttachment(100);
this.btn_position.setLayoutData(fd_btn_position);
- this.btn_position.setText(Messages.getString("main.position")); //$NON-NLS-1$
- this.btn_position.setToolTipText(Messages.getString("main.position")); //$NON-NLS-1$
+ this.btn_position.setText(Messages.getString("main.position")); //
+ this.btn_position.setToolTipText(Messages.getString("main.position")); //
this.btn_position.addMouseListener(new MouseAdapter() {
@Override
@@ -342,8 +342,8 @@ public class MainWindow {
fd_btn_sign.top = new FormAttachment(0);
fd_btn_sign.bottom = new FormAttachment(100);
this.btn_sign.setLayoutData(fd_btn_sign);
- this.btn_sign.setText(Messages.getString("main.signature")); //$NON-NLS-1$
- this.btn_sign.setToolTipText(Messages.getString("main.signature")); //$NON-NLS-1$
+ this.btn_sign.setText(Messages.getString("main.signature")); //
+ this.btn_sign.setToolTipText(Messages.getString("main.signature")); //
this.btn_sign.addMouseListener(new MouseAdapter() {
@Override
@@ -361,8 +361,8 @@ public class MainWindow {
fd_btn_end.top = new FormAttachment(0);
fd_btn_end.bottom = new FormAttachment(100);
this.btn_end.setLayoutData(fd_btn_end);
- this.btn_end.setText(Messages.getString("main.done")); //$NON-NLS-1$
- this.btn_end.setToolTipText(Messages.getString("main.done")); //$NON-NLS-1$
+ this.btn_end.setText(Messages.getString("main.done")); //
+ this.btn_end.setToolTipText(Messages.getString("main.done")); //
this.buttonMap.put(Buttons.FINAL, this.btn_end);
this.container = new Composite(getShell(), SWT.RESIZE);
@@ -380,7 +380,7 @@ public class MainWindow {
* Hook up SWT menu under OS X
*/
private void hookupOSXMenu() {
- log.debug("Hooking up OS X menu"); //$NON-NLS-1$
+ log.debug("Hooking up OS X menu"); //
CocoaUIEnhancer.hookApplicationMenu(getShell().getDisplay(), new Listener() {
@Override
public void handleEvent(Event arg0) {
@@ -390,7 +390,7 @@ public class MainWindow {
@Override
public void handleEvent(Event arg0) {
Dialog dialog = new Dialog(getShell(),
- String.format(Messages.getString("main.about"), Constants.APP_NAME), //$NON-NLS-1$
+ String.format(Messages.getString("main.about"), Constants.APP_NAME), //
Constants.APP_NAME_VERSION, BUTTONS.OK, ICON.INFORMATION);
dialog.open();
}
@@ -410,7 +410,7 @@ public class MainWindow {
MainWindowBehavior behavior = this.stateMachine.getStatus()
.getBehavior();
- log.debug("Updating MainWindow state for : " //$NON-NLS-1$
+ log.debug("Updating MainWindow state for : " //
+ this.stateMachine.getStatus().getCurrentState().toString());
for (Buttons button : Buttons.values()) {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java
index b48dbba8..ee78b628 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java
@@ -28,19 +28,19 @@ public class MainWindowBehavior {
* Enabled buttons map
*/
protected Map<Buttons, Boolean> buttonsEnabled;
-
+
/**
* active buttons map
*/
protected Map<Buttons, Boolean> buttonsActive;
-
+
/**
* Main bar visible
*/
protected boolean mainBarVisible;
/**
- *
+ *
*/
public MainWindowBehavior() {
this.buttonsActive = new EnumMap<MainWindow.Buttons, Boolean>(MainWindow.Buttons.class);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
index 6705aae7..87dca1c3 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
@@ -36,7 +36,7 @@ import org.eclipse.swt.widgets.Label;
/**
- *
+ *
*/
public class PlaceholderSelectionGui extends Dialog {
/**
@@ -45,27 +45,27 @@ public class PlaceholderSelectionGui extends Dialog {
private static final Logger log = LoggerFactory.getLogger(PlaceholderSelectionGui.class);
protected Object result;
protected Shell shlInfo;
- protected Combo placeholderNameDropDown;
- protected String lblString;
+ protected Combo placeholderNameDropDown;
+ protected String lblString;
protected List<String> placeholderList;
private Button btnCancel;
private Button btnOk;
- protected int returnValue;
-
+ protected int returnValue;
+
/**
* Create the dialog.
* @param parent
* @param style
- * @param text
- * @param lblString
- * @param placeholderList
+ * @param text
+ * @param lblString
+ * @param placeholderList
*/
public PlaceholderSelectionGui(Shell parent, int style, String text, String lblString, List<String> placeholderList) {
super(parent, style);
setText(text);
- this.lblString = lblString;
- this.placeholderList = placeholderList;
+ this.lblString = lblString;
+ this.placeholderList = placeholderList;
}
/**
@@ -85,7 +85,7 @@ public class PlaceholderSelectionGui extends Dialog {
}
return this.returnValue;
}
-
+
/**
* @return
*/
@@ -99,48 +99,48 @@ public class PlaceholderSelectionGui extends Dialog {
private void createContents() {
this.shlInfo = new Shell(getParent(), getStyle());
this.shlInfo.setSize(290, 195);
- this.shlInfo.setText("Info"); //$NON-NLS-1$
+ this.shlInfo.setText("Info"); //
this.shlInfo.setLayout(null);
-
+
this.placeholderNameDropDown = new Combo(this.shlInfo, SWT.NONE);
this.placeholderNameDropDown.setBounds(27, 77, 223, 23);
addDropDownEntries(this.placeholderList);
this.placeholderNameDropDown.select(0);
-
+
this.btnCancel = new Button(this.shlInfo, SWT.NONE);
this.btnCancel.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
-
-
+
+
PlaceholderSelectionGui.this.returnValue = -1;
PlaceholderSelectionGui.this.shlInfo.dispose();
-
+
}
});
this.btnCancel.setBounds(175, 118, 75, 25);
- this.btnCancel.setText("Cancel"); //$NON-NLS-1$
-
+ this.btnCancel.setText("Cancel"); //
+
this.btnOk = new Button(this.shlInfo, SWT.NONE);
this.btnOk.setBounds(94, 118, 75, 25);
this.btnOk.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
-
- PlaceholderSelectionGui.this.returnValue = PlaceholderSelectionGui.this.placeholderNameDropDown.getSelectionIndex();
+
+ PlaceholderSelectionGui.this.returnValue = PlaceholderSelectionGui.this.placeholderNameDropDown.getSelectionIndex();
PlaceholderSelectionGui.this.shlInfo.dispose();
}
});
- this.btnOk.setText("Ok"); //$NON-NLS-1$
-
+ this.btnOk.setText("Ok"); //
+
Label lbLabel = new Label(this.shlInfo, SWT.WRAP);
lbLabel.setBounds(27, 10, 223, 41);
- lbLabel.setText(Messages.getString("positioning.placeholder")); //$NON-NLS-1$
+ lbLabel.setText(Messages.getString("positioning.placeholder")); //
}
-
+
/**
- * @param list
+ * @param list
* @param Filling up the placeholder drop down list
*/
public void addDropDownEntries(List<String> list) {
@@ -148,14 +148,14 @@ public class PlaceholderSelectionGui extends Dialog {
this.placeholderNameDropDown.add(name);
}
}
-
+
/**
- *
+ *
*/
protected void close() {
this.close();
}
-
+
@Override
protected void checkSubclass() {
// allow subclass
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java
index b9edc3c0..7686959a 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java
@@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.commons.Constants;
/**
- *
+ *
*/
public class BKUHelper {
/**
@@ -37,31 +37,31 @@ public class BKUHelper {
/* public static HttpClient getHttpClient(boolean useProxy) {
HttpClient client = new HttpClient();
- client.getParams().setParameter("http.useragent", //$NON-NLS-1$
+ client.getParams().setParameter("http.useragent", //
Constants.USER_AGENT_STRING);
-
+
if (useProxy) {
- String host = System.getProperty("http.proxyHost"); //$NON-NLS-1$
- String port = System.getProperty("http.proxyPort"); //$NON-NLS-1$
+ String host = System.getProperty("http.proxyHost"); //
+ String port = System.getProperty("http.proxyPort"); //
if (host != null && !host.isEmpty() &&
port != null && !port.isEmpty()) {
int p = Integer.parseInt(port);
client.getHostConfiguration().setProxy(host, p);
- String user = System.getProperty("http.proxyUser"); //$NON-NLS-1$
- String pass = System.getProperty("http.proxyPassword"); //$NON-NLS-1$
+ String user = System.getProperty("http.proxyUser"); //
+ String pass = System.getProperty("http.proxyPassword"); //
if (user != null && !user.isEmpty() && pass != null) {
client.getState().setProxyCredentials(new AuthScope(host, p),
new UsernamePasswordCredentials(user, pass));
}
}
}
-
+
return client;
}*/
/**
* Get a HTTP Client instance
- *
+ *
* @param useProxy
* whether to use a potentially set proxy
* @return the HttpClient
@@ -69,20 +69,20 @@ public class BKUHelper {
@SuppressWarnings("deprecation")
public static HttpClient getHttpClient(boolean useProxy) {
HttpClient client = new HttpClient();
- client.getParams().setParameter("http.useragent", //$NON-NLS-1$
+ client.getParams().setParameter("http.useragent", //
Constants.USER_AGENT_STRING);
- client.getParams().setParameter("http.protocol.cookie-policy", CookieSpecs.BROWSER_COMPATIBILITY); //$NON-NLS-1$
+ client.getParams().setParameter("http.protocol.cookie-policy", CookieSpecs.BROWSER_COMPATIBILITY); //
if (useProxy) {
- String host = System.getProperty("http.proxyHost");//$NON-NLS-1$
- String port = System.getProperty("http.proxyPort");//$NON-NLS-1$
+ String host = System.getProperty("http.proxyHost");//
+ String port = System.getProperty("http.proxyPort");//
if (host != null && !host.isEmpty() && port != null && !port.isEmpty()) {
int p = Integer.parseInt(port);
client.getHostConfiguration().setProxy(host, p);
- String user = System.getProperty("http.proxyUser");//$NON-NLS-1$
- String pass = System.getProperty("http.proxyPassword");//$NON-NLS-1$
+ String user = System.getProperty("http.proxyUser");//
+ String pass = System.getProperty("http.proxyPassword");//
if (user != null && !user.isEmpty() && pass != null) {
client.getState().setProxyCredentials(new AuthScope(host, p),
new UsernamePasswordCredentials(user, pass));
@@ -96,7 +96,7 @@ public class BKUHelper {
/**
* Get a HTTP Client instance
- *
+ *
* @return the HttpClient
*/
public static HttpClient getHttpClient() {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java
index bd5f1423..561bb5ba 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java
@@ -39,7 +39,7 @@ import at.asit.pdfover.signator.SLResponse;
import at.asit.pdfover.signator.SignatureException;
/**
- *
+ *
*/
public class LocalBKUConnector implements BkuSlConnector {
/**
@@ -51,17 +51,17 @@ public class LocalBKUConnector implements BkuSlConnector {
/**
* HTTP Response server HEADER
*/
- public final static String BKU_RESPONSE_HEADER_SERVER = "server"; //$NON-NLS-1$
+ public final static String BKU_RESPONSE_HEADER_SERVER = "server"; //
/**
* HTTP Response user-agent HEADER
*/
- public final static String BKU_RESPONSE_HEADER_USERAGENT = "user-agent"; //$NON-NLS-1$
+ public final static String BKU_RESPONSE_HEADER_USERAGENT = "user-agent"; //
/**
* HTTP Response SignatureLayout HEADER
*/
- public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout"; //$NON-NLS-1$
+ public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout"; //
/* (non-Javadoc)
* @see at.asit.pdfover.signator.BkuSlConnector#handleSLRequest(java.lang.String)
@@ -74,12 +74,12 @@ public class LocalBKUConnector implements BkuSlConnector {
String sl_request = request.getRequest();
if (request.getSignatureData() == null) {
- method.addParameter("XMLRequest", sl_request); //$NON-NLS-1$
+ method.addParameter("XMLRequest", sl_request); //
} else {
StringPart xmlpart = new StringPart(
- "XMLRequest", sl_request, "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
+ "XMLRequest", sl_request, "UTF-8"); // //
- FilePart filepart = new FilePart("fileupload", //$NON-NLS-1$
+ FilePart filepart = new FilePart("fileupload", //
new FileUploadSource(request.getSignatureData()));
Part[] parts = { xmlpart, filepart };
@@ -87,7 +87,7 @@ public class LocalBKUConnector implements BkuSlConnector {
method.setRequestEntity(new MultipartRequestEntity(parts, method
.getParams()));
}
- log.trace("SL REQUEST: " + sl_request); //$NON-NLS-1$
+ log.trace("SL REQUEST: " + sl_request); //
int returnCode = client.executeMethod(method);
@@ -95,25 +95,25 @@ public class LocalBKUConnector implements BkuSlConnector {
throw new HttpException(
method.getResponseBodyAsString());
}
-
+
String server = getResponseHeader(method, BKU_RESPONSE_HEADER_SERVER);
if (server == null)
- server = ""; //$NON-NLS-1$
+ server = ""; //
String userAgent = getResponseHeader(method, BKU_RESPONSE_HEADER_USERAGENT);
if (userAgent == null)
- userAgent = ""; //$NON-NLS-1$
+ userAgent = ""; //
String signatureLayout = getResponseHeader(method, BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT);
String response = method.getResponseBodyAsString();
- log.debug("SL Response: " + response); //$NON-NLS-1$
+ log.debug("SL Response: " + response); //
SLResponse slResponse = new SLResponse(response, server,
userAgent, signatureLayout);
return slResponse;
} catch (HttpException e) {
- log.error("LocalBKUConnector: ", e); //$NON-NLS-1$
+ log.error("LocalBKUConnector: ", e); //
throw new SignatureException(e);
} catch (IOException e) {
- log.error("LocalBKUConnector: ", e); //$NON-NLS-1$
+ log.error("LocalBKUConnector: ", e); //
throw new SignatureException(e);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
index 2e278f5e..3d3f6012 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
@@ -31,7 +31,7 @@ import at.asit.pdfover.signator.SignatureException;
import at.asit.pdfover.signer.pdfas.PdfAs4SigningState;
/**
- *
+ *
*/
public class MobileBKUConnector implements BkuSlConnector {
/**
@@ -43,8 +43,8 @@ public class MobileBKUConnector implements BkuSlConnector {
private MobileBKUState state;
/**
- *
- * @param state
+ *
+ * @param state
*/
public MobileBKUConnector(MobileBKUState state) {
this.state = state;
@@ -64,31 +64,31 @@ public class MobileBKUConnector implements BkuSlConnector {
// Post SL Request
try {
String responseData = handler.postSLRequest(this.state.getURL(), request);
-
+
// Now we have received some data lets check it:
- log.trace("Response from mobile BKU: " + responseData); //$NON-NLS-1$
-
+ log.trace("Response from mobile BKU: " + responseData); //
+
handler.handleSLRequestResponse(responseData);
} catch (Exception ex) {
- log.error("Error in PostSLRequestThread", ex); //$NON-NLS-1$
+ log.error("Error in PostSLRequestThread", ex); //
this.state.threadException = ex;
this.state.displayError(ex);
throw new SignatureException(ex);
}
-
+
do {
// Check if credentials are available, get them from user if not
this.state.checkCredentials();
if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) //$NON-NLS-1$
+ this.state.status.errorMessage.equals("cancel")) //
throw new SignatureException(new IllegalStateException());
// Post credentials
try {
String responseData = handler.postCredentials();
- if (responseData.contains("undecided.aspx?sid=")) { //$NON-NLS-1$
+ if (responseData.contains("undecided.aspx?sid=")) { //
// handle polling
this.state.showOpenAppMessageWithSMSandCancel();
@@ -98,28 +98,28 @@ public class MobileBKUConnector implements BkuSlConnector {
aHandler.handleCredentialsResponse(response);
} else if (consumeCancelError()) {
throw new SignatureException(new IllegalStateException());
- }
+ }
} else {
// Now we have received some data lets check it:
- log.trace("Response from mobile BKU: " + responseData); //$NON-NLS-1$
+ log.trace("Response from mobile BKU: " + responseData); //
handler.handleCredentialsResponse(responseData);
}
} catch (Exception ex) {
- log.error("Error in PostCredentialsThread", ex); //$NON-NLS-1$
+ log.error("Error in PostCredentialsThread", ex); //
this.state.threadException = new IllegalStateException();
throw new SignatureException(new IllegalStateException());
}
} while(this.state.status.errorMessage != null);
-
+
// Check if response is already available
if (signingState.hasSignatureResponse()) {
SLResponse response = signingState.getSignatureResponse();
signingState.setSignatureResponse(null);
return response;
}
-
+
do {
MobileBKUStatus status = this.state.status;
boolean enterTAN = true;
@@ -130,72 +130,72 @@ public class MobileBKUConnector implements BkuSlConnector {
if (aStatus.qrCodeURL != null) {
this.state.showQR();
if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) //$NON-NLS-1$
+ this.state.status.errorMessage.equals("cancel")) //
throw new SignatureException(new IllegalStateException());
if (aStatus.qrCodeURL == null) {
try {
String response = aHandler.postSMSRequest();
- log.trace("Response from mobile BKU: " + response); //$NON-NLS-1$
+ log.trace("Response from mobile BKU: " + response); //
handler.handleCredentialsResponse(response);
} catch (Exception ex) {
- log.error("Error in PostCredentialsThread", ex); //$NON-NLS-1$
+ log.error("Error in PostCredentialsThread", ex); //
this.state.threadException = new IllegalStateException();
throw new SignatureException(new IllegalStateException());
}
} else {
enterTAN = false;
}
- }
+ }
if (enterTAN && !aStatus.tanField) {
try {
-
+
this.state.showFingerPrintInformation();
if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) //$NON-NLS-1$
+ this.state.status.errorMessage.equals("cancel")) //
throw new SignatureException(new IllegalStateException());
} catch (Exception ex) {
- log.error("Error in PostCredentialsThread", ex); //$NON-NLS-1$
+ log.error("Error in PostCredentialsThread", ex); //
this.state.threadException = new IllegalStateException();
//this.state.displayError(ex);
throw new SignatureException(new IllegalStateException());
}
-
+
if (this.state.getSMSStatus()) {
String response;
try {
response = aHandler.postSMSRequest();
handler.handleCredentialsResponse(response);
} catch (Exception e) {
- log.error("Error in PostCredentialsThread", e); //$NON-NLS-1$
+ log.error("Error in PostCredentialsThread", e); //
this.state.threadException = e;
this.state.displayError(e);
throw new SignatureException(e);
}
}
else {
- enterTAN = false;
+ enterTAN = false;
}
}
}
-
+
if (enterTAN) {
// Get TAN
this.state.checkTAN();
-
+
if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) //$NON-NLS-1$
+ this.state.status.errorMessage.equals("cancel")) //
throw new SignatureException(new IllegalStateException());
// Post TAN
try {
responseData = handler.postTAN();
- log.trace("Response from mobile BKU: " + responseData); //$NON-NLS-1$
+ log.trace("Response from mobile BKU: " + responseData); //
// Now we have received some data lets check it:
handler.handleTANResponse(responseData);
} catch (Exception ex) {
- log.error("Error in PostTanThread", ex); //$NON-NLS-1$
+ log.error("Error in PostTanThread", ex); //
this.state.threadException = ex;
this.state.displayError(ex);
throw new SignatureException(ex);
@@ -207,18 +207,18 @@ public class MobileBKUConnector implements BkuSlConnector {
} while (this.state.status.tanTries == -2);
return signingState.getSignatureResponse();
- }
-
+ }
+
private boolean consumeCancelError() {
-
+
if (this.state.status instanceof ATrustStatus) {
- if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) { //$NON-NLS-1$
+ if (this.state.status.errorMessage != null &&
+ this.state.status.errorMessage.equals("cancel")) { //
this.state.status.errorMessage = null;
return true;
}
}
- return false;
+ return false;
}
-
+
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java
index 03003325..aa98317e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java
@@ -75,7 +75,7 @@ public class ATrustHandler extends MobileBKUHandler {
private static boolean expiryNoticeDisplayed = false;
- private static final String ACTIVATION_URL = "https://www.handy-signatur.at/"; //$NON-NLS-1$
+ private static final String ACTIVATION_URL = "https://www.handy-signatur.at/"; //
private boolean useBase64 = false;
@@ -86,36 +86,36 @@ public class ATrustHandler extends MobileBKUHandler {
public void handleSLRequestResponse(String responseData) throws Exception {
ATrustStatus status = getStatus();
- if (responseData.contains("<sl:ErrorResponse")) { //$NON-NLS-1$
+ if (responseData.contains("<sl:ErrorResponse")) { //
String errorCode = MobileBKUHelper.extractSubstring(responseData,
- "<sl:ErrorCode>", "</sl:ErrorCode>"); //$NON-NLS-1$ //$NON-NLS-2$
+ "<sl:ErrorCode>", "</sl:ErrorCode>"); // //
String errorMsg = MobileBKUHelper.extractSubstring(responseData,
- "<sl:Info>", "</sl:Info>"); //$NON-NLS-1$ //$NON-NLS-2$
- throw new Exception("Error from mobile BKU: " + //$NON-NLS-1$
- errorCode + " - " + errorMsg); //$NON-NLS-1$
+ "<sl:Info>", "</sl:Info>"); // //
+ throw new Exception("Error from mobile BKU: " + //
+ errorCode + " - " + errorMsg); //
}
// Extract infos:
String sessionID = MobileBKUHelper.extractSubstring(responseData,
- "identification.aspx?sid=", "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ "identification.aspx?sid=", "\""); // //
String viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "", "id", "__VIEWSTATE", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ responseData, "", "id", "__VIEWSTATE", "value"); // // // //
String eventValidation = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "", "id", "__EVENTVALIDATION", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- String viewstateGenerator = MobileBKUHelper.extractValueFromTagWithParamOptional(responseData, "", "id", "__VIEWSTATEGENERATOR", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- String dynamicAttrPhonenumber = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_PHONE_NUMBER);
- String dynamicAttrPassword = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_SIGN_PASS);
- String dynamicAttrButtonId = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_BTN_IDF);
- String dynamicAttrTan = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_TAN);
-
-
- log.info("sessionID: " + sessionID); //$NON-NLS-1$
- log.info("viewState: " + viewState); //$NON-NLS-1$
- log.info("eventValidation: " + eventValidation); //$NON-NLS-1$
+ responseData, "", "id", "__EVENTVALIDATION", "value"); // // // //
+
+ String viewstateGenerator = MobileBKUHelper.extractValueFromTagWithParamOptional(responseData, "", "id", "__VIEWSTATEGENERATOR", "value"); // // // //
+
+ String dynamicAttrPhonenumber = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_PHONE_NUMBER);
+ String dynamicAttrPassword = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_SIGN_PASS);
+ String dynamicAttrButtonId = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_BTN_IDF);
+ String dynamicAttrTan = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_TAN);
+
+
+ log.info("sessionID: " + sessionID); //
+ log.info("viewState: " + viewState); //
+ log.info("eventValidation: " + eventValidation); //
status.sessionID = sessionID;
status.viewState = viewState;
@@ -137,14 +137,14 @@ public class ATrustHandler extends MobileBKUHandler {
MobileBKUHelper.registerTrustedSocketFactory();
HttpClient client = MobileBKUHelper.getHttpClient(getStatus());
- PostMethod post = new PostMethod(status.baseURL + "/identification.aspx?sid=" + status.sessionID); //$NON-NLS-1$
- post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
- post.addParameter("__VIEWSTATE", status.viewState); //$NON-NLS-1$
- post.addParameter("__VIEWSTATEGENERATOR", status.viewStateGenerator); //$NON-NLS-1$
- post.addParameter("__EVENTVALIDATION", status.eventValidation); //$NON-NLS-1$
- post.addParameter(status.dynAttrPhoneNumber, status.phoneNumber);
- post.addParameter(status.dynAttrPassword, status.mobilePassword);
- post.addParameter(status.dynAttrBtnId, "Identifizieren"); //$NON-NLS-1$
+ PostMethod post = new PostMethod(status.baseURL + "/identification.aspx?sid=" + status.sessionID); //
+ post.getParams().setContentCharset("utf-8"); //
+ post.addParameter("__VIEWSTATE", status.viewState); //
+ post.addParameter("__VIEWSTATEGENERATOR", status.viewStateGenerator); //
+ post.addParameter("__EVENTVALIDATION", status.eventValidation); //
+ post.addParameter(status.dynAttrPhoneNumber, status.phoneNumber);
+ post.addParameter(status.dynAttrPassword, status.mobilePassword);
+ post.addParameter(status.dynAttrBtnId, "Identifizieren");
return executePost(client, post);
}
@@ -164,29 +164,29 @@ public class ATrustHandler extends MobileBKUHandler {
status.errorMessage = null;
- if (responseData.contains("ExpiresInfo.aspx?sid=")) { //$NON-NLS-1$
+ if (responseData.contains("ExpiresInfo.aspx?sid=")) { //
// Certificate expiration interstitial - skip
- String notice = Messages.getString("mobileBKU.notice") + " " + //$NON-NLS-1$ //$NON-NLS-2$
- StringEscapeUtils.unescapeHtml4(MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "Label2")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- .replaceAll("\\<.*?\\>", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ String notice = Messages.getString("mobileBKU.notice") + " " + // //
+ StringEscapeUtils.unescapeHtml4(MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "Label2")) // // //
+ .replaceAll("\\<.*?\\>", ""); // //
log.info(notice);
if (!expiryNoticeDisplayed) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
- Dialog d = new Dialog(ATrustHandler.this.shell, Messages.getString("common.info"), Messages.getString("mobileBKU.certExpiresSoon"), BUTTONS.YES_NO, ICON.WARNING); //$NON-NLS-1$ //$NON-NLS-2$
+ Dialog d = new Dialog(ATrustHandler.this.shell, Messages.getString("common.info"), Messages.getString("mobileBKU.certExpiresSoon"), BUTTONS.YES_NO, ICON.WARNING); // //
if (d.open() == SWT.YES) {
- log.debug("Trying to open " + ACTIVATION_URL); //$NON-NLS-1$
+ log.debug("Trying to open " + ACTIVATION_URL); //
if (Desktop.isDesktopSupported()) {
try {
Desktop.getDesktop().browse(new URI(ACTIVATION_URL));
return;
} catch (Exception e) {
- log.debug("Error opening URL", e); //$NON-NLS-1$
+ log.debug("Error opening URL", e); //
}
}
- log.info("SWT Desktop is not supported on this platform"); //$NON-NLS-1$
+ log.info("SWT Desktop is not supported on this platform"); //
Program.launch(ACTIVATION_URL);
}
}
@@ -194,97 +194,97 @@ public class ATrustHandler extends MobileBKUHandler {
expiryNoticeDisplayed = true;
}
- String t_sessionID = MobileBKUHelper.extractSubstring(responseData, "ExpiresInfo.aspx?sid=", "\""); //$NON-NLS-1$ //$NON-NLS-2$
- String t_viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- String t_eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ String t_sessionID = MobileBKUHelper.extractSubstring(responseData, "ExpiresInfo.aspx?sid=", "\""); // //
+ String t_viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); // // // //
+ String t_eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); // // // //
// Post again to skip
MobileBKUHelper.registerTrustedSocketFactory();
HttpClient client = MobileBKUHelper.getHttpClient(getStatus());
- PostMethod post = new PostMethod(status.baseURL + "/ExpiresInfo.aspx?sid=" + t_sessionID); //$NON-NLS-1$
- post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
- post.addParameter("__VIEWSTATE", t_viewState); //$NON-NLS-1$
- post.addParameter("__EVENTVALIDATION", t_eventValidation); //$NON-NLS-1$
- post.addParameter("Button_Next", "Weiter"); //$NON-NLS-1$ //$NON-NLS-2$
+ PostMethod post = new PostMethod(status.baseURL + "/ExpiresInfo.aspx?sid=" + t_sessionID); //
+ post.getParams().setContentCharset("utf-8"); //
+ post.addParameter("__VIEWSTATE", t_viewState); //
+ post.addParameter("__EVENTVALIDATION", t_eventValidation); //
+ post.addParameter("Button_Next", "Weiter"); // //
responseData = executePost(client, post);
- log.trace("Response from mobile BKU: " + responseData); //$NON-NLS-1$
- } else if (responseData.contains("tanAppInfo.aspx?sid=")) { //$NON-NLS-1$
+ log.trace("Response from mobile BKU: " + responseData); //
+ } else if (responseData.contains("tanAppInfo.aspx?sid=")) { //
// App info interstitial - skip
- log.info("Skipping tan app interstitial"); //$NON-NLS-1$
+ log.info("Skipping tan app interstitial"); //
+
+ String t_sessionID = MobileBKUHelper.extractSubstring(responseData, "tanAppInfo.aspx?sid=", "\""); // //
+ String t_viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); // // // //
+ String t_eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); // // // //
- String t_sessionID = MobileBKUHelper.extractSubstring(responseData, "tanAppInfo.aspx?sid=", "\""); //$NON-NLS-1$ //$NON-NLS-2$
- String t_viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- String t_eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
// Post again to skip
MobileBKUHelper.registerTrustedSocketFactory();
HttpClient client = MobileBKUHelper.getHttpClient(getStatus());
- PostMethod post = new PostMethod(status.baseURL + "/tanAppInfo.aspx?sid=" + t_sessionID); //$NON-NLS-1$
- post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
- post.addParameter("__VIEWSTATE", t_viewState); //$NON-NLS-1$
- post.addParameter("__EVENTVALIDATION", t_eventValidation); //$NON-NLS-1$
- post.addParameter("NextBtn", "Weiter"); //$NON-NLS-1$ //$NON-NLS-2$
+ PostMethod post = new PostMethod(status.baseURL + "/tanAppInfo.aspx?sid=" + t_sessionID); //
+ post.getParams().setContentCharset("utf-8"); //
+ post.addParameter("__VIEWSTATE", t_viewState); //
+ post.addParameter("__EVENTVALIDATION", t_eventValidation); //
+ post.addParameter("NextBtn", "Weiter"); // //
responseData = executePost(client, post);
- log.trace("Response from mobile BKU: " + responseData); //$NON-NLS-1$
+ log.trace("Response from mobile BKU: " + responseData); //
}
- if (responseData.contains("signature.aspx?sid=")) { //$NON-NLS-1$
+ if (responseData.contains("signature.aspx?sid=")) { //
// credentials ok! TAN entry
- log.debug("Credentials accepted - TAN required"); //$NON-NLS-1$
- sessionID = MobileBKUHelper.extractSubstring(responseData, "signature.aspx?sid=", "\""); //$NON-NLS-1$ //$NON-NLS-2$
- viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- refVal = MobileBKUHelper.extractSubstring(responseData, "id='vergleichswert'><b>Vergleichswert:</b>", "</div>"); //$NON-NLS-1$ //$NON-NLS-2$
- signatureDataURL = status.baseURL + "/ShowSigobj.aspx" + //$NON-NLS-1$
- MobileBKUHelper.extractSubstring(responseData, "ShowSigobj.aspx", "'"); //$NON-NLS-1$ //$NON-NLS-2$
+ log.debug("Credentials accepted - TAN required"); //
+ sessionID = MobileBKUHelper.extractSubstring(responseData, "signature.aspx?sid=", "\""); // //
+ viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); // // // //
+ eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); // // // //
+ refVal = MobileBKUHelper.extractSubstring(responseData, "id='vergleichswert'><b>Vergleichswert:</b>", "</div>"); // //
+ signatureDataURL = status.baseURL + "/ShowSigobj.aspx" + //
+ MobileBKUHelper.extractSubstring(responseData, "ShowSigobj.aspx", "'"); // //
try {
- String qrCode = MobileBKUHelper.extractValueFromTagWithParam(responseData, "img", "class", "qrcode", "src"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- log.debug("QR Code found: " + qrCode); //$NON-NLS-1$
+ String qrCode = MobileBKUHelper.extractValueFromTagWithParam(responseData, "img", "class", "qrcode", "src"); // // // //
+ log.debug("QR Code found: " + qrCode); //
status.qrCodeURL = qrCode;
} catch (Exception e) {
- log.debug("No QR Code found"); //$NON-NLS-1$
+ log.debug("No QR Code found"); //
}
try {
- String tanTextTan = MobileBKUHelper.extractValueFromTagWithParam(responseData, "label", "id", "label_for_input_tan", "for"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ String tanTextTan = MobileBKUHelper.extractValueFromTagWithParam(responseData, "label", "id", "label_for_input_tan", "for"); // // // //
status.tanField = tanTextTan.equals("input_tan");
status.dynAttrTan = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_TAN);
status.dynAttrSignButton = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_SIGN_BTN);
} catch (Exception e) {
- log.debug("No tan field found"); //$NON-NLS-1$
+ log.debug("No tan field found"); //
}
try {
- String tanTextTan = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "text_tan"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ String tanTextTan = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "text_tan"); // // //
status.isAPPTan = !tanTextTan.toLowerCase().contains("sms");
status.dynAttrTan = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_TAN);
status.dynAttrSignButton = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_SIGN_BTN);
}catch (Exception e) {
- log.debug("No text_tan tag"); //$NON-NLS-1$
+ log.debug("No text_tan tag"); //
}
-
- } else if (responseData.contains("sl:InfoboxReadResponse")) { //$NON-NLS-1$
+
+ } else if (responseData.contains("sl:InfoboxReadResponse")) { //
// credentials ok! InfoboxReadResponse
- log.debug("Credentials accepted - Response given"); //$NON-NLS-1$
+ log.debug("Credentials accepted - Response given"); //
getSigningState().setSignatureResponse(new SLResponse(responseData, getStatus().server, null, null));
return;
- } else if (responseData.contains("undecided.aspx?sid=")) { //$NON-NLS-1$
- // skip intermediate page
- log.debug("Page Undecided"); //$NON-NLS-1$
+ } else if (responseData.contains("undecided.aspx?sid=")) { //
+ // skip intermediate page
+ log.debug("Page Undecided"); //
getSigningState().setSignatureResponse(new SLResponse(responseData, getStatus().server, null, null));
- status.errorMessage = "waiting..."; //$NON-NLS-1$
- return;
+ status.errorMessage = "waiting..."; //
+ return;
}else {
// error page
// extract error text!
try {
- String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "class", "ErrorClass"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "class", "ErrorClass"); // // //
status.errorMessage = errorMessage;
} catch (Exception e) {
- throw new SignatureException(MobileBKUHelper.extractSubstring(responseData, "<sl:ErrorCode>", "</sl:ErrorCode>") + ": " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- MobileBKUHelper.extractSubstring(responseData, "<sl:Info>", "</sl:Info>")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new SignatureException(MobileBKUHelper.extractSubstring(responseData, "<sl:ErrorCode>", "</sl:ErrorCode>") + ": " + // // //
+ MobileBKUHelper.extractSubstring(responseData, "<sl:Info>", "</sl:Info>")); // //
}
// force UI again!
@@ -311,20 +311,20 @@ public class ATrustHandler extends MobileBKUHandler {
@Override
public String postTAN() throws IOException {
ATrustStatus status = getStatus();
-
+
MobileBKUHelper.registerTrustedSocketFactory();
HttpClient client = MobileBKUHelper.getHttpClient(getStatus());
-
+
PostMethod post = new PostMethod(status.baseURL
- + "/signature.aspx?sid=" + status.sessionID); //$NON-NLS-1$
- post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
- post.addParameter("__VIEWSTATE", status.viewState); //$NON-NLS-1$
+ + "/signature.aspx?sid=" + status.sessionID); //
+ post.getParams().setContentCharset("utf-8"); //
+ post.addParameter("__VIEWSTATE", status.viewState); //
post.addParameter(
- "__EVENTVALIDATION", status.eventValidation); //$NON-NLS-1$
- post.addParameter(status.dynAttrTan, status.tan);
- post.addParameter(status.dynAttrSignButton, "Signieren"); //$NON-NLS-1$
- post.addParameter("Button1", "Identifizieren"); //$NON-NLS-1$ //$NON-NLS-2$
-
+ "__EVENTVALIDATION", status.eventValidation); //
+ post.addParameter(status.dynAttrTan, status.tan);
+ post.addParameter(status.dynAttrSignButton, "Signieren");
+ post.addParameter("Button1", "Identifizieren"); // //
+
return executePost(client, post);
}
@@ -334,21 +334,21 @@ public class ATrustHandler extends MobileBKUHandler {
@Override
public void handleTANResponse(String responseData) {
getStatus().errorMessage = null;
- if (responseData.contains("sl:CreateXMLSignatureResponse xmlns:sl") || //$NON-NLS-1$
- responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) { //$NON-NLS-1$
+ if (responseData.contains("sl:CreateXMLSignatureResponse xmlns:sl") || //
+ responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) { //
// success !!
-
+
getSigningState().setSignatureResponse(
new SLResponse(responseData, getStatus().server, null, null));
} else {
try {
String tries = MobileBKUHelper.extractSubstring(
- responseData, "Sie haben noch", "Versuch"); //$NON-NLS-1$ //$NON-NLS-2$
+ responseData, "Sie haben noch", "Versuch"); // //
getStatus().tanTries = Integer.parseInt(tries.trim());
getStatus().errorMessage = "mobileBKU.wrong_tan";
} catch (Exception e) {
getStatus().tanTries = (getStatus().tanTries - 1);
- log.debug("Error parsing TAN response", e); //$NON-NLS-1$
+ log.debug("Error parsing TAN response", e); //
}
if (getStatus().tanTries <= 0) {
@@ -356,10 +356,10 @@ public class ATrustHandler extends MobileBKUHandler {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
- Dialog dialog = new Dialog(ATrustHandler.this.shell, Messages.getString("common.warning"), //$NON-NLS-1$
- Messages.getString("mobileBKU.tan_tries_exceeded"), //$NON-NLS-1$
+ Dialog dialog = new Dialog(ATrustHandler.this.shell, Messages.getString("common.warning"), //
+ Messages.getString("mobileBKU.tan_tries_exceeded"), //
BUTTONS.OK_CANCEL, ICON.QUESTION);
-
+
// TODO: THIS IS A COLOSSAL HACK
if (dialog.open() == SWT.CANCEL) {
// Go back to BKU Selection
@@ -387,7 +387,7 @@ public class ATrustHandler extends MobileBKUHandler {
GetMethod get = new GetMethod(status.baseURL
+ "/sendsms.aspx?sid=" + status.sessionID);
- get.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
+ get.getParams().setContentCharset("utf-8"); //
return executeGet(client, get);
}
@@ -398,7 +398,7 @@ public class ATrustHandler extends MobileBKUHandler {
*/
public InputStream getQRCode() {
//TODO: Update HTTPClient here
-
+
ATrustStatus status = getStatus();
MobileBKUHelper.registerTrustedSocketFactory();
@@ -407,17 +407,17 @@ public class ATrustHandler extends MobileBKUHandler {
GetMethod get = new GetMethod(status.baseURL + "/" + status.qrCodeURL);
try {
- log.debug("Getting " + get.getURI()); //$NON-NLS-1$
+ log.debug("Getting " + get.getURI()); //
int returnCode = client.executeMethod(get);
if (returnCode != HttpStatus.SC_OK) {
- log.error("Error getting QR code"); //$NON-NLS-1$
+ log.error("Error getting QR code"); //
return null;
}
return get.getResponseBodyAsStream();
} catch (Exception e) {
- log.error("Error getting QR code", e); //$NON-NLS-1$
+ log.error("Error getting QR code", e); //
return null;
}
}
@@ -436,24 +436,24 @@ public class ATrustHandler extends MobileBKUHandler {
//TODO check
//String baseURL = "https://www.a-trust.at/mobile/https-security-layer-request";
GetMethod get = new GetMethod(status.baseURL
- + "/signature.aspx?sid=" + status.sessionID); //$NON-NLS-1$
+ + "/signature.aspx?sid=" + status.sessionID); //
return executeGet(client, get);
}
-
+
/**
* @param responseData
* @return a boolean
*/
public Boolean handleWaitforAppResponse(String responseData) {
-
+
getStatus().errorMessage = null;
- if (!responseData.toLowerCase().contains("Bitte starten Sie Ihre Handy-Signatur App!".toLowerCase())/* || //$NON-NLS-1$
- responseData.toLowerCase().contains("TAN (Handy-Signatur App)".toLowerCase())*/) { //$NON-NLS-1$
+ if (!responseData.toLowerCase().contains("Bitte starten Sie Ihre Handy-Signatur App!".toLowerCase())/* || //
+ responseData.toLowerCase().contains("TAN (Handy-Signatur App)".toLowerCase())*/) { //
return true;
}
- return false;
+ return false;
}
/**
@@ -463,8 +463,8 @@ public class ATrustHandler extends MobileBKUHandler {
*/
public boolean handleQRResponse(String responseData) {
getStatus().errorMessage = null;
- if (responseData.contains("sl:CreateXMLSignatureResponse xmlns:sl") || //$NON-NLS-1$
- responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) { //$NON-NLS-1$
+ if (responseData.contains("sl:CreateXMLSignatureResponse xmlns:sl") || //
+ responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) { //
// success !!
getSigningState().setSignatureResponse(
@@ -489,17 +489,17 @@ public class ATrustHandler extends MobileBKUHandler {
/*
* (non-Javadoc)
- *
+ *
*/
@Override
public boolean handlePolling() throws ATrustConnectionException {
-
+
ATrustStatus status = getStatus();
URLConnection urlconnection = null;
String isReady = null;
Status serverStatus = null;
int waits = 0;
- final String ERROR = "Error: Server is not responding"; //$NON-NLS-1$
+ final String ERROR = "Error: Server is not responding"; //
HttpClient client;
try {
do {
@@ -517,7 +517,7 @@ public class ATrustHandler extends MobileBKUHandler {
int returnValue = client.executeMethod(get);
InputStream in = new BufferedInputStream(get.getResponseBodyAsStream());
- isReady = IOUtils.toString(in, "utf-8"); //$NON-NLS-1$
+ isReady = IOUtils.toString(in, "utf-8"); //
serverStatus = new Status(isReady);
if (serverStatus.isFin()) {
@@ -530,36 +530,36 @@ public class ATrustHandler extends MobileBKUHandler {
} while (serverStatus.isWait());
if (serverStatus.isFin()) {
- return true;
+ return true;
}
//else error
status.errorMessage = "Server reponded ERROR during polling";
- log.error("Server reponded ERROR during polling"); //$NON-NLS-1$
+ log.error("Server reponded ERROR during polling"); //
throw new ATrustConnectionException();
} catch (Exception e) {
- log.error("handle polling failed" + e.getMessage()); //$NON-NLS-1$
+ log.error("handle polling failed" + e.getMessage()); //
throw new ATrustConnectionException();
}
}
-
+
private class Status {
- private final boolean fin;
- private final boolean error;
- private final boolean wait;
-
+ private final boolean fin;
+ private final boolean error;
+ private final boolean wait;
+
public Status(String status) {
JsonElement jelement = new JsonParser().parse(status.toLowerCase());
JsonObject jobject = jelement.getAsJsonObject();
- this.fin = jobject.get("fin").getAsBoolean(); //$NON-NLS-1$
- this.error = jobject.get("error").getAsBoolean(); //$NON-NLS-1$
- this.wait = jobject.get("wait").getAsBoolean(); //$NON-NLS-1$
+ this.fin = jobject.get("fin").getAsBoolean();
+ this.error = jobject.get("error").getAsBoolean();
+ this.wait = jobject.get("wait").getAsBoolean();
}
-
+
public Status(boolean error) {
- this.error = error;
- this.fin = false;
- this.wait = false;
+ this.error = error;
+ this.fin = false;
+ this.wait = false;
}
public boolean isFin() {
@@ -573,12 +573,12 @@ public class ATrustHandler extends MobileBKUHandler {
public boolean isWait() {
return wait;
}
-
-
-
-
+
+
+
+
}
-
+
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java
index cbd26f8c..20f645a2 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java
@@ -41,12 +41,12 @@ public class ATrustStatus extends MobileBKUStatus {
public String qrCodeURL = null;
public boolean tanField = false;
public boolean isAPPTan = false;
- public String viewStateGenerator;
- public String dynAttrPhoneNumber;
- public String dynAttrPassword;
- public String dynAttrBtnId;
- public String dynAttrTan;
- public String dynAttrSignButton;
+ public String viewStateGenerator;
+ public String dynAttrPhoneNumber;
+ public String dynAttrPassword;
+ public String dynAttrBtnId;
+ public String dynAttrTan;
+ public String dynAttrSignButton;
public boolean isSMSTan = false;
/**
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java
index cbf0ee03..77572f26 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java
@@ -38,7 +38,7 @@ import at.asit.pdfover.gui.workflow.states.MobileBKUState;
import at.asit.pdfover.signator.SLResponse;
/**
- *
+ *
*/
public class IAIKHandler extends MobileBKUHandler {
/**
@@ -68,23 +68,23 @@ public class IAIKHandler extends MobileBKUHandler {
// Extract infos:
String credentialURL = MobileBKUHelper.extractValueFromTagWithParam(responseData,
- "form", "name", "userCredLogon", "action"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "form", "name", "userCredLogon", "action"); // // // //
URL baseURL = new URL(status.baseURL);
credentialURL = MobileBKUHelper.getQualifiedURL(credentialURL, baseURL);
String viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "input", "name", "javax.faces.ViewState", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ responseData, "input", "name", "javax.faces.ViewState", "value"); // // // //
String sessionID = null;
- int si = credentialURL.indexOf("jsessionid="); //$NON-NLS-1$
+ int si = credentialURL.indexOf("jsessionid="); //
if (si != -1)
sessionID = credentialURL.substring(si + 11);
else
sessionID = status.sessionID;
- log.info("credentialURL: " + credentialURL); //$NON-NLS-1$
- log.info("sessionID: " + sessionID); //$NON-NLS-1$
- log.info("viewState: " + viewState); //$NON-NLS-1$
+ log.info("credentialURL: " + credentialURL); //
+ log.info("sessionID: " + sessionID); //
+ log.info("viewState: " + viewState); //
status.baseURL = credentialURL;
if (sessionID != null)
@@ -103,17 +103,17 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = MobileBKUHelper.getHttpClient(status);
PostMethod post = new PostMethod(status.ensureSessionID(status.baseURL));
- post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
+ post.getParams().setContentCharset("utf-8"); //
post.addParameter("javax.faces.ViewState", status.viewState);
post.addParameter("userCredLogon:phoneNr", status.phoneNumber);
post.addParameter("userCredLogon:pwd", status.mobilePassword);
- post.addParameter("userCredLogon:logonButton", "userCredLogon:logonButton"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.partial.ajax", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.source", "userCredLogon:logonButton"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.partial.execute", "@all"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.partial.render", "userCredLogon:userCredentialLogonPanel"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("userCredLogon", "userCredLogon"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("userCredLogon:j_idt33_input", "de"); //$NON-NLS-1$ //$NON-NLS-2$
+ post.addParameter("userCredLogon:logonButton", "userCredLogon:logonButton"); // //
+ post.addParameter("javax.faces.partial.ajax", "true"); // //
+ post.addParameter("javax.faces.source", "userCredLogon:logonButton"); // //
+ post.addParameter("javax.faces.partial.execute", "@all"); // //
+ post.addParameter("javax.faces.partial.render", "userCredLogon:userCredentialLogonPanel"); // //
+ post.addParameter("userCredLogon", "userCredLogon"); // //
+ post.addParameter("userCredLogon:j_idt33_input", "de"); // //
return executePost(client, post);
}
@@ -130,14 +130,14 @@ public class IAIKHandler extends MobileBKUHandler {
status.errorMessage = null;
- if (!responseData.contains("redirection_url")) { //$NON-NLS-1$
+ if (!responseData.contains("redirection_url")) { //
// Assume that an error occurred
String errorMessage;
try {
- errorMessage = MobileBKUHelper.extractSubstring(responseData, ":errorMessage\">", "</span>"); //$NON-NLS-1$ //$NON-NLS-2$
+ errorMessage = MobileBKUHelper.extractSubstring(responseData, ":errorMessage\">", "</span>"); // //
} catch (Exception e) {
- errorMessage = Messages.getString("error.Unexpected"); //$NON-NLS-1$
+ errorMessage = Messages.getString("error.Unexpected"); //
}
status.errorMessage = errorMessage;
@@ -149,7 +149,7 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = MobileBKUHelper.getHttpClient(status);
String redirectURL = MobileBKUHelper.extractSubstring(responseData,
- "\"redirection_url\":\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ "\"redirection_url\":\"", "\""); // //
URL baseURL = new URL(status.baseURL);
redirectURL = MobileBKUHelper.getQualifiedURL(redirectURL, baseURL);
@@ -157,66 +157,66 @@ public class IAIKHandler extends MobileBKUHandler {
responseData = getRedirect(client, redirectURL);
- if (responseData.contains("sl:InfoboxReadResponse")) { //$NON-NLS-1$
+ if (responseData.contains("sl:InfoboxReadResponse")) { //
// credentials ok! InfoboxReadResponse
getSigningState().setSignatureResponse(
new SLResponse(responseData, status.server, null, null));
return;
}
-
+
if (responseData.contains("tanCodeLogon"))
{
refVal = MobileBKUHelper.extractContentFromTagWithParam(responseData,
- "span", "id", "tanCodeLogon:refValue"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "span", "id", "tanCodeLogon:refValue"); // // //
}
else
{
refVal = MobileBKUHelper.extractContentFromTagWithParam(responseData,
- "span", "id", "j_idt5:refValue"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "span", "id", "j_idt5:refValue"); // // //
}
-
- if (responseData.contains("/error")) { //$NON-NLS-1$
+
+ if (responseData.contains("/error")) { //
// Error response - try again
String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(
- responseData, "div", "id", "errorPanel:panel_content"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (errorMessage.contains("<br />")) //$NON-NLS-1$
- errorMessage = errorMessage.substring(0, errorMessage.indexOf("<br />")); //$NON-NLS-1$
- errorMessage.replace("\n", " "); //$NON-NLS-1$ //$NON-NLS-2$
+ responseData, "div", "id", "errorPanel:panel_content"); // // //
+ if (errorMessage.contains("<br />")) //
+ errorMessage = errorMessage.substring(0, errorMessage.indexOf("<br />")); //
+ errorMessage.replace("\n", " "); // //
status.errorMessage = errorMessage;
status.mobilePassword = null;
return;
}
-
-
-
+
+
+
String viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "input", "name", "javax.faces.ViewState", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ responseData, "input", "name", "javax.faces.ViewState", "value"); // // // //
status.viewState = viewState;
- if (!responseData.contains("tanCodeLogon.jsf")) { //$NON-NLS-1$
+ if (!responseData.contains("tanCodeLogon.jsf")) { //
// Assume that we need to confirm reference value dialog
- log.debug("viewState: " + viewState); //$NON-NLS-1$
-
-
+ log.debug("viewState: " + viewState); //
+
+
PostMethod post = new PostMethod(redirectURL);
- post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
- post.addParameter("javax.faces.partial.ajax", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.source", "j_idt5:yesButton"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.partial.execute", "@all"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("j_idt5:yesButton", "j_idt5:yesButton"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("j_idt5", "j_idt5"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.ViewState", status.viewState); //$NON-NLS-1$
+ post.getParams().setContentCharset("utf-8"); //
+ post.addParameter("javax.faces.partial.ajax", "true"); // //
+ post.addParameter("javax.faces.source", "j_idt5:yesButton"); // //
+ post.addParameter("javax.faces.partial.execute", "@all"); // //
+ post.addParameter("j_idt5:yesButton", "j_idt5:yesButton"); // //
+ post.addParameter("j_idt5", "j_idt5"); // //
+ post.addParameter("javax.faces.ViewState", status.viewState); //
responseData = executePost(client, post);
- log.debug("Response: " + responseData); //$NON-NLS-1$
- if (responseData.contains("/error")) { //$NON-NLS-1$
+ log.debug("Response: " + responseData); //
+ if (responseData.contains("/error")) { //
// Error response - try again
- String errorMessage = Messages.getString("error.Unexpected"); //$NON-NLS-1$
+ String errorMessage = Messages.getString("error.Unexpected"); //
status.errorMessage = errorMessage;
status.mobilePassword = null;
@@ -224,7 +224,7 @@ public class IAIKHandler extends MobileBKUHandler {
}
redirectURL = MobileBKUHelper.extractSubstring(responseData,
- "redirect url=\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ "redirect url=\"", "\""); // //
baseURL = new URL(status.baseURL);
redirectURL = MobileBKUHelper.getQualifiedURL(redirectURL, baseURL);
redirectURL = status.ensureSessionID(redirectURL);
@@ -232,27 +232,27 @@ public class IAIKHandler extends MobileBKUHandler {
responseData = getRedirect(client, redirectURL);
viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "input", "name", "javax.faces.ViewState", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ responseData, "input", "name", "javax.faces.ViewState", "value"); // // // //
status.viewState = viewState;
}
signatureDataURL = status.baseURL;
signatureDataURL = signatureDataURL.substring(0, signatureDataURL.lastIndexOf('/') + 1);
- signatureDataURL += "viewer.jsf" + //$NON-NLS-1$
- MobileBKUHelper.extractSubstring(responseData, "viewer.jsf", "\""); //$NON-NLS-1$ //$NON-NLS-2$
- signatureDataURL += (signatureDataURL.contains("?") ? "&" : "?") + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- "pdfoversessionid=" + status.sessionID; //$NON-NLS-1$
+ signatureDataURL += "viewer.jsf" + //
+ MobileBKUHelper.extractSubstring(responseData, "viewer.jsf", "\""); // //
+ signatureDataURL += (signatureDataURL.contains("?") ? "&" : "?") + // // //
+ "pdfoversessionid=" + status.sessionID; //
String tanURL = MobileBKUHelper.extractValueFromTagWithParam(responseData,
- "form", "name", "tanCodeLogon", "action"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "form", "name", "tanCodeLogon", "action"); // // // //
baseURL = new URL(status.baseURL);
tanURL = MobileBKUHelper.getQualifiedURL(tanURL, baseURL);
tanURL = status.ensureSessionID(tanURL);
- log.debug("reference value: " + refVal); //$NON-NLS-1$
- log.debug("signatureDataURL: " + signatureDataURL); //$NON-NLS-1$
- log.debug("tanURL: " + tanURL); //$NON-NLS-1$
- log.debug("viewState: " + viewState); //$NON-NLS-1$
+ log.debug("reference value: " + refVal); //
+ log.debug("signatureDataURL: " + signatureDataURL); //
+ log.debug("tanURL: " + tanURL); //
+ log.debug("viewState: " + viewState); //
status.refVal = refVal;
status.signatureDataURL = signatureDataURL;
@@ -270,12 +270,12 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = MobileBKUHelper.getHttpClient(status);
PostMethod post = new PostMethod(status.baseURL);
- post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
- post.addParameter("javax.faces.ViewState", status.viewState); //$NON-NLS-1$
- post.addParameter("tanCodeLogon", "tanCodeLogon"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("tanCodeLogon:signButton", ""); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("tanCodeLogon:authCode", status.tan); //$NON-NLS-1$
- post.addParameter("referenceValue", status.refVal); //$NON-NLS-1$
+ post.getParams().setContentCharset("utf-8"); //
+ post.addParameter("javax.faces.ViewState", status.viewState); //
+ post.addParameter("tanCodeLogon", "tanCodeLogon"); // //
+ post.addParameter("tanCodeLogon:signButton", ""); // //
+ post.addParameter("tanCodeLogon:authCode", status.tan); //
+ post.addParameter("referenceValue", status.refVal); //
return executePost(client, post);
}
@@ -287,14 +287,14 @@ public class IAIKHandler extends MobileBKUHandler {
public void handleTANResponse(String responseData) throws Exception {
final IAIKStatus status = getStatus();
status.errorMessage = null;
- if (responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) { //$NON-NLS-1$
+ if (responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) { //
// success
getSigningState().setSignatureResponse(
new SLResponse(responseData, status.server, null, null));
} else {
try {
String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(
- responseData, "p", "class", "ui-messages-error ui-messages-error-signing"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ responseData, "p", "class", "ui-messages-error ui-messages-error-signing"); // // //
status.errorMessage = errorMessage;
log.error(errorMessage);
@@ -303,14 +303,14 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = MobileBKUHelper.getHttpClient(status);
PostMethod post = new PostMethod(status.baseURL);
- post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
- post.addParameter("javax.faces.partial.ajax", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.source", "tanCodeLogon:backbutton"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.partial.execute", "@all"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.partial.render", "tanCodeLogon:tanCodeLogonPanel"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("tanCodeLogon:backbutton", "tanCodeLogon:backbutton"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("tanCodeLogon", "tanCodeLogon"); //$NON-NLS-1$ //$NON-NLS-2$
- post.addParameter("javax.faces.ViewState", status.viewState); //$NON-NLS-1$
+ post.getParams().setContentCharset("utf-8"); //
+ post.addParameter("javax.faces.partial.ajax", "true"); // //
+ post.addParameter("javax.faces.source", "tanCodeLogon:backbutton"); // //
+ post.addParameter("javax.faces.partial.execute", "@all"); // //
+ post.addParameter("javax.faces.partial.render", "tanCodeLogon:tanCodeLogonPanel"); // //
+ post.addParameter("tanCodeLogon:backbutton", "tanCodeLogon:backbutton"); // //
+ post.addParameter("tanCodeLogon", "tanCodeLogon"); // //
+ post.addParameter("javax.faces.ViewState", status.viewState); //
executePost(client, post);
} catch (Exception e) {
@@ -318,8 +318,8 @@ public class IAIKHandler extends MobileBKUHandler {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
- Dialog dialog = new Dialog(IAIKHandler.this.shell, Messages.getString("common.warning"), //$NON-NLS-1$
- Messages.getString("mobileBKU.tan_tries_exceeded"), //$NON-NLS-1$
+ Dialog dialog = new Dialog(IAIKHandler.this.shell, Messages.getString("common.warning"), //
+ Messages.getString("mobileBKU.tan_tries_exceeded"), //
BUTTONS.OK_CANCEL, ICON.QUESTION);
// TODO: ALSO A COLOSSAL HACK HERE
if (dialog.open() == SWT.CANCEL) {
@@ -342,7 +342,7 @@ public class IAIKHandler extends MobileBKUHandler {
private String getRedirect(HttpClient client, String redirectURL) throws HttpException, IOException {
redirectURL = getStatus().ensureSessionID(redirectURL);
- log.debug("Sending get request to URL " + redirectURL); //$NON-NLS-1$
+ log.debug("Sending get request to URL " + redirectURL); //
GetMethod get = new GetMethod(redirectURL);
int returnCode = client.executeMethod(get);
@@ -350,7 +350,7 @@ public class IAIKHandler extends MobileBKUHandler {
throw new HttpException(HttpStatus.getStatusText(returnCode));
}
String responseData = get.getResponseBodyAsString();
- log.debug("Response: " + responseData); //$NON-NLS-1$
+ log.debug("Response: " + responseData); //
return responseData;
}
@@ -361,10 +361,10 @@ public class IAIKHandler extends MobileBKUHandler {
public boolean useBase64Request() {
return false;
}
-
+
@Override
public boolean handlePolling() {
//nothing todo
- return true;
+ return true;
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java
index 808df7d4..3f093ce2 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java
@@ -56,11 +56,11 @@ public class IAIKStatus extends MobileBKUStatus {
@Override
public String ensureSessionID(String url)
{
- if (url.contains("jsessionid=")) //$NON-NLS-1$
+ if (url.contains("jsessionid=")) //
return url;
if (this.sessionID != null)
- url += ";jsessionid=" + this.sessionID; //$NON-NLS-1$
+ url += ";jsessionid=" + this.sessionID; //
return url;
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java
index 200ca54e..8268f6f5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java
@@ -79,14 +79,14 @@ public abstract class MobileBKUHandler {
sl_request = request.getRequest();
if (useBase64Request())
{
- post.addParameter("XMLRequest", sl_request); //$NON-NLS-1$
+ post.addParameter("XMLRequest", sl_request); //
} else {
StringPart xmlpart = new StringPart(
- "XMLRequest", sl_request, "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
+ "XMLRequest", sl_request, "UTF-8"); // //
- FilePart filepart = new FilePart("fileupload", //$NON-NLS-1$
+ FilePart filepart = new FilePart("fileupload", //
new FileUploadSource(request.getSignatureData()),
- "application/pdf", "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
+ "application/pdf", "UTF-8"); // //
Part[] parts = { xmlpart, filepart };
@@ -95,9 +95,9 @@ public abstract class MobileBKUHandler {
}
} else {
sl_request = request.getRequest();
- post.addParameter("XMLRequest", sl_request); //$NON-NLS-1$
+ post.addParameter("XMLRequest", sl_request); //
}
- log.trace("SL Request: " + sl_request); //$NON-NLS-1$
+ log.trace("SL Request: " + sl_request); //
state.status.baseURL = MobileBKUHelper.stripQueryString(mobileBKUUrl);
@@ -176,21 +176,21 @@ public abstract class MobileBKUHandler {
ByteArrayOutputStream os = new ByteArrayOutputStream();
post.getRequestEntity().writeRequest(os);
req = os.toString();
- if (req.contains("passwort=")) //$NON-NLS-1$
- req = req.replaceAll("passwort=[^&]*", "passwort=******"); //$NON-NLS-1$ //$NON-NLS-2$
- if (req.contains(":pwd=")) //$NON-NLS-1$
- req = req.replaceAll(":pwd=[^&]*", ":pwd=******"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (req.contains("passwort=")) //
+ req = req.replaceAll("passwort=[^&]*", "passwort=******"); // //
+ if (req.contains(":pwd=")) //
+ req = req.replaceAll(":pwd=[^&]*", ":pwd=******"); // //
os.close();
} else {
- req = post.getRequestEntity().getContentLength() + " bytes"; //$NON-NLS-1$
+ req = post.getRequestEntity().getContentLength() + " bytes"; //
}
- log.debug("Posting to " + post.getURI() + ": " + req); //$NON-NLS-1$ //$NON-NLS-2$
+ log.debug("Posting to " + post.getURI() + ": " + req); // //
}
int returnCode = client.executeMethod(post);
String redirectLocation = null;
GetMethod get = null;
-
+
String responseData = null;
@@ -202,12 +202,12 @@ public abstract class MobileBKUHandler {
if (returnCode == HttpStatus.SC_MOVED_TEMPORARILY ||
returnCode == HttpStatus.SC_MOVED_PERMANENTLY) {
- Header locationHeader = post.getResponseHeader("location"); //$NON-NLS-1$
+ Header locationHeader = post.getResponseHeader("location"); //
if (locationHeader != null) {
redirectLocation = locationHeader.getValue();
} else {
throw new IOException(
- "Got HTTP 302 but no location to follow!"); //$NON-NLS-1$
+ "Got HTTP 302 but no location to follow!"); //
}
} else if (returnCode == HttpStatus.SC_OK) {
if (get != null) {
@@ -225,12 +225,12 @@ public abstract class MobileBKUHandler {
server = serverHeader.getValue();
}
redirectLocation = null;
- String p = "<meta [^>]*http-equiv=\"refresh\" [^>]*content=\"([^\"]*)\""; //$NON-NLS-1$
+ String p = "<meta [^>]*http-equiv=\"refresh\" [^>]*content=\"([^\"]*)\""; //
Pattern pat = Pattern.compile(p);
Matcher m = pat.matcher(responseData);
if (m.find()) {
String content = m.group(1);
- int start = content.indexOf("URL="); //$NON-NLS-1$
+ int start = content.indexOf("URL="); //
if (start != -1) {
start += 9;
redirectLocation = content.substring(start, content.length() - 5);
@@ -244,7 +244,7 @@ public abstract class MobileBKUHandler {
if (redirectLocation != null) {
redirectLocation = MobileBKUHelper.getQualifiedURL(redirectLocation, new URL(post.getURI().toString()));
redirectLocation = getStatus().ensureSessionID(redirectLocation);
- log.debug("Redirected to " + redirectLocation); //$NON-NLS-1$
+ log.debug("Redirected to " + redirectLocation); //
get = new GetMethod(redirectLocation);
get.setFollowRedirects(true);
returnCode = client.executeMethod(get);
@@ -253,7 +253,7 @@ public abstract class MobileBKUHandler {
getStatus().server = server;
if (server != null)
- log.info("Server: " + server); //$NON-NLS-1$
+ log.info("Server: " + server); //
return responseData;
}
@@ -266,7 +266,7 @@ public abstract class MobileBKUHandler {
* @throws IOException IO error
*/
protected String executeGet(HttpClient client, GetMethod get) throws IOException {
- log.debug("Getting " + get.getURI()); //$NON-NLS-1$
+ log.debug("Getting " + get.getURI()); //
int returnCode = client.executeMethod(get);
@@ -284,12 +284,12 @@ public abstract class MobileBKUHandler {
if (returnCode == HttpStatus.SC_MOVED_TEMPORARILY ||
returnCode == HttpStatus.SC_MOVED_PERMANENTLY) {
- Header locationHeader = get.getResponseHeader("location"); //$NON-NLS-1$
+ Header locationHeader = get.getResponseHeader("location"); //
if (locationHeader != null) {
redirectLocation = locationHeader.getValue();
} else {
throw new IOException(
- "Got HTTP 302 but no location to follow!"); //$NON-NLS-1$
+ "Got HTTP 302 but no location to follow!"); //
}
} else if (returnCode == HttpStatus.SC_OK) {
if (get2 != null) {
@@ -307,12 +307,12 @@ public abstract class MobileBKUHandler {
server = serverHeader.getValue();
}
redirectLocation = null;
- String p = "<meta [^>]*http-equiv=\"refresh\" [^>]*content=\"([^\"]*)\""; //$NON-NLS-1$
+ String p = "<meta [^>]*http-equiv=\"refresh\" [^>]*content=\"([^\"]*)\""; //
Pattern pat = Pattern.compile(p);
Matcher m = pat.matcher(responseData);
if (m.find()) {
String content = m.group(1);
- int start = content.indexOf("URL="); //$NON-NLS-1$
+ int start = content.indexOf("URL="); //
if (start != -1) {
start += 9;
redirectLocation = content.substring(start, content.length() - 5);
@@ -326,7 +326,7 @@ public abstract class MobileBKUHandler {
if (redirectLocation != null) {
redirectLocation = MobileBKUHelper.getQualifiedURL(redirectLocation, new URL(get.getURI().toString()));
redirectLocation = getStatus().ensureSessionID(redirectLocation);
- log.debug("Redirected to " + redirectLocation); //$NON-NLS-1$
+ log.debug("Redirected to " + redirectLocation); //
get2 = new GetMethod(redirectLocation);
get2.setFollowRedirects(true);
returnCode = client.executeMethod(get2);
@@ -335,11 +335,11 @@ public abstract class MobileBKUHandler {
getStatus().server = server;
if (server != null)
- log.info("Server: " + server); //$NON-NLS-1$
+ log.info("Server: " + server); //
return responseData;
}
-
+
/**
* @param responseData
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java
index 9466fecb..6b9f0584 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java
@@ -36,7 +36,7 @@ import at.asit.pdfover.gui.exceptions.PasswordTooLongException;
import at.asit.pdfover.gui.exceptions.PasswordTooShortException;
/**
- *
+ *
*/
public class MobileBKUHelper {
/**
@@ -48,15 +48,15 @@ public class MobileBKUHelper {
/**
* Regular expression for mobile phone numbers: this allows the entry of
* mobile numbers in the following formats:
- *
+ *
* +(countryCode)99999999999 00(countryCode)99999999999 099999999999
* 1030199999999999 (A-Trust Test bku)
*/
- private static final String NUMBER_REGEX = "^((\\+[\\d]{2})|(00[\\d]{2})|(0)|(10301))([1-9][\\d]+)$"; //$NON-NLS-1$
+ private static final String NUMBER_REGEX = "^((\\+[\\d]{2})|(00[\\d]{2})|(0)|(10301))([1-9][\\d]+)$"; //
/**
* Extracts a substring from data starting after start and ending with end
- *
+ *
* @param data
* the whole data string
* @param start
@@ -76,16 +76,16 @@ public class MobileBKUHelper {
if (endidx > startidx) {
return data.substring(startidx, endidx);
}
- log.error("extracting substring: end not valid!: " + start + " ... " + end); //$NON-NLS-1$//$NON-NLS-2$
- throw new Exception("End string not available! Mobile BKU site changed?"); //$NON-NLS-1$
+ log.error("extracting substring: end not valid!: " + start + " ... " + end); ////
+ throw new Exception("End string not available! Mobile BKU site changed?"); //
}
- log.error("extracting substring: start not valid!: " + start + " ... " + end); //$NON-NLS-1$//$NON-NLS-2$
- throw new Exception("Start string not available! Mobile BKU site changed?"); //$NON-NLS-1$
+ log.error("extracting substring: start not valid!: " + start + " ... " + end); ////
+ throw new Exception("Start string not available! Mobile BKU site changed?"); //
}
/**
* Extracts an XML tag from data with the given param="value"
- *
+ *
* @param data
* the whole data string
* @param tag
@@ -101,25 +101,25 @@ public class MobileBKUHelper {
public static String extractTagWithParam(String data, String tag,
String param, String value) throws Exception {
String start = '<' + tag;
- int startidx, endidx = 0;
+ int startidx, endidx = 0;
while ((startidx = data.indexOf(start, endidx)) != -1) {
endidx = data.indexOf('>', startidx);
if (endidx == -1) {
- log.error("extracting tag: unterminated tag! " + tag + " (" + param + "=" + value + ")"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- throw new Exception("Tag not found! Mobile BKU site changed?"); //$NON-NLS-1$
+ log.error("extracting tag: unterminated tag! " + tag + " (" + param + "=" + value + ")"); //// // //
+ throw new Exception("Tag not found! Mobile BKU site changed?"); //
}
String found = data.substring(startidx, endidx + 1);
- if (found.contains(param + "='" + value + "'") || //$NON-NLS-1$ //$NON-NLS-2$
- found.contains(param + "=\"" + value + "\"")) //$NON-NLS-1$ //$NON-NLS-2$
+ if (found.contains(param + "='" + value + "'") || // //
+ found.contains(param + "=\"" + value + "\"")) // //
return found;
}
- log.info("extracting tag: not found!: " + tag + " (" + param + "='" + value + "')"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- throw new Exception("Tag not found! Mobile BKU site changed?"); //$NON-NLS-1$
+ log.info("extracting tag: not found!: " + tag + " (" + param + "='" + value + "')"); //// // //
+ throw new Exception("Tag not found! Mobile BKU site changed?"); //
}
/**
* Extracts a parameter value from an XML tag from data with the given param="value"
- *
+ *
* @param data
* the whole data string
* @param tag
@@ -139,25 +139,25 @@ public class MobileBKUHelper {
String found = extractTagWithParam(data, tag, param, value);
int startidx = found.indexOf(returnparam + '=');
if (startidx == -1) {
- log.error("extracting tag: param not found! " + tag + " (" + param + "=" + value + ") - " + returnparam); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- throw new Exception("Tag not found! Mobile BKU site changed?"); //$NON-NLS-1$
+ log.error("extracting tag: param not found! " + tag + " (" + param + "=" + value + ") - " + returnparam); //// // //
+ throw new Exception("Tag not found! Mobile BKU site changed?"); //
}
startidx += returnparam.length() + 1;
int endidx = found.indexOf(found.charAt(startidx), startidx + 1);
if (endidx == -1) {
- log.error("extracting tag: unterminated param value! " + tag + " (" + param + "=" + value + ") - " + returnparam); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- throw new Exception("Tag not found! Mobile BKU site changed?"); //$NON-NLS-1$
+ log.error("extracting tag: unterminated param value! " + tag + " (" + param + "=" + value + ") - " + returnparam); //// // //
+ throw new Exception("Tag not found! Mobile BKU site changed?"); //
}
return found.substring(startidx + 1, endidx);
}
-
+
/**
- * This method is the same as the non optional method but instead of throwing the exception it returns null
- * @return the string or null
+ * This method is the same as the non optional method but instead of throwing the exception it returns null
+ * @return the string or null
*/
public static String extractValueFromTagWithParamOptional(String data, String tag,
String param, String value, String returnparam) {
- String str;
+ String str;
try {
str = extractValueFromTagWithParam(data, tag, param, value, returnparam);
} catch (Exception e) {
@@ -165,12 +165,12 @@ public class MobileBKUHelper {
str = null;
}
return str;
-
+
}
/**
* Extracts the content from an XML tag from data with the given param="value"
- *
+ *
* @param data
* the whole data string
* @param tag
@@ -187,17 +187,17 @@ public class MobileBKUHelper {
String param, String value) throws Exception {
String found = extractTagWithParam(data, tag, param, value);
int startidx = data.indexOf(found) + found.length();
- int endidx = data.indexOf("</" + tag + ">", startidx); //$NON-NLS-1$ //$NON-NLS-2$
+ int endidx = data.indexOf("</" + tag + ">", startidx); // //
if (endidx == -1) {
- log.error("extracting tag: closing tag not found! " + tag + " (" + param + "=" + value + ")"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- throw new Exception("Tag not found! Mobile BKU site changed?"); //$NON-NLS-1$
+ log.error("extracting tag: closing tag not found! " + tag + " (" + param + "=" + value + ")"); //// // //
+ throw new Exception("Tag not found! Mobile BKU site changed?"); //
}
return data.substring(startidx, endidx);
}
/**
* Validates the Mobile phone number
- *
+ *
* @param number
* @return the normalized Phone number
*/
@@ -220,15 +220,15 @@ public class MobileBKUHelper {
String normalNumber = matcher.group(6);
- if (countryCode.equals("10301")) { //$NON-NLS-1$
+ if (countryCode.equals("10301")) { //
// A-Trust Testnumber! Don't change
return number;
}
- countryCode = countryCode.replace("00", "+"); //$NON-NLS-1$ //$NON-NLS-2$
+ countryCode = countryCode.replace("00", "+"); // //
- if (countryCode.equals("0")) { //$NON-NLS-1$
- countryCode = "+43"; //$NON-NLS-1$
+ if (countryCode.equals("0")) { //
+ countryCode = "+43"; //
}
return countryCode + normalNumber;
@@ -236,7 +236,7 @@ public class MobileBKUHelper {
/**
* Validate given Password for Mobile BKU
- *
+ *
* @param password
* @throws InvalidPasswordException
*/
@@ -252,7 +252,7 @@ public class MobileBKUHelper {
/**
* Removes file extension from URL
- *
+ *
* @param url
* the url string
* @return the stripped url
@@ -272,14 +272,14 @@ public class MobileBKUHelper {
* @return the fully qualified URL
*/
public static String getQualifiedURL(String fragment, URL base) {
- if (fragment.startsWith("http:") || fragment.startsWith("https:")) //$NON-NLS-1$ //$NON-NLS-2$
+ if (fragment.startsWith("http:") || fragment.startsWith("https:")) // //
return fragment;
int p = base.getPort();
- String port = ((p != -1) && (p != base.getDefaultPort())) ? ":" + p : ""; //$NON-NLS-1$ //$NON-NLS-2$
- if (fragment.startsWith("/")) { //$NON-NLS-1$
- return base.getProtocol() + "://" + base.getHost() + port + fragment; //$NON-NLS-1$
+ String port = ((p != -1) && (p != base.getDefaultPort())) ? ":" + p : ""; // //
+ if (fragment.startsWith("/")) { //
+ return base.getProtocol() + "://" + base.getHost() + port + fragment; //
}
- return stripQueryString(base.toString()) + "/" + fragment; //$NON-NLS-1$
+ return stripQueryString(base.toString()) + "/" + fragment; //
}
/**
@@ -287,8 +287,8 @@ public class MobileBKUHelper {
*/
@SuppressWarnings("deprecation")
public static void registerTrustedSocketFactory() {
- Protocol.registerProtocol("https", //$NON-NLS-1$
- new Protocol("https", new TrustedSocketFactory(), 443)); //$NON-NLS-1$
+ Protocol.registerProtocol("https", //
+ new Protocol("https", new TrustedSocketFactory(), 443)); //
}
/**
@@ -299,21 +299,21 @@ public class MobileBKUHelper {
public static HttpClient getHttpClient(MobileBKUStatus status) {
return BKUHelper.getHttpClient(true);
}
-
+
/***
- *
- * @param htmlString describes the html data in String representation
- * @param attributeName is the attribute which should be selected
+ *
+ * @param htmlString describes the html data in String representation
+ * @param attributeName is the attribute which should be selected
* @return returns the attribute name or null otherswise
*/
public static String getDynamicNameAttribute(String htmlString, String attributeName) {
-
+
Document doc = Jsoup.parse(htmlString);
Elements inputs = doc.select("div input#" + attributeName);
-
- if (inputs.size() == 0 ) return null;
-
- String name = inputs.get(0).attr("name");
- return name;
+
+ if (inputs.size() == 0 ) return null;
+
+ String name = inputs.get(0).attr("name");
+ return name;
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUStatus.java
index 7db04b68..d5058e43 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUStatus.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUStatus.java
@@ -18,7 +18,7 @@ package at.asit.pdfover.gui.bku.mobile;
import org.apache.commons.httpclient.Cookie;
/**
- *
+ *
*/
public abstract class MobileBKUStatus {
public String sessionID;
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
index e715184a..08385456 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
@@ -35,7 +35,7 @@ import org.w3c.dom.NodeList;
import at.asit.pdfover.commons.Constants;
/**
- *
+ *
*/
public class SimpleXMLTrustManager implements X509TrustManager {
/**
@@ -58,13 +58,13 @@ public class SimpleXMLTrustManager implements X509TrustManager {
/**
* Constructs the TrustManager
- *
+ *
* @throws Exception
*/
public SimpleXMLTrustManager() throws Exception {
// create a "default" JSSE X509TrustManager.
- TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); //$NON-NLS-1$
+ TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); //
tmf.init((KeyStore) null);
TrustManager tms[] = tmf.getTrustManagers();
@@ -94,8 +94,8 @@ public class SimpleXMLTrustManager implements X509TrustManager {
NodeList certificateList = certificates.getChildNodes();
try {
- if (!certificates.getNodeName().equals("certificates")) { //$NON-NLS-1$
- throw new Exception("Used certificates xml is invalid! no certificates node"); //$NON-NLS-1$
+ if (!certificates.getNodeName().equals("certificates")) { //
+ throw new Exception("Used certificates xml is invalid! no certificates node"); //
}
//add trusted certificates to certStore//
@@ -104,26 +104,26 @@ public class SimpleXMLTrustManager implements X509TrustManager {
Node certificateNode = certificateList.item(i);
- if (certificateNode.getNodeName().equals("#text")) { //$NON-NLS-1$
+ if (certificateNode.getNodeName().equals("#text")) { //
continue; // Ignore dummy text node ..
}
- if (!certificateNode.getNodeName().equals("certificate")) { //$NON-NLS-1$
- log.warn("Ignoring XML node: " + certificateNode.getNodeName()); //$NON-NLS-1$
+ if (!certificateNode.getNodeName().equals("certificate")) { //
+ log.warn("Ignoring XML node: " + certificateNode.getNodeName()); //
continue;
}
String certResource = Constants.RES_CERT_PATH + certificateNode.getTextContent();
- X509Certificate cert = (X509Certificate) CertificateFactory.getInstance("X509"). //$NON-NLS-1$
+ X509Certificate cert = (X509Certificate) CertificateFactory.getInstance("X509"). //
generateCertificate(this.getClass().getResourceAsStream(certResource));
myKeyStore.setCertificateEntry(certificateNode.getTextContent(), cert);
- log.debug("Loaded certificate : " + certResource); //$NON-NLS-1$
+ log.debug("Loaded certificate : " + certResource); //
} catch (Exception ex) {
- log.error("Failed to load certificate [" + "]", ex); //$NON-NLS-1$ //$NON-NLS-2$
+ log.error("Failed to load certificate [" + "]", ex); // //
}
}
@@ -156,12 +156,12 @@ public class SimpleXMLTrustManager implements X509TrustManager {
* Find some other way to initialize, or else we have to fail the
* constructor.
*/
- throw new Exception("Couldn't initialize ASITTrustManager"); //$NON-NLS-1$
+ throw new Exception("Couldn't initialize ASITTrustManager"); //
}
/*
* (non-Javadoc)
- *
+ *
* @see
* javax.net.ssl.X509TrustManager#checkClientTrusted(java.security.cert.
* X509Certificate[], java.lang.String)
@@ -174,7 +174,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
try {
this.sunJSSEX509TrustManager.checkClientTrusted(arg0, arg1);
} catch (CertificateException ex2) {
- log.info("checkClientTrusted: ", ex2); //$NON-NLS-1$
+ log.info("checkClientTrusted: ", ex2); //
throw ex2;
}
}
@@ -182,7 +182,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
/*
* (non-Javadoc)
- *
+ *
* @see
* javax.net.ssl.X509TrustManager#checkServerTrusted(java.security.cert.
* X509Certificate[], java.lang.String)
@@ -195,7 +195,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
try {
this.sunJSSEX509TrustManager.checkServerTrusted(arg0, arg1);
} catch (CertificateException ex2) {
- log.info("checkServerTrusted: ", ex2); //$NON-NLS-1$
+ log.info("checkServerTrusted: ", ex2); //
throw ex2;
}
}
@@ -203,7 +203,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
/*
* (non-Javadoc)
- *
+ *
* @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
*/
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java
index 7b465b25..ff9b48a0 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java
@@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.commons.Messages;
/**
- *
+ *
*/
public class TrustedSocketFactory implements SecureProtocolSocketFactory {
/**
@@ -49,15 +49,15 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
.getLogger(TrustedSocketFactory.class);
private static final String ENABLED_CS[] = {
- "TLS_RSA_WITH_AES_128_CBC_SHA", //$NON-NLS-1$
- "SSL_RSA_WITH_RC4_128_SHA", //$NON-NLS-1$
- "SSL_RSA_WITH_3DES_EDE_CBC_SHA", //$NON-NLS-1$
- "SSL_RSA_WITH_RC4_128_MD5" //$NON-NLS-1$
+ "TLS_RSA_WITH_AES_128_CBC_SHA", //
+ "SSL_RSA_WITH_RC4_128_SHA", //
+ "SSL_RSA_WITH_3DES_EDE_CBC_SHA", //
+ "SSL_RSA_WITH_RC4_128_MD5" //
};
private static SSLSocketFactory getFactory() throws NoSuchAlgorithmException,
KeyManagementException, Exception {
- SSLContext sslContext = SSLContext.getInstance("TLS"); //$NON-NLS-1$
+ SSLContext sslContext = SSLContext.getInstance("TLS"); //
sslContext.init(null, new TrustManager[] { new SimpleXMLTrustManager() },
new java.security.SecureRandom());
@@ -66,7 +66,7 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket
* (java.lang.String, int)
@@ -80,21 +80,21 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
sslSocket.setEnabledCipherSuites(ENABLED_CS);
return sslSocket;
} catch (Exception ex) {
- log.error("TrustedSocketFactory: ", ex); //$NON-NLS-1$
+ log.error("TrustedSocketFactory: ", ex); //
if (ex instanceof IOException) {
throw (IOException) ex;
} else if (ex instanceof UnknownHostException) {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //
}
}
}
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket
* (java.lang.String, int, java.net.InetAddress, int)
@@ -108,21 +108,21 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
sslSocket.setEnabledCipherSuites(ENABLED_CS);
return sslSocket;
} catch (Exception ex) {
- log.error("TrustedSocketFactory: ", ex); //$NON-NLS-1$
+ log.error("TrustedSocketFactory: ", ex); //
if (ex instanceof IOException) {
throw (IOException) ex;
} else if (ex instanceof UnknownHostException) {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //
}
}
}
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket
* (java.lang.String, int, java.net.InetAddress, int,
@@ -134,7 +134,7 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
UnknownHostException, ConnectTimeoutException {
try {
if (params == null) {
- throw new IllegalArgumentException("Parameters may not be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("Parameters may not be null"); //
}
int timeout = params.getConnectionTimeout();
SSLSocket sslSocket = null;
@@ -154,14 +154,14 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
sslSocket.setEnabledCipherSuites(ENABLED_CS);
return sslSocket;
} catch (Exception ex) {
- log.error("TrustedSocketFactory: ", ex); //$NON-NLS-1$
+ log.error("TrustedSocketFactory: ", ex); //
if (ex instanceof IOException) {
throw (IOException) ex;
} else if (ex instanceof UnknownHostException) {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //
}
}
}
@@ -177,14 +177,14 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
sslSocket.setEnabledCipherSuites(ENABLED_CS);
return sslSocket;
} catch (Exception ex) {
- log.error("TrustedSocketFactory: ", ex); //$NON-NLS-1$
+ log.error("TrustedSocketFactory: ", ex); //
if (ex instanceof IOException) {
throw (IOException) ex;
} else if (ex instanceof UnknownHostException) {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //
}
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java
index 1b7aca28..b2ecb3aa 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java
@@ -23,7 +23,7 @@ import at.asit.pdfover.gui.workflow.config.ConfigOverlayManipulator;
/**
* CLI Argument base class
- *
+ *
* Implementing arguments have to be registered in PrepareConfigurationState
*/
public abstract class Argument {
@@ -86,9 +86,9 @@ public abstract class Argument {
/**
* Set the command option in format: -...
- *
+ *
* Examples: -h
- *
+ *
* @param value
*/
protected void setCommandOptions(String[] value) {
@@ -97,7 +97,7 @@ public abstract class Argument {
/**
* Get the command option
- *
+ *
* Examples: -h
* @return the command option
*/
@@ -107,25 +107,25 @@ public abstract class Argument {
/**
* Invokes the argument to set stuff within the stateMachine
- *
+ *
* It should return the offset within the args array where the last used argument of this Argument was used.
- *
+ *
* Example:
* args[] = { "-h", "-b", "LOCAL" }
- *
+ *
* Help Argument call:
* offset = 0
* returns 0
- *
+ *
* BKU Argument call:
* offset = 1
* returns 2
- *
+ *
* @param args
* @param argOffset
- * @param handler
+ * @param handler
* @return returns the argumentOffset ending the section of this Argument
- * @throws InitializationException
+ * @throws InitializationException
*/
public abstract int handleArgument(String[] args, int argOffset, ArgumentHandler handler) throws InitializationException;
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
index dbc92a29..54ccbb48 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
@@ -45,7 +45,7 @@ public class ArgumentHandler {
/**
* Constructor
- *
+ *
* @param stateMachine
*/
public ArgumentHandler(StateMachine stateMachine) {
@@ -54,7 +54,7 @@ public class ArgumentHandler {
/**
* Gets available Arguments
- *
+ *
* @return the list of available arguments
*/
public Set<Argument> getArguments() {
@@ -63,7 +63,7 @@ public class ArgumentHandler {
/**
* Adds a CLIArgument to the handler
- *
+ *
* @param cliArgument the CLIArgument subclass to add
*/
public void addCLIArgument(Class<? extends Argument> cliArgument) {
@@ -84,13 +84,13 @@ public class ArgumentHandler {
this.cliArguments.put(commandOptions[i], arg);
}
} catch (Exception e) {
- log.error("Error instantiating CLI argument" , e); //$NON-NLS-1$
+ log.error("Error instantiating CLI argument" , e); //
}
}
/**
* Handle CLI Arguments
- *
+ *
* @param args
* @throws InitializationException
*/
@@ -101,8 +101,8 @@ public class ArgumentHandler {
i = this.cliArguments.get(args[i]).handleArgument(args, i, this);
} else {
// Assume we got the document we want to sign
- if (this.cliArguments.containsKey("-i")) { //$NON-NLS-1$
- i = this.cliArguments.get("-i").handleArgument(args, i-1, this); //$NON-NLS-1$
+ if (this.cliArguments.containsKey("-i")) { //
+ i = this.cliArguments.get("-i").handleArgument(args, i-1, this); //
}
}
}
@@ -110,7 +110,7 @@ public class ArgumentHandler {
/**
* Set by a cli argument if it wants the program to exit
- *
+ *
* @param requireExit
*/
public void setRequireExit(boolean requireExit) {
@@ -119,7 +119,7 @@ public class ArgumentHandler {
/**
* Checks if one argument required the program to exit immediately
- *
+ *
* @return true or false
*/
public boolean doesRequireExit() {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java
index 3c6b9f3e..29ce09cb 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java
@@ -26,12 +26,12 @@ public class AutomaticPositioningArgument extends Argument {
* Constructor
*/
public AutomaticPositioningArgument() {
- super(new String[] { "-a" }, "argument.help.autopos"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] { "-a" }, "argument.help.autopos"); // //
}
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang
* .String[], int, at.asit.pdfover.gui.workflow.StateMachine,
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
index 646d361d..8760438a 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
@@ -28,12 +28,12 @@ public class BKUArgument extends Argument {
*/
public BKUArgument() {
super(
- new String[] { "-b" }, "argument.help.bku"); //$NON-NLS-1$ //$NON-NLS-2$
+ new String[] { "-b" }, "argument.help.bku"); // //
}
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang
* .String[], int, at.asit.pdfover.gui.workflow.StateMachine,
@@ -49,16 +49,16 @@ public class BKUArgument extends Argument {
BKUs argumentValue = BKUs.valueOf(args[argOffset + 1]);
getConfiguration().setDefaultBKUOverlay(argumentValue);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
throw new InitializationException(
- Messages.getString("argument.invalid.bku") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.bku") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.bku") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.bku") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
index e14782ae..d7fa5de4 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
@@ -36,9 +36,9 @@ public class ConfigFileArgument extends Argument {
* Constructor
*/
public ConfigFileArgument() {
- super(new String[] {"-c"}, "argument.help.config"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-c"}, "argument.help.config"); // //
}
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang.String[], int, at.asit.pdfover.gui.workflow.StateMachine, at.asit.pdfover.gui.cliarguments.ArgumentHandler)
*/
@@ -50,19 +50,19 @@ public class ConfigFileArgument extends Argument {
if (args.length > argOffset + 1) {
String configFile = args[argOffset + 1];
-
+
getConfiguration().setConfigurationFile(configFile);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Configuration File Argument invalid!", ex); //$NON-NLS-1$
+ log.error("Configuration File Argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.config") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.config") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.config") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.config") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
index 31d11fc6..cc0b15ca 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
@@ -33,7 +33,7 @@ public class EmblemArgument extends Argument {
* Constructor
*/
public EmblemArgument() {
- super(new String[] {"-e"}, "argument.help.emblem"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-e"}, "argument.help.emblem"); // //
}
/**
@@ -55,23 +55,23 @@ public class EmblemArgument extends Argument {
String emblem = args[argOffset + 1];
File emblemFile = new File(emblem);
-
+
if(!emblemFile.exists()) {
throw new FileNotFoundException(emblem);
}
-
+
getConfiguration().setDefaultEmblemOverlay(emblem);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Emblem argument invalid!", ex); //$NON-NLS-1$
+ log.error("Emblem argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.emblem") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.emblem") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.emblem") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.emblem") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
index 4296bb3a..cdcc7a32 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
@@ -26,15 +26,15 @@ import at.asit.pdfover.commons.Messages;
* CLI Argument to show the useage message
*/
public class HelpArgument extends Argument {
-
+
/**
* Constructor
*/
public HelpArgument() {
- super(new String[] {"-h", "-?", "--help" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- "argument.help.help"); //$NON-NLS-1$
+ super(new String[] {"-h", "-?", "--help" }, // // //
+ "argument.help.help"); //
}
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang.String[], int, at.asit.pdfover.gui.workflow.StateMachine, at.asit.pdfover.gui.cliarguments.ArgumentHandler)
*/
@@ -43,29 +43,29 @@ public class HelpArgument extends Argument {
ArgumentHandler handler)
throws InitializationException {
Set<Argument> arguments = handler.getArguments();
-
+
Iterator<Argument> argumentIterator = arguments.iterator();
-
- System.out.println(Messages.getString("argument.info.help")); //$NON-NLS-1$
-
+
+ System.out.println(Messages.getString("argument.info.help")); //
+
while(argumentIterator.hasNext()) {
Argument argument = argumentIterator.next();
StringBuilder sb = new StringBuilder();
-
+
for(int i = 0; i < argument.getCommandOptions().length; i++) {
sb.append(argument.getCommandOptions()[i]);
-
+
if(i < argument.getCommandOptions().length -1) {
- sb.append(", "); //$NON-NLS-1$
+ sb.append(", "); //
}
}
-
- System.out.println(sb.toString() + ":"); //$NON-NLS-1$
- System.out.println("\t" + argument.getHelpText()); //$NON-NLS-1$
+
+ System.out.println(sb.toString() + ":"); //
+ System.out.println("\t" + argument.getHelpText()); //
}
-
+
handler.setRequireExit(true);
-
+
return argOffset;
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
index 756effb2..6b62fb83 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
@@ -33,7 +33,7 @@ public class InputDocumentArgument extends Argument {
* Constructor
*/
public InputDocumentArgument() {
- super(new String[] {"-i"}, "argument.help.input"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-i"}, "argument.help.input"); // //
}
/**
@@ -53,25 +53,25 @@ public class InputDocumentArgument extends Argument {
if (args.length > argOffset + 1) {
String signatureDocument = args[argOffset + 1];
-
+
File signatureDocumentFile = new File(signatureDocument);
-
+
if(!signatureDocumentFile.exists()) {
throw new FileNotFoundException(signatureDocument);
}
-
+
getStatus().setDocument(signatureDocumentFile);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Document to sign argument invalid!", ex); //$NON-NLS-1$
+ log.error("Document to sign argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.input") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.input") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.input") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.input") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
index af819470..cf87865c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
@@ -32,7 +32,7 @@ public class InvisibleProfile extends Argument {
* Constructor
*/
public InvisibleProfile() {
- super(new String[] {"-v"}, "argument.help.vis"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-v"}, "argument.help.vis"); // //
}
/**
@@ -50,21 +50,21 @@ public class InvisibleProfile extends Argument {
throws InitializationException {
try {
log.info("Set Profile Invisible");
-
+
if (args.length > argOffset + 1) {
PdfAs4SignatureParameter.PROFILE_VISIBILITY=false;
log.debug("We are setting the profile visibility to false");
- return argOffset + 1;
+ return argOffset + 1;
}
-
+
} catch (Exception ex) {
- log.error("Signature Profile Visibilty Error", ex); //$NON-NLS-1$
+ log.error("Signature Profile Visibilty Error", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.vis") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.vis") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.vis") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.vis") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java
index 3874f4ef..558c3555 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java
@@ -30,7 +30,7 @@ public class KeystoreAliasArgument extends Argument {
* Constructor
*/
public KeystoreAliasArgument() {
- super(new String[] {"-ksalias"}, "argument.help.keystorealias"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-ksalias"}, "argument.help.keystorealias"); // //
}
/**
@@ -50,19 +50,19 @@ public class KeystoreAliasArgument extends Argument {
if (args.length > argOffset + 1) {
String ksAlias = args[argOffset + 1];
-
+
getConfiguration().setKeyStoreAliasOverlay(ksAlias);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore alias argument invalid!", ex); //$NON-NLS-1$
+ log.error("Keystore alias argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java
index 66ebe286..596bdafc 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java
@@ -33,7 +33,7 @@ public class KeystoreFileArgument extends Argument {
* Constructor
*/
public KeystoreFileArgument() {
- super(new String[] {"-ks"}, "argument.help.keystorefile"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-ks"}, "argument.help.keystorefile"); // //
}
/**
@@ -53,24 +53,24 @@ public class KeystoreFileArgument extends Argument {
if (args.length > argOffset + 1) {
String ksFile = args[argOffset + 1];
-
+
File ks = new File(ksFile);
if(!ks.exists() || !ks.isFile())
throw new KeystoreDoesntExistException(ks, 0);
-
+
getConfiguration().setKeyStoreFileOverlay(ksFile);
getConfiguration().setKeyStoreEnabledOverlay(true);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore file argument invalid!", ex); //$NON-NLS-1$
+ log.error("Keystore file argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java
index ca3fd5e8..55324a08 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java
@@ -30,7 +30,7 @@ public class KeystoreKeyPassArgument extends Argument {
* Constructor
*/
public KeystoreKeyPassArgument() {
- super(new String[] {"-kskeypass"}, "argument.help.keystorekeypass"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-kskeypass"}, "argument.help.keystorekeypass"); // //
}
/**
@@ -50,19 +50,19 @@ public class KeystoreKeyPassArgument extends Argument {
if (args.length > argOffset + 1) {
String ksKeyPass = args[argOffset + 1];
-
+
getConfiguration().setKeyStoreKeyPassOverlay(ksKeyPass);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore key password argument invalid!", ex); //$NON-NLS-1$
+ log.error("Keystore key password argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java
index f7b8e116..a9f2b3d8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java
@@ -30,7 +30,7 @@ public class KeystoreStorePassArgument extends Argument {
* Constructor
*/
public KeystoreStorePassArgument() {
- super(new String[] {"-kspass"}, "argument.help.keystorestorepass"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-kspass"}, "argument.help.keystorestorepass"); // //
}
/**
@@ -50,19 +50,19 @@ public class KeystoreStorePassArgument extends Argument {
if (args.length > argOffset + 1) {
String ksStorePass = args[argOffset + 1];
-
+
getConfiguration().setKeyStoreStorePassOverlay(ksStorePass);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore password argument invalid!", ex); //$NON-NLS-1$
+ log.error("Keystore password argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java
index 47d1972b..b949cc40 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java
@@ -30,7 +30,7 @@ public class KeystoreTypeArgument extends Argument {
* Constructor
*/
public KeystoreTypeArgument() {
- super(new String[] {"-kstype"}, "argument.help.keystoretype"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-kstype"}, "argument.help.keystoretype"); // //
}
/**
@@ -50,19 +50,19 @@ public class KeystoreTypeArgument extends Argument {
if (args.length > argOffset + 1) {
String ksType = args[argOffset + 1];
-
+
getConfiguration().setKeyStoreTypeOverlay(ksType);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore type argument invalid!", ex); //$NON-NLS-1$
+ log.error("Keystore type argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
index ad9c3520..2ac80cd1 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
@@ -30,7 +30,7 @@ public class OutputFolderArgument extends Argument {
* Constructor
*/
public OutputFolderArgument() {
- super(new String[] {"-o"}, "argument.help.output"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-o"}, "argument.help.output"); // //
}
/**
@@ -55,7 +55,7 @@ public class OutputFolderArgument extends Argument {
// throw new FileNotFoundException(outputFolder);
// }
// if(!outputFolderDir.isDirectory()) {
-// throw new IOException(outputFolderDir + Messages.getString("argument.error.output")); //$NON-NLS-1$
+// throw new IOException(outputFolderDir + Messages.getString("argument.error.output")); //
// }
getConfiguration().setDefaultOutputFolderOverlay(outputFolder);
@@ -63,13 +63,13 @@ public class OutputFolderArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Output folder argument invalid!", ex); //$NON-NLS-1$
+ log.error("Output folder argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.output") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.output") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.output") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.output") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
index 60c4c3bc..6a464410 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
@@ -31,7 +31,7 @@ public class PasswordArgument extends Argument {
* Constructor
*/
public PasswordArgument() {
- super(new String[] {"-p"}, "argument.help.password"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-p"}, "argument.help.password"); // //
}
/**
@@ -53,19 +53,19 @@ public class PasswordArgument extends Argument {
String password = args[argOffset + 1];
MobileBKUHelper.validatePassword(password);
-
+
getConfiguration().setDefaultMobilePasswordOverlay(password);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Mobile BKU password argument invalid!", ex); //$NON-NLS-1$
+ log.error("Mobile BKU password argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.password") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.password") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.password") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.password") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
index 6f49e6ce..b0a10491 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
@@ -31,7 +31,7 @@ public class PhoneNumberArgument extends Argument {
* Constructor
*/
public PhoneNumberArgument() {
- super(new String[] {"-n" }, "argument.help.number"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-n" }, "argument.help.number"); // //
}
@@ -41,7 +41,7 @@ public class PhoneNumberArgument extends Argument {
private static final Logger log = LoggerFactory
.getLogger(PhoneNumberArgument.class);
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang.String[], int, at.asit.pdfover.gui.workflow.StateMachine, at.asit.pdfover.gui.cliarguments.ArgumentHandler)
*/
@@ -56,19 +56,19 @@ public class PhoneNumberArgument extends Argument {
String number = args[argOffset + 1];
number = MobileBKUHelper.normalizeMobileNumber(number);
-
+
getConfiguration().setDefaultMobileNumberOverlay(number);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Phone Number Argument invalid!", ex); //$NON-NLS-1$
+ log.error("Phone Number Argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.number") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.number") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.number") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.number") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
index 924bacda..fae84543 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
@@ -30,7 +30,7 @@ public class ProxyHostArgument extends Argument {
* Constructor
*/
public ProxyHostArgument() {
- super(new String[] {"-proxy"}, "argument.help.proxyhost"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-proxy"}, "argument.help.proxyhost"); // //
}
/**
@@ -50,19 +50,19 @@ public class ProxyHostArgument extends Argument {
if (args.length > argOffset + 1) {
String proxyHost = args[argOffset + 1];
-
+
getConfiguration().setProxyHostOverlay(proxyHost);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Proxy host argument invalid!", ex); //$NON-NLS-1$
+ log.error("Proxy host argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java
index 3640b1d1..9456006f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java
@@ -30,7 +30,7 @@ public class ProxyPassArgument extends Argument {
* Constructor
*/
public ProxyPassArgument() {
- super(new String[] {"-proxypass"}, "argument.help.proxypass"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-proxypass"}, "argument.help.proxypass"); // //
}
/**
@@ -50,19 +50,19 @@ public class ProxyPassArgument extends Argument {
if (args.length > argOffset + 1) {
String proxyPass = args[argOffset + 1];
-
+
getConfiguration().setProxyPassOverlay(proxyPass);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Proxy password argument invalid!", ex); //$NON-NLS-1$
+ log.error("Proxy password argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.proxypass") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.proxypass") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.proxypass") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.proxypass") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
index 808c1352..820b3ed5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
@@ -31,7 +31,7 @@ public class ProxyPortArgument extends Argument {
* Constructor
*/
public ProxyPortArgument() {
- super(new String[] {"-proxyport"}, "argument.help.proxyport"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-proxyport"}, "argument.help.proxyport"); // //
}
/**
@@ -51,25 +51,25 @@ public class ProxyPortArgument extends Argument {
if (args.length > argOffset + 1) {
String proxyPortString = args[argOffset + 1];
-
+
int port = Integer.parseInt(proxyPortString);
-
+
if(port <= 0 || port > 0xFFFF) {
throw new InvalidPortException(port);
}
-
+
getConfiguration().setProxyPortOverlay(port);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Proxy port argument invalid!", ex); //$NON-NLS-1$
+ log.error("Proxy port argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.proxyport") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.proxyport") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.proxyport") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.proxyport") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java
index 8e636186..71592b35 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java
@@ -30,7 +30,7 @@ public class ProxyUserArgument extends Argument {
* Constructor
*/
public ProxyUserArgument() {
- super(new String[] {"-proxyuser"}, "argument.help.proxyuser"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] {"-proxyuser"}, "argument.help.proxyuser"); // //
}
/**
@@ -50,19 +50,19 @@ public class ProxyUserArgument extends Argument {
if (args.length > argOffset + 1) {
String proxyUser = args[argOffset + 1];
-
+
getConfiguration().setProxyUserOverlay(proxyUser);
-
+
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Proxy username argument invalid!", ex); //$NON-NLS-1$
+ log.error("Proxy username argument invalid!", ex); //
throw new InitializationException(
- Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), ex); //$NON-NLS-1$
+ Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), ex); //
}
throw new InitializationException(
- Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), null); //$NON-NLS-1$
+ Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), null); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java
index 44e35f87..f49e784f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java
@@ -25,12 +25,12 @@ public class SkipFinishArgument extends Argument {
* Constructor
*/
public SkipFinishArgument() {
- super(new String[] { "-s" }, "argument.help.skipfinish"); //$NON-NLS-1$ //$NON-NLS-2$
+ super(new String[] { "-s" }, "argument.help.skipfinish"); // //
}
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang
* .String[], int, at.asit.pdfover.gui.workflow.StateMachine,
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
index 01d6c41c..7bba2860 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
@@ -40,14 +40,14 @@ import at.asit.pdfover.signator.BKUs;
* Composite for BKU selection
*/
public class BKUSelectionComposite extends StateComposite {
-
+
/**
* Margin for button
*/
public static final int btnMargin = 2;
-
+
/**
- * Listener for local bku selection
+ * Listener for local bku selection
*/
private final class LocalSelectionListener extends SelectionAdapter {
/**
@@ -58,13 +58,13 @@ public class BKUSelectionComposite extends StateComposite {
@Override
public void widgetSelected(SelectionEvent e) {
- log.debug("Setting BKU to LOCAL"); //$NON-NLS-1$
+ log.debug("Setting BKU to LOCAL"); //
setSelected(BKUs.LOCAL);
}
}
-
+
/**
- * Listener for mobile bku selection
+ * Listener for mobile bku selection
*/
private final class MobileSelectionListener extends SelectionAdapter {
/**
@@ -75,13 +75,13 @@ public class BKUSelectionComposite extends StateComposite {
@Override
public void widgetSelected(SelectionEvent e) {
- log.debug("Setting BKU to MOBILE"); //$NON-NLS-1$
+ log.debug("Setting BKU to MOBILE"); //
setSelected(BKUs.MOBILE);
}
}
/**
- * Listener for keystore selection
+ * Listener for keystore selection
*/
private final class KSSelectionListener extends SelectionAdapter {
/**
@@ -92,7 +92,7 @@ public class BKUSelectionComposite extends StateComposite {
@Override
public void widgetSelected(SelectionEvent e) {
- log.debug("Setting BKU to KS"); //$NON-NLS-1$
+ log.debug("Setting BKU to KS"); //
setSelected(BKUs.KS);
}
}
@@ -149,7 +149,7 @@ public class BKUSelectionComposite extends StateComposite {
* Create the composite.
* @param parent
* @param style
- * @param state
+ * @param state
*/
public BKUSelectionComposite(Composite parent, int style, State state) {
super(parent, style, state);
@@ -229,9 +229,9 @@ public class BKUSelectionComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.btnMobile.setText(Messages.getString("bku_selection.mobile")); //$NON-NLS-1$
- this.btnCard.setText(Messages.getString("bku_selection.card")); //$NON-NLS-1$
+ this.btnMobile.setText(Messages.getString("bku_selection.mobile")); //
+ this.btnCard.setText(Messages.getString("bku_selection.card")); //
if (this.btnKS != null)
- this.btnKS.setText(Messages.getString("bku_selection.ks")); //$NON-NLS-1$
+ this.btnKS.setText(Messages.getString("bku_selection.ks")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
index f2e10726..10a2a2f4 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
@@ -140,7 +140,7 @@ public class ConfigurationComposite extends StateComposite {
/**
* Create the composite.
- *
+ *
* @param parent
* @param style
* @param state
@@ -166,7 +166,7 @@ public class ConfigurationComposite extends StateComposite {
this.tabFolder.setFont(new Font(Display.getCurrent(), fD_tabFolder[0]));
this.simpleTabItem = new TabItem(this.tabFolder, SWT.NONE);
- this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$
+ this.simpleTabItem.setText(Messages.getString("config.Simple")); //
ScrolledComposite simpleCompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
this.simpleTabItem.setControl(simpleCompositeScr);
@@ -177,7 +177,7 @@ public class ConfigurationComposite extends StateComposite {
simpleCompositeScr.setMinSize(simpleConfigComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
this.advancedTabItem = new TabItem(this.tabFolder, SWT.NONE);
- this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$
+ this.advancedTabItem.setText(Messages.getString("config.Advanced")); //
ScrolledComposite advancedCompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
this.advancedTabItem.setControl(advancedCompositeScr);
@@ -188,7 +188,7 @@ public class ConfigurationComposite extends StateComposite {
advancedCompositeScr.setMinSize(advancedConfigComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
this.aboutTabItem = new TabItem(this.tabFolder, SWT.NONE);
- this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$
+ this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //
ScrolledComposite aboutCompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
this.aboutTabItem.setControl(aboutCompositeScr);
@@ -219,7 +219,7 @@ public class ConfigurationComposite extends StateComposite {
}
}
});
- this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$
+ this.btnSpeichern.setText(Messages.getString("common.Save")); //
getShell().setDefaultButton(this.btnSpeichern);
FontData[] fD_btnSpeichern = this.btnSpeichern.getFont().getFontData();
@@ -231,7 +231,7 @@ public class ConfigurationComposite extends StateComposite {
fd_btnAbrechen.right = new FormAttachment(this.btnSpeichern, -10);
fd_btnAbrechen.bottom = new FormAttachment(this.btnSpeichern, 0, SWT.BOTTOM);
this.btnAbbrechen.setLayoutData(fd_btnAbrechen);
- this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
+ this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //
this.btnAbbrechen.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -287,8 +287,8 @@ public class ConfigurationComposite extends StateComposite {
public void keystoreEnabled(boolean enabled) {
if (enabled && this.keystoreConfigComposite == null) {
this.keystoreTabItem = new TabItem(this.tabFolder, SWT.NONE, 2);
- this.keystoreTabItem.setText(Messages.getString("config.Keystore")); //$NON-NLS-1$
-
+ this.keystoreTabItem.setText(Messages.getString("config.Keystore")); //
+
ScrolledComposite keystoreCompositeScr = new ScrolledComposite(
this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
this.keystoreTabItem.setControl(keystoreCompositeScr);
@@ -313,7 +313,7 @@ public class ConfigurationComposite extends StateComposite {
/**
* Sets the configuration manipulator
- *
+ *
* @param manipulator
*/
public void setConfigManipulator(ConfigManipulator manipulator) {
@@ -322,7 +322,7 @@ public class ConfigurationComposite extends StateComposite {
/**
* Sets the configuration provider
- *
+ *
* @param provider
*/
public void setConfigProvider(PersistentConfigProvider provider) {
@@ -351,7 +351,7 @@ public class ConfigurationComposite extends StateComposite {
redo = false;
status = true;
} catch (ResumableException e) {
- log.error("Settings validation failed!", e); //$NON-NLS-1$
+ log.error("Settings validation failed!", e); //
ErrorDialog dialog = new ErrorDialog(getShell(),
e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
int rc = dialog.open();
@@ -380,7 +380,7 @@ public class ConfigurationComposite extends StateComposite {
redo = false;
status = true;
} catch (ResumableException e) {
- log.error("Settings validation failed!", e); //$NON-NLS-1$
+ log.error("Settings validation failed!", e); //
ErrorDialog dialog = new ErrorDialog(getShell(),
e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
int rc = dialog.open();
@@ -402,19 +402,19 @@ public class ConfigurationComposite extends StateComposite {
status = false;
redo = false;
resumeIndex = 0;
-
+
do {
try {
this.keystoreConfigComposite.validateSettings(resumeIndex);
-
+
redo = false;
status = true;
} catch (ResumableException e) {
- log.error("Settings validation failed!", e); //$NON-NLS-1$
+ log.error("Settings validation failed!", e); //
ErrorDialog dialog = new ErrorDialog(getShell(),
e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
int rc = dialog.open();
-
+
redo = (rc == SWT.RETRY);
if (rc == SWT.IGNORE)
{
@@ -423,16 +423,16 @@ public class ConfigurationComposite extends StateComposite {
}
}
} while (redo);
-
+
if (!status) {
return false;
}
}
} catch (Exception e) {
- log.error("Settings validation failed!", e); //$NON-NLS-1$
+ log.error("Settings validation failed!", e); //
String message = e.getMessage();
if (message == null)
- message = Messages.getString("error.Unexpected"); //$NON-NLS-1$
+ message = Messages.getString("error.Unexpected"); //
ErrorDialog dialog = new ErrorDialog(getShell(), message,
BUTTONS.OK);
dialog.open();
@@ -461,21 +461,21 @@ public class ConfigurationComposite extends StateComposite {
redo = false;
status = true;
} catch (IOException e) {
- log.error("Failed to save configuration to file!", e); //$NON-NLS-1$
+ log.error("Failed to save configuration to file!", e); //
ErrorDialog dialog = new ErrorDialog(getShell(),
- Messages.getString("error.FailedToSaveSettings"), BUTTONS.RETRY_CANCEL); //$NON-NLS-1$
+ Messages.getString("error.FailedToSaveSettings"), BUTTONS.RETRY_CANCEL); //
redo = (dialog.open() == SWT.RETRY);
// return false;
}
} while (redo);
-
+
return status;
}
/**
* Checks if the user has finished working with the configuration composite
- *
+ *
* @return if the user is done
*/
public boolean isUserDone() {
@@ -489,7 +489,7 @@ public class ConfigurationComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -509,10 +509,10 @@ public class ConfigurationComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$
- this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$
- this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$
- this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$
- this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
+ this.simpleTabItem.setText(Messages.getString("config.Simple")); //
+ this.advancedTabItem.setText(Messages.getString("config.Advanced")); //
+ this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //
+ this.btnSpeichern.setText(Messages.getString("common.Save")); //
+ this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
index 51b8441c..dda55a47 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
@@ -59,10 +59,10 @@ public class DataSourceSelectComposite extends StateComposite {
public void openFileDialog() {
FileDialog dialog = new FileDialog(
DataSourceSelectComposite.this.getShell(), SWT.OPEN);
- dialog.setFilterExtensions(new String[] { "*.pdf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$
+ dialog.setFilterExtensions(new String[] { "*.pdf", "*" }); // //
dialog.setFilterNames(new String[] {
- Messages.getString("common.PDFExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.AllExtension_Description") }); //$NON-NLS-1$
+ Messages.getString("common.PDFExtension_Description"), //
+ Messages.getString("common.AllExtension_Description") }); //
String fileName = dialog.open();
File file = null;
if (fileName != null) {
@@ -102,7 +102,7 @@ public class DataSourceSelectComposite extends StateComposite {
/**
* Sets the selected file and calls update to the workflow
- *
+ *
* @param selected
*/
protected void setSelected(File selected) {
@@ -112,7 +112,7 @@ public class DataSourceSelectComposite extends StateComposite {
/**
* Gets the selected file
- *
+ *
* @return the selected file
*/
public File getSelected() {
@@ -124,13 +124,13 @@ public class DataSourceSelectComposite extends StateComposite {
this.borderColor = this.activeBorder;
this.redrawDrop();
}
-
+
void MarkDragLeave() {
this.backgroundColor = this.inactiveBackground;
this.borderColor = this.inactiveBorder;
this.redrawDrop();
}
-
+
void redrawDrop() {
this.lbl_drag.setBackground(this.backgroundColor);
this.lbl_drag2.setBackground(this.backgroundColor);
@@ -138,17 +138,17 @@ public class DataSourceSelectComposite extends StateComposite {
this.drop_area.redraw();
this.drop_area.layout(true, true);
}
-
+
Color activeBackground;
Color inactiveBackground;
Color inactiveBorder;
Color activeBorder;
Color borderColor;
Color backgroundColor;
-
+
/**
* Create the composite.
- *
+ *
* @param parent
* @param style
* @param state
@@ -162,7 +162,7 @@ public class DataSourceSelectComposite extends StateComposite {
this.activeBorder = Constants.MAINBAR_ACTIVE_BACK_DARK;
this.backgroundColor = this.inactiveBackground;
this.borderColor = Constants.DROP_BORDER_COLOR;
-
+
this.setLayout(new FormLayout());
// Color back = new Color(Display.getCurrent(), 77, 190, 250);
@@ -175,28 +175,28 @@ public class DataSourceSelectComposite extends StateComposite {
fd_drop_area.bottom = new FormAttachment(100, -30);
this.drop_area.setLayoutData(fd_drop_area);
this.drop_area.setLayout(new FormLayout());
-
+
this.drop_area.addPaintListener(new PaintListener() {
-
+
@Override
public void paintControl(PaintEvent e) {
Rectangle clientArea = DataSourceSelectComposite.this
.drop_area.getClientArea();
-
+
//e.gc.setForeground(new Color(getDisplay(),0x6B, 0xA5, 0xD9));
e.gc.setForeground(DataSourceSelectComposite.this.borderColor);
e.gc.setLineWidth(3);
e.gc.setLineStyle(SWT.LINE_DASH);
e.gc.setBackground(DataSourceSelectComposite.this.backgroundColor);
- e.gc.fillRoundRectangle(clientArea.x,
- clientArea.y, clientArea.width - 2, clientArea.height - 2,
+ e.gc.fillRoundRectangle(clientArea.x,
+ clientArea.y, clientArea.width - 2, clientArea.height - 2,
10, 10);
- e.gc.drawRoundRectangle(clientArea.x,
- clientArea.y, clientArea.width - 2, clientArea.height - 2,
+ e.gc.drawRoundRectangle(clientArea.x,
+ clientArea.y, clientArea.width - 2, clientArea.height - 2,
10, 10);
}
});
-
+
DropTarget dnd_target = new DropTarget(this.drop_area, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
final FileTransfer fileTransfer = FileTransfer.getInstance();
Transfer[] types = new Transfer[] { fileTransfer };
@@ -207,7 +207,7 @@ public class DataSourceSelectComposite extends StateComposite {
public void drop(DropTargetEvent event) {
if (fileTransfer.isSupportedType(event.currentDataType)) {
if (event.data == null) {
- log.error("Dropped file name was null"); //$NON-NLS-1$
+ log.error("Dropped file name was null"); //
return;
}
String[] files = (String[]) event.data;
@@ -215,7 +215,7 @@ public class DataSourceSelectComposite extends StateComposite {
// Only taking first file ...
File file = new File(files[0]);
if (!file.exists()) {
- log.error(String.format(Messages.getString("error.FileNotExist"), files[0])); //$NON-NLS-1$
+ log.error(String.format(Messages.getString("error.FileNotExist"), files[0])); //
return;
}
DataSourceSelectComposite.this.setSelected(file);
@@ -253,7 +253,7 @@ public class DataSourceSelectComposite extends StateComposite {
});
this.lbl_drag2 = new Label(this.drop_area, SWT.NONE | SWT.RESIZE );
-
+
this.lbl_drag = new Label(this.drop_area, SWT.NONE | SWT.RESIZE );
this.fd_lbl_drag = new FormData();
this.fd_lbl_drag.left = new FormAttachment(0, 10);
@@ -264,10 +264,10 @@ public class DataSourceSelectComposite extends StateComposite {
FontData[] fD = this.lbl_drag.getFont().getFontData();
fD[0].setHeight(Constants.TEXT_SIZE_BIG);
this.lbl_drag.setFont(new Font(Display.getCurrent(), fD[0]));
- this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel")); //$NON-NLS-1$
+ this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel")); //
this.lbl_drag.setAlignment(SWT.CENTER);
-
-
+
+
this.fd_lbl_drag2 = new FormData();
this.fd_lbl_drag2.left = new FormAttachment(0, 10);
this.fd_lbl_drag2.right = new FormAttachment(100, -10);
@@ -278,16 +278,16 @@ public class DataSourceSelectComposite extends StateComposite {
fD2[0].setHeight(Constants.TEXT_SIZE_NORMAL);
this.lbl_drag2.setFont(new Font(Display.getCurrent(), fD2[0]));
this.lbl_drag2.setText(Messages
- .getString("dataSourceSelection.DropLabel2")); //$NON-NLS-1$
+ .getString("dataSourceSelection.DropLabel2")); //
this.lbl_drag2.setAlignment(SWT.CENTER);
-
+
this.btn_open = new Button(this.drop_area, SWT.NATIVE | SWT.RESIZE);
- this.btn_open.setText(Messages.getString("dataSourceSelection.browse")); //$NON-NLS-1$
-
+ this.btn_open.setText(Messages.getString("dataSourceSelection.browse")); //
+
FontData[] fD_open = this.btn_open.getFont().getFontData();
fD_open[0].setHeight(Constants.TEXT_SIZE_BUTTON);
this.btn_open.setFont(new Font(Display.getCurrent(), fD_open[0]));
-
+
/*
lbl_drag.addListener(SWT.Resize, new Listener() {
@@ -297,7 +297,7 @@ public class DataSourceSelectComposite extends StateComposite {
50, -1 * (lbl_drag.getSize().y / 2));
DataSourceSelectComposite.this.fd_lbl_drag.left = new FormAttachment(
50, -1 * (lbl_drag.getSize().x / 2));
-
+
Point size = btn_open.computeSize(SWT.DEFAULT, SWT.DEFAULT);
DataSourceSelectComposite.this.fd_btn_open.top = new FormAttachment(
50, (lbl_drag.getSize().y / 2) + 10);
@@ -343,7 +343,7 @@ public class DataSourceSelectComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.components.StateComposite#doLayout()
*/
@Override
@@ -357,8 +357,8 @@ public class DataSourceSelectComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel")); //$NON-NLS-1$
- this.btn_open.setText(Messages.getString("dataSourceSelection.browse")); //$NON-NLS-1$
- this.lbl_drag2.setText(Messages.getString("dataSourceSelection.DropLabel2")); //$NON-NLS-1$
+ this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel")); //
+ this.btn_open.setText(Messages.getString("dataSourceSelection.browse")); //
+ this.lbl_drag2.setText(Messages.getString("dataSourceSelection.DropLabel2")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
index cf722d35..197d2bcc 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
@@ -50,7 +50,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
.getLogger(MobileBKUEnterNumberComposite.class);
/**
- *
+ *
*/
private final SelectionListener okListener = new SelectionAdapter() {
@Override
@@ -58,13 +58,13 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
if(!MobileBKUEnterNumberComposite.this.btn_ok.isEnabled()) {
return;
}
-
+
try {
String number = MobileBKUEnterNumberComposite.this.txt_number
.getText();
number = number.replaceAll("\\s","");
-
+
MobileBKUEnterNumberComposite.this.setMobileNumber(number);
MobileBKUEnterNumberComposite.this.mobileNumber = number;
@@ -78,17 +78,17 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
MobileBKUEnterNumberComposite.this.userAck = true;
MobileBKUEnterNumberComposite.this.btn_ok.setEnabled(false);
-
+
} catch(InvalidPasswordException ex) {
- log.error("Validating input for Mobile BKU failed!", ex); //$NON-NLS-1$
+ log.error("Validating input for Mobile BKU failed!", ex); //
MobileBKUEnterNumberComposite.this
.setErrorMessage(ex.getMessage());
MobileBKUEnterNumberComposite.this.txt_password.setFocus();
}
catch (Exception ex) {
- log.error("Validating input for Mobile BKU failed!", ex); //$NON-NLS-1$
+ log.error("Validating input for Mobile BKU failed!", ex); //
MobileBKUEnterNumberComposite.this
- .setErrorMessage(Messages.getString("error.InvalidPhoneNumber")); //$NON-NLS-1$
+ .setErrorMessage(Messages.getString("error.InvalidPhoneNumber")); //
MobileBKUEnterNumberComposite.this.txt_number.setFocus();
return;
}
@@ -96,7 +96,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
};
/**
- *
+ *
*/
private final SelectionListener cancelListener = new SelectionAdapter() {
@Override
@@ -144,13 +144,13 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
if (this.errorMessage != null) {
this.lbl_error.setText(this.errorMessage);
} else {
- this.lbl_error.setText(""); //$NON-NLS-1$
+ this.lbl_error.setText(""); //
}
}
/**
* Create the composite.
- *
+ *
* @param parent
* @param style
* @param state
@@ -179,8 +179,8 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
fd_containerComposite.left = new FormAttachment(50, -200);
fd_containerComposite.right = new FormAttachment(50, 200);
containerComposite.setLayoutData(fd_containerComposite);
-
-
+
+
this.txt_number = new Text(containerComposite, SWT.SINGLE | SWT.NATIVE | SWT.BORDER);
FormData fd_number = new FormData();
fd_number.bottom = new FormAttachment(50, -10);
@@ -189,20 +189,20 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
this.txt_number.setLayoutData(fd_number);
this.txt_number.setEditable(true);
-
+
this.lbl_number = new Label(containerComposite, SWT.NATIVE);
this.lbl_number.setAlignment(SWT.RIGHT);
- this.lbl_number.setText(Messages.getString("mobileBKU.number")); //$NON-NLS-1$
+ this.lbl_number.setText(Messages.getString("mobileBKU.number")); //
FormData fd_lbl_number = new FormData();
fd_lbl_number.bottom = new FormAttachment(50, -10);
fd_lbl_number.right = new FormAttachment(50, -10);
this.lbl_number.setLayoutData(fd_lbl_number);
Label lbl_image = new Label(containerComposite, SWT.NATIVE);
-
+
ImageData data = new ImageData(this.getClass().getResourceAsStream(Constants.RES_IMG_MOBILE));
- Image mobile = new Image(getDisplay(), data);
-
+ Image mobile = new Image(getDisplay(), data);
+
FormData fd_lbl_image = new FormData();
fd_lbl_image.top = new FormAttachment(20, -1 * (data.width / 2));
fd_lbl_image.bottom = new FormAttachment(20, data.width / 2);
@@ -210,8 +210,8 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
fd_lbl_image.width = data.width;
lbl_image.setLayoutData(fd_lbl_image);
lbl_image.setImage(mobile);
-
-
+
+
this.txt_password = new Text(containerComposite, SWT.SINGLE | SWT.PASSWORD
| SWT.BORDER | SWT.NATIVE);
FormData fd_password = new FormData();
@@ -223,14 +223,14 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
this.lbl_password = new Label(containerComposite, SWT.NATIVE);
this.lbl_password.setAlignment(SWT.RIGHT);
- this.lbl_password.setText(Messages.getString("mobileBKU.password")); //$NON-NLS-1$
+ this.lbl_password.setText(Messages.getString("mobileBKU.password")); //
FormData fd_lbl_password = new FormData();
fd_lbl_password.top = new FormAttachment(50, 10);
fd_lbl_password.right = new FormAttachment(50, -10);
this.lbl_password.setLayoutData(fd_lbl_password);
this.btn_ok = new Button(containerComposite, SWT.NATIVE);
- this.btn_ok.setText(Messages.getString("common.Ok")); //$NON-NLS-1$
+ this.btn_ok.setText(Messages.getString("common.Ok")); //
FormData fd_btn_ok = new FormData();
fd_btn_ok.bottom = new FormAttachment(100, -20);
fd_btn_ok.right = new FormAttachment(100, -20);
@@ -238,19 +238,19 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
this.btn_ok.addSelectionListener(this.okListener);
this.btn_cancel = new Button(containerComposite, SWT.NATIVE);
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
+ this.btn_cancel.setText(Messages.getString("common.Cancel")); //
FormData fd_btn_cancel = new FormData();
fd_btn_cancel.bottom = new FormAttachment(100, -20);
fd_btn_cancel.right = new FormAttachment(this.btn_ok, -10);
this.btn_cancel.setLayoutData(fd_btn_cancel);
this.btn_cancel.addSelectionListener(this.cancelListener);
- this.lbl_error = new Label(containerComposite, SWT.WRAP | SWT.NATIVE );
+ this.lbl_error = new Label(containerComposite, SWT.WRAP | SWT.NATIVE );
FormData fd_lbl_error = new FormData();
- fd_lbl_error.top = new FormAttachment(87, -15);
- fd_lbl_error.bottom = new FormAttachment(103, -20);
+ fd_lbl_error.top = new FormAttachment(87, -15);
+ fd_lbl_error.bottom = new FormAttachment(103, -20);
fd_lbl_error.left = new FormAttachment(5, 0);
- fd_lbl_error.right = new FormAttachment(this.btn_cancel, -10);
+ fd_lbl_error.right = new FormAttachment(this.btn_cancel, -10);
this.lbl_error.setLayoutData(fd_lbl_error);
}
@@ -266,10 +266,10 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
public void enableButton() {
this.btn_ok.setEnabled(true);
}
-
+
/**
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -295,7 +295,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
this.txt_number.setText(this.mobileNumber);
this.txt_password.setFocus();
} else {
- this.txt_number.setText(""); //$NON-NLS-1$
+ this.txt_number.setText(""); //
}
}
@@ -305,7 +305,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
public String getMobilePassword() {
return this.mobilePassword;
}
-
+
/**
@@ -318,7 +318,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
if (this.mobilePassword != null) {
this.txt_password.setText(this.mobilePassword);
} else {
- this.txt_password.setText(""); //$NON-NLS-1$
+ this.txt_password.setText(""); //
}
}
@@ -327,9 +327,9 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_number.setText(Messages.getString("mobileBKU.number")); //$NON-NLS-1$
- this.lbl_password.setText(Messages.getString("mobileBKU.password")); //$NON-NLS-1$
- this.btn_ok.setText(Messages.getString("common.Ok")); //$NON-NLS-1$
+ this.lbl_number.setText(Messages.getString("mobileBKU.number")); //
+ this.lbl_password.setText(Messages.getString("mobileBKU.password")); //
+ this.btn_ok.setText(Messages.getString("common.Ok")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
index 8120d269..1e754e9a 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
@@ -53,7 +53,7 @@ import at.asit.pdfover.gui.workflow.states.State;
public class MobileBKUEnterTANComposite extends StateComposite {
/**
- *
+ *
*/
private final class OkSelectionListener extends SelectionAdapter {
/**
@@ -74,19 +74,19 @@ public class MobileBKUEnterTANComposite extends StateComposite {
if (tan.isEmpty()) {
MobileBKUEnterTANComposite.this.setMessage(Messages
- .getString("error.NoTan")); //$NON-NLS-1$
+ .getString("error.NoTan")); //
return;
}
if (MobileBKUEnterTANComposite.this.refVal.startsWith(tan)) {
MobileBKUEnterTANComposite.this.setMessage(Messages
- .getString("error.EnteredReferenceValue")); //$NON-NLS-1$
+ .getString("error.EnteredReferenceValue")); //
return;
}
if (tan.length() > 6) {
MobileBKUEnterTANComposite.this.setMessage(Messages
- .getString("error.TanTooLong")); //$NON-NLS-1$
+ .getString("error.TanTooLong")); //
return;
}
@@ -99,7 +99,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
}
/**
- *
+ *
*/
private final class CancelSelectionListener extends SelectionAdapter {
/**
@@ -171,12 +171,12 @@ public class MobileBKUEnterTANComposite extends StateComposite {
/**
* Set how many tries are left
- *
+ *
* @param tries
*/
public void setTries(int tries) {
- this.lblTries.setText(tries == 1 ? Messages.getString("tanEnter.try") : //$NON-NLS-1$
- String.format(Messages.getString("tanEnter.tries"), tries)); //$NON-NLS-1$
+ this.lblTries.setText(tries == 1 ? Messages.getString("tanEnter.try") : //
+ String.format(Messages.getString("tanEnter.tries"), tries)); //
}
/**
@@ -185,16 +185,16 @@ public class MobileBKUEnterTANComposite extends StateComposite {
*/
public void setErrorMessage(String errorMessage) {
if (errorMessage == null)
- this.lblTries.setText(""); //$NON-NLS-1$
+ this.lblTries.setText(""); //
else
this.lblTries.setText(
- Messages.getString("error.Title") + ": " + errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("error.Title") + ": " + errorMessage); // //
}
/**
* Sets the message
- *
+ *
* @param msg
*/
public void setMessage(String msg) {
@@ -225,7 +225,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
public String getRefVal() {
return this.refVal;
}
-
+
/**
* Enables the submit button
*/
@@ -243,7 +243,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
if (this.refVal != null) {
this.lblRefVal.setText(this.refVal);
} else {
- this.lblRefVal.setText(""); //$NON-NLS-1$
+ this.lblRefVal.setText(""); //
}
}
@@ -263,7 +263,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
this.tan = tan;
if (this.tan == null) {
- this.txt_tan.setText(""); //$NON-NLS-1$
+ this.txt_tan.setText(""); //
} else {
this.txt_tan.setText(this.tan);
}
@@ -284,24 +284,24 @@ public class MobileBKUEnterTANComposite extends StateComposite {
try {
String signatureData = MobileBKUEnterTANComposite.this
.getSignatureData();
- if (signatureData != null && !signatureData.equals("")) { //$NON-NLS-1$
- log.debug("Trying to open " + signatureData); //$NON-NLS-1$
+ if (signatureData != null && !signatureData.equals("")) { //
+ log.debug("Trying to open " + signatureData); //
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(new URI(signatureData));
} else {
- log.info("SWT Desktop is not supported on this platform"); //$NON-NLS-1$
+ log.info("SWT Desktop is not supported on this platform"); //
Program.launch(signatureData);
}
}
} catch (Exception ex) {
- log.error("OpenSelectionListener: ", ex); //$NON-NLS-1$
+ log.error("OpenSelectionListener: ", ex); //
}
}
}
/**
* Create the composite.
- *
+ *
* @param parent
* @param style
* @param state
@@ -341,7 +341,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_lblRefValLabel.bottom = new FormAttachment(50, -10);
this.lblRefValLabel.setLayoutData(fd_lblRefValLabel);
this.lblRefValLabel.setText(Messages
- .getString("tanEnter.ReferenceValue")); //$NON-NLS-1$
+ .getString("tanEnter.ReferenceValue")); //
Label lbl_image = new Label(containerComposite, SWT.NATIVE);
@@ -364,7 +364,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
// fd_lblRefVal.top = new FormAttachment(30, -15);
fd_lblRefVal.bottom = new FormAttachment(50, -10);
this.lblRefVal.setLayoutData(fd_lblRefVal);
- this.lblRefVal.setText(""); //$NON-NLS-1$
+ this.lblRefVal.setText(""); //
this.lblTan = new Label(containerComposite, SWT.NATIVE);
this.lblTan.setAlignment(SWT.RIGHT);
@@ -374,7 +374,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_lblTan.top = new FormAttachment(50, 10);
// fd_lblTan.bottom = new FormAttachment(50, 15);
this.lblTan.setLayoutData(fd_lblTan);
- this.lblTan.setText(Messages.getString("tanEnter.TAN")); //$NON-NLS-1$
+ this.lblTan.setText(Messages.getString("tanEnter.TAN")); //
this.txt_tan = new Text(containerComposite, SWT.BORDER | SWT.NATIVE);
FormData fd_text = new FormData();
@@ -402,12 +402,12 @@ public class MobileBKUEnterTANComposite extends StateComposite {
public void modifyText(ModifyEvent e) {
String text = MobileBKUEnterTANComposite.this.txt_tan.getText();
- //log.debug("Current TAN: " + text); //$NON-NLS-1$
+ //log.debug("Current TAN: " + text); //
if (text.length() > 3
&& MobileBKUEnterTANComposite.this.getRefVal()
.startsWith(text.trim())) {
MobileBKUEnterTANComposite.this.setMessage(Messages
- .getString("error.EnteredReferenceValue")); //$NON-NLS-1$
+ .getString("error.EnteredReferenceValue")); //
}
}
});
@@ -420,8 +420,8 @@ public class MobileBKUEnterTANComposite extends StateComposite {
lnk_sig_data.setEnabled(true);
lnk_sig_data.setLayoutData(fd_lnk_data);
lnk_sig_data.addSelectionListener(new ShowSignatureDataListener());
- lnk_sig_data.setText(Messages.getString("mobileBKU.show")); //$NON-NLS-1$
- lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip")); //$NON-NLS-1$
+ lnk_sig_data.setText(Messages.getString("mobileBKU.show")); //
+ lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip")); //
this.btn_ok = new Button(containerComposite, SWT.NATIVE);
this.btn_cancel = new Button(containerComposite, SWT.NATIVE);
@@ -441,7 +441,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_btn_ok.bottom = new FormAttachment(100, -20);
this.btn_ok.setLayoutData(fd_btn_ok);
- this.btn_ok.setText(Messages.getString("common.Ok")); //$NON-NLS-1$
+ this.btn_ok.setText(Messages.getString("common.Ok")); //
this.btn_ok.addSelectionListener(new OkSelectionListener());
FormData fd_btn_cancel = new FormData();
@@ -451,7 +451,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_btn_cancel.bottom = new FormAttachment(100, -20);
this.btn_cancel.setLayoutData(fd_btn_cancel);
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
+ this.btn_cancel.setText(Messages.getString("common.Cancel")); //
this.btn_cancel.addSelectionListener(new CancelSelectionListener());
}
@@ -462,7 +462,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -472,13 +472,13 @@ public class MobileBKUEnterTANComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
*/
@Override
public void reloadResources() {
this.lblRefValLabel.setText(Messages
- .getString("tanEnter.ReferenceValue")); //$NON-NLS-1$
- this.lblTan.setText(Messages.getString("tanEnter.TAN")); //$NON-NLS-1$
+ .getString("tanEnter.ReferenceValue")); //
+ this.lblTan.setText(Messages.getString("tanEnter.TAN")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java
index 7d477f62..02c0b9b3 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java
@@ -48,7 +48,7 @@ import at.asit.pdfover.gui.workflow.states.State;
public class MobileBKUFingerprintComposite extends StateComposite {
/**
- *
+ *
*/
private final class SMSSelectionListener extends SelectionAdapter {
/**
@@ -69,7 +69,7 @@ public class MobileBKUFingerprintComposite extends StateComposite {
}
/**
- *
+ *
*/
private final class CancelSelectionListener extends SelectionAdapter {
/**
@@ -151,10 +151,10 @@ public class MobileBKUFingerprintComposite extends StateComposite {
*/
public void setErrorMessage(String errorMessage) {
if (errorMessage == null)
- this.lblError.setText(""); //$NON-NLS-1$
+ this.lblError.setText(""); //
else
this.lblError.setText(
- Messages.getString("error.Title") + ": " + errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("error.Title") + ": " + errorMessage); // //
}
/**
@@ -198,7 +198,7 @@ public class MobileBKUFingerprintComposite extends StateComposite {
if (this.refVal != null) {
this.lblRefVal.setText(this.refVal);
} else {
- this.lblRefVal.setText(""); //$NON-NLS-1$
+ this.lblRefVal.setText(""); //
}
}
@@ -219,24 +219,24 @@ public class MobileBKUFingerprintComposite extends StateComposite {
try {
String signatureData = MobileBKUFingerprintComposite.this
.getSignatureData();
- if (signatureData != null && !signatureData.equals("")) { //$NON-NLS-1$
- log.debug("Trying to open " + signatureData); //$NON-NLS-1$
+ if (signatureData != null && !signatureData.equals("")) { //
+ log.debug("Trying to open " + signatureData); //
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(new URI(signatureData));
} else {
- log.info("SWT Desktop is not supported on this platform"); //$NON-NLS-1$
+ log.info("SWT Desktop is not supported on this platform"); //
Program.launch(signatureData);
}
}
} catch (Exception ex) {
- log.error("OpenSelectionListener: ", ex); //$NON-NLS-1$
+ log.error("OpenSelectionListener: ", ex); //
}
}
}
/**
* Create the composite.
- *
+ *
* @param parent
* @param style
* @param state
@@ -297,7 +297,7 @@ public class MobileBKUFingerprintComposite extends StateComposite {
fd_lblRefVal.top = new FormAttachment(30, -10);
//fd_lblRefVal.bottom = new FormAttachment(50, -10);
this.lblRefVal.setLayoutData(fd_lblRefVal);
- this.lblRefVal.setText("test"); //$NON-NLS-1$
+ this.lblRefVal.setText("test"); //
this.lblFPLabel = new Label(containerComposite, SWT.NATIVE);
this.lblFPLabel.setAlignment(SWT.LEFT);
@@ -355,7 +355,7 @@ public class MobileBKUFingerprintComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -365,17 +365,17 @@ public class MobileBKUFingerprintComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
*/
@Override
public void reloadResources() {
this.lblRefValLabel.setText(Messages
- .getString("tanEnter.ReferenceValue")); //$NON-NLS-1$
- this.lblFPLabel.setText(Messages.getString("tanEnter.FP")); //$NON-NLS-1$
- this.lnk_sig_data.setText(Messages.getString("mobileBKU.show")); //$NON-NLS-1$
- this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip")); //$NON-NLS-1$
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
- this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //$NON-NLS-1$
+ .getString("tanEnter.ReferenceValue")); //
+ this.lblFPLabel.setText(Messages.getString("tanEnter.FP")); //
+ this.lnk_sig_data.setText(Messages.getString("mobileBKU.show")); //
+ this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip")); //
+ this.btn_cancel.setText(Messages.getString("common.Cancel")); //
+ this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java
index 0303ae09..303415a1 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java
@@ -50,7 +50,7 @@ import at.asit.pdfover.gui.workflow.states.State;
public class MobileBKUQRComposite extends StateComposite {
/**
- *
+ *
*/
private final class SMSSelectionListener extends SelectionAdapter {
/**
@@ -71,7 +71,7 @@ public class MobileBKUQRComposite extends StateComposite {
}
/**
- *
+ *
*/
private final class CancelSelectionListener extends SelectionAdapter {
/**
@@ -155,10 +155,10 @@ public class MobileBKUQRComposite extends StateComposite {
*/
public void setErrorMessage(String errorMessage) {
if (errorMessage == null)
- this.lblError.setText(""); //$NON-NLS-1$
+ this.lblError.setText(""); //
else
this.lblError.setText(
- Messages.getString("error.Title") + ": " + errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("error.Title") + ": " + errorMessage); // //
}
/**
@@ -202,7 +202,7 @@ public class MobileBKUQRComposite extends StateComposite {
if (this.refVal != null) {
this.lblRefVal.setText(this.refVal);
} else {
- this.lblRefVal.setText(""); //$NON-NLS-1$
+ this.lblRefVal.setText(""); //
}
}
@@ -213,7 +213,7 @@ public class MobileBKUQRComposite extends StateComposite {
*/
public void setQR(InputStream qrcode) {
if (qrcode == null) {
- setErrorMessage(Messages.getString("error.FailedToLoadQRCode")); //$NON-NLS-1$
+ setErrorMessage(Messages.getString("error.FailedToLoadQRCode")); //
return;
}
Image qr = new Image(Display.getCurrent(), qrcode);
@@ -235,24 +235,24 @@ public class MobileBKUQRComposite extends StateComposite {
try {
String signatureData = MobileBKUQRComposite.this
.getSignatureData();
- if (signatureData != null && !signatureData.equals("")) { //$NON-NLS-1$
- log.debug("Trying to open " + signatureData); //$NON-NLS-1$
+ if (signatureData != null && !signatureData.equals("")) { //
+ log.debug("Trying to open " + signatureData); //
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(new URI(signatureData));
} else {
- log.info("SWT Desktop is not supported on this platform"); //$NON-NLS-1$
+ log.info("SWT Desktop is not supported on this platform"); //
Program.launch(signatureData);
}
}
} catch (Exception ex) {
- log.error("OpenSelectionListener: ", ex); //$NON-NLS-1$
+ log.error("OpenSelectionListener: ", ex); //
}
}
}
/**
* Create the composite.
- *
+ *
* @param parent
* @param style
* @param state
@@ -313,7 +313,7 @@ public class MobileBKUQRComposite extends StateComposite {
fd_lblRefVal.top = new FormAttachment(30, -10);
//fd_lblRefVal.bottom = new FormAttachment(50, -10);
this.lblRefVal.setLayoutData(fd_lblRefVal);
- this.lblRefVal.setText(""); //$NON-NLS-1$
+ this.lblRefVal.setText(""); //
this.lblQRLabel = new Label(containerComposite, SWT.NATIVE);
this.lblQRLabel.setAlignment(SWT.RIGHT);
@@ -379,7 +379,7 @@ public class MobileBKUQRComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -389,17 +389,17 @@ public class MobileBKUQRComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
*/
@Override
public void reloadResources() {
this.lblRefValLabel.setText(Messages
- .getString("tanEnter.ReferenceValue")); //$NON-NLS-1$
- this.lblQRLabel.setText(Messages.getString("tanEnter.QR")); //$NON-NLS-1$
- this.lnk_sig_data.setText(Messages.getString("mobileBKU.show")); //$NON-NLS-1$
- this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip")); //$NON-NLS-1$
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
- this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //$NON-NLS-1$
+ .getString("tanEnter.ReferenceValue")); //
+ this.lblQRLabel.setText(Messages.getString("tanEnter.QR")); //
+ this.lnk_sig_data.setText(Messages.getString("mobileBKU.show")); //
+ this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip")); //
+ this.btn_cancel.setText(Messages.getString("common.Cancel")); //
+ this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
index 84ef58d3..a9315b4c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
@@ -82,7 +82,7 @@ public class OutputComposite extends StateComposite {
/**
* Create the composite.
- *
+ *
* @param parent
* The parent composite
* @param style
@@ -156,7 +156,7 @@ public class OutputComposite extends StateComposite {
/**
* Sets the input file
- *
+ *
* @param inputFile
* the input file
*/
@@ -166,7 +166,7 @@ public class OutputComposite extends StateComposite {
/**
* Gets the input file
- *
+ *
* @return the input file
*/
public File getInputFile() {
@@ -182,7 +182,7 @@ public class OutputComposite extends StateComposite {
/**
* Gets the signed document
- *
+ *
* @return the signed document
*/
public DocumentSource getSignedDocument() {
@@ -191,7 +191,7 @@ public class OutputComposite extends StateComposite {
/**
* Sets the signed document
- *
+ *
* @param signedDocument
* the signed document
*/
@@ -226,7 +226,7 @@ public class OutputComposite extends StateComposite {
/**
* Saves the signed document.
- *
+ *
* If user has a default output directory set, try to save there.
* If not (or if directory unavailable), ask user for location.
*/
@@ -254,17 +254,17 @@ public class OutputComposite extends StateComposite {
FileDialog save = new FileDialog(this.getShell(),
SWT.SAVE | SWT.NATIVE);
- save.setFilterExtensions(new String[] { "*.pdf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$
- save.setFilterNames(new String[] {
- Messages.getString("common.PDFExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.AllExtension_Description")}); //$NON-NLS-1$
+ save.setFilterExtensions(new String[] { "*.pdf", "*" }); // //
+ save.setFilterNames(new String[] {
+ Messages.getString("common.PDFExtension_Description"), //
+ Messages.getString("common.AllExtension_Description")}); //
save.setFilterPath(inputFolder.getAbsolutePath());
save.setFileName(proposedName);
outputFileName = save.open();
inputFolder = null;
}
- log.debug("Trying to save to '" + outputFileName + "'"); //$NON-NLS-1$ //$NON-NLS-2$
+ log.debug("Trying to save to '" + outputFileName + "'"); // //
this.outputFile = saveResultAsFile(inputFolder, outputFileName);
this.saveFailed = (this.outputFile == null);
@@ -279,7 +279,7 @@ public class OutputComposite extends StateComposite {
* Save the signed document under the given filename
* @param inputFolder the Folder the original document is located at
* @param target the filename to save the document as
- *
+ *
* @return saved File (or null if unsuccessful)
* @throws FileNotFoundException
* @throws IOException
@@ -293,8 +293,8 @@ public class OutputComposite extends StateComposite {
targetFile = new File(inputFolder, target);
if (targetFile.exists()) {
- Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"), //$NON-NLS-1$
- String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()), //$NON-NLS-1$
+ Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"), //
+ String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()), //
BUTTONS.OK_CANCEL, ICON.QUESTION);
if (dialog.open() == SWT.CANCEL)
{
@@ -313,18 +313,18 @@ public class OutputComposite extends StateComposite {
source.getByteArray().length);
outstream.close();
} catch (FileNotFoundException e) {
- log.warn("Failed to open output file", e); //$NON-NLS-1$
+ log.warn("Failed to open output file", e); //
ErrorDialog dialog = new ErrorDialog(getShell(),
- String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$
+ String.format(Messages.getString("output.save_failed"), //
targetFile.getName(), e.getLocalizedMessage()),
BUTTONS.RETRY_CANCEL);
if (dialog.open() == SWT.CANCEL)
return null;
retry = true;
} catch (IOException e) {
- log.error("I/O Error", e); //$NON-NLS-1$
+ log.error("I/O Error", e); //
ErrorDialog dialog = new ErrorDialog(getShell(),
- String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$
+ String.format(Messages.getString("output.save_failed"), //
targetFile.getName(), e.getLocalizedMessage()),
BUTTONS.RETRY_CANCEL);
if (dialog.open() == SWT.CANCEL)
@@ -335,8 +335,8 @@ public class OutputComposite extends StateComposite {
if (!targetFile.exists())
{
- log.error("Tried to save file " + targetFile.getName() + //$NON-NLS-1$
- ", but it doesn't exist"); //$NON-NLS-1$
+ log.error("Tried to save file " + targetFile.getName() + //
+ ", but it doesn't exist"); //
return null;
}
return targetFile;
@@ -369,7 +369,7 @@ public class OutputComposite extends StateComposite {
try {
OutputComposite.this.saveDocument();
} catch (Exception ex) {
- log.error("SaveSelectionListener: ", ex); //$NON-NLS-1$
+ log.error("SaveSelectionListener: ", ex); //
}
}
}
@@ -396,22 +396,22 @@ public class OutputComposite extends StateComposite {
// Normalize filename
File f = new File(FilenameUtils.normalize(
OutputComposite.this.outputFile.getAbsolutePath()));
- log.debug("Trying to open " + f.toString()); //$NON-NLS-1$
- // work around for the case of Linux and Java version 8
+ log.debug("Trying to open " + f.toString()); //
+ // work around for the case of Linux and Java version 8
if (isSpecialCase()) {
- reReloadResources(f.toString());
+ reReloadResources(f.toString());
return;
}
else if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().open(f);
} else {
- log.info("AWT Desktop is not supported on this platform"); //$NON-NLS-1$
+ log.info("AWT Desktop is not supported on this platform"); //
Program.launch(f.getAbsolutePath());
}
} catch (IOException ex) {
- log.error("OpenSelectionListener: ", ex); //$NON-NLS-1$
+ log.error("OpenSelectionListener: ", ex); //
ErrorDialog error = new ErrorDialog(getShell(),
- String.format(Messages.getString("error.FailedToOpenDocument"), //$NON-NLS-1$
+ String.format(Messages.getString("error.FailedToOpenDocument"), //
ex.getLocalizedMessage()), BUTTONS.RETRY_CANCEL);
if (error.open() == SWT.RETRY)
widgetSelected(e);
@@ -426,7 +426,7 @@ public class OutputComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -437,63 +437,63 @@ public class OutputComposite extends StateComposite {
/**
* @return true when linux and java version <= 8
- *
+ *
*/
public boolean isSpecialCase() {
boolean isSCase = false;
try {
- String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- if (os.contains("linux")) { //$NON-NLS-1$
- String version = System.getProperty("java.version"); //$NON-NLS-1$
- if (version.contains(".")) { //$NON-NLS-1$
- String[] parts = version.split("\\."); //$NON-NLS-1$
+ String os = System.getProperty("os.name").toLowerCase(); //
+ if (os.contains("linux")) { //
+ String version = System.getProperty("java.version"); //
+ if (version.contains(".")) { //
+ String[] parts = version.split("\\."); //
isSCase = Integer.valueOf(parts[0]) <= 8 ? true : false;
} else {
isSCase = Integer.valueOf(version) <= 8 ? true : false;
}
}
} catch (Exception e) {
- log.debug("Error: " + e.getMessage()); //$NON-NLS-1$
+ log.debug("Error: " + e.getMessage()); //
isSCase = false;
}
return isSCase;
}
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
*/
@Override
public void reloadResources() {
this.lbl_success_message.setText(Messages
- .getString("output.success_message")); //$NON-NLS-1$
+ .getString("output.success_message")); //
if (this.outputFile == null) {
this.lnk_saved_file.setText(Messages
- .getString("output.link_save_message")); //$NON-NLS-1$
+ .getString("output.link_save_message")); //
} else {
this.lnk_saved_file.setText(Messages
- .getString("output.link_open_message")); //$NON-NLS-1$
+ .getString("output.link_open_message")); //
}
- this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$
+ this.btn_save.setText(Messages.getString("common.Save")); //
}
-
+
/**
* @param str
*/
public void reReloadResources(String str) {
- this.lbl_success_message.setText(Messages.getString("output.success_message")); //$NON-NLS-1$
+ this.lbl_success_message.setText(Messages.getString("output.success_message")); //
if (this.outputFile == null) {
this.lnk_saved_file.setText(Messages
- .getString("output.link_save_message")); //$NON-NLS-1$
+ .getString("output.link_save_message")); //
} else {
- String str2 = "File location: " + str; //$NON-NLS-1$
+ String str2 = "File location: " + str; //
this.lbl_success_message.setText(str2);
- this.lnk_saved_file.setText(""); //$NON-NLS-1$
+ this.lnk_saved_file.setText(""); //
}
- this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$
+ this.btn_save.setText(Messages.getString("common.Save")); //
}
-
-
-
+
+
+
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index c38a9427..a98cdf9e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
@@ -73,7 +73,7 @@ public class PositioningComposite extends StateComposite {
/**
* Create the composite.
- *
+ *
* @param parent
* @param style
* @param state
@@ -91,7 +91,7 @@ public class PositioningComposite extends StateComposite {
this.bottomBar.setLayout(new FormLayout());
this.btnSign = new Button(this.bottomBar, SWT.PUSH);
- this.btnSign.setText(Messages.getString("positioning.sign")); //$NON-NLS-1$
+ this.btnSign.setText(Messages.getString("positioning.sign")); //
FormData fd_btnSign = new FormData();
fd_btnSign.right = new FormAttachment(100);
fd_btnSign.top = new FormAttachment(0);
@@ -105,7 +105,7 @@ public class PositioningComposite extends StateComposite {
});
this.btnNewPage = new Button(this.bottomBar, SWT.TOGGLE);
- this.btnNewPage.setText(Messages.getString("positioning.newPage")); //$NON-NLS-1$
+ this.btnNewPage.setText(Messages.getString("positioning.newPage")); //
FormData fd_btnNewPage = new FormData();
fd_btnNewPage.right = new FormAttachment(this.btnSign);
fd_btnNewPage.top = new FormAttachment(0);
@@ -157,7 +157,7 @@ public class PositioningComposite extends StateComposite {
/**
* Set the PDF Document to display
- *
+ *
* @param document
* document to display
*/
@@ -224,7 +224,7 @@ public class PositioningComposite extends StateComposite {
/**
* Set the signature placeholder image Must be called _after_
* displayDocument
- *
+ *
* @param placeholder
* signature placeholder
* @param width
@@ -350,21 +350,21 @@ public class PositioningComposite extends StateComposite {
if ((previousPage > numPages) && (currentPage <= numPages)) {
// Was on new page
PositioningComposite.this.btnNewPage.setText(
- Messages.getString("positioning.newPage")); //$NON-NLS-1$
+ Messages.getString("positioning.newPage")); //
PositioningComposite.this.btnNewPage.setSelection(false);
PositioningComposite.this.bottomBar.layout();
PositioningComposite.this.scrollbar.setMaximum(numPages + 1);
} else if ((previousPage <= numPages) && (currentPage > numPages)) {
// Go to new page
PositioningComposite.this.btnNewPage.setText(
- Messages.getString("positioning.removeNewPage")); //$NON-NLS-1$
+ Messages.getString("positioning.removeNewPage")); //
PositioningComposite.this.btnNewPage.setSelection(true);
PositioningComposite.this.bottomBar.layout();
PositioningComposite.this.scrollbar.setMaximum(numPages + 2);
}
PositioningComposite.this.scrollbar.setSelection(currentPage);
PositioningComposite.this.lblPage.setText(String.format(
- Messages.getString("positioning.page"), currentPage, numPages)); //$NON-NLS-1$
+ Messages.getString("positioning.page"), currentPage, numPages)); //
}
});
EventQueue.invokeLater(new Runnable() {
@@ -382,7 +382,7 @@ public class PositioningComposite extends StateComposite {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.components.StateComposite#doLayout()
*/
@Override
@@ -393,7 +393,7 @@ public class PositioningComposite extends StateComposite {
/**
* Translate the signature placeholder position
- *
+ *
* @param sigXOffset
* signature placeholder horizontal position offset
* @param sigYOffset
@@ -411,7 +411,7 @@ public class PositioningComposite extends StateComposite {
/**
* Set the signature position and continue to the next state
- *
+ *
* @param position
* the signature position
*/
@@ -427,7 +427,7 @@ public class PositioningComposite extends StateComposite {
/**
* Set the signature position
- *
+ *
* @param x
* the horizontal signature position
* @param y
@@ -443,7 +443,7 @@ public class PositioningComposite extends StateComposite {
/**
* Get the signature position
- *
+ *
* @return the signature position
*/
public SignaturePosition getPosition() {
@@ -456,11 +456,11 @@ public class PositioningComposite extends StateComposite {
@Override
public void reloadResources() {
if (this.currentPage <= this.numPages)
- this.btnNewPage.setText(Messages.getString("positioning.newPage")); //$NON-NLS-1$
+ this.btnNewPage.setText(Messages.getString("positioning.newPage")); //
else
- this.btnNewPage.setText(Messages.getString("positioning.removeNewPage")); //$NON-NLS-1$
- this.btnSign.setText(Messages.getString("positioning.sign")); //$NON-NLS-1$
- this.lblPage.setText(String.format(Messages.getString("positioning.page"), //$NON-NLS-1$
+ this.btnNewPage.setText(Messages.getString("positioning.removeNewPage")); //
+ this.btnSign.setText(Messages.getString("positioning.sign")); //
+ this.lblPage.setText(String.format(Messages.getString("positioning.page"), //
this.currentPage, this.numPages));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
index 1911ac67..408bfa5e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
@@ -42,7 +42,7 @@ import com.sun.pdfview.PDFFile;
import com.sun.pdfview.PDFPage;
/**
- *
+ *
*/
public class SignaturePanel extends JPanel {
/**
@@ -146,7 +146,7 @@ public class SignaturePanel extends JPanel {
* Set the signature placeholder image
* @param placeholder signature placeholder
* @param width width of the placeholder in page space
- * @param height height of the placeholder in page space
+ * @param height height of the placeholder in page space
* @param transparency transparency of the signature placeholder (0 - 255)
*/
public void setSignaturePlaceholder(Image placeholder, int width, int height, int transparency) {
@@ -175,7 +175,7 @@ public class SignaturePanel extends JPanel {
/**
* Add and display a new page at the end of the document
- *
+ *
* This page has the same dimensions as the old last page
*/
public void addNewLastPage() {
@@ -224,7 +224,7 @@ public class SignaturePanel extends JPanel {
/**
* Stop the generation of any previous page, and draw the new one.
- *
+ *
* @param page the PDFPage to draw.
*/
private synchronized void showPage(PDFPage page) {
@@ -290,7 +290,7 @@ public class SignaturePanel extends JPanel {
try {
this.currentXform = this.currentXform.createInverse();
} catch (NoninvertibleTransformException nte) {
- log.error("Error inverting page transform!", nte); //$NON-NLS-1$
+ log.error("Error inverting page transform!", nte); //
}
if (this.sigPagePos == null)
@@ -319,7 +319,7 @@ public class SignaturePanel extends JPanel {
g.fillRect(0, 0, getWidth(), getHeight());
if (this.currentImage == null) {
g.setColor(Color.black);
- g.drawString(Messages.getString("error.SignaturePanel.NoPage"), getWidth() / 2 - 30, //$NON-NLS-1$
+ g.drawString(Messages.getString("error.SignaturePanel.NoPage"), getWidth() / 2 - 30, //
getHeight() / 2);
if (this.currentPage != null) {
showPage(this.currentPage);
@@ -366,7 +366,7 @@ public class SignaturePanel extends JPanel {
g_phs.drawImage(placeholder, 0, 0, null);
// Draw grey "Signature" overlay
- String overlay = Messages.getString("positioning.signature"); //$NON-NLS-1$
+ String overlay = Messages.getString("positioning.signature"); //
// Voodoo to get overlay font scale
float scale = (((float) this.sigScreenWidth) / this.sigPlaceholder.getWidth(null)) * 150;
g_phs.setFont(getFont().deriveFont(scale));
@@ -399,7 +399,7 @@ public class SignaturePanel extends JPanel {
showPage(this.currentPage);
}
g.setColor(Color.black);
- g.drawString(Messages.getString("error.SignaturePanel.NoRender"), getWidth() / 2 - 30, //$NON-NLS-1$
+ g.drawString(Messages.getString("error.SignaturePanel.NoRender"), getWidth() / 2 - 30, //
getHeight() / 2);
}
}
@@ -408,7 +408,7 @@ public class SignaturePanel extends JPanel {
/**
* Handles notification of the fact that some part of the image changed.
* Repaints that portion.
- *
+ *
* @return true if more updates are desired.
*/
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java
index 119c1607..5fc5dc55 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java
@@ -37,7 +37,7 @@ public abstract class StateComposite extends Composite {
/**
* The base class for state composites
- *
+ *
* @param parent The parent Composite
* @param style The Composite style
* @param state The current State
@@ -49,10 +49,10 @@ public abstract class StateComposite extends Composite {
/**
* Performs layout for all children in composite
- * (SWT layout(...) only layouts children no grandchildren!)
+ * (SWT layout(...) only layouts children no grandchildren!)
*/
public abstract void doLayout();
-
+
/**
* Reloads the localizeable resources
*/
@@ -79,32 +79,32 @@ public abstract class StateComposite extends Composite {
private final Control c;
private final FormData fd = new FormData();
public AnchorSetter(Control c) { this.c = c; }
-
+
public void set() { this.c.setLayoutData(this.fd); }
-
+
public AnchorSetter height(int h) { fd.height = h; return this; }
public AnchorSetter width(int w) { fd.width = w; return this; }
-
+
public AnchorSetter top(FormAttachment a) { fd.top = a; return this; }
public AnchorSetter left(FormAttachment a) { fd.left = a; return this; }
public AnchorSetter right(FormAttachment a) { fd.right = a; return this; }
public AnchorSetter bottom(FormAttachment a) { fd.bottom = a; return this; }
-
+
public AnchorSetter top(Control control, int offset, int alignment) { return top(new FormAttachment(control, offset, alignment)); }
public AnchorSetter top(Control control, int offset) { return top(new FormAttachment(control, offset)); }
public AnchorSetter top(int num, int offset) { return top(new FormAttachment(num, offset)); }
public AnchorSetter top(int num) { return top(new FormAttachment(num)); }
-
+
public AnchorSetter left(Control control, int offset, int alignment) { return left(new FormAttachment(control, offset, alignment)); }
public AnchorSetter left(Control control, int offset) { return left(new FormAttachment(control, offset)); }
public AnchorSetter left(int num, int offset) { return left(new FormAttachment(num, offset)); }
public AnchorSetter left(int num) { return left(new FormAttachment(num)); }
-
+
public AnchorSetter right(Control control, int offset, int alignment) { return right(new FormAttachment(control, offset, alignment)); }
public AnchorSetter right(Control control, int offset) { return right(new FormAttachment(control, offset)); }
public AnchorSetter right(int num, int offset) { return right(new FormAttachment(num, offset)); }
public AnchorSetter right(int num) { return right(new FormAttachment(num)); }
-
+
public AnchorSetter bottom(Control control, int offset, int alignment) { return bottom(new FormAttachment(control, offset, alignment)); }
public AnchorSetter bottom(Control control, int offset) { return bottom(new FormAttachment(control, offset)); }
public AnchorSetter bottom(int num, int offset) { return bottom(new FormAttachment(num, offset)); }
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
index deecb09d..1bfb33c3 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
@@ -28,7 +28,7 @@ import at.asit.pdfover.commons.Messages;
import at.asit.pdfover.gui.workflow.states.State;
/**
- *
+ *
*/
public class WaitingComposite extends StateComposite {
private Label lbl_description;
@@ -37,12 +37,12 @@ public class WaitingComposite extends StateComposite {
* Create the composite.
* @param parent
* @param style
- * @param state
+ * @param state
*/
public WaitingComposite(Composite parent, int style, State state) {
super(parent, style, state);
setLayout(new FormLayout());
-
+
this.lbl_description = new Label(this, SWT.NATIVE);
FormData fd_lbl_description = new FormData();
fd_lbl_description.bottom = new FormAttachment(50, -10);
@@ -50,8 +50,8 @@ public class WaitingComposite extends StateComposite {
fd_lbl_description.right = new FormAttachment(100, -10);
this.lbl_description.setLayoutData(fd_lbl_description);
this.lbl_description.setAlignment(SWT.CENTER);
- this.lbl_description.setText(Messages.getString("waiting.message")); //$NON-NLS-1$
-
+ this.lbl_description.setText(Messages.getString("waiting.message")); //
+
ProgressBar progressBar = new ProgressBar(this, SWT.HORIZONTAL | SWT.INDETERMINATE);
FormData fd_progressBar = new FormData();
fd_progressBar.top = new FormAttachment(50, +10);
@@ -79,6 +79,6 @@ public class WaitingComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_description.setText(Messages.getString("waiting.message")); //$NON-NLS-1$
+ this.lbl_description.setText(Messages.getString("waiting.message")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
index 310a38e9..ca865df9 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
@@ -31,15 +31,15 @@ import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
/**
- *
+ *
*/
public class WaitingForAppComposite extends StateComposite {
private Label lbl_description;
- private Button btn_sms;
+ private Button btn_sms;
private Button btn_cancel;
- private Boolean isUserSMS = false;
- private Boolean userCancel = false;
- private Boolean isDone = false;
+ private Boolean isUserSMS = false;
+ private Boolean userCancel = false;
+ private Boolean isDone = false;
/**
* @return the isDone
@@ -59,12 +59,12 @@ public class WaitingForAppComposite extends StateComposite {
* Create the composite.
* @param parent
* @param style
- * @param state
+ * @param state
*/
public WaitingForAppComposite(Composite parent, int style, State state) {
super(parent, style, state);
setLayout(new FormLayout());
-
+
this.lbl_description = new Label(this, SWT.NATIVE);
FormData fd_lbl_description = new FormData();
fd_lbl_description.bottom = new FormAttachment(50, -10);
@@ -72,8 +72,8 @@ public class WaitingForAppComposite extends StateComposite {
fd_lbl_description.right = new FormAttachment(100, -10);
this.lbl_description.setLayoutData(fd_lbl_description);
this.lbl_description.setAlignment(SWT.CENTER);
- this.lbl_description.setText(Messages.getString("waiting_for_app.message")); //$NON-NLS-1$
-
+ this.lbl_description.setText(Messages.getString("waiting_for_app.message")); //
+
ProgressBar progressBar = new ProgressBar(this, SWT.HORIZONTAL | SWT.INDETERMINATE);
FormData fd_progressBar = new FormData();
fd_progressBar.top = new FormAttachment(50, +10);
@@ -81,30 +81,30 @@ public class WaitingForAppComposite extends StateComposite {
fd_progressBar.left = new FormAttachment(50, -100);
fd_progressBar.right = new FormAttachment(50, +100);
progressBar.setLayoutData(fd_progressBar);
-
+
this.btn_sms = new Button(this, SWT.NONE);
this.btn_sms.addSelectionListener(new SMSSelectionListener());
-
+
FormData fd_btnSMS = new FormData();
fd_btnSMS.top = new FormAttachment(progressBar, 24);
fd_btnSMS.right = new FormAttachment(progressBar, 0, SWT.RIGHT);
this.btn_sms.setLayoutData(fd_btnSMS);
- this.btn_sms.setText(Messages.getString("SMS tan")); //$NON-NLS-1$
-
+ this.btn_sms.setText(Messages.getString("SMS tan")); //
+
this.btn_cancel = new Button(this, SWT.NONE);
this.btn_cancel.addSelectionListener(new CancelSelectionListener());
FormData fd_btnCancel = new FormData();
fd_btnCancel.top = new FormAttachment(btn_sms, 0, SWT.TOP);
fd_btnCancel.right = new FormAttachment(btn_sms, -6);
this.btn_cancel.setLayoutData(fd_btnCancel);
- this.btn_cancel.setText(Messages.getString("WaitingForAppComposite.btnCancel.text")); //$NON-NLS-1$
-
+ this.btn_cancel.setText(Messages.getString("WaitingForAppComposite.btnCancel.text")); //
+
reloadResources();
}
-
+
/**
- *
+ *
*/
private final class CancelSelectionListener extends SelectionAdapter {
/**
@@ -120,7 +120,7 @@ public class WaitingForAppComposite extends StateComposite {
WaitingForAppComposite.this.btn_sms.setEnabled(false);
}
}
-
+
private final class SMSSelectionListener extends SelectionAdapter {
/**
* Empty constructor
@@ -139,9 +139,9 @@ public class WaitingForAppComposite extends StateComposite {
WaitingForAppComposite.this.btn_cancel.setEnabled(false);
}
}
-
+
public void setUserSMS(boolean b) {
- this.isUserSMS = b;
+ this.isUserSMS = b;
}
@Override
@@ -162,10 +162,10 @@ public class WaitingForAppComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_description.setText(Messages.getString("waiting_for_app.message")); //$NON-NLS-1$
- this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //$NON-NLS-1$
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
- this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //$NON-NLS-1$
+ this.lbl_description.setText(Messages.getString("waiting_for_app.message")); //
+ this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //
+ this.btn_cancel.setText(Messages.getString("common.Cancel")); //
+ this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //
}
/**
@@ -179,8 +179,8 @@ public class WaitingForAppComposite extends StateComposite {
* @param b
*/
public void setUserCancel(boolean b) {
- this.userCancel = b;
-
+ this.userCancel = b;
+
}
/**
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
index a0a423c4..2779727f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
@@ -127,7 +127,7 @@ public class AboutComposite extends ConfigurationCompositeBase {
*/
@Override
public void reloadResources() {
- this.lnkAbout.setText(Messages.getString("config.AboutText")); //$NON-NLS-1$
+ this.lnkAbout.setText(Messages.getString("config.AboutText")); //
this.lblDataProtection.setText(Messages.getString("config.DataProtection"));
this.lnkDataProtection.setText(Messages.getString("config.DataProtectionStatement"));
this.btnOpenLogDirectory.setText(Messages.getString("config.ShowLogDirectory"));
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java
index 1c894e5c..6f8561e3 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java
@@ -62,7 +62,7 @@ import at.asit.pdfover.signator.SignaturePosition;
/**
* Composite for advanced configuration
- *
+ *
* Contains the simple configuration composite
*/
public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
@@ -301,10 +301,10 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
dlg.setFilterPath(AdvancedConfigurationComposite.this.txtOutputFolder.getText());
// Change the title bar text
- dlg.setText(Messages.getString("advanced_config.OutputFolder.Dialog_Title")); //$NON-NLS-1$
+ dlg.setText(Messages.getString("advanced_config.OutputFolder.Dialog_Title")); //
// Customizable message displayed in the dialog
- dlg.setMessage(Messages.getString("advanced_config.OutputFolder.Dialog")); //$NON-NLS-1$
+ dlg.setMessage(Messages.getString("advanced_config.OutputFolder.Dialog")); //
// Calling open() will open and run the dialog.
// It will return the selected directory, or
@@ -393,12 +393,12 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
Composite compProxyHostContainer = new Composite(this.grpProxy, SWT.NONE);
compProxyHostContainer.setLayout(new FormLayout());
compProxyHostContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
-
+
this.txtProxyHost = new Text(compProxyHostContainer, SWT.BORDER);
StateComposite.anchor(txtProxyHost).right(100,-42).top(0).left(0,5).set();
StateComposite.setFontHeight(txtProxyHost, Constants.TEXT_SIZE_NORMAL);
- this.proxyHostErrorMarker = new ErrorMarker(compProxyHostContainer, SWT.NONE, ""); //$NON-NLS-1$
+ this.proxyHostErrorMarker = new ErrorMarker(compProxyHostContainer, SWT.NONE, ""); //
StateComposite.anchor(proxyHostErrorMarker).left(100,-32).right(100).top(0).bottom(0,32).set();
this.proxyHostErrorMarker.setVisible(false);
@@ -433,7 +433,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
}
});
- this.txtProxyPortErrorMarker = new ErrorMarker(compProxyPortContainer, SWT.NONE, ""); //$NON-NLS-1$
+ this.txtProxyPortErrorMarker = new ErrorMarker(compProxyPortContainer, SWT.NONE, ""); //
StateComposite.anchor(txtProxyPortErrorMarker).left(100,-32).right(100).top(0).bottom(0,32).set();
this.txtProxyPortErrorMarker.setVisible(false);
@@ -449,14 +449,14 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
private void performPostFixChanged(String postfix) {
- log.debug("Save file postfix changed to : {}", postfix); //$NON-NLS-1$
+ log.debug("Save file postfix changed to : {}", postfix); //
this.configurationContainer.setSaveFilePostFix(postfix);
AdvancedConfigurationComposite.this.txtSaveFilePostFix.setText(postfix);
}
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#signerChanged()
*/
@@ -466,25 +466,25 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
}
void performOutputFolderChanged(String foldername) {
- log.debug("Selected Output folder: {}", foldername); //$NON-NLS-1$
+ log.debug("Selected Output folder: {}", foldername); //
this.configurationContainer.setOutputFolder(foldername);
AdvancedConfigurationComposite.this.txtOutputFolder.setText(foldername);
}
int getBKUElementIndex(BKUs bku) {
- String lookup = "BKU." + bku.toString(); //$NON-NLS-1$
+ String lookup = "BKU." + bku.toString(); //
String bkuName = Messages.getString(lookup);
int i = this.bkuStrings.indexOf(bkuName);
if (i == -1) {
- log.warn("NO BKU match for {}", bkuName); //$NON-NLS-1$
+ log.warn("NO BKU match for {}", bkuName); //
return 0;
}
return i;
}
void performBKUSelectionChanged(BKUs selected) {
- log.debug("Selected BKU: {}", selected); //$NON-NLS-1$
+ log.debug("Selected BKU: {}", selected); //
this.configurationContainer.setDefaultBKU(selected);
this.cmbBKUAuswahl.select(this.getBKUElementIndex(selected));
}
@@ -494,8 +494,8 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
BKUs bkuvalue = resolveBKU(selected);
this.performBKUSelectionChanged(bkuvalue);
} catch (Exception ex) {
- log.error("Failed to parse BKU value: {} {}", selected, ex); //$NON-NLS-1$
- ErrorDialog dialog = new ErrorDialog(getShell(), Messages.getString("error.InvalidBKU"), BUTTONS.OK); //$NON-NLS-1$
+ log.error("Failed to parse BKU value: {} {}", selected, ex); //
+ ErrorDialog dialog = new ErrorDialog(getShell(), Messages.getString("error.InvalidBKU"), BUTTONS.OK); //
dialog.open();
}
}
@@ -504,7 +504,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
int blen = BKUs.values().length;
for (int i = 0; i < blen; i++) {
- String lookup = "BKU." + BKUs.values()[i].toString(); //$NON-NLS-1$
+ String lookup = "BKU." + BKUs.values()[i].toString(); //
if (Messages.getString(lookup).equals(localizedBKU)) {
return BKUs.values()[i];
}
@@ -516,23 +516,23 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
int getLocaleElementIndex(Locale locale) {
for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; i++) {
if (Constants.SUPPORTED_LOCALES[i].equals(locale)) {
- log.debug("Locale: {} IDX: {}", locale, i); //$NON-NLS-1$ //$NON-NLS-2$
+ log.debug("Locale: {} IDX: {}", locale, i); // //
return i;
}
}
- log.warn("NO Locale match for {}", locale); //$NON-NLS-1$
+ log.warn("NO Locale match for {}", locale); //
return 0;
}
void performLocaleSelectionChanged(Locale selected) {
- log.debug("Selected Locale: {}", selected); //$NON-NLS-1$
+ log.debug("Selected Locale: {}", selected); //
this.configurationContainer.setLocale(selected);
this.cmbLocaleAuswahl.select(this.getLocaleElementIndex(selected));
}
void performPositionSelection(boolean automatic) {
- log.debug("Selected Position: {}", automatic); //$NON-NLS-1$
+ log.debug("Selected Position: {}", automatic); //
SignaturePosition pos = automatic ? new SignaturePosition() : null;
this.configurationContainer.setDefaultSignaturePosition(pos);
this.btnAutomatischePositionierung.setSelection(automatic);
@@ -596,7 +596,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
} catch (Exception ex) {
this.proxyHostErrorMarker.setVisible(true);
this.proxyHostErrorMarker.setToolTipText(ex.getMessage());
- log.error("processProxyHost: ", ex); //$NON-NLS-1$
+ log.error("processProxyHost: ", ex); //
}
}
@@ -615,7 +615,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
} catch (Exception ex) {
this.txtProxyPortErrorMarker.setVisible(true);
this.txtProxyPortErrorMarker.setToolTipText(ex.getMessage());
- log.error("processProxyPort: ", ex); //$NON-NLS-1$
+ log.error("processProxyPort: ", ex); //
}
}
@@ -639,7 +639,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -649,7 +649,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#initConfiguration(
* at.asit.pdfover.gui.workflow.config.PersistentConfigProvider)
@@ -677,7 +677,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
try {
this.configurationContainer.setProxyPort(provider.getProxyPortPersistent());
} catch (InvalidPortException e) {
- log.error("Failed to set proxy port!", e); //$NON-NLS-1$
+ log.error("Failed to set proxy port!", e); //
}
this.configurationContainer.setProxyUser(provider.getProxyUserPersistent());
this.configurationContainer.setProxyPass(provider.getProxyPassPersistent());
@@ -686,7 +686,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#loadConfiguration()
*/
@@ -730,7 +730,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
/**
* @param profile
- *
+ *
*/
public void performSetSignatureProfile(Profile profile) {
switch (profile) {
@@ -748,7 +748,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#storeConfiguration(
* at.asit.pdfover.gui.workflow.config.ConfigManipulator,
@@ -779,8 +779,8 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
if (hostOld != null && !hostOld.isEmpty() && (hostNew == null || hostNew.isEmpty())) {
// Proxy has been removed, let's clear the system properties
// Otherwise, the proxy settings wouldn't get removed
- System.clearProperty("http.proxyHost"); //$NON-NLS-1$
- System.clearProperty("https.proxyHost"); //$NON-NLS-1$
+ System.clearProperty("http.proxyHost"); //
+ System.clearProperty("https.proxyHost"); //
}
store.setProxyHost(hostNew);
@@ -788,8 +788,8 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
int portNew = this.configurationContainer.getProxyPort();
if (portOld != -1 && portNew == -1) {
// cf. above
- System.clearProperty("http.proxyPort"); //$NON-NLS-1$
- System.clearProperty("https.proxyPort"); //$NON-NLS-1$
+ System.clearProperty("http.proxyPort"); //
+ System.clearProperty("https.proxyPort"); //
}
store.setProxyPort(portNew);
@@ -797,8 +797,8 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
String userNew = this.configurationContainer.getProxyUser();
if (userOld != null && !userOld.isEmpty() && (userNew == null || userNew.isEmpty())) {
// cf. above
- System.clearProperty("http.proxyUser"); //$NON-NLS-1$
- System.clearProperty("https.proxyUser"); //$NON-NLS-1$
+ System.clearProperty("http.proxyUser"); //
+ System.clearProperty("https.proxyUser"); //
}
store.setProxyUser(userNew);
@@ -806,15 +806,15 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
String passNew = this.configurationContainer.getProxyPass();
if (passOld != null && passNew == null) {
// cf. above
- System.clearProperty("http.proxyPassword"); //$NON-NLS-1$
- System.clearProperty("https.proxyPassword"); //$NON-NLS-1$
+ System.clearProperty("http.proxyPassword"); //
+ System.clearProperty("https.proxyPassword"); //
}
store.setProxyPass(passNew);
}
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings()
*/
@@ -851,62 +851,62 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
*/
@Override
public void reloadResources() {
- this.grpSignatur.setText(Messages.getString("advanced_config.Signature_Title")); //$NON-NLS-1$
- this.btnAutomatischePositionierung.setText(Messages.getString("advanced_config.AutoPosition")); //$NON-NLS-1$
- this.btnAutomatischePositionierung.setToolTipText(Messages.getString("advanced_config.AutoPosition_ToolTip")); //$NON-NLS-1$
- this.grpPlaceholder.setText(Messages.getString("advanced_config.Placeholder_Title")); //$NON-NLS-1$
- this.btnPlatzhalterVerwenden.setText(Messages.getString("advanced_config.UseMarker")); //$NON-NLS-1$
- this.btnPlatzhalterVerwenden.setToolTipText(Messages.getString("advanced_config.UseMarker_ToolTip")); //$NON-NLS-1$
- this.btnSignatureFieldsUsage.setText(Messages.getString("advanced_config.UseSignatureFields")); //$NON-NLS-1$
- this.btnSignatureFieldsUsage.setToolTipText(Messages.getString("advanced_config.UseSignatureFields_ToolTip")); //$NON-NLS-1$
+ this.grpSignatur.setText(Messages.getString("advanced_config.Signature_Title")); //
+ this.btnAutomatischePositionierung.setText(Messages.getString("advanced_config.AutoPosition")); //
+ this.btnAutomatischePositionierung.setToolTipText(Messages.getString("advanced_config.AutoPosition_ToolTip")); //
+ this.grpPlaceholder.setText(Messages.getString("advanced_config.Placeholder_Title")); //
+ this.btnPlatzhalterVerwenden.setText(Messages.getString("advanced_config.UseMarker")); //
+ this.btnPlatzhalterVerwenden.setToolTipText(Messages.getString("advanced_config.UseMarker_ToolTip")); //
+ this.btnSignatureFieldsUsage.setText(Messages.getString("advanced_config.UseSignatureFields")); //
+ this.btnSignatureFieldsUsage.setToolTipText(Messages.getString("advanced_config.UseSignatureFields_ToolTip")); //
this.btnEnablePlaceholderUsage.setText(Messages.getString("advanced_config.Placeholder_Enabled"));
- this.btnPdfACompat.setText(Messages.getString("advanced_config.PdfACompat")); //$NON-NLS-1$
- this.btnPdfACompat.setToolTipText(Messages.getString("advanced_config.PdfACompat_ToolTip")); //$NON-NLS-1$
- this.lblTransparenz.setText(Messages.getString("advanced_config.SigPHTransparency")); //$NON-NLS-1$
- this.lblTransparenzLinks.setText(Messages.getString("advanced_config.SigPHTransparencyMin")); //$NON-NLS-1$
- this.lblTransparenzRechts.setText(Messages.getString("advanced_config.SigPHTransparencyMax")); //$NON-NLS-1$
- this.sclTransparenz.setToolTipText(Messages.getString("advanced_config.SigPHTransparencyTooltip")); //$NON-NLS-1$
-
- this.grpBkuAuswahl.setText(Messages.getString("advanced_config.BKUSelection_Title")); //$NON-NLS-1$
- this.cmbBKUAuswahl.setToolTipText(Messages.getString("advanced_config.BKUSelection_ToolTip")); //$NON-NLS-1$
- this.btnKeystoreEnabled.setText(Messages.getString("advanced_config.KeystoreEnabled")); //$NON-NLS-1$
- this.btnKeystoreEnabled.setToolTipText(Messages.getString("advanced_config.KeystoreEnabled_ToolTip")); //$NON-NLS-1$
-
- this.grpSpeicherort.setText(Messages.getString("advanced_config.OutputFolder_Title")); //$NON-NLS-1$
- this.lblDefaultOutputFolder.setText(Messages.getString("advanced_config.OutputFolder")); //$NON-NLS-1$
- this.txtOutputFolder.setToolTipText(Messages.getString("advanced_config.OutputFolder_ToolTip")); //$NON-NLS-1$
- this.btnBrowse.setText(Messages.getString("common.browse")); //$NON-NLS-1$
-
- this.grpLocaleAuswahl.setText(Messages.getString("advanced_config.LocaleSelection_Title")); //$NON-NLS-1$
- this.cmbLocaleAuswahl.setToolTipText(Messages.getString("advanced_config.LocaleSelection_ToolTip")); //$NON-NLS-1$
-
- this.grpUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck_Title")); //$NON-NLS-1$
- this.btnUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck")); //$NON-NLS-1$
- this.btnUpdateCheck.setToolTipText(Messages.getString("advanced_config.UpdateCheck_ToolTip")); //$NON-NLS-1$
-
- this.grpProxy.setText(Messages.getString("advanced_config.Proxy_Title")); //$NON-NLS-1$
- this.lblProxyHost.setText(Messages.getString("advanced_config.ProxyHost")); //$NON-NLS-1$
- this.txtProxyHost.setToolTipText(Messages.getString("advanced_config.ProxyHost_ToolTip")); //$NON-NLS-1$
- this.txtProxyHost.setMessage(Messages.getString("advanced_config.ProxyHost_Template")); //$NON-NLS-1$
- this.lblProxyPort.setText(Messages.getString("advanced_config.ProxyPort")); //$NON-NLS-1$
- this.txtProxyPort.setToolTipText(Messages.getString("advanced_config.ProxyPort_ToolTip")); //$NON-NLS-1$
- this.txtProxyPort.setMessage(Messages.getString("advanced_config.ProxyPort_Template")); //$NON-NLS-1$
+ this.btnPdfACompat.setText(Messages.getString("advanced_config.PdfACompat")); //
+ this.btnPdfACompat.setToolTipText(Messages.getString("advanced_config.PdfACompat_ToolTip")); //
+ this.lblTransparenz.setText(Messages.getString("advanced_config.SigPHTransparency")); //
+ this.lblTransparenzLinks.setText(Messages.getString("advanced_config.SigPHTransparencyMin")); //
+ this.lblTransparenzRechts.setText(Messages.getString("advanced_config.SigPHTransparencyMax")); //
+ this.sclTransparenz.setToolTipText(Messages.getString("advanced_config.SigPHTransparencyTooltip")); //
+
+ this.grpBkuAuswahl.setText(Messages.getString("advanced_config.BKUSelection_Title")); //
+ this.cmbBKUAuswahl.setToolTipText(Messages.getString("advanced_config.BKUSelection_ToolTip")); //
+ this.btnKeystoreEnabled.setText(Messages.getString("advanced_config.KeystoreEnabled")); //
+ this.btnKeystoreEnabled.setToolTipText(Messages.getString("advanced_config.KeystoreEnabled_ToolTip")); //
+
+ this.grpSpeicherort.setText(Messages.getString("advanced_config.OutputFolder_Title")); //
+ this.lblDefaultOutputFolder.setText(Messages.getString("advanced_config.OutputFolder")); //
+ this.txtOutputFolder.setToolTipText(Messages.getString("advanced_config.OutputFolder_ToolTip")); //
+ this.btnBrowse.setText(Messages.getString("common.browse")); //
+
+ this.grpLocaleAuswahl.setText(Messages.getString("advanced_config.LocaleSelection_Title")); //
+ this.cmbLocaleAuswahl.setToolTipText(Messages.getString("advanced_config.LocaleSelection_ToolTip")); //
+
+ this.grpUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck_Title")); //
+ this.btnUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck")); //
+ this.btnUpdateCheck.setToolTipText(Messages.getString("advanced_config.UpdateCheck_ToolTip")); //
+
+ this.grpProxy.setText(Messages.getString("advanced_config.Proxy_Title")); //
+ this.lblProxyHost.setText(Messages.getString("advanced_config.ProxyHost")); //
+ this.txtProxyHost.setToolTipText(Messages.getString("advanced_config.ProxyHost_ToolTip")); //
+ this.txtProxyHost.setMessage(Messages.getString("advanced_config.ProxyHost_Template")); //
+ this.lblProxyPort.setText(Messages.getString("advanced_config.ProxyPort")); //
+ this.txtProxyPort.setToolTipText(Messages.getString("advanced_config.ProxyPort_ToolTip")); //
+ this.txtProxyPort.setMessage(Messages.getString("advanced_config.ProxyPort_Template")); //
// this.lblProxyUser.setText(Messages.getString("advanced_config.ProxyUser"));
- // //$NON-NLS-1$
+ // //
// this.txtProxyUser.setToolTipText(Messages
- // .getString("advanced_config.ProxyUser_ToolTip")); //$NON-NLS-1$
+ // .getString("advanced_config.ProxyUser_ToolTip")); //
// this.txtProxyUser.setMessage(Messages
- // .getString("advanced_config.ProxyUser_Template")); //$NON-NLS-1$
+ // .getString("advanced_config.ProxyUser_Template")); //
// this.lblProxyPass.setText(Messages.getString("advanced_config.ProxyPass"));
- // //$NON-NLS-1$
+ // //
// this.txtProxyPass.setToolTipText(Messages
- // .getString("advanced_config.ProxyPass_ToolTip")); //$NON-NLS-1$
+ // .getString("advanced_config.ProxyPass_ToolTip")); //
// this.txtProxyPass.setMessage(Messages
- // .getString("advanced_config.ProxyPass_Template")); //$NON-NLS-1$
+ // .getString("advanced_config.ProxyPass_Template")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java
index 81011f5e..5dfee07b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java
@@ -29,17 +29,17 @@ import at.asit.pdfover.gui.workflow.states.State;
* Base class for configuration composites
*/
public abstract class ConfigurationCompositeBase extends StateComposite {
-
+
/**
* the configuration container
*/
protected ConfigurationContainer configurationContainer;
-
+
/**
* The PDF Signer used to produce signature block preview
*/
protected PDFSigner signer;
-
+
/**
* @return the signer
*/
@@ -64,7 +64,7 @@ public abstract class ConfigurationCompositeBase extends StateComposite {
* @param parent
* @param style
* @param state
- * @param configuration
+ * @param configuration
*/
public ConfigurationCompositeBase(Composite parent, int style, State state, ConfigurationContainer configuration) {
super(parent, style, state);
@@ -92,12 +92,12 @@ public abstract class ConfigurationCompositeBase extends StateComposite {
/**
* Called before exit.
* The method validates every setting in the configuration before exit
- *
+ *
* There might be settings when the user can decide to ignore a validation exception
* (for example the Outputfolder validation)
* In this case, the validator throws a ResumableException, which includes the
* validator index to resume from (should the user choose to ignore the error)
- *
+ *
* @param resumeFrom Resume from this validator index (initially 0)
* @throws Exception
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
index afcca6ac..2400ac7e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
@@ -62,7 +62,7 @@ import at.asit.pdfover.gui.workflow.states.State;
import iaik.security.provider.IAIK;
/**
- *
+ *
*/
public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
@@ -174,12 +174,12 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
FileDialog dialog = new FileDialog(
KeystoreConfigurationComposite.this.getShell(), SWT.OPEN);
dialog.setFilterExtensions(new String[] {
- "*.p12;*.pkcs12;*.pfx;*.ks;*.jks", "*.p12;*.pkcs12;*.pfx;", "*.ks;*.jks*.", "*" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "*.p12;*.pkcs12;*.pfx;*.ks;*.jks", "*.p12;*.pkcs12;*.pfx;", "*.ks;*.jks*.", "*" }); // // // //
dialog.setFilterNames(new String[] {
- Messages.getString("common.KeystoreExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.PKCS12Extension_Description"), //$NON-NLS-1$
- Messages.getString("common.KSExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.AllExtension_Description") }); //$NON-NLS-1$
+ Messages.getString("common.KeystoreExtension_Description"), //
+ Messages.getString("common.PKCS12Extension_Description"), //
+ Messages.getString("common.KSExtension_Description"), //
+ Messages.getString("common.AllExtension_Description") }); //
String fileName = dialog.open();
File file = null;
if (fileName != null) {
@@ -217,24 +217,24 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
try {
loadKeystore();
} catch (KeyStoreException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
} catch (FileNotFoundException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
showErrorDialog(String.format(Messages.getString(
- "error.KeyStoreFileNotExist"), f.getName())); //$NON-NLS-1$
+ "error.KeyStoreFileNotExist"), f.getName())); //
} catch (NoSuchAlgorithmException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
} catch (CertificateException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
} catch (IOException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
} catch (NullPointerException ex) {
- log.error("Error loading keystore - NPE?", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore - NPE?", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
}
}
});
@@ -278,7 +278,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
}
void loadKeystore() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {
- ConfigurationContainer config =
+ ConfigurationContainer config =
KeystoreConfigurationComposite.this.configurationContainer;
File f = new File(config.getKeyStoreFile());
this.ks = KeyStore.getInstance(config.getKeyStoreType());
@@ -292,37 +292,37 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
private void initKeystoreTypes() {
this.keystoreTypes = new HashMap<String, String>();
- this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_PKCS12"), "PKCS12"); //$NON-NLS-1$ //$NON-NLS-2$
- this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_JKS"), "JCEKS"); //$NON-NLS-1$ //$NON-NLS-2$
+ this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_PKCS12"), "PKCS12"); // //
+ this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_JKS"), "JCEKS"); // //
}
/**
- * @param fileName
+ * @param fileName
*/
protected void performKeystoreFileChanged(String fileName) {
- log.debug("Selected keystore file: " + fileName); //$NON-NLS-1$
+ log.debug("Selected keystore file: " + fileName); //
this.configurationContainer.setKeyStoreFile(fileName);
KeystoreConfigurationComposite.this.txtKeystoreFile.setText(fileName);
int i = fileName.lastIndexOf('.');
if (i > 0) {
String ext = fileName.substring(i+1);
if (
- ext.equalsIgnoreCase("p12") || //$NON-NLS-1$
- ext.equalsIgnoreCase("pkcs12") || //$NON-NLS-1$
- ext.equalsIgnoreCase("pfx")) //$NON-NLS-1$
- performKeystoreTypeChanged("PKCS12"); //$NON-NLS-1$
+ ext.equalsIgnoreCase("p12") || //
+ ext.equalsIgnoreCase("pkcs12") || //
+ ext.equalsIgnoreCase("pfx")) //
+ performKeystoreTypeChanged("PKCS12"); //
else if (
- ext.equalsIgnoreCase("ks") || //$NON-NLS-1$
- ext.equalsIgnoreCase("jks")) //$NON-NLS-1$
- performKeystoreTypeChanged("JCEKS"); //$NON-NLS-1$
+ ext.equalsIgnoreCase("ks") || //
+ ext.equalsIgnoreCase("jks")) //
+ performKeystoreTypeChanged("JCEKS"); //
}
}
/**
- * @param type
+ * @param type
*/
protected void performKeystoreTypeChanged(String type) {
- log.debug("Selected keystore type: " + type); //$NON-NLS-1$
+ log.debug("Selected keystore type: " + type); //
this.configurationContainer.setKeyStoreType(type);
for (int i = 0; i < this.cmbKeystoreType.getItemCount(); ++i) {
if (this.keystoreTypes.get(this.cmbKeystoreType.getItem(i)).equals(type)) {
@@ -333,10 +333,10 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
}
/**
- * @param storepass
+ * @param storepass
*/
protected void performKeystoreStorePassChanged(String storepass) {
- log.debug("Changed keystore store password"); //$NON-NLS-1$
+ log.debug("Changed keystore store password"); //
this.configurationContainer.setKeyStoreStorePass(storepass);
this.txtKeystoreStorePass.setText(storepass);
}
@@ -345,23 +345,23 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
* @param alias
*/
protected void performKeystoreAliasChanged(String alias) {
- log.debug("Selected keystore alias: " + alias); //$NON-NLS-1$
+ log.debug("Selected keystore alias: " + alias); //
this.configurationContainer.setKeyStoreAlias(alias);
this.cmbKeystoreAlias.setText(alias);
}
/**
- * @param keypass
+ * @param keypass
*/
protected void performKeystoreKeyPassChanged(String keypass) {
- log.debug("Changed keystore key password"); //$NON-NLS-1$
+ log.debug("Changed keystore key password"); //
this.configurationContainer.setKeyStoreKeyPass(keypass);
this.txtKeystoreKeyPass.setText(keypass);
}
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#signerChanged()
*/
@@ -372,7 +372,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -412,7 +412,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
if (ksf.exists())
loadKeystore();
} catch (Exception e) {
- log.error("Error loading keystore", e); //$NON-NLS-1$
+ log.error("Error loading keystore", e); //
}
performKeystoreAliasChanged(config.getKeyStoreAlias());
performKeystoreKeyPassChanged(config.getKeyStoreKeyPass());
@@ -434,7 +434,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings
* ()
@@ -478,24 +478,24 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
*/
@Override
public void reloadResources() {
- this.grpKeystore.setText(Messages.getString("keystore_config.Keystore_Title")); //$NON-NLS-1$
- this.lblKeystoreFile.setText(Messages.getString("keystore_config.KeystoreFile")); //$NON-NLS-1$
- this.btnBrowse.setText(Messages.getString("common.browse")); //$NON-NLS-1$
- this.txtKeystoreFile.setToolTipText(Messages.getString("keystore_config.KeystoreFile_ToolTip")); //$NON-NLS-1$
- this.lblKeystoreType.setText(Messages.getString("keystore_config.KeystoreType")); //$NON-NLS-1$
+ this.grpKeystore.setText(Messages.getString("keystore_config.Keystore_Title")); //
+ this.lblKeystoreFile.setText(Messages.getString("keystore_config.KeystoreFile")); //
+ this.btnBrowse.setText(Messages.getString("common.browse")); //
+ this.txtKeystoreFile.setToolTipText(Messages.getString("keystore_config.KeystoreFile_ToolTip")); //
+ this.lblKeystoreType.setText(Messages.getString("keystore_config.KeystoreType")); //
initKeystoreTypes();
this.cmbKeystoreType.setItems(this.keystoreTypes.keySet().toArray(new String[0]));
- this.lblKeystoreStorePass.setText(Messages.getString("keystore_config.KeystoreStorePass")); //$NON-NLS-1$
- this.txtKeystoreStorePass.setToolTipText(Messages.getString("keystore_config.KeystoreStorePass_ToolTip")); //$NON-NLS-1$
- this.btnLoad.setText(Messages.getString("keystore_config.Load")); //$NON-NLS-1$
- this.btnLoad.setToolTipText(Messages.getString("keystore_config.Load_ToolTip")); //$NON-NLS-1$
- this.lblKeystoreAlias.setText(Messages.getString("keystore_config.KeystoreAlias")); //$NON-NLS-1$
- this.lblKeystoreKeyPass.setText(Messages.getString("keystore_config.KeystoreKeyPass")); //$NON-NLS-1$
- this.txtKeystoreKeyPass.setToolTipText(Messages.getString("keystore_config.KeystoreKeyPass_ToolTip")); //$NON-NLS-1$
+ this.lblKeystoreStorePass.setText(Messages.getString("keystore_config.KeystoreStorePass")); //
+ this.txtKeystoreStorePass.setToolTipText(Messages.getString("keystore_config.KeystoreStorePass_ToolTip")); //
+ this.btnLoad.setText(Messages.getString("keystore_config.Load")); //
+ this.btnLoad.setToolTipText(Messages.getString("keystore_config.Load_ToolTip")); //
+ this.lblKeystoreAlias.setText(Messages.getString("keystore_config.KeystoreAlias")); //
+ this.lblKeystoreKeyPass.setText(Messages.getString("keystore_config.KeystoreKeyPass")); //
+ this.txtKeystoreKeyPass.setToolTipText(Messages.getString("keystore_config.KeystoreKeyPass_ToolTip")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
index a2973c3d..edf7894f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
@@ -72,7 +72,7 @@ import at.asit.pdfover.signator.SignatureParameter;
import at.asit.pdfover.signator.SignaturePosition;
/**
- *
+ *
*/
public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
@@ -105,12 +105,12 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
protected String logoFile = null;
protected Image sigPreview = null;
protected Image logo = null;
-
+
protected final Group grpSignatureProfile;
protected final Combo cmbSignatureProfiles;
-
+
/**
* @param parent
@@ -162,7 +162,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
StateComposite.anchor(grpSignatureProfile).right(100,-5).left(0,5).top(grpHandySignatur, 5).set();
this.grpSignatureProfile.setLayout(new FormLayout());
StateComposite.setFontHeight(grpSignatureProfile, Constants.TEXT_SIZE_NORMAL);
-
+
this.cmbSignatureProfiles = new Combo(this.grpSignatureProfile, SWT.READ_ONLY);
StateComposite.anchor(cmbSignatureProfiles).left(0,10).right(100,-10).top(0,10).bottom(100,-10).set();
StateComposite.setFontHeight(cmbSignatureProfiles, Constants.TEXT_SIZE_NORMAL);
@@ -233,7 +233,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
// Only taking first file ...
File file = new File(files[0]);
if (!file.exists()) {
- log.error("File: {} does not exist!", files[0]); //$NON-NLS-1$//$NON-NLS-2$
+ log.error("File: {} does not exist!", files[0]); ////
return;
}
processEmblemChanged(file.getAbsolutePath());
@@ -392,11 +392,11 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
}
/**
- *
+ *
*/
private final class ImageFileBrowser extends SelectionAdapter {
/**
- *
+ *
*/
public ImageFileBrowser() {
// Nothing to do
@@ -407,13 +407,13 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
FileDialog dialog = new FileDialog(
SimpleConfigurationComposite.this.getShell(), SWT.OPEN);
dialog.setFilterExtensions(new String[] {
- "*.jpg;*.png;*.gif", "*.jpg", "*.png", "*.gif", "*" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "*.jpg;*.png;*.gif", "*.jpg", "*.png", "*.gif", "*" }); // // // // //
dialog.setFilterNames(new String[] {
- Messages.getString("common.ImageExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.JPGExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.PNGExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.GIFExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.AllExtension_Description") }); //$NON-NLS-1$
+ Messages.getString("common.ImageExtension_Description"), //
+ Messages.getString("common.JPGExtension_Description"), //
+ Messages.getString("common.PNGExtension_Description"), //
+ Messages.getString("common.GIFExtension_Description"), //
+ Messages.getString("common.AllExtension_Description") }); //
String fileName = dialog.open();
File file = null;
if (fileName != null) {
@@ -447,9 +447,9 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
if (this.signer != null) {
SignatureParameter param = this.signer.getPDFSigner().newParameter();
if(this.configurationContainer.getSignatureNote() != null && !this.configurationContainer.getSignatureNote().isEmpty()) {
- param.setProperty("SIG_NOTE", this.configurationContainer.getSignatureNote()); //$NON-NLS-1$
+ param.setProperty("SIG_NOTE", this.configurationContainer.getSignatureNote()); //
}
-
+
param.setSignatureLanguage(this.configurationContainer.getSignatureLocale().getLanguage());
param.setSignaturePdfACompat(this.configurationContainer.getSignaturePdfACompat());
if (image != null && !image.trim().isEmpty()) {
@@ -461,7 +461,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
//img = SignaturePlaceholderCache.getSWTPlaceholder(param);
}
} catch (Exception e) {
- log.error("Failed to load image for display...", e); //$NON-NLS-1
+ log.error("Failed to load image for display...", e);
}
if (img != null) {
@@ -477,7 +477,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
ImageConverter.convertToSWT(CachedFileNameEmblem.fixImage(
ImageIO.read(imgFile), imgFile)));
} catch (IOException e) {
- log.error("Error reading image", e); //$NON-NLS-1$
+ log.error("Error reading image", e); //
}
} else {
this.logo = null;
@@ -491,10 +491,10 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
try {
setEmblemFileInternal(filename, false);
} catch (Exception ex) {
- log.error("processEmblemChanged: ", ex); //$NON-NLS-1$
+ log.error("processEmblemChanged: ", ex); //
ErrorDialog dialog = new ErrorDialog(
getShell(),
- Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK); //$NON-NLS-1$
+ Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK); //
dialog.open();
}
}
@@ -506,8 +506,8 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
} catch (Exception ex) {
this.txtMobileNumberErrorMarker.setVisible(true);
this.txtMobileNumberErrorMarker.setToolTipText(Messages
- .getString("error.InvalidPhoneNumber")); //$NON-NLS-1$
- log.error("processNumberChanged: ", ex); //$NON-NLS-1$
+ .getString("error.InvalidPhoneNumber")); //
+ log.error("processNumberChanged: ", ex); //
this.redraw();
this.doLayout();
}
@@ -516,17 +516,17 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
int getLocaleElementIndex(Locale locale) {
for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; i++) {
if (Constants.SUPPORTED_LOCALES[i].equals(locale)) {
- log.debug("Locale: {} IDX: {}",locale, i); //$NON-NLS-1$ //$NON-NLS-2$
+ log.debug("Locale: {} IDX: {}",locale, i); // //
return i;
}
}
- log.warn("NO Locale match for {}", locale); //$NON-NLS-1$
+ log.warn("NO Locale match for {}", locale); //
return 0;
}
void performSignatureLangSelectionChanged(Locale selected, Locale previous) {
- log.debug("Selected Sign Locale: {}", selected); //$NON-NLS-1$
+ log.debug("Selected Sign Locale: {}", selected); //
this.configurationContainer.setSignatureLocale(selected);
this.cmbSignatureLang.select(this.getLocaleElementIndex(selected));
@@ -535,9 +535,9 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
}
-
+
void preformProfileSelectionChanged(Profile newProfile) {
- log.debug("Signature Profile {} was selected", newProfile.name()); //$NON-NLS-1$
+ log.debug("Signature Profile {} was selected", newProfile.name()); //
Profile oldProfile = this.configurationContainer.getSignatureProfile();
this.configurationContainer.setSignatureProfile(newProfile);
this.cmbSignatureProfiles.select(newProfile.ordinal());
@@ -574,7 +574,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#signerChanged()
*/
@@ -589,7 +589,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
this.configurationContainer.setMobileNumber(number);
number = this.configurationContainer.getMobileNumber();
if (number == null) {
- this.txtMobileNumber.setText(""); //$NON-NLS-1$
+ this.txtMobileNumber.setText(""); //
return;
}
this.txtMobileNumber.setText(number);
@@ -602,7 +602,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -623,7 +623,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
this.configurationContainer.setEmblem(
provider.getDefaultEmblemPersistent());
} catch (InvalidEmblemFile e) {
- log.error("Failed to set emblem!", e); //$NON-NLS-1$
+ log.error("Failed to set emblem!", e); //
}
this.configurationContainer.setSignatureLocale(
@@ -653,10 +653,10 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
setEmblemFileInternal(emblemFile, true);
this.btnClearImage.setSelection(true);
} catch (Exception e1) {
- log.error("Failed to load emblem: ", e1); //$NON-NLS-1$
+ log.error("Failed to load emblem: ", e1); //
ErrorDialog dialog = new ErrorDialog(
getShell(),
- Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK); //$NON-NLS-1$
+ Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK); //
dialog.open();
}
}
@@ -670,9 +670,9 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
this.setVisibleImage();
this.performSignatureLangSelectionChanged(this.configurationContainer.getSignatureLocale(), null);
-
+
this.preformProfileSelectionChanged(this.configurationContainer.getSignatureProfile());
-
+
}
/* (non-Javadoc)
@@ -688,7 +688,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
store.setSignatureLocale(this.configurationContainer.getSignatureLocale());
store.setSignatureNote(this.configurationContainer.getSignatureNote());
-
+
store.setSignatureProfile(this.configurationContainer.getSignatureProfile().name());
@@ -696,7 +696,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings
* ()
@@ -717,7 +717,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
*/
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ClickableCanvas.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ClickableCanvas.java
index c14a2373..e2246761 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ClickableCanvas.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ClickableCanvas.java
@@ -28,19 +28,19 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
/**
- *
+ *
*/
public class ClickableCanvas extends Canvas {
-
+
private Image image = null;
-
+
/**
* @param parent
* @param style
*/
public ClickableCanvas(Composite parent, int style) {
super(parent, style);
-
+
this.addPaintListener(new PaintListener() {
@Override
@@ -65,7 +65,7 @@ public class ClickableCanvas extends Canvas {
/**
* Gets the image
- *
+ *
* @return the image
*/
public Image getImage() {
@@ -74,7 +74,7 @@ public class ClickableCanvas extends Canvas {
/**
* Sets the Image
- *
+ *
* @param image
* the imgage to set
*/
@@ -84,7 +84,7 @@ public class ClickableCanvas extends Canvas {
/**
* Main painting method
- *
+ *
* @param e
*/
void paintControl(PaintEvent e) {
@@ -93,7 +93,7 @@ public class ClickableCanvas extends Canvas {
/**
* Paint the text or image on the button
- *
+ *
* @param e
*/
protected void paintText(PaintEvent e) {
@@ -103,9 +103,9 @@ public class ClickableCanvas extends Canvas {
// e.gc.fillGradientRectangle(0, 1, width, height / 4, true);
if (this.image != null) {
-
+
//log.debug("Width: " + width + " Height: " + height);
-
+
int w = 0;
Image tmp = null;
if(this.image.getImageData().width < width) {
@@ -116,7 +116,7 @@ public class ClickableCanvas extends Canvas {
} else {
tmp = new Image(getDisplay(), this.image.getImageData());
}
-
+
e.gc.drawImage(tmp, w, w);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java
index 6d14dbd7..de3fb157 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java
@@ -26,7 +26,7 @@ import org.eclipse.swt.widgets.Shell;
public class Dialog {
private MessageBox box;
-
+
/**
* Message box buttons
*/
@@ -42,7 +42,7 @@ public class Dialog {
/** Display yes and no buttons */
YES_NO
};
-
+
/**
* Message box icon
*/
@@ -58,7 +58,7 @@ public class Dialog {
/** Working icon */
WORKING
};
-
+
/**
* @param parent The parent shell
* @param title The dialog title
@@ -114,7 +114,7 @@ public class Dialog {
/**
* Open error dialog
- *
+ *
* @return SWT.OK | SWT.IGNORE | SWT.ABORT | SWT.RETRY | SWT.CANCEL
*/
public int open() {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
index f6863b4f..f2c7b8e6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
@@ -30,7 +30,7 @@ public class ErrorDialog extends Dialog {
* @param button The buttons to be shown
*/
public ErrorDialog(Shell parent, String message, BUTTONS button) {
- super(parent, Messages.getString("error.Title"), //$NON-NLS-1$
+ super(parent, Messages.getString("error.Title"), //
message, button, ICON.ERROR);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java
index 0b5ca4b9..ba2949d8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.commons.Constants;
/**
- *
+ *
*/
public class ErrorMarker extends Label {
@@ -53,7 +53,7 @@ public class ErrorMarker extends Label {
public ErrorMarker(Composite parent, int style,
String message) {
super(parent, style);
-
+
InputStream stream = this.getClass().getResourceAsStream(Constants.RES_IMG_ERROR);
this.errorImg = new Image(getDisplay(), new ImageData(stream));
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java
index 3822bbd7..f86ed4db 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java
@@ -31,7 +31,7 @@ import org.eclipse.swt.widgets.Text;
import at.asit.pdfover.commons.Messages;
/**
- *
+ *
*/
public class InputDialog extends org.eclipse.swt.widgets.Dialog {
/**
@@ -134,7 +134,7 @@ public class InputDialog extends org.eclipse.swt.widgets.Dialog {
data.horizontalSpan = 2;
text.setLayoutData(data);
Button ok = new Button(shell, SWT.PUSH);
- ok.setText(Messages.getString("common.Ok")); //$NON-NLS-1$
+ ok.setText(Messages.getString("common.Ok")); //
data = new GridData(GridData.FILL_HORIZONTAL);
ok.setLayoutData(data);
ok.addSelectionListener(new SelectionAdapter() {
@@ -145,7 +145,7 @@ public class InputDialog extends org.eclipse.swt.widgets.Dialog {
}
});
Button cancel = new Button(shell, SWT.PUSH);
- cancel.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
+ cancel.setText(Messages.getString("common.Cancel")); //
data = new GridData(GridData.FILL_HORIZONTAL);
cancel.setLayoutData(data);
cancel.addSelectionListener(new SelectionAdapter() {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
index e03b427d..ee17f6b8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
@@ -36,15 +36,15 @@ import at.asit.pdfover.commons.Constants;
* Main Bar Button implementation
*/
public abstract class MainBarButton extends Canvas {
-
+
/**
* If borders are drawn with a gradient effect this sets the size
*/
public static final int GradientFactor = 5;
-
+
/**
* Number of pixel of the altitude of the triangle representing the arrow within the button shapes
- *
+ *
* This should be a multiple of 2!
*/
public static final int SplitFactor = 10;
@@ -66,7 +66,7 @@ public abstract class MainBarButton extends Canvas {
private Color inactiveText = null;
- private String text = ""; //$NON-NLS-1$
+ private String text = ""; //
private boolean active = true;
@@ -167,11 +167,11 @@ public abstract class MainBarButton extends Canvas {
public void setBorderColor(Color borderColor) {
this.borderColor = borderColor;
}
-
+
/**
* Gets the image
- *
+ *
* @return the image
*/
public Image getImage() {
@@ -180,7 +180,7 @@ public abstract class MainBarButton extends Canvas {
/**
* Sets the Image
- *
+ *
* @param image
* the imgage to set
*/
@@ -190,7 +190,7 @@ public abstract class MainBarButton extends Canvas {
/**
* Sets if this button is active
- *
+ *
* @param active
* the active state
*/
@@ -206,7 +206,7 @@ public abstract class MainBarButton extends Canvas {
/**
* Gets if this button is active
- *
+ *
* @return the active state
*/
public boolean getActive() {
@@ -215,7 +215,7 @@ public abstract class MainBarButton extends Canvas {
/**
* Gets the button text
- *
+ *
* @return the text
*/
public String getText() {
@@ -224,7 +224,7 @@ public abstract class MainBarButton extends Canvas {
/**
* Sets the text for the button
- *
+ *
* @param text
* the text to set
*/
@@ -234,7 +234,7 @@ public abstract class MainBarButton extends Canvas {
/**
* Paint 3D style borders
- *
+ *
* @param e
*/
protected void paintBackground(PaintEvent e) {
@@ -242,14 +242,14 @@ public abstract class MainBarButton extends Canvas {
int height = size.y - 4;
int width = size.x;
-
+
e.gc.setForeground(this.activeBackground1);
e.gc.setBackground(this.activeBackground);
-
+
e.gc.fillGradientRectangle(0, height, width, -1 * height, true);
-
+
//e.gc.setBackground(activeBackground);
-
+
// LEFT
// e.gc.fillGradientRectangle(0, 0, factor, height, false);
@@ -261,20 +261,20 @@ public abstract class MainBarButton extends Canvas {
/**
* Main painting method
- *
+ *
* @param e
*/
void paintControl(PaintEvent e) {
Color forecurrent = e.gc.getForeground();
Color backcurrent = e.gc.getBackground();
-
+
e.gc.setForeground(getBorderColor());
if(this.getActive()) {
this.paintBackground(e);
}
e.gc.setForeground(getBorderColor());
-
+
this.paintButton(e);
e.gc.setForeground(forecurrent);
@@ -285,7 +285,7 @@ public abstract class MainBarButton extends Canvas {
/**
* paint the inner button
- *
+ *
* @param e
*/
protected void paintButton(PaintEvent e) {
@@ -294,7 +294,7 @@ public abstract class MainBarButton extends Canvas {
/**
* Paint the text or image on the button
- *
+ *
* @param e
*/
protected void paintText(PaintEvent e) {
@@ -331,9 +331,9 @@ public abstract class MainBarButton extends Canvas {
e.gc.setForeground(current);
} else {
-
+
//log.debug("Width: " + width + " Height: " + height);
-
+
int w = 0;
Image tmp = null;
if(this.image.getImageData().width < width) {
@@ -344,7 +344,7 @@ public abstract class MainBarButton extends Canvas {
} else {
tmp = new Image(getDisplay(), this.image.getImageData());
}
-
+
e.gc.drawImage(tmp, w, w);
}
@@ -352,7 +352,7 @@ public abstract class MainBarButton extends Canvas {
/**
* change the text position
- *
+ *
* @param positionX
* the position
* @return the new position
@@ -363,7 +363,7 @@ public abstract class MainBarButton extends Canvas {
/**
* Gets the region of the button
- *
+ *
* @return the button region
*/
protected abstract Region getCustomRegion();
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarEndButton.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarEndButton.java
index 636de621..fa4c40c2 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarEndButton.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarEndButton.java
@@ -24,7 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
+ *
*/
public class MainBarEndButton extends MainBarButton {
/**
@@ -44,7 +44,7 @@ public class MainBarEndButton extends MainBarButton {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.controls.MainBarButton#paintButton(org.eclipse.swt
* .events.PaintEvent)
@@ -56,7 +56,7 @@ public class MainBarEndButton extends MainBarButton {
int split = 10;
int width = size.x - 1;
-
+
e.gc.drawLine(0, 0, width, 0);
e.gc.drawLine(width, 0, width, height);
e.gc.drawLine(width, height, 0, height);
@@ -67,7 +67,7 @@ public class MainBarEndButton extends MainBarButton {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.controls.MainBarButton#getCustomRegion()
*/
@Override
@@ -87,7 +87,7 @@ public class MainBarEndButton extends MainBarButton {
}
/**
- * change the text position
+ * change the text position
* @param positionX the position
* @return the new position
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarMiddleButton.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarMiddleButton.java
index 6d992799..63cc50a2 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarMiddleButton.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarMiddleButton.java
@@ -24,7 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
+ *
*/
public class MainBarMiddleButton extends MainBarButton {
/**
@@ -47,14 +47,14 @@ public class MainBarMiddleButton extends MainBarButton {
*/
@Override
protected void paintButton(PaintEvent e) {
-
+
Point size = this.getSize();
-
+
int height = size.y - 3;
int split = SplitFactor;
int width = size.x - split;
-
+
e.gc.drawLine(0, 0, width, 0);
e.gc.drawLine(width, 0, width+split, (height) / 2);
e.gc.drawLine(width+split, (height) / 2, width, height);
@@ -64,7 +64,7 @@ public class MainBarMiddleButton extends MainBarButton {
}
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.controls.MainBarButton#getCustomRegion()
*/
@@ -75,17 +75,17 @@ public class MainBarMiddleButton extends MainBarButton {
int height = size.y - 2;
int split = SplitFactor;
-
+
int width = size.x - split;
Region reg = new Region();
- reg.add(new int[] {
- 0, 0,
- width, 0,
+ reg.add(new int[] {
+ 0, 0,
+ width, 0,
width + split, (height) / 2,
- width, height,
- 0, height,
- 0+split, (height) / 2,
+ width, height,
+ 0, height,
+ 0+split, (height) / 2,
0, 0 });
return reg;
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java
index ce423977..9e35d3d6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java
@@ -25,7 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
+ *
*/
public class MainBarRectangleButton extends MainBarButton {
@@ -71,7 +71,7 @@ public class MainBarRectangleButton extends MainBarButton {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.controls.MainBarButton#paintButton(org.eclipse.swt
* .events.PaintEvent)
@@ -103,55 +103,55 @@ public class MainBarRectangleButton extends MainBarButton {
Region left_reg = new Region();
left_reg.add(new int[] { 0, 0, factor, factor, factor, height-factor, 0, height, 0, 0 });
-
+
Region right_reg = new Region();
- right_reg.add(new int[] { width, 0,
- width - factor, factor,
+ right_reg.add(new int[] { width, 0,
+ width - factor, factor,
width - factor, height-factor, width, height, width, 0 });
-
+
Region top_reg = new Region();
- top_reg.add(new int[] {
- 0, 0,
- factor, factor,
- width - factor, factor,
- width, 0,
+ top_reg.add(new int[] {
+ 0, 0,
+ factor, factor,
+ width - factor, factor,
+ width, 0,
0, 0 });
-
+
Region bottom_reg = new Region();
- bottom_reg.add(new int[] {
- 0, height,
- factor, height-factor,
- width - factor, height-factor,
+ bottom_reg.add(new int[] {
+ 0, height,
+ factor, height-factor,
+ width - factor, height-factor,
width, height, 0, height });
-
+
e.gc.setClipping(top_reg);
-
- //TOP
+
+ //TOP
e.gc.fillGradientRectangle(0, 0, width, factor, true);
-
+
e.gc.setClipping(bottom_reg);
-
- //BOTTOM
+
+ //BOTTOM
e.gc.fillGradientRectangle(0, height, width, -1 * (factor),
true);
-
+
e.gc.setClipping(left_reg);
-
+
// LEFT
e.gc.fillGradientRectangle(0, 0, factor, height, false);
-
+
e.gc.setClipping(right_reg);
// RIGTH
e.gc.fillGradientRectangle(width, 0, -1 * factor, height,
false);
-
+
e.gc.setClipping((Region)null);
}
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.controls.MainBarButton#getCustomRegion()
*/
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java
index 489f17b3..265bccf6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java
@@ -24,7 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
+ *
*/
public class MainBarStartButton extends MainBarButton {
/**
@@ -56,52 +56,52 @@ public class MainBarStartButton extends MainBarButton {
Region left_reg = new Region();
left_reg.add(new int[] { 0, 0, factor, factor, factor, height-factor, 0, height, 0, 0 });
-
+
Region right1_reg = new Region();
- right1_reg.add(new int[] { width, 0,
- width - factor, factor,
+ right1_reg.add(new int[] { width, 0,
+ width - factor, factor,
width - factor, height-factor, width, height, width, 0 });
-
+
Region top_reg = new Region();
- top_reg.add(new int[] {
- 0, 0,
- factor, factor,
- width - factor, factor,
- width, 0,
+ top_reg.add(new int[] {
+ 0, 0,
+ factor, factor,
+ width - factor, factor,
+ width, 0,
0, 0 });
-
+
Region bottom_reg = new Region();
- bottom_reg.add(new int[] {
- 0, height,
- factor, height-factor,
- width - factor, height-factor,
+ bottom_reg.add(new int[] {
+ 0, height,
+ factor, height-factor,
+ width - factor, height-factor,
width, height, 0, height });
-
+
e.gc.setClipping(top_reg);
-
- //TOP
+
+ //TOP
e.gc.fillGradientRectangle(0, 0, width, factor, true);
-
+
e.gc.setClipping(bottom_reg);
-
- //BOTTOM
+
+ //BOTTOM
e.gc.fillGradientRectangle(0, height, width, -1 * (factor),
true);
-
+
e.gc.setClipping(left_reg);
-
+
// LEFT
e.gc.fillGradientRectangle(0, 0, factor, height, false);
-
+
e.gc.setClipping(right1_reg);
// RIGTH
e.gc.fillGradientRectangle(width, 0, -1 * factor, height,
false);
-
+
e.gc.setClipping((Region)null);*/
}
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.controls.MainBarButton#paintButton(org.eclipse.swt.events.PaintEvent)
*/
@@ -114,7 +114,7 @@ public class MainBarStartButton extends MainBarButton {
int split = SplitFactor;
int width = size.x - split;
-
+
e.gc.drawLine(0, 0, width, 0);
e.gc.drawLine(width, 0, width + split, (height) / 2);
e.gc.drawLine(width + split, (height) / 2, width, height);
@@ -142,9 +142,9 @@ public class MainBarStartButton extends MainBarButton {
return reg;
}
-
+
/**
- * change the text position
+ * change the text position
* @param positionX the position
* @return the new position
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/PasswordInputDialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/PasswordInputDialog.java
index 1659b73c..12b41a3e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/PasswordInputDialog.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/PasswordInputDialog.java
@@ -20,7 +20,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
/**
- *
+ *
*/
public class PasswordInputDialog extends InputDialog {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java
index 29f08e49..0e740a51 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java
@@ -20,11 +20,11 @@ package at.asit.pdfover.gui.exceptions;
import at.asit.pdfover.commons.Messages;
/**
- *
+ *
*/
public class ATrustConnectionException extends Exception {
/**
- *
+ *
*/
private static final long serialVersionUID = -5826910929587650685L;
@@ -33,8 +33,8 @@ public class ATrustConnectionException extends Exception {
* @param file
*/
public ATrustConnectionException() {
- super(Messages.getString("error.ATrustConnection")); //$NON-NLS-1$
+ super(Messages.getString("error.ATrustConnection")); //
}
-
-
+
+
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java
index dd924118..ab0f66b7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java
@@ -22,7 +22,7 @@ import at.asit.pdfover.commons.Messages;
*/
public class CantLoadKeystoreException extends ResumableException {
/**
- *
+ *
*/
private static final long serialVersionUID = 7554121273052104624L;
@@ -31,6 +31,6 @@ public class CantLoadKeystoreException extends ResumableException {
* @param cause The original exception
*/
public CantLoadKeystoreException(Throwable cause, int resumeIndex) {
- super(Messages.getString("error.KeyStore"), cause, resumeIndex); //$NON-NLS-1$
+ super(Messages.getString("error.KeyStore"), cause, resumeIndex); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java
index ed96d06e..8f717391 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java
@@ -16,14 +16,14 @@
package at.asit.pdfover.gui.exceptions;
/**
- *
+ *
*/
public class InitializationException extends PDFOverGUIException {
/**
- *
+ *
*/
private static final long serialVersionUID = 433744698649684034L;
-
+
/**
* @param msg
* @param cause
@@ -31,5 +31,5 @@ public class InitializationException extends PDFOverGUIException {
public InitializationException(String msg, Throwable cause) {
super(msg, cause);
}
-
+
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java
index e5f2a9de..30eb7bb8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java
@@ -21,11 +21,11 @@ import java.io.File;
import at.asit.pdfover.commons.Messages;
/**
- *
+ *
*/
public class InvalidEmblemFile extends PDFOverGUIException {
/**
- *
+ *
*/
private static final long serialVersionUID = -5826910929131650685L;
@@ -34,15 +34,15 @@ public class InvalidEmblemFile extends PDFOverGUIException {
* @param file
*/
public InvalidEmblemFile(final File file) {
- super(String.format(Messages.getString("exception.InvalidEmblemFile"), file.getAbsolutePath())); //$NON-NLS-1$
+ super(String.format(Messages.getString("exception.InvalidEmblemFile"), file.getAbsolutePath())); //
}
-
+
/**
* Constructor
* @param file
- * @param reason
+ * @param reason
*/
public InvalidEmblemFile(final File file, Throwable reason) {
- super(String.format(Messages.getString("exception.InvalidEmblemFile"), file.getAbsolutePath()), reason); //$NON-NLS-1$
+ super(String.format(Messages.getString("exception.InvalidEmblemFile"), file.getAbsolutePath()), reason); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java
index e6984a7d..2067c0fc 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java
@@ -21,13 +21,13 @@ package at.asit.pdfover.gui.exceptions;
public abstract class InvalidPasswordException extends PDFOverGUIException {
/**
- *
+ *
*/
private static final long serialVersionUID = 6735754648793405145L;
/**
- * Invalid Password
- * @param msg
+ * Invalid Password
+ * @param msg
*/
public InvalidPasswordException(String msg) {
super(msg);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java
index 695d477a..9c86bcc7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java
@@ -18,21 +18,21 @@ package at.asit.pdfover.gui.exceptions;
import at.asit.pdfover.commons.Messages;
/**
- *
+ *
*/
public class InvalidPortException extends PDFOverGUIException {
/**
- *
+ *
*/
private static final long serialVersionUID = -4809078091773253962L;
-
-
+
+
/**
* Constructor with an invalid port number
* @param port invalid port number
*/
public InvalidPortException(int port) {
- super(String.format(Messages.getString("exception.InvalidPort"), Integer.toString(port), 1, 0xffff)); //$NON-NLS-1$
+ super(String.format(Messages.getString("exception.InvalidPort"), Integer.toString(port), 1, 0xffff)); //
}
/**
@@ -41,6 +41,6 @@ public class InvalidPortException extends PDFOverGUIException {
* @param portString invalid port string
*/
public InvalidPortException(String portString, Throwable source) {
- super(String.format(Messages.getString("exception.InvalidPort"), portString, 1, 0xffff), source); //$NON-NLS-1$
+ super(String.format(Messages.getString("exception.InvalidPort"), portString, 1, 0xffff), source); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java
index 61cf968f..3e326a8c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java
@@ -22,7 +22,7 @@ import at.asit.pdfover.commons.Messages;
*/
public class KeystoreAliasDoesntExistException extends ResumableException {
/**
- *
+ *
*/
private static final long serialVersionUID = 2264150118185552023L;
@@ -31,6 +31,6 @@ public class KeystoreAliasDoesntExistException extends ResumableException {
* @param resumeIndex The resume Index
*/
public KeystoreAliasDoesntExistException(final String alias, int resumeIndex) {
- super(String.format(Messages.getString("error.KeyStoreAliasExist"), alias), resumeIndex); //$NON-NLS-1$
+ super(String.format(Messages.getString("error.KeyStoreAliasExist"), alias), resumeIndex); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java
index 8ea41f56..17b4661f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java
@@ -22,7 +22,7 @@ import at.asit.pdfover.commons.Messages;
*/
public class KeystoreAliasNoKeyException extends ResumableException {
/**
- *
+ *
*/
private static final long serialVersionUID = -4030764219866181859L;
@@ -31,6 +31,6 @@ public class KeystoreAliasNoKeyException extends ResumableException {
* @param resumeIndex The resume Index
*/
public KeystoreAliasNoKeyException(final String alias, int resumeIndex) {
- super(String.format(Messages.getString("error.KeyStoreAliasNoKey"), alias), resumeIndex); //$NON-NLS-1$
+ super(String.format(Messages.getString("error.KeyStoreAliasNoKey"), alias), resumeIndex); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java
index ebe8dd7f..5b3167b6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java
@@ -24,7 +24,7 @@ import at.asit.pdfover.commons.Messages;
*/
public class KeystoreDoesntExistException extends ResumableException {
/**
- *
+ *
*/
private static final long serialVersionUID = 8213496549933275086L;
@@ -33,6 +33,6 @@ public class KeystoreDoesntExistException extends ResumableException {
* @param resumeIndex The resume Index
*/
public KeystoreDoesntExistException(final File keystore, int resumeIndex) {
- super(String.format(Messages.getString("error.KeyStoreFileNotExist"), keystore.getPath()), resumeIndex); //$NON-NLS-1$
+ super(String.format(Messages.getString("error.KeyStoreFileNotExist"), keystore.getPath()), resumeIndex); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java
index 4dd20ef2..1b2b4875 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java
@@ -22,7 +22,7 @@ import at.asit.pdfover.commons.Messages;
*/
public class KeystoreKeyPasswordException extends ResumableException {
/**
- *
+ *
*/
private static final long serialVersionUID = 7734648200275150410L;
@@ -30,6 +30,6 @@ public class KeystoreKeyPasswordException extends ResumableException {
* @param resumeIndex The resume Index
*/
public KeystoreKeyPasswordException(int resumeIndex) {
- super(Messages.getString("error.KeyStoreKeyPass"), resumeIndex); //$NON-NLS-1$
+ super(Messages.getString("error.KeyStoreKeyPass"), resumeIndex); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java
index c82a82bf..c9d042e6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java
@@ -33,7 +33,7 @@ public class OutputfolderDoesntExistException extends ResumableException {
* @param resumeIndex The resume Index
*/
public OutputfolderDoesntExistException(final File folder, int resumeIndex) {
- super(String.format(Messages.getString("exception.PathNotExist"), folder.getAbsolutePath()), resumeIndex); //$NON-NLS-1$
+ super(String.format(Messages.getString("exception.PathNotExist"), folder.getAbsolutePath()), resumeIndex); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java
index cfa884a0..1f895783 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java
@@ -22,18 +22,18 @@ import java.io.File;
import at.asit.pdfover.commons.Messages;
/**
- *
+ *
*/
public class OutputfolderNotADirectoryException extends PDFOverGUIException {
/**
- *
+ *
*/
private static final long serialVersionUID = -3270628002264772405L;
-
+
/**
* @param folder The file
*/
public OutputfolderNotADirectoryException(File folder) {
- super(String.format(Messages.getString("exception.PathNotDirectory"), folder.getAbsolutePath())); //$NON-NLS-1$
+ super(String.format(Messages.getString("exception.PathNotDirectory"), folder.getAbsolutePath())); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java
index d915b6da..da2b29d5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java
@@ -20,18 +20,18 @@ import at.asit.pdfover.commons.Messages;
// Imports
/**
- *
+ *
*/
public class PasswordTooLongException extends InvalidPasswordException {
-
+
/**
* Constructor
*/
public PasswordTooLongException() {
- super(Messages.getString("exception.PasswordTooLong")); //$NON-NLS-1$
+ super(Messages.getString("exception.PasswordTooLong")); //
}
/**
- *
+ *
*/
private static final long serialVersionUID = -3268343884240608304L;
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java
index ab073484..3e4b43b1 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java
@@ -20,19 +20,19 @@ import at.asit.pdfover.commons.Messages;
// Imports
/**
- *
+ *
*/
public class PasswordTooShortException extends InvalidPasswordException {
/**
- *
+ *
*/
private static final long serialVersionUID = 3015765967751806169L;
-
+
/**
* Constructor
*/
public PasswordTooShortException() {
- super(Messages.getString("exception.PasswordTooShort")); //$NON-NLS-1$
+ super(Messages.getString("exception.PasswordTooShort")); //
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java
index 3b0c79c1..7cec826f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java
@@ -16,17 +16,17 @@
package at.asit.pdfover.gui.exceptions;
/**
- *
+ *
*/
public class ResumableException extends PDFOverGUIException {
/**
- *
+ *
*/
private static final long serialVersionUID = -607216270516492225L;
private int resumeIndex = 0;
-
+
/**
* Create a new resumable exception, thrown by a validator which can be ignored
* @param msg Error message
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java
index bd4c3aa6..a6960f87 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java
@@ -36,7 +36,7 @@ import at.asit.pdfover.commons.Messages;
* This code does not require the Cocoa SWT JAR in order to be compiled as it
* uses reflection to access the Cocoa specific API methods. Use SWT Listeners
* instead in order to use this class in SWT only applications.
- *
+ *
* </p>
* <p>
* This code was influenced by the <a
@@ -85,9 +85,9 @@ public class CocoaUIEnhancer {
/**
* Will be called on 32bit SWT.
- * @param id
- * @param sel
- * @param arg0
+ * @param id
+ * @param sel
+ * @param arg0
* @return x
*/
@SuppressWarnings("unused")
@@ -97,26 +97,26 @@ public class CocoaUIEnhancer {
/**
* Will be called on 64bit SWT.
- * @param id
- * @param sel
- * @param arg0
+ * @param id
+ * @param sel
+ * @param arg0
* @return x
*/
public long actionProc(final long id, final long sel, final long arg0) {
if (sel == sel_aboutMenuItemSelected_) {
if (log.isDebugEnabled()) {
- log.debug("[MenuHookObject - actionProc] : About"); //$NON-NLS-1$
+ log.debug("[MenuHookObject - actionProc] : About"); //
this.about.handleEvent(null);
}
} else if (sel == sel_preferencesMenuItemSelected_) {
if (log.isDebugEnabled()) {
- log.debug("[MenuHookObject - actionProc] : Preferences"); //$NON-NLS-1$
+ log.debug("[MenuHookObject - actionProc] : Preferences"); //
}
this.pref.handleEvent(null);
} else {
if (log.isDebugEnabled()) {
- log.debug("[MenuHookObject - actionProc] : Unknow selection!"); //$NON-NLS-1$
+ log.debug("[MenuHookObject - actionProc] : Unknow selection!"); //
}
}
// Return value is not used.
@@ -138,7 +138,7 @@ public class CocoaUIEnhancer {
/**
* Hook the given Listener to the Mac OS X application Quit menu and the
* IActions to the About and Preferences menus.
- *
+ *
* @param display
* The Display to use.
* @param quitListener
@@ -173,29 +173,29 @@ public class CocoaUIEnhancer {
display.disposeExec(new Runnable() {
@Override
public void run() {
- CocoaUIEnhancer.invoke(proc3Args, "dispose"); //$NON-NLS-1$
+ CocoaUIEnhancer.invoke(proc3Args, "dispose"); //
}
});
}
private static void initialize(final Object callbackObject) throws Exception {
- final Class<?> osCls = classForName("org.eclipse.swt.internal.cocoa.OS"); //$NON-NLS-1$
+ final Class<?> osCls = classForName("org.eclipse.swt.internal.cocoa.OS"); //
// Register names in objective-c.
if (sel_toolbarButtonClicked_ == 0) {
- // sel_toolbarButtonClicked_ = registerName( osCls, "toolbarButtonClicked:" ); //$NON-NLS-1$
+ // sel_toolbarButtonClicked_ = registerName( osCls, "toolbarButtonClicked:" ); //
sel_preferencesMenuItemSelected_ = registerName(osCls,
- "preferencesMenuItemSelected:"); //$NON-NLS-1$
+ "preferencesMenuItemSelected:"); //
sel_aboutMenuItemSelected_ = registerName(osCls,
- "aboutMenuItemSelected:"); //$NON-NLS-1$
+ "aboutMenuItemSelected:"); //
}
// Create an SWT Callback object that will invoke the actionProc method
// of our internal
// callbackObject.
- proc3Args = new Callback(callbackObject, "actionProc", 3); //$NON-NLS-1$
- final Method getAddress = Callback.class.getMethod("getAddress", //$NON-NLS-1$
+ proc3Args = new Callback(callbackObject, "actionProc", 3); //
+ final Method getAddress = Callback.class.getMethod("getAddress", //
new Class[0]);
Object object = getAddress.invoke(proc3Args, (Object[]) null);
final long proc3 = convertToLong(object);
@@ -203,64 +203,64 @@ public class CocoaUIEnhancer {
SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
}
- final Class<?> nsmenuCls = classForName("org.eclipse.swt.internal.cocoa.NSMenu"); //$NON-NLS-1$
- final Class<?> nsmenuitemCls = classForName("org.eclipse.swt.internal.cocoa.NSMenuItem"); //$NON-NLS-1$
- final Class<?> nsstringCls = classForName("org.eclipse.swt.internal.cocoa.NSString"); //$NON-NLS-1$
- final Class<?> nsapplicationCls = classForName("org.eclipse.swt.internal.cocoa.NSApplication"); //$NON-NLS-1$
+ final Class<?> nsmenuCls = classForName("org.eclipse.swt.internal.cocoa.NSMenu"); //
+ final Class<?> nsmenuitemCls = classForName("org.eclipse.swt.internal.cocoa.NSMenuItem"); //
+ final Class<?> nsstringCls = classForName("org.eclipse.swt.internal.cocoa.NSString"); //
+ final Class<?> nsapplicationCls = classForName("org.eclipse.swt.internal.cocoa.NSApplication"); //
// Instead of creating a new delegate class in objective-c,
// just use the current SWTApplicationDelegate. An instance of this
// is a field of the Cocoa Display object and is already the target
// for the menuItems. So just get this class and add the new methods
// to it.
- object = invoke(osCls, "objc_lookUpClass", //$NON-NLS-1$
- new Object[] { "SWTApplicationDelegate" }); //$NON-NLS-1$
+ object = invoke(osCls, "objc_lookUpClass", //
+ new Object[] { "SWTApplicationDelegate" }); //
final long cls = convertToLong(object);
// Add the action callbacks for Preferences and About menu items.
- invoke(osCls, "class_addMethod", new Object[] { wrapPointer(cls), //$NON-NLS-1$
+ invoke(osCls, "class_addMethod", new Object[] { wrapPointer(cls), //
wrapPointer(sel_preferencesMenuItemSelected_),
- wrapPointer(proc3), "@:@" }); //$NON-NLS-1$
- invoke(osCls, "class_addMethod", new Object[] { wrapPointer(cls), //$NON-NLS-1$
+ wrapPointer(proc3), "@:@" }); //
+ invoke(osCls, "class_addMethod", new Object[] { wrapPointer(cls), //
wrapPointer(sel_aboutMenuItemSelected_), wrapPointer(proc3),
- "@:@" }); //$NON-NLS-1$
+ "@:@" }); //
// Get the Mac OS X Application menu.
final Object sharedApplication = invoke(nsapplicationCls,
- "sharedApplication"); //$NON-NLS-1$
- final Object mainMenu = invoke(sharedApplication, "mainMenu"); //$NON-NLS-1$
- final Object mainMenuItem = invoke(nsmenuCls, mainMenu, "itemAtIndex", //$NON-NLS-1$
+ "sharedApplication"); //
+ final Object mainMenu = invoke(sharedApplication, "mainMenu"); //
+ final Object mainMenuItem = invoke(nsmenuCls, mainMenu, "itemAtIndex", //
new Object[] { wrapPointer(0) });
- final Object appMenu = invoke(mainMenuItem, "submenu"); //$NON-NLS-1$
+ final Object appMenu = invoke(mainMenuItem, "submenu"); //
// Create the About <application-name> menu command
- final Object aboutMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex", //$NON-NLS-1$
+ final Object aboutMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex", //
new Object[] { wrapPointer(kAboutMenuItem) });
- final Object nsStrAbout = invoke(nsstringCls, "stringWith", //$NON-NLS-1$
- new Object[] { String.format(Messages.getString("main.about"), Constants.APP_NAME) }); //$NON-NLS-1$
- invoke(nsmenuitemCls, aboutMenuItem, "setTitle", //$NON-NLS-1$
+ final Object nsStrAbout = invoke(nsstringCls, "stringWith", //
+ new Object[] { String.format(Messages.getString("main.about"), Constants.APP_NAME) }); //
+ invoke(nsmenuitemCls, aboutMenuItem, "setTitle", //
new Object[] { nsStrAbout });
// Rename the quit action.
final Object quitMenuItem = invoke(nsmenuCls, appMenu,
- "itemAtIndex", new Object[] { wrapPointer(kQuitMenuItem) }); //$NON-NLS-1$
- final Object nsStrQuit = invoke(nsstringCls, "stringWith", //$NON-NLS-1$
- new Object[] { String.format(Messages.getString("main.quit"), Constants.APP_NAME) }); //$NON-NLS-1$
- invoke(nsmenuitemCls, quitMenuItem, "setTitle", //$NON-NLS-1$
+ "itemAtIndex", new Object[] { wrapPointer(kQuitMenuItem) }); //
+ final Object nsStrQuit = invoke(nsstringCls, "stringWith", //
+ new Object[] { String.format(Messages.getString("main.quit"), Constants.APP_NAME) }); //
+ invoke(nsmenuitemCls, quitMenuItem, "setTitle", //
new Object[] { nsStrQuit });
// Rename the hide action.
final Object hideMenuItem = invoke(nsmenuCls, appMenu,
- "itemAtIndex", //$NON-NLS-1$
+ "itemAtIndex", //
new Object[] { wrapPointer(kHideApplicationMenuItem) });
- final Object nsStrHide = invoke(nsstringCls, "stringWith", //$NON-NLS-1$
- new Object[] { String.format(Messages.getString("main.hide"), Constants.APP_NAME) }); //$NON-NLS-1$
- invoke(nsmenuitemCls, hideMenuItem, "setTitle", //$NON-NLS-1$
+ final Object nsStrHide = invoke(nsstringCls, "stringWith", //
+ new Object[] { String.format(Messages.getString("main.hide"), Constants.APP_NAME) }); //
+ invoke(nsmenuitemCls, hideMenuItem, "setTitle", //
new Object[] { nsStrHide });
// Enable the Preferences menuItem.
- final Object prefMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex", //$NON-NLS-1$
+ final Object prefMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex", //
new Object[] { wrapPointer(kPreferencesMenuItem) });
- invoke(nsmenuitemCls, prefMenuItem, "setEnabled", new Object[] { true }); //$NON-NLS-1$
+ invoke(nsmenuitemCls, prefMenuItem, "setEnabled", new Object[] { true }); //
// Set the action to execute when the About or Preferences menuItem is
// invoked.
@@ -270,15 +270,15 @@ public class CocoaUIEnhancer {
// and we have registerd the new selectors on it. So just set the new
// action to invoke the
// selector.
- invoke(nsmenuitemCls, prefMenuItem, "setAction", //$NON-NLS-1$
+ invoke(nsmenuitemCls, prefMenuItem, "setAction", //
new Object[] { wrapPointer(sel_preferencesMenuItemSelected_) });
- invoke(nsmenuitemCls, aboutMenuItem, "setAction", //$NON-NLS-1$
+ invoke(nsmenuitemCls, aboutMenuItem, "setAction", //
new Object[] { wrapPointer(sel_aboutMenuItemSelected_) });
}
private static long registerName(final Class<?> osCls, final String name)
throws IllegalArgumentException, SecurityException {
- final Object object = invoke(osCls, "sel_registerName", //$NON-NLS-1$
+ final Object object = invoke(osCls, "sel_registerName", //
new Object[] { name });
return convertToLong(object);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java
index 7de75749..f15e5f6e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java
@@ -24,7 +24,7 @@ import org.apache.commons.httpclient.methods.multipart.PartSource;
import at.asit.pdfover.signator.DocumentSource;
/**
- *
+ *
*/
public class FileUploadSource implements PartSource {
@@ -32,7 +32,7 @@ public class FileUploadSource implements PartSource {
/**
* Constructor
- *
+ *
* @param source
* the source
*/
@@ -47,7 +47,7 @@ public class FileUploadSource implements PartSource {
@Override
public String getFileName() {
- return "sign.pdf"; //$NON-NLS-1$
+ return "sign.pdf"; //
}
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java
index d4ad4496..11187c31 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java
@@ -28,10 +28,10 @@ import org.eclipse.swt.graphics.PaletteData;
import org.eclipse.swt.graphics.RGB;
/**
- *
+ *
*/
public class ImageConverter {
-
+
/**
* Convert Image Data to AWT Image
* @param data
@@ -95,7 +95,7 @@ public class ImageConverter {
/**
* Convert AWT Image to SWT Image
- *
+ *
* @param bufferedImage
* @return SWT Image data
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/LocaleSerializer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/LocaleSerializer.java
index cdd5b5cc..18d6e8c1 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/LocaleSerializer.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/LocaleSerializer.java
@@ -19,7 +19,7 @@ package at.asit.pdfover.gui.utils;
import java.util.Locale;
/**
- *
+ *
*/
public class LocaleSerializer {
/**
@@ -28,11 +28,11 @@ public class LocaleSerializer {
* @return the locale
*/
public static Locale parseFromString(String localeString) {
-
+
if(localeString == null || localeString.isEmpty()) {
return null;
}
-
+
Locale targetLocale = null;
Locale[] locale = Locale.getAvailableLocales();
for(int i = 0; i < locale.length; i++) {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java
index 44e72725..00422b32 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java
@@ -39,7 +39,7 @@ import at.asit.pdfover.signator.Emblem;
import at.asit.pdfover.signator.SignatureParameter;
/**
- *
+ *
*/
public class SignaturePlaceholderCache {
/**
@@ -49,12 +49,12 @@ public class SignaturePlaceholderCache {
.getLogger(SignaturePlaceholderCache.class);
private static void saveImage(BufferedImage image, String fileDir, String fileName, String fileExt) throws IOException {
- File file = new File(fileDir, fileName + "." + fileExt); //$NON-NLS-1$
+ File file = new File(fileDir, fileName + "." + fileExt); //
ImageIO.write(image, fileExt, file); // ignore returned boolean
}
private static Image loadImage(String fileDir, String fileName, String fileExt) throws IOException {
- return ImageIO.read(new File(fileDir, fileName + "." + fileExt)); //$NON-NLS-1$
+ return ImageIO.read(new File(fileDir, fileName + "." + fileExt)); //
}
/**
@@ -65,19 +65,19 @@ public class SignaturePlaceholderCache {
public static Image getPlaceholder(SignatureParameter param) {
final String fileDir = Constants.CONFIG_DIRECTORY;
final String imgFileName = Constants.PLACEHOLDER_CACHE_FILENAME;
- final String imgFileExt = "png"; //$NON-NLS-1$
+ final String imgFileExt = "png"; //
final String propFileName = Constants.PLACEHOLDER_CACHE_PROPS_FILENAME;
- final String sigLangProp = "LANG"; //$NON-NLS-1$
- final String sigEmblProp = "EMBL"; //$NON-NLS-1$
- final String sigEHshProp = "EHSH"; //$NON-NLS-1$
- final String sigPdfAProp = "PDFA"; //$NON-NLS-1$
- final String sigNoteProp = "NOTE"; //$NON-NLS-1$
- final String sigProfProp = "PROF"; //$NON-NLS-1$
+ final String sigLangProp = "LANG"; //
+ final String sigEmblProp = "EMBL"; //
+ final String sigEHshProp = "EHSH"; //
+ final String sigPdfAProp = "PDFA"; //
+ final String sigNoteProp = "NOTE"; //
+ final String sigProfProp = "PROF"; //
String sigLang = param.getSignatureLanguage();
- String sigEmbl = ""; //$NON-NLS-1$
- String sigEHsh = ""; //$NON-NLS-1$
+ String sigEmbl = ""; //
+ String sigEHsh = ""; //
if (param.getEmblem() != null) {
Emblem embl = param.getEmblem();
if (embl instanceof CachedFileNameEmblem) {
@@ -88,9 +88,9 @@ public class SignaturePlaceholderCache {
}
}
String sigPdfA = param.getSignaturePdfACompat() ? Constants.TRUE : Constants.FALSE;
- String sigNote = param.getProperty("SIG_NOTE"); //$NON-NLS-1$
+ String sigNote = param.getProperty("SIG_NOTE"); //
if (sigNote == null)
- sigNote = ""; //$NON-NLS-1$
+ sigNote = ""; //
String profile = param.getSignatureProfile();
if (profile == null){
// set default value
@@ -107,18 +107,18 @@ public class SignaturePlaceholderCache {
sigNote.equals(sigProps.getProperty(sigNoteProp)) &&
sigPdfA.equals(sigProps.getProperty(sigPdfAProp)) &&
profile.equals(sigProps.getProperty(sigProfProp))) {
- log.debug("Placeholder cache hit"); //$NON-NLS-1$
+ log.debug("Placeholder cache hit"); //
return loadImage(fileDir, imgFileName, imgFileExt);
}
- log.debug("Placeholder cache miss (" + //$NON-NLS-1$
- sigLang + "|" + sigProps.getProperty(sigLangProp) + " - " +//$NON-NLS-1$ //$NON-NLS-2$
- sigEmbl + "|" + sigProps.getProperty(sigEmblProp) + " - " + //$NON-NLS-1$ //$NON-NLS-2$
- sigEHsh + "|" + sigProps.getProperty(sigEHshProp) + " - " + //$NON-NLS-1$ //$NON-NLS-2$
- sigNote + "|" + sigProps.getProperty(sigNoteProp) + " - " + //$NON-NLS-1$ //$NON-NLS-2$
- sigPdfA + "|" + sigProps.getProperty(sigPdfAProp) + " - " + //$NON-NLS-1$ //$NON-NLS-2$
+ log.debug("Placeholder cache miss (" + //
+ sigLang + "|" + sigProps.getProperty(sigLangProp) + " - " +// //
+ sigEmbl + "|" + sigProps.getProperty(sigEmblProp) + " - " + // //
+ sigEHsh + "|" + sigProps.getProperty(sigEHshProp) + " - " + // //
+ sigNote + "|" + sigProps.getProperty(sigNoteProp) + " - " + // //
+ sigPdfA + "|" + sigProps.getProperty(sigPdfAProp) + " - " + // //
profile + "|" + sigProps.getProperty(sigProfProp) + ")");
} catch (Exception e) {
- log.warn("Can't load signature Placeholder", e); //$NON-NLS-1$
+ log.warn("Can't load signature Placeholder", e); //
}
// create new cache
@@ -135,7 +135,7 @@ public class SignaturePlaceholderCache {
saveImage((BufferedImage) img, fileDir, imgFileName, imgFileExt);
return img;
} catch (IOException e) {
- log.error("Can't save signature Placeholder", e); //$NON-NLS-1$
+ log.error("Can't save signature Placeholder", e); //
return param.getPlaceholder();
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java
index 3f2d0f3d..6321586b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java
@@ -19,7 +19,7 @@ package at.asit.pdfover.gui.utils;
import java.util.Comparator;
/**
- *
+ *
*/
public class VersionComparator implements Comparator<String> {
/* (non-Javadoc)
@@ -27,8 +27,8 @@ public class VersionComparator implements Comparator<String> {
*/
@Override
public int compare(String v1, String v2) {
- String[] v1Parts = v1.split("\\.|-"); //$NON-NLS-1$
- String[] v2Parts = v2.split("\\.|-"); //$NON-NLS-1$
+ String[] v1Parts = v1.split("\\.|-"); //
+ String[] v2Parts = v2.split("\\.|-"); //
int length = Math.max(v1Parts.length, v2Parts.length);
for (int i = 0; i < length; ++i) {
@@ -37,7 +37,7 @@ public class VersionComparator implements Comparator<String> {
if (i < v1Parts.length)
v1Part = Integer.parseInt(v1Parts[i]);
} catch (NumberFormatException e) {
- if (v1Parts[i].equals("SNAPSHOT")) //$NON-NLS-1$
+ if (v1Parts[i].equals("SNAPSHOT")) //
v1Part = Integer.MAX_VALUE;
}
@@ -46,7 +46,7 @@ public class VersionComparator implements Comparator<String> {
if (i < v2Parts.length)
v2Part = Integer.parseInt(v2Parts[i]);
} catch (NumberFormatException e) {
- if (v2Parts[i].equals("SNAPSHOT")) //$NON-NLS-1$
+ if (v2Parts[i].equals("SNAPSHOT")) //
v2Part = Integer.MAX_VALUE;
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java
index b3e07d60..4fd2528a 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java
@@ -42,21 +42,21 @@ public class Zipper {
private static final Logger log = LoggerFactory.getLogger(Zipper.class);
/**
- * Compresses the source path to Zip File output stream
+ * Compresses the source path to Zip File output stream
* @param sourcePath
* @param os
- * @throws IOException
+ * @throws IOException
*/
public static void zip(String sourcePath, OutputStream os) throws IOException {
zip(sourcePath, os, false);
}
/**
- * Compresses the source path to Zip File output stream
+ * Compresses the source path to Zip File output stream
* @param sourcePath
* @param os
* @param doDelete whether to delete content after compression
- * @throws IOException
+ * @throws IOException
*/
public static void zip(String sourcePath, OutputStream os, boolean doDelete) throws IOException {
ZipOutputStream zos = new ZipOutputStream(os);
@@ -90,7 +90,7 @@ public class Zipper {
}
/**
- * Extracts Zip File input stream to target path
+ * Extracts Zip File input stream to target path
* @param is
* @param targetPath
* @throws IOException
@@ -100,17 +100,17 @@ public class Zipper {
ZipEntry entry;
// while there are entries I process them
while ((entry = zis.getNextEntry()) != null) {
- log.debug("entry: " + entry.getName() + ", " //$NON-NLS-1$//$NON-NLS-2$
+ log.debug("entry: " + entry.getName() + ", " ////
+ entry.getSize());
// consume all the data from this entry
if (entry.isDirectory()) {
- log.debug("Extracting directory: " + entry.getName()); //$NON-NLS-1$
-
+ log.debug("Extracting directory: " + entry.getName()); //
+
File nDir = new File(targetPath + File.separator + entry.getName());
if(!nDir.exists()) {
if(!nDir.mkdir()) {
- throw new IOException("Failed to create dir: " + entry.getName()); //$NON-NLS-1$
+ throw new IOException("Failed to create dir: " + entry.getName()); //
}
}
continue;
@@ -121,7 +121,7 @@ public class Zipper {
new FileOutputStream(targetPath + File.separator + entry.getName()));
while ((len = zis.read(buffer)) >= 0)
out.write(buffer, 0, len);
-
+
out.close();
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java
index f18b4ef1..a332d844 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java
@@ -22,7 +22,7 @@ import at.asit.pdfover.gui.workflow.states.State;
/**
- *
+ *
*/
public interface GUIProvider {
/**
@@ -39,13 +39,13 @@ public interface GUIProvider {
* @param composite the composite
*/
public void display(final Composite composite);
-
+
/**
* Gets the main window shell
* @return the main window shell
*/
public Shell getMainShell();
-
+
/**
* Reloads the resources on active gui components
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSigner.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSigner.java
index 33e8c176..9d174302 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSigner.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSigner.java
@@ -20,7 +20,7 @@ import at.asit.pdfover.signator.Signator;
import at.asit.pdfover.signator.Signer;
/**
- *
+ *
*/
public interface PDFSigner {
/**
@@ -28,13 +28,13 @@ public interface PDFSigner {
* @return the signer type
*/
public Signator.Signers getUsedPDFSignerLibrary();
-
+
/**
* Set PDF Signer Type
* @param signer the signer type
*/
public void setUsedPDFSignerLibrary(Signator.Signers signer);
-
+
/**
* Gets the currently used PDF Signer
* @return the pdf signer
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSignerImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSignerImpl.java
index 9750a0b1..c858f46d 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSignerImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PDFSignerImpl.java
@@ -24,7 +24,7 @@ import at.asit.pdfover.signator.Signator.Signers;
import at.asit.pdfover.signator.Signer;
/**
- *
+ *
*/
public class PDFSignerImpl implements PDFSigner {
/**
@@ -35,7 +35,7 @@ public class PDFSignerImpl implements PDFSigner {
.getLogger(PDFSignerImpl.class);
private Signers signer = Signator.Signers.PDFAS4;
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.PDFSigner#getPDFSignerType()
*/
@@ -57,7 +57,7 @@ public class PDFSignerImpl implements PDFSigner {
}
private Signer signerLib;
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.PDFSigner#getPDFSigner()
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java
index 6075ffee..85539eb5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java
@@ -22,7 +22,7 @@ import at.asit.pdfover.gui.workflow.config.PersistentConfigProvider;
import at.asit.pdfover.gui.workflow.states.State;
/**
- *
+ *
*/
public interface StateMachine {
/**
@@ -54,29 +54,29 @@ public interface StateMachine {
* @return the PDF Signer
*/
public PDFSigner getPDFSigner();
-
+
/**
* Get the Status
* @return the Status
*/
public Status getStatus();
-
+
/**
* Gets the GUI provider
* @return the GUI provider
*/
public GUIProvider getGUIProvider();
-
+
/**
* Jump to specific state
- *
+ *
* Sets the state machine state this method should be used to let the user jump
* around between states. This Method also resets certain properties defined
* by later states then the target state.
- *
+ *
* Example: Usually the MainWindow allows the user to jump to the states:
* DataSourceSelectionState, PositioningState and BKUSelectionState
- *
+ *
* @param state the state to jump to
*/
public void jumpToState(State state);
@@ -86,7 +86,7 @@ public interface StateMachine {
* Calls the next state.
*/
public void update();
-
+
/**
* Update state machine from other thread
* Calls the next state within the main thread
@@ -97,10 +97,10 @@ public interface StateMachine {
* Exit state machine execution
*/
public void exit();
-
+
/**
* Gets the command line arguments
- *
+ *
* @return the command line arguments
*/
public String[] getCmdArgs();
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java
index 990e6c31..a48c0e5e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java
@@ -56,7 +56,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
/**
* Default constructor
- *
+ *
* @param cmdLineArgs
*/
public StateMachineImpl(String[] cmdLineArgs) {
@@ -72,7 +72,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
* This method should be used to let the user jump
* around between states. This Method also resets certain properties defined
* by later states then state
- *
+ *
* @param state
*/
@Override
@@ -92,9 +92,9 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
try {
current.run();
} catch (Exception e) {
- log.error("StateMachine update: ", e); //$NON-NLS-1$
- ErrorDialog errorState = new ErrorDialog(this.getMainShell(),
- Messages.getString("error.Unexpected"), BUTTONS.OK); //$NON-NLS-1$
+ log.error("StateMachine update: ", e); //
+ ErrorDialog errorState = new ErrorDialog(this.getMainShell(),
+ Messages.getString("error.Unexpected"), BUTTONS.OK); //
//errorState.setException(e);
//jumpToState(errorState);
errorState.open();
@@ -109,7 +109,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
if (this.mainWindow != null
&& !this.mainWindow.getShell().isDisposed()) {
- log.debug("Allowing MainWindow to update its state for " //$NON-NLS-1$
+ log.debug("Allowing MainWindow to update its state for " //
+ current);
current.updateMainWindowBehavior();
this.mainWindow.applyBehavior();
@@ -121,13 +121,13 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
}
if (next == null) {
- log.info("Next state is null -> exit"); //$NON-NLS-1$
+ log.info("Next state is null -> exit"); //
this.status.setCurrentState(next);
break;
}
- log.debug("Changing state from: " //$NON-NLS-1$
- + current + " to " //$NON-NLS-1$
+ log.debug("Changing state from: " //
+ + current + " to " //
+ next.toString());
this.status.setCurrentState(next);
}
@@ -159,7 +159,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.StateMachine#display(org.eclipse.swt.widgets
* .Composite)
@@ -184,7 +184,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
this.shell.open();
this.shell.layout();
} catch (Exception e) {
- log.warn("Main-Window creation FAILED. Reason: " + e.getMessage()); //$NON-NLS-1$
+ log.warn("Main-Window creation FAILED. Reason: " + e.getMessage()); //
this.display = null;
this.mainWindow = null;
this.shell = null;
@@ -195,7 +195,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
/**
* Gets the Shell for drawing the ui
- *
+ *
* @return Composite
*/
public synchronized Composite getComposite() {
@@ -217,7 +217,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
Composite.class, int.class, State.class);
composite = constructor.newInstance(getComposite(), style, state);
} catch (Exception e) {
- log.error("Could not create Composite for Class " //$NON-NLS-1$
+ log.error("Could not create Composite for Class " //
+ compositeClass.getName(), e);
}
return composite;
@@ -225,7 +225,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
/**
* Only returns a shell if one was already created ...
- *
+ *
* @return
*/
private Shell nonCreatingGetShell() {
@@ -247,7 +247,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
/**
* Only returns a shell if one was already created ...
- *
+ *
* @return
*/
private Display nonCreatingGetDisplay() {
@@ -258,9 +258,9 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
* Workflow main entrance point
*/
public void start() {
-
+
// Call update to start processing ...
- update();
+ update();
// if a user interaction is required we have a shell ...
Shell shell = nonCreatingGetShell();
@@ -352,7 +352,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
/**
* sets the command line arguments
- *
+ *
* @param cmdLineArgs
*/
private void setCmdLineArgs(String[] cmdLineArgs) {
@@ -361,7 +361,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
/**
* Gets the command line arguments
- *
+ *
* @return the command line arguments
*/
@Override
@@ -377,7 +377,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
if(this.shell == null) {
this.createMainWindow();
}
-
+
return this.shell;
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java
index f5b078ed..177b2f39 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java
@@ -45,7 +45,7 @@ public interface Status {
* @param position the position
*/
public void setSignaturePosition(SignaturePosition position);
-
+
/**
* Gets the signature position
* @return the signature position
@@ -57,13 +57,13 @@ public interface Status {
* @param bku the selected BKU
*/
public void setBKU(BKUs bku);
-
+
/**
* Gets the selected BKU
* @return the selected BKU
*/
public BKUs getBKU();
-
+
/**
* Gets the current state
* @return the current state
@@ -81,25 +81,25 @@ public interface Status {
* @return the previous State
*/
public State getPreviousState();
-
+
/**
* Gets the signing state
* @return the signing state
*/
public SigningState getSigningState();
-
+
/**
* Sets the signing state
* @param state the signing state
*/
public void setSigningState(SigningState state);
-
+
/**
* Sets the sign result
* @param signResult
*/
public void setSignResult(SignResult signResult);
-
+
/**
* Gets the sign Result
* @return the sign result
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java
index 7cc94c62..2faf8b73 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java
@@ -29,7 +29,7 @@ import at.asit.pdfover.signator.SignaturePosition;
import at.asit.pdfover.signator.SigningState;
/**
- *
+ *
*/
public class StatusImpl implements Status {
/**
@@ -38,19 +38,19 @@ public class StatusImpl implements Status {
private static final Logger log = LoggerFactory.getLogger(StatusImpl.class);
private File document = null;
-
+
private SignaturePosition signaturePosition = null;
-
+
private BKUs bku = BKUs.NONE;
-
+
private State currentState = null;
private State previousState = null;
private SigningState signingState = null;
-
+
private SignResult signResult = null;
-
+
private MainWindowBehavior behavior;
private boolean searchForPlacehoderSignature = false;
@@ -73,16 +73,16 @@ public class StatusImpl implements Status {
*/
public void setCurrentState(State currentState) {
//if (this.previousState == this.currentState)
- // log.error("Changing to same state? " + this.currentState); //$NON-NLS-1$
+ // log.error("Changing to same state? " + this.currentState); //
if (this.previousState != null && !this.previousState.equals(currentState))
{
//Reference to previous state will be lost - perform cleanup
- log.debug("Changing from " + this.currentState + " to " + currentState); //$NON-NLS-1$ //$NON-NLS-2$
- log.debug("Cleaning up " + this.previousState); //$NON-NLS-1$
+ log.debug("Changing from " + this.currentState + " to " + currentState); // //
+ log.debug("Cleaning up " + this.previousState); //
this.previousState.cleanUp();
}
-
+
this.previousState = this.currentState;
this.currentState = currentState;
}
@@ -110,7 +110,7 @@ public class StatusImpl implements Status {
public File getDocument() {
return this.document;
}
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.Status#setSignaturePosition(at.asit.pdfover.signator.SignaturePosition)
*/
@@ -185,7 +185,7 @@ public class StatusImpl implements Status {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.Status#getConfiguration()
*/
@Override
@@ -195,7 +195,7 @@ public class StatusImpl implements Status {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.Status#setSearchForPlaceholderSignature(
* boolean)
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java
index befb244b..2a34b440 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java
@@ -171,28 +171,28 @@ public interface ConfigManipulator {
*/
public void saveCurrentConfiguration() throws IOException;
-
+
/**
* Sets whether to use an existing signaturemarker.
* QR-Code only
- *
+ *
* @param useMarker
* whether to use an existing signaturemarker
*/
public void setUseMarker(boolean useMarker);
-
+
/**
- * Sets the use of signature fields as signature marker
+ * Sets the use of signature fields as signature marker
* @param useFields
*/
public void setUseSignatureFields(boolean useFields);
-
+
/**
* @param bool
*/
public void setEnablePlaceholderUsage(boolean bool);
-
+
/**
* @return
*/
@@ -204,7 +204,7 @@ public interface ConfigManipulator {
public void setSignatureProfile(String profile);
public void setSaveFilePostFix(String postFix);
-
+
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
index 9b54f4ee..9c82845d 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
@@ -20,7 +20,7 @@ import at.asit.pdfover.signator.SignaturePosition;
/**
* An interface for setting the configuration overlay
- *
+ *
* This overlay overrides the actual configuration but will not be saved
*/
public interface ConfigOverlayManipulator {
@@ -131,10 +131,10 @@ public interface ConfigOverlayManipulator {
* @param configurationFile
*/
public void setConfigurationFile(String configurationFile);
-
+
/**
- *
+ *
* @param profile
*/
- public void setSignatureProfile(String profile);
+ public void setSignatureProfile(String profile);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
index b6935206..38526326 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
@@ -32,11 +32,11 @@ public interface ConfigProvider {
/**
* RegEx for parsing signature position
*/
- public static final String SIGN_POS_REGEX = "(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?);p=(\\d))|(auto)|(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?))"; //$NON-NLS-1$
+ public static final String SIGN_POS_REGEX = "(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?);p=(\\d))|(auto)|(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?))"; //
/**
* Loads the configuration from a configuration file
- *
+ *
* @param configSource
* the configuration file
* @throws IOException
@@ -45,77 +45,77 @@ public interface ConfigProvider {
/**
* Gets the configuration file
- *
+ *
* @return the configuration file
*/
public String getConfigurationFile();
/**
* Gets the configuration directory
- *
+ *
* @return the configuration directory
*/
public String getConfigurationDirectory();
/**
* Gets the default Mobile number
- *
+ *
* @return the default mobile number
*/
public String getDefaultMobileNumber();
/**
* Gets the password to use for Mobile BKU
- *
+ *
* @return the password
*/
public String getDefaultMobilePassword();
/**
* Gets the filename of the default emblem
- *
+ *
* @return the emblem
*/
public String getDefaultEmblem();
/**
* Gets the proxy host
- *
+ *
* @return the proxy hostname or ip address
*/
public String getProxyHost();
/**
* Gets the proxy port
- *
+ *
* @return the proxy port
*/
public int getProxyPort();
/**
* Gets the proxy username
- *
+ *
* @return the proxy username
*/
public String getProxyUser();
/**
* Gets the proxy password
- *
+ *
* @return the proxy password
*/
public String getProxyPass();
/**
* Get the default configured BKU
- *
+ *
* @return the default configured BKU
*/
public BKUs getDefaultBKU();
/**
* Get the default configured SignaturePosition
- *
+ *
* @return the default configured SignaturePosition or null if not
* configured
*/
@@ -123,126 +123,126 @@ public interface ConfigProvider {
/**
* Get the transparency of the signature placeholder
- *
+ *
* @return the transparency of the signature placeholder
*/
public int getPlaceholderTransparency();
/**
* Gets the default output folder for signed documents
- *
+ *
* @return the default output folder
*/
public String getDefaultOutputFolder();
/**
* Gets the mobile BKU URL
- *
+ *
* @return the mobile BKU URL
*/
public String getMobileBKUURL();
/**
* Gets the mobile BKU type
- *
+ *
* @return the mobile BKU type
*/
public MobileBKUs getMobileBKUType();
/**
* Gets the mobile BKU BASE64 setting
- *
+ *
* @return the mobile BKU BASE64 setting
*/
public boolean getMobileBKUBase64();
/**
* Get the signature note text to use
- *
+ *
* @return the signature note text
*/
public String getSignatureNote();
/**
* Gets the configured locale
- *
+ *
* @return the configured locale
*/
public Locale getLocale();
/**
* Gets the configured locale
- *
+ *
* @return the configured locale
*/
public Locale getSignatureLocale();
/**
* Get the signature PDF/A compatibility setting
- *
+ *
* @return the signature PDF/A compatibility setting
*/
public boolean getSignaturePdfACompat();
/**
* Gets whether keystore signing is enabled
- *
+ *
* @return whether keystore signing is enabled
*/
public Boolean getKeyStoreEnabled();
/**
* Gets the keystore file
- *
+ *
* @return the keystore file
*/
public String getKeyStoreFile();
/**
* Gets the keystore type
- *
+ *
* @return the keystore type
*/
public String getKeyStoreType();
/**
* Gets the keystore alias
- *
+ *
* @return the keystore alias
*/
public String getKeyStoreAlias();
/**
* Gets the keystore store password
- *
+ *
* @return the keystore store password
*/
public String getKeyStoreStorePass();
/**
* Gets the keystore key password
- *
+ *
* @return the keystore key password
*/
public String getKeyStoreKeyPass();
/**
* Gets whether to automatically check for application updates
- *
+ *
* @return whether to automatically check for application updates
*/
public boolean getUpdateCheck();
/**
* Gets the configured MainWindow size
- *
+ *
* @return the configured MainWindow size
*/
public Point getMainWindowSize();
/**
* Gets whether to skip the finish screen
- *
+ *
* @return whether to skip the finish screen
*/
public boolean getSkipFinish();
@@ -253,14 +253,14 @@ public interface ConfigProvider {
* @return whether to use a signature maker
*/
public boolean getUseMarker();
-
+
/**
* Gets whether to use signature fileds instead of QR code.
*
* @return boolean
*/
public boolean getUseSignatureFields();
-
+
/**
* @return
*/
@@ -270,8 +270,8 @@ public interface ConfigProvider {
* @param profile
*/
public void setSignatureProfile(String profile);
-
-
+
+
/**
* @return
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
index a744cf72..6edd7662 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
@@ -59,7 +59,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* An empty property entry
*/
- private static final String STRING_EMPTY = ""; //$NON-NLS-1$
+ private static final String STRING_EMPTY = ""; //
private String configurationFile = Constants.DEFAULT_CONFIG_FILENAME;
@@ -79,7 +79,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.ConfigProvider#loadConfiguration(java.io
* .InputStream)
@@ -110,13 +110,13 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
setSaveFilePostFix(postFix);
String localeString = config.getProperty(Constants.CFG_LOCALE);
-
+
Locale targetLocale = LocaleSerializer.parseFromString(localeString);
if (targetLocale != null)
setLocale(targetLocale);
String signatureLocaleString = config.getProperty(Constants.CFG_SIGNATURE_LOCALE);
-
+
Locale signatureTargetLocale = LocaleSerializer.parseFromString(signatureLocaleString);
if (signatureTargetLocale != null)
setSignatureLocale(signatureTargetLocale);
@@ -124,15 +124,15 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
String useMarker = config.getProperty(Constants.CFG_USE_MARKER);
if (useMarker != null)
setUseMarker(useMarker.equalsIgnoreCase(Constants.TRUE));
-
+
String useSignatureFields = config.getProperty(Constants.CFG_USE_SIGNATURE_FIELDS);
if (useSignatureFields != null)
setUseSignatureFields(useSignatureFields.equalsIgnoreCase(Constants.TRUE));
-
+
String enablePlaceholder = config.getProperty(Constants.CFG_ENABLE_PLACEHOLDER);
if (enablePlaceholder != null)
setEnablePlaceholderUsage(enablePlaceholder.equalsIgnoreCase(Constants.TRUE));
-
+
String signatureProfile = config.getProperty(Constants.SIGNATURE_PROFILE);
if (signatureProfile != null)
{
@@ -143,7 +143,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configurationOverlay.setSignatureProfile(profile);
}
}
-
+
String compat = config.getProperty(Constants.CFG_SIGNATURE_PDFA_COMPAT);
if (compat != null)
setSignaturePdfACompat(compat.equalsIgnoreCase(Constants.TRUE));
@@ -162,7 +162,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configuration.setMobileBKUType(MobileBKUs.valueOf(
bkuType.trim().toUpperCase()));
} catch (IllegalArgumentException e) {
- log.error("Invalid BKU type: " + bkuType); //$NON-NLS-1$
+ log.error("Invalid BKU type: " + bkuType); //
this.configuration.setMobileBKUType(DEFAULT_MOBILE_BKU_TYPE);
}
}
@@ -179,7 +179,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
if (port > 0 && port <= 0xFFFF)
setProxyPort(port);
else
- log.warn("Proxy port is out of range!: " + port); //$NON-NLS-1$
+ log.warn("Proxy port is out of range!: " + port); //
}
// Set Default BKU
@@ -189,10 +189,10 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
try {
defaultBKU = BKUs.valueOf(bkuString);
} catch (IllegalArgumentException ex) {
- log.error("Invalid BKU config value " + bkuString + " using none!"); //$NON-NLS-1$ //$NON-NLS-2$
+ log.error("Invalid BKU config value " + bkuString + " using none!"); // //
defaultBKU = BKUs.NONE;
} catch (NullPointerException ex) {
- log.error("Invalid BKU config value " + bkuString + " using none!"); //$NON-NLS-1$ //$NON-NLS-2$
+ log.error("Invalid BKU config value " + bkuString + " using none!"); // //
defaultBKU = BKUs.NONE;
}
}
@@ -205,7 +205,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
try {
transparency = Integer.parseInt(trans);
} catch (NumberFormatException e) {
- log.debug("Couldn't parse placeholder transparency", e); //$NON-NLS-1$
+ log.debug("Couldn't parse placeholder transparency", e); //
// ignore parsing exception
}
}
@@ -226,7 +226,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
width = Integer.parseInt(size.substring(0, pos).trim());
height = Integer.parseInt(size.substring(pos + 1).trim());
} catch (NumberFormatException e) {
- log.debug("Couldn't parse main window size", e); //$NON-NLS-1$
+ log.debug("Couldn't parse main window size", e); //
// ignore parsing exception
}
}
@@ -257,7 +257,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
position = new SignaturePosition(x, y, p);
} catch (NumberFormatException ex) {
log.error(
- "Signature Position read from config failed: Not a valid number", ex); //$NON-NLS-1$
+ "Signature Position read from config failed: Not a valid number", ex); //
}
} else if (matcher.group(5) != null) {
// we have format auto
@@ -273,10 +273,10 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
position = new SignaturePosition(x, y);
}
} else {
- log.error("Signature Position read from config failed: wrong group Count!"); //$NON-NLS-1$
+ log.error("Signature Position read from config failed: wrong group Count!"); //
}
} else {
- log.error("Signature Position read from config failed: not matching string"); //$NON-NLS-1$
+ log.error("Signature Position read from config failed: not matching string"); //
}
}
setDefaultSignaturePosition(position);
@@ -300,7 +300,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.ConfigManipulator#saveCurrentConfiguration()
*/
@@ -338,7 +338,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
Integer.toString(getPlaceholderTransparency()));
Point size = this.configuration.getMainWindowSize();
- props.setProperty(Constants.CFG_MAINWINDOW_SIZE, size.x + "," + size.y); //$NON-NLS-1$
+ props.setProperty(Constants.CFG_MAINWINDOW_SIZE, size.x + "," + size.y); //
Locale configLocale = getLocale();
if(configLocale != null) {
@@ -352,11 +352,11 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
if (getUseMarker())
props.setProperty(Constants.CFG_USE_MARKER, Constants.TRUE);
-
+
if (getUseSignatureFields()) {
props.setProperty(Constants.CFG_USE_SIGNATURE_FIELDS, Constants.TRUE);
}
-
+
if (getEnablePlaceholderUsage()) {
props.setProperty(Constants.CFG_ENABLE_PLACEHOLDER, Constants.TRUE);
}
@@ -366,12 +366,12 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
SignaturePosition pos = getDefaultSignaturePositionPersistent();
if (pos == null) {
- props.setProperty(Constants.CFG_SIGNATURE_POSITION, ""); //$NON-NLS-1$
+ props.setProperty(Constants.CFG_SIGNATURE_POSITION, ""); //
} else if (pos.useAutoPositioning()) {
- props.setProperty(Constants.CFG_SIGNATURE_POSITION, "auto"); //$NON-NLS-1$
+ props.setProperty(Constants.CFG_SIGNATURE_POSITION, "auto"); //
} else {
props.setProperty(Constants.CFG_SIGNATURE_POSITION,
- String.format((Locale) null, "x=%f;y=%f;p=%d", //$NON-NLS-1$
+ String.format((Locale) null, "x=%f;y=%f;p=%d", //
pos.getX(), pos.getY(), pos.getPage()));
}
@@ -409,21 +409,21 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
if (!getUpdateCheck())
props.setProperty(Constants.CFG_UPDATE_CHECK, Constants.FALSE);
-
+
props.setProperty(Constants.SIGNATURE_PROFILE, getSignatureProfile());
-
+
FileOutputStream outputstream = new FileOutputStream(configFile, false);
- props.store(outputstream, "Configuration file was generated!"); //$NON-NLS-1$
+ props.store(outputstream, "Configuration file was generated!"); //
- log.info("Configuration file saved to " + configFile.getAbsolutePath()); //$NON-NLS-1$
+ log.info("Configuration file saved to " + configFile.getAbsolutePath()); //
}
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.ConfigProvider#getConfigurationDirectory()
*/
@@ -434,7 +434,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.ConfigManipulator#setConfigurationFile(java
* .lang.String)
@@ -446,7 +446,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getConfigurationFile()
*/
@Override
@@ -456,7 +456,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the default bku type
- *
+ *
* @param bku
* the bku type
*/
@@ -471,12 +471,12 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
@Override
public void setDefaultBKUOverlay(BKUs bku) {
this.configurationOverlay.setDefaultBKU(bku);
-
+
}
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getDefaultBKU()
*/
@Override
@@ -497,7 +497,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the default signature position
- *
+ *
* @param signaturePosition
* the default signature position
*/
@@ -517,7 +517,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.ConfigProvider#getDefaultSignaturePosition()
*/
@@ -539,7 +539,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the signature placeholder transparency
- *
+ *
* @param transparency
* the signature placeholder transparency
*/
@@ -550,7 +550,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.ConfigProvider#getPlaceholderTransparency()
*/
@@ -561,7 +561,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the default mobile number
- *
+ *
* @param number
* the default mobile number
*/
@@ -588,7 +588,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getDefaultMobileNumber()
*/
@Override
@@ -612,7 +612,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the default mobile password
- *
+ *
* @param password
* the default password
*/
@@ -639,7 +639,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getDefaultPassword()
*/
@Override
@@ -663,7 +663,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the default emblem
- *
+ *
* @param emblem
* the default emblem
*/
@@ -676,7 +676,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configuration.setEmblem(emblem);
}
} catch (InvalidEmblemFile e) {
- log.error("Error setting emblem file", e); //$NON-NLS-1$
+ log.error("Error setting emblem file", e); //
try {
this.configuration.setEmblem(STRING_EMPTY);
} catch (InvalidEmblemFile e1) {
@@ -697,7 +697,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configurationOverlay.setEmblem(emblem);
}
} catch (InvalidEmblemFile e) {
- log.error("Error setting emblem file", e); //$NON-NLS-1$
+ log.error("Error setting emblem file", e); //
try {
this.configurationOverlay.setEmblem(STRING_EMPTY);
} catch (InvalidEmblemFile e1) {
@@ -708,7 +708,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getDefaultEmblem()
*/
@Override
@@ -729,7 +729,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
emblem = STRING_EMPTY;
return emblem;
}
-
+
/*@Override
public String getDownloadURL() {
return Constants.CERTIFICATE_DOWNLOAD_XML_URL;
@@ -737,7 +737,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the proxy host
- *
+ *
* @param host
* the proxy host
*/
@@ -764,7 +764,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getProxyHost()
*/
@Override
@@ -788,7 +788,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the proxy port
- *
+ *
* @param port
* the proxy port
*/
@@ -797,7 +797,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
try {
this.configuration.setProxyPort(port);
} catch (InvalidPortException e) {
- log.error("Error setting proxy port" , e); //$NON-NLS-1$
+ log.error("Error setting proxy port" , e); //
// ignore
}
}
@@ -810,14 +810,14 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
try {
this.configurationOverlay.setProxyPort(port);
} catch (InvalidPortException e) {
- log.error("Error setting proxy port" , e); //$NON-NLS-1$
+ log.error("Error setting proxy port" , e); //
// ignore
}
}
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getProxyPort()
*/
@Override
@@ -838,7 +838,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the proxy username
- *
+ *
* @param user
* the proxy username
*/
@@ -887,7 +887,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* Sets the proxy password
- *
+ *
* @param pass
* the proxy password
*/
@@ -936,7 +936,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.ConfigManipulator#setDefaultOutputFolder
* (java.lang.String)
@@ -964,7 +964,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getDefaultOutputFolder()
*/
@Override
@@ -988,7 +988,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getMobileBKUURL()
*/
@Override
@@ -1015,7 +1015,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.ConfigManipulator#setSignatureNote(java.
* lang.String)
@@ -1031,7 +1031,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getSignatureNote()
*/
@Override
@@ -1424,14 +1424,14 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.config.ConfigProvider#getUseMarker()
*/
@Override
public boolean getUseMarker() {
return this.configurationOverlay.getUseMarker();
}
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.config.PersistentConfigProvider#getUseSignatureFields()
*/
@@ -1439,13 +1439,13 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
public boolean getUseSignatureFields() {
return this.configurationOverlay.getUseSignatureFields();
}
-
-
-
+
+
+
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.config.ConfigManipulator#setUseMarker(
* boolean)
*/
@@ -1460,7 +1460,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configurationOverlay.setUseSignatureFields(useFields);
if (useFields) setUseMarker(false);
}
-
+
@Override
public void setSignatureProfile(String profile) {
this.configurationOverlay.setSignatureProfile(Profile.getProfile(profile));
@@ -1480,18 +1480,18 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
public String getSignatureProfile() {
return this.configurationOverlay.getSignatureProfile().name();
}
-
-
+
+
@Override
public void setEnablePlaceholderUsage(boolean bool) {
this.configurationOverlay.setEnablePlaceholderUsage(bool);
}
-
+
@Override
public boolean getEnablePlaceholderUsage() {
return this.configurationOverlay.getEnablePlaceholderUsage();
}
-
-
-
+
+
+
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
index e2381a6f..70661f3d 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
@@ -50,7 +50,7 @@ public interface ConfigurationContainer {
public String getMobileNumber();
/**
- * Sets the mobile phone number
+ * Sets the mobile phone number
* @param number the mobile phone number
*/
public void setMobileNumber(String number);
@@ -62,7 +62,7 @@ public interface ConfigurationContainer {
public String getMobilePassword();
/**
- * Sets the mobile phone password
+ * Sets the mobile phone password
* @param password the mobile phone password
*/
public void setMobilePassword(String password);
@@ -81,18 +81,18 @@ public interface ConfigurationContainer {
/**
* Gets the proxy port
- *
+ *
* if port is -1 no port is selected
- *
+ *
* @return the proxy port
*/
public int getProxyPort();
/**
* Sets the proxy port
- *
+ *
* set to -1 for no port
- *
+ *
* @param port the proxy port
* @throws InvalidPortException
*/
@@ -153,7 +153,7 @@ public interface ConfigurationContainer {
public BKUs getDefaultBKU();
/**
- * Sets the default BKU
+ * Sets the default BKU
* @param defaultBKU the default BKU
*/
public void setDefaultBKU(BKUs defaultBKU);
@@ -301,7 +301,7 @@ public interface ConfigurationContainer {
* @param alias the keystore alias
*/
public void setKeyStoreAlias(String alias);
-
+
/**
* Gets the keystore store password
* @return the keystore store password
@@ -362,7 +362,7 @@ public interface ConfigurationContainer {
*/
public void setSkipFinish(boolean skipFinish);
-
+
/**
* Gets theCertificate-Download URL
* @return the Certificate-Download URL
@@ -370,7 +370,7 @@ public interface ConfigurationContainer {
public String getDownloadURL();
-
+
/**
* Gets whether to use an existing signature marker.
*
@@ -385,37 +385,37 @@ public interface ConfigurationContainer {
* whether to use an existing signature marker
*/
public void setUseMarker(boolean useMarker);
-
-
+
+
/***
* Extension to the standard use marker implementation
* @param useFields
*/
public void setUseSignatureFields(boolean useFields);
-
-
+
+
/**
* @return if the usage of signatureFields is enabled
*/
public boolean getUseSignatureFields();
-
+
/**
* @param bool
*/
public void setEnablePlaceholderUsage(boolean bool);
-
+
/**
* @return boolean
*/
public boolean getEnablePlaceholderUsage();
-
-
+
+
/**
* @param profile set the selected profile
*/
public void setSignatureProfile(Profile profile);
-
-
+
+
/**
* @return selected signature profile as string
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
index c989d59f..c0c84054 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
@@ -131,19 +131,19 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
/** Whether to skip the output state */
protected boolean skipFinish = false;
-
+
/** Default Download URL for certificates*/
protected String downloadURL = null;
-
+
/** describes if the placeholder search is enabled */
- protected boolean enabledPlaceholderUsage = false;
-
+ protected boolean enabledPlaceholderUsage = false;
+
/** Whether to use an existing signature marker. */
protected boolean useMarker = false;
/** Either QR-Code or signature fields as marker */
- protected boolean useSignatureFields = false;
-
+ protected boolean useSignatureFields = false;
+
/** The Signature Profile */
protected Profile signatureProfile = null;
@@ -649,15 +649,15 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
this.skipFinish = skipFinish;
}
-
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#setDownloadURL(java.lang.String)
-
+
@Override
public void setDownloadURL(String downloadURL) {
this.downloadURL = downloadURL;
-
-
+
+
}*/
/* (non-Javadoc)
@@ -667,10 +667,10 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
public String getDownloadURL() {
return this.downloadURL;
}
-
+
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.config.ConfigurationContainer#getUseMarker()
*/
@@ -681,7 +681,7 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.config.ConfigurationContainer#setUseMarker(
* boolean)
@@ -691,16 +691,16 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
this.useMarker = useMarker;
if (useMarker) setUseSignatureFields(false);
}
-
-
+
+
@Override
public void setUseSignatureFields(boolean useFields) {
this.useSignatureFields = useFields;
if (useFields) setUseMarker(false);
}
-
-
+
+
@Override
public boolean getUseSignatureFields() {
return this.useSignatureFields;
@@ -711,8 +711,8 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
*/
@Override
public void setEnablePlaceholderUsage(boolean bool) {
- this.enabledPlaceholderUsage = bool;
-
+ this.enabledPlaceholderUsage = bool;
+
}
/* (non-Javadoc)
@@ -722,14 +722,14 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
public boolean getEnablePlaceholderUsage() {
return this.enabledPlaceholderUsage;
}
-
-
- @Override
+
+
+ @Override
public Profile getSignatureProfile() {
if (this.signatureProfile == null) {
this.signatureProfile = Profile.SIGNATURBLOCK_SMALL;
}
- return this.signatureProfile;
+ return this.signatureProfile;
}
@Override
@@ -747,5 +747,5 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
public void setSignatureProfile(Profile profile) {
this.signatureProfile = profile;
}
-
+
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java
index 1175ca9a..9bf81a05 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java
@@ -25,7 +25,7 @@ import at.asit.pdfover.signator.SignaturePosition;
/**
* An interface for reading the persistent configuration
- *
+ *
* This reads the configuration that will be saved
*/
public interface PersistentConfigProvider {
@@ -79,7 +79,7 @@ public interface PersistentConfigProvider {
/**
* Gets the default output folder for signed documents
- * @return the default output folder
+ * @return the default output folder
*/
public String getDefaultOutputFolderPersistent();
@@ -180,29 +180,29 @@ public interface PersistentConfigProvider {
* @return the configured MainWindow size
*/
public Point getMainWindowSize();
-
+
/**
* Gets whether to use an existing singature marker.
*
* @return whether to use an existing singature marker
*/
public boolean getUseMarker();
-
+
/**
* Gets whether to use an existing signature fields.
*
* @return boolean
*/
public boolean getUseSignatureFields();
-
+
/**
* @return
*/
public boolean getEnablePlaceholderUsage();
-
+
/***
- *
- * @return the signature profile
+ *
+ * @return the signature profile
*/
public String getSignatureProfile();
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java
index 8cca67a0..006b1ed9 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java
@@ -47,7 +47,7 @@ public class BKUSelectionState extends State {
**/
@SuppressWarnings("unused")
private static final Logger log = LoggerFactory.getLogger(BKUSelectionState.class);
-
+
private BKUSelectionComposite selectionComposite = null;
private BKUSelectionComposite getSelectionComposite() {
@@ -64,7 +64,7 @@ public class BKUSelectionState extends State {
return this.selectionComposite;
}
-
+
@Override
public void run() {
Status status = getStateMachine().getStatus();
@@ -85,13 +85,13 @@ public class BKUSelectionState extends State {
getStateMachine().getGUIProvider().display(selection);
selection.layout();
-
+
status.setBKU(selection.getSelected());
-
+
if(status.getBKU() == BKUs.NONE) {
return;
}
- }
+ }
this.setNextState(new PrepareSigningState(getStateMachine()));
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java
index 2d839bc0..d8ee2c63 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java
@@ -27,7 +27,7 @@ import at.asit.pdfover.gui.workflow.StateMachine;
import at.asit.pdfover.gui.workflow.Status;
/**
- *
+ *
*/
public class ConfigurationUIState extends State {
/**
@@ -37,8 +37,8 @@ public class ConfigurationUIState extends State {
private static final Logger log = LoggerFactory
.getLogger(ConfigurationUIState.class);
-
-
+
+
private ConfigurationComposite configurationComposite = null;
private ConfigurationComposite getConfigurationComposite() {
@@ -52,7 +52,7 @@ public class ConfigurationUIState extends State {
return this.configurationComposite;
}
-
+
/**
* @param stateMachine
*/
@@ -69,7 +69,7 @@ public class ConfigurationUIState extends State {
Status status = getStateMachine().getStatus();
ConfigurationComposite config = this.getConfigurationComposite();
-
+
getStateMachine().getGUIProvider().display(config);
if(config.isUserDone())
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java
index c2a5f039..86d8f32f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java
@@ -54,7 +54,7 @@ public class KSState extends State {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.WorkflowState#update(at.asit.pdfover.gui
* .workflow.Workflow)
@@ -70,10 +70,10 @@ public class KSState extends State {
String file = config.getKeyStoreFile();
File f = new File(file);
if (!f.isFile()) {
- log.error("Keystore not found"); //$NON-NLS-1$
+ log.error("Keystore not found"); //
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
- String.format(Messages.getString("error.KeyStoreFileNotExist"), f.getName()), //$NON-NLS-1$
+ String.format(Messages.getString("error.KeyStoreFileNotExist"), f.getName()), //
BUTTONS.RETRY_CANCEL);
if (dialog.open() != SWT.RETRY) {
//getStateMachine().exit();
@@ -88,25 +88,25 @@ public class KSState extends State {
if (storePass.isEmpty()) {
PasswordInputDialog pwd = new PasswordInputDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("keystore_config.KeystoreStorePass"), //$NON-NLS-1$
- Messages.getString("keystore.KeystoreStorePassEntry")); //$NON-NLS-1$
+ Messages.getString("keystore_config.KeystoreStorePass"), //
+ Messages.getString("keystore.KeystoreStorePassEntry")); //
storePass = pwd.open();
}
String keyPass = config.getKeyStoreKeyPass();
if (keyPass.isEmpty()) {
PasswordInputDialog pwd = new PasswordInputDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("keystore_config.KeystoreKeyPass"), //$NON-NLS-1$
- Messages.getString("keystore.KeystoreKeyPassEntry")); //$NON-NLS-1$
+ Messages.getString("keystore_config.KeystoreKeyPass"), //
+ Messages.getString("keystore.KeystoreKeyPassEntry")); //
keyPass = pwd.open();
}
String type = config.getKeyStoreType();
signingState.setKSSigner(file, alias, storePass, keyPass, type);
} catch (SignatureException e) {
- log.error("Error loading keystore", e); //$NON-NLS-1$
+ log.error("Error loading keystore", e); //
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("error.KeyStore"), //$NON-NLS-1$
+ Messages.getString("error.KeyStore"), //
BUTTONS.RETRY_CANCEL);
if (dialog.open() != SWT.RETRY) {
//getStateMachine().exit();
@@ -123,7 +123,7 @@ public class KSState extends State {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
*/
@Override
@@ -133,7 +133,7 @@ public class KSState extends State {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
*/
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java
index c0baabbf..ed6ee411 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java
@@ -51,17 +51,17 @@ public class LocalBKUState extends State {
/**
* HTTP Response server HEADER
*/
- public final static String BKU_RESPONSE_HEADER_SERVER = "server"; //$NON-NLS-1$
+ public final static String BKU_RESPONSE_HEADER_SERVER = "server"; //
/**
* HTTP Response user-agent HEADER
*/
- public final static String BKU_RESPONSE_HEADER_USERAGENT = "user-agent"; //$NON-NLS-1$
+ public final static String BKU_RESPONSE_HEADER_USERAGENT = "user-agent"; //
/**
* HTTP Response SignatureLayout HEADER
*/
- public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout"; //$NON-NLS-1$
+ public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout"; //
Exception threadException = null;
@@ -71,8 +71,8 @@ public class LocalBKUState extends State {
/**
* Null-Operation SL-Request
*/
- private final static String NULL_OPERATION_REQUEST = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + //$NON-NLS-1$
- "<sl:NullOperationRequest xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\"/>"; //$NON-NLS-1$
+ private final static String NULL_OPERATION_REQUEST = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + //
+ "<sl:NullOperationRequest xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\"/>"; //
/**
* Constructor
@@ -83,14 +83,14 @@ public class LocalBKUState extends State {
}
/**
- *
+ *
*/
private final class SignLocalBKUThread implements Runnable {
private LocalBKUState state;
private SigningState signingState;
-
+
/**
* @param localBKUState
* @param signingState
@@ -109,7 +109,7 @@ public class LocalBKUState extends State {
PostMethod method = new PostMethod(Constants.LOCAL_BKU_URL);
String sl_request = NULL_OPERATION_REQUEST;
- method.addParameter("XMLRequest", sl_request); //$NON-NLS-1$
+ method.addParameter("XMLRequest", sl_request); //
int returnCode = client.executeMethod(method);
String userAgent = getResponseHeader(method, BKU_RESPONSE_HEADER_USERAGENT);
@@ -121,27 +121,27 @@ public class LocalBKUState extends State {
} else {
server = getResponseHeader(method, BKU_RESPONSE_HEADER_SERVER);
if (server == null)
- server = ""; //$NON-NLS-1$
+ server = ""; //
else
- if (server.contains("trustDeskbasic") || server.contains("asignSecurityLayer")) //$NON-NLS-1$ //$NON-NLS-2$
+ if (server.contains("trustDeskbasic") || server.contains("asignSecurityLayer")) // //
LocalBKUState.this.useBase64Request = true;
userAgent = getResponseHeader(method, BKU_RESPONSE_HEADER_USERAGENT);
if (userAgent == null)
- userAgent = ""; //$NON-NLS-1$
+ userAgent = ""; //
String signatureLayout = getResponseHeader(method, BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT);
- log.debug("Server - UA: " + server + " - " + userAgent); //$NON-NLS-1$ //$NON-NLS-2$
+ log.debug("Server - UA: " + server + " - " + userAgent); // //
String response = method.getResponseBodyAsString();
- log.debug("SL Response: " + response); //$NON-NLS-1$
+ log.debug("SL Response: " + response); //
SLResponse slResponse = new SLResponse(response, server,
userAgent, signatureLayout);
this.signingState.setSignatureResponse(slResponse);
this.signingState.setUseBase64Request(LocalBKUState.this.useBase64Request);
}
} catch (Exception e) {
- log.error("SignLocalBKUThread: ", e); //$NON-NLS-1$
+ log.error("SignLocalBKUThread: ", e); //
this.state.threadException = e;
} finally {
@@ -164,7 +164,7 @@ public class LocalBKUState extends State {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.WorkflowState#update(at.asit.pdfover.gui
* .workflow.Workflow)
@@ -186,7 +186,7 @@ public class LocalBKUState extends State {
if (this.threadException != null) {
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("error.LocalBKU"), //$NON-NLS-1$
+ Messages.getString("error.LocalBKU"), //
BUTTONS.RETRY_CANCEL);
if (dialog.open() != SWT.RETRY) {
//getStateMachine().exit();
@@ -204,7 +204,7 @@ public class LocalBKUState extends State {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
*/
@Override
@@ -214,7 +214,7 @@ public class LocalBKUState extends State {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
*/
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
index a838c635..86266b13 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
@@ -75,15 +75,15 @@ public class MobileBKUState extends State {
this.status = new IAIKStatus(provider);
this.handler = new IAIKHandler(this, stateMachine.getGUIProvider().getMainShell());
break;
-
+
default:
throw new RuntimeException("Unexpected mobileBKUType");
}
}
MobileBKUEnterTANComposite mobileBKUEnterTANComposite = null;
-
- WaitingForAppComposite waitingForAppComposite = null;
+
+ WaitingForAppComposite waitingForAppComposite = null;
WaitingForAppComposite getWaitingForAppComposite() {
if (this.waitingForAppComposite == null) {
this.waitingForAppComposite = getStateMachine().getGUIProvider()
@@ -92,7 +92,7 @@ public class MobileBKUState extends State {
return this.waitingForAppComposite;
}
-
+
WaitingComposite waitingComposite = null;
WaitingComposite getWaitingComposite() {
if (this.waitingComposite == null) {
@@ -159,22 +159,22 @@ public class MobileBKUState extends State {
/**
* Display an error message
- *
+ *
* @param e
* the exception
*/
public void displayError(Exception e) {
- String message = Messages.getString("error.Unexpected"); //$NON-NLS-1$
+ String message = Messages.getString("error.Unexpected"); //
log.error(message, e);
String errormsg = e.getLocalizedMessage();
if (errormsg != null && !errormsg.isEmpty())
- message += ": " + errormsg; //$NON-NLS-1$
+ message += ": " + errormsg; //
displayError(message);
}
/**
* Display an error message
- *
+ *
* @param message
* the error message
*/
@@ -205,7 +205,7 @@ public class MobileBKUState extends State {
public void run() {
MobileBKUEnterNumberComposite ui = MobileBKUState.this
.getMobileBKUEnterNumberComposite();
-
+
if (!ui.userAck) {
// We need number and password => show UI!
if (mobileStatus.errorMessage != null
@@ -214,7 +214,7 @@ public class MobileBKUState extends State {
ui.setErrorMessage(mobileStatus.errorMessage);
mobileStatus.errorMessage = null;
} else if (mobileStatus instanceof ATrustStatus) {
- ui.setErrorMessage(Messages.getString("mobileBKU.aTrustDisclaimer")); //$NON-NLS-1$
+ ui.setErrorMessage(Messages.getString("mobileBKU.aTrustDisclaimer")); //
}
if (ui.getMobileNumber() == null
@@ -231,7 +231,7 @@ public class MobileBKUState extends State {
ui.enableButton();
getStateMachine().getGUIProvider().display(ui);
- Display display = getStateMachine().getGUIProvider().getMainShell().getDisplay();
+ Display display = getStateMachine().getGUIProvider().getMainShell().getDisplay();
while (!ui.userAck && !ui.userCancel) {
if (!display.readAndDispatch()) {
display.sleep();
@@ -241,7 +241,7 @@ public class MobileBKUState extends State {
if (ui.userCancel) {
ui.userCancel = false;
- mobileStatus.errorMessage = "cancel"; //$NON-NLS-1$
+ mobileStatus.errorMessage = "cancel"; //
return;
}
@@ -270,7 +270,7 @@ public class MobileBKUState extends State {
public void run() {
MobileBKUEnterTANComposite tan = MobileBKUState.this
.getMobileBKUEnterTANComposite();
-
+
if (!tan.isUserAck()) {
// we need the TAN
tan.setRefVal(mobileStatus.refVal);
@@ -280,13 +280,13 @@ public class MobileBKUState extends State {
&& mobileStatus.tanTries > 0) {
// show warning message x tries left!
// overrides error message
-
+
tan.setTries(mobileStatus.tanTries);
}
tan.enableButton();
getStateMachine().getGUIProvider().display(tan);
- Display display = getStateMachine().getGUIProvider().getMainShell().getDisplay();
+ Display display = getStateMachine().getGUIProvider().getMainShell().getDisplay();
while (!tan.isUserAck() && !tan.isUserCancel()) {
if (!display.readAndDispatch()) {
display.sleep();
@@ -321,14 +321,14 @@ public class MobileBKUState extends State {
final Timer checkDone = new Timer();
checkDone.scheduleAtFixedRate(new TimerTask() {
-
+
@Override
public void run() {
// ping signature page to see if code has been scanned
try {
String resp = handler.getSignaturePage();
if (handler.handleQRResponse(resp)) {
- log.debug("Signature page response: " + resp); //$NON-NLS-1$
+ log.debug("Signature page response: " + resp); //
getMobileBKUQRComposite().setDone(true);
Display display = getStateMachine().getGUIProvider().
getMainShell().getDisplay();
@@ -337,7 +337,7 @@ public class MobileBKUState extends State {
}
Display.getDefault().wake();
} catch (Exception e) {
- log.error("Error getting signature page", e); //$NON-NLS-1$
+ log.error("Error getting signature page", e); //
}
}
}, 0, 5000);
@@ -351,7 +351,7 @@ public class MobileBKUState extends State {
InputStream qrcode = handler.getQRCode();
if (qrcode == null) {
MobileBKUState.this.threadException = new Exception(
- Messages.getString("error.FailedToLoadQRCode")); //$NON-NLS-1$
+ Messages.getString("error.FailedToLoadQRCode")); //
}
qr.setQR(qrcode);
getStateMachine().getGUIProvider().display(qr);
@@ -396,9 +396,9 @@ public class MobileBKUState extends State {
getStateMachine().getGUIProvider().display(MobileBKUState.this.getWaitingForAppComposite());
}
});
-
+
}
-
+
/**
* This composite notifies the user to open the signature-app
*/
@@ -472,8 +472,8 @@ public class MobileBKUState extends State {
}
/**
- * when fingerprint or faceid is selected in the app
- * this information is shown
+ * when fingerprint or faceid is selected in the app
+ * this information is shown
*/
public void showFingerPrintInformation() {
final ATrustStatus status = (ATrustStatus) this.status;
@@ -481,14 +481,14 @@ public class MobileBKUState extends State {
Timer checkDone = new Timer();
checkDone.scheduleAtFixedRate(new TimerTask() {
-
+
@Override
public void run() {
// ping signature page to see if code has been scanned
try {
String resp = handler.getSignaturePage();
if (handler.handleQRResponse(resp)) {
- log.debug("Signature page response: " + resp); //$NON-NLS-1$
+ log.debug("Signature page response: " + resp); //
getMobileBKUFingerprintComposite().setDone(true);
Display display = getStateMachine().getGUIProvider().getMainShell().getDisplay();
display.wake();
@@ -496,7 +496,7 @@ public class MobileBKUState extends State {
}
Display.getDefault().wake();
} catch (Exception e) {
- log.error("Error getting signature page", e); //$NON-NLS-1$
+ log.error("Error getting signature page", e); //
}
}
}, 0, 5000);
@@ -539,14 +539,14 @@ public class MobileBKUState extends State {
/**
* @return a boolean true if the user has pressed the sms tan button
*/
- public boolean getSMSStatus() {
-
- return this.getMobileBKUFingerprintComposite().isUserSMS();
+ public boolean getSMSStatus() {
+
+ return this.getMobileBKUFingerprintComposite().isUserSMS();
}
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.workflow.WorkflowState#update(at.asit.pdfover.gui
* .workflow.Workflow)
@@ -556,15 +556,15 @@ public class MobileBKUState extends State {
this.signingState = getStateMachine().getStatus().getSigningState();
this.signingState.setBKUConnector(new MobileBKUConnector(this));
- log.debug("Setting base64 request to " + this.handler.useBase64Request()); //$NON-NLS-1$
+ log.debug("Setting base64 request to " + this.handler.useBase64Request()); //
this.signingState.setUseBase64Request(this.handler.useBase64Request());
if (this.threadException != null) {
- String message = Messages.getString("error.Unexpected"); //$NON-NLS-1$
+ String message = Messages.getString("error.Unexpected"); //
log.error(message, this.threadException);
String errormsg = this.threadException.getLocalizedMessage();
if (errormsg != null && !errormsg.isEmpty())
- message += ": " + errormsg; //$NON-NLS-1$
+ message += ": " + errormsg; //
ErrorDialog error = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
message, BUTTONS.OK);
@@ -583,7 +583,7 @@ public class MobileBKUState extends State {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
*/
@Override
@@ -600,7 +600,7 @@ public class MobileBKUState extends State {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
*/
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
index 9fca3d2c..78b9db3c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
@@ -67,8 +67,8 @@ public class OpenState extends State {
**/
private static final Logger log = LoggerFactory
.getLogger(OpenState.class);
- private static final String advancedConfig = Constants.CONFIG_DIRECTORY + File.separator + "/cfg/advancedconfig.properties"; //$NON-NLS-1$
-
+ private static final String advancedConfig = Constants.CONFIG_DIRECTORY + File.separator + "/cfg/advancedconfig.properties"; //
+
private DataSourceSelectComposite selectionComposite = null;
private DataSourceSelectComposite getSelectionComposite() {
@@ -106,7 +106,7 @@ public class OpenState extends State {
return;
}
}
- log.debug("Got Datasource: " + getStateMachine().getStatus().getDocument().getAbsolutePath()); //$NON-NLS-1$
+ log.debug("Got Datasource: " + getStateMachine().getStatus().getDocument().getAbsolutePath()); //
// scan for signature placeholders
// - see if we want to scan for placeholders in the settings
@@ -116,7 +116,7 @@ public class OpenState extends State {
boolean useSignatureFields = config.getUseSignatureFields();
boolean useMarker = config.getUseMarker();
log.debug("Placeholder usage enabled. Signature fields: {}, QR Markers: {}", useSignatureFields, useMarker);
- //first check the signature fields placeholder
+ //first check the signature fields placeholder
if (useSignatureFields) {
List<String> fields = SignatureFieldsAndPlaceHolderExtractor.findEmptySignatureFields(pddocument);
@@ -128,23 +128,23 @@ public class OpenState extends State {
// icon
MessageBox dialog = new MessageBox(getStateMachine().getGUIProvider().getMainShell(),
SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CANCEL);
- dialog.setText(Messages.getString("dataSourceSelection.usePlaceholderTitle")); //$NON-NLS-1$
- dialog.setMessage(Messages.getString("dataSourceSelection.usePlaceholderText")); //$NON-NLS-1$
+ dialog.setText(Messages.getString("dataSourceSelection.usePlaceholderTitle")); //
+ dialog.setMessage(Messages.getString("dataSourceSelection.usePlaceholderText")); //
// open dialog and await user selection
int result = dialog.open();
if (result == SWT.YES) {
-
+
if (fields.size() == 1) {
addPlaceholderSelectionToConfig(fields.get(0));
this.setNextState(new BKUSelectionState(getStateMachine()));
return;
-
+
} else if (fields.size() > 1) {
PlaceholderSelectionGui gui = new PlaceholderSelectionGui(
- getStateMachine().getGUIProvider().getMainShell(), 65570, "text", //$NON-NLS-1$
- "select the fields", fields); //$NON-NLS-1$
+ getStateMachine().getGUIProvider().getMainShell(), 65570, "text", //
+ "select the fields", fields); //
int res = gui.open();
if (res != -1) {
getStateMachine().getStatus().setSearchForPlaceholderSignature(true);
@@ -174,8 +174,8 @@ public class OpenState extends State {
// create a dialog with ok and cancel buttons and a question icon
MessageBox dialog = new MessageBox(getStateMachine().getGUIProvider().getMainShell(),
SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CANCEL);
- dialog.setText(Messages.getString("dataSourceSelection.usePlaceholderTitle")); //$NON-NLS-1$
- dialog.setMessage(Messages.getString("dataSourceSelection.usePlaceholderText")); //$NON-NLS-1$
+ dialog.setText(Messages.getString("dataSourceSelection.usePlaceholderTitle")); //
+ dialog.setMessage(Messages.getString("dataSourceSelection.usePlaceholderText")); //
// open dialog and await user selection
int result = dialog.open();
@@ -212,7 +212,7 @@ public class OpenState extends State {
// proceed with the usual process.
}
}
-
+
this.setNextState(new PositioningState(getStateMachine()));
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
index d20d5268..89b7d346 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
@@ -48,16 +48,16 @@ public class OutputState extends State {
if (this.outputComposite == null) {
this.outputComposite = getStateMachine().getGUIProvider()
.createComposite(OutputComposite.class, SWT.RESIZE, this);
-
+
ConfigProvider config = getStateMachine().getConfigProvider();
Status status = getStateMachine().getStatus();
-
- File tmpDir = new File(config.getConfigurationDirectory() + File.separator + "tmp"); //$NON-NLS-1$
-
+
+ File tmpDir = new File(config.getConfigurationDirectory() + File.separator + "tmp"); //
+
if(!tmpDir.exists()) {
tmpDir.mkdir();
}
-
+
this.outputComposite.setOutputDir(config.getDefaultOutputFolder());
this.outputComposite.setSaveFilePostFix(config.getSaveFilePostFix());
this.outputComposite.setTempDir(tmpDir.getAbsolutePath());
@@ -83,7 +83,7 @@ public class OutputState extends State {
if (status.getSignResult() == null) {
ErrorDialog error = new ErrorDialog(getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("error.Signatur"), BUTTONS.RETRY_CANCEL); //$NON-NLS-1$
+ Messages.getString("error.Signatur"), BUTTONS.RETRY_CANCEL); //
if(error.open() == SWT.RETRY) {
this.setNextState(new PrepareSigningState(getStateMachine()));
} else {
@@ -100,21 +100,21 @@ public class OutputState extends State {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
*/
@Override
public void cleanUp() {
-
+
getStateMachine().getStatus().setSignResult(null);
-
+
if (this.outputComposite != null)
this.outputComposite.dispose();
}
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
*/
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
index 6aec43fe..df157774 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
@@ -71,7 +71,7 @@ public class PositioningState extends State {
private PDFFile document = null;
private void closePDFDocument() {
-
+
if (this.document != null)
{
this.document = null;
@@ -102,7 +102,7 @@ public class PositioningState extends State {
}
catch (IOException e) {
if (e.getCause() instanceof UnsupportedEncryptionException)
- throw new IOException(Messages.getString("error.PDFProtected"));
+ throw new IOException(Messages.getString("error.PDFProtected"));
else
throw new IOException(Messages.getString("error.MayNotBeAPDF"), e);
}
@@ -124,7 +124,7 @@ public class PositioningState extends State {
Emblem emblem = new CachedFileNameEmblem(config.getDefaultEmblem());
param.setEmblem(emblem);
if(config.getSignatureNote() != null && !config.getSignatureNote().isEmpty()) {
- param.setProperty("SIG_NOTE", config.getSignatureNote()); //$NON-NLS-1$
+ param.setProperty("SIG_NOTE", config.getSignatureNote()); //
}
param.setSignatureLanguage(config.getSignatureLocale().getLanguage());
@@ -140,7 +140,7 @@ public class PositioningState extends State {
this.previousPosition.getX(),
this.previousPosition.getY(),
this.previousPosition.getPage());
-
+
return this.positionComposite;
}
@@ -156,15 +156,15 @@ public class PositioningState extends State {
if ((this.document == null) ||
(this.loadedDocumentPath != getStateMachine().getStatus().getDocument())) {
- log.debug("Checking PDF document for encryption"); //$NON-NLS-1$
+ log.debug("Checking PDF document for encryption"); //
try {
openPDFDocument();
- } catch (IOException e) {
+ } catch (IOException e) {
this.positionComposite = null;
- log.error("Failed to display PDF document", e); //$NON-NLS-1$
+ log.error("Failed to display PDF document", e); //
String message = e.getLocalizedMessage();
if (message == null)
- message = Messages.getString("error.IOError"); //$NON-NLS-1$
+ message = Messages.getString("error.IOError"); //
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
message, BUTTONS.RETRY_CANCEL);
@@ -182,10 +182,10 @@ public class PositioningState extends State {
try {
position = this.getPositioningComposite(this.document);
} catch(Exception ex) {
- log.error("Failed to create composite (probably a mac...)", ex); //$NON-NLS-1$
+ log.error("Failed to create composite (probably a mac...)", ex); //
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("error.PositioningNotPossible"), BUTTONS.OK); //$NON-NLS-1$
+ Messages.getString("error.PositioningNotPossible"), BUTTONS.OK); //
dialog.open();
status.setSignaturePosition(new SignaturePosition());
this.setNextState(new BKUSelectionState(getStateMachine()));
@@ -193,13 +193,13 @@ public class PositioningState extends State {
}
getStateMachine().getGUIProvider().display(position);
-
+
status.setSignaturePosition(position.getPosition());
-
+
if(status.getSignaturePosition() != null) {
this.setNextState(new BKUSelectionState(getStateMachine()));
}
-
+
this.positionComposite.requestFocus();
} else {
this.setNextState(new BKUSelectionState(getStateMachine()));
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
index 21343b5b..d653a07f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
@@ -114,7 +114,7 @@ public class PrepareConfigurationState extends State {
new FileInputStream(
getStateMachine().getConfigProvider().getConfigurationDirectory() + FILE_SEPARATOR + filename));
- log.info("Loaded config from file : " + filename); //$NON-NLS-1$
+ log.info("Loaded config from file : " + filename); //
} catch (FileNotFoundException ex) {
if (filename.equals(Constants.DEFAULT_CONFIG_FILENAME)) {
// we only check for resource config file if it is the
@@ -125,7 +125,7 @@ public class PrepareConfigurationState extends State {
getStateMachine().getConfigProvider()
.loadConfiguration(is);
- log.info("Loaded config from resource : " + filename); //$NON-NLS-1$
+ log.info("Loaded config from resource : " + filename); //
} catch (Exception eex) {
throw ex;
}
@@ -136,7 +136,7 @@ public class PrepareConfigurationState extends State {
} catch (IOException ex) {
throw new InitializationException(
- "Failed to read configuration from config file", ex); //$NON-NLS-1$
+ "Failed to read configuration from config file", ex); //
}
}
@@ -150,7 +150,7 @@ public class PrepareConfigurationState extends State {
String note = config.getSignatureNote();
Locale loc = config.getSignatureLocale();
- String note_old = Messages.getString("simple_config.Note_Default_Old", loc); //$NON-NLS-1$
+ String note_old = Messages.getString("simple_config.Note_Default_Old", loc); //
if (note.equals(note_old))
resetSignatureNoteField(config);
}
@@ -189,9 +189,9 @@ public class PrepareConfigurationState extends State {
}
} catch (Exception e) {
log.error(
- "Failed to write PDF Over config file to config directory", e); //$NON-NLS-1$
+ "Failed to write PDF Over config file to config directory", e); //
throw new InitializationException(
- "Failed to write PDF Over config file to config directory", //$NON-NLS-1$
+ "Failed to write PDF Over config file to config directory", //
e);
} finally {
if (pdfOverConfig != null) {
@@ -199,7 +199,7 @@ public class PrepareConfigurationState extends State {
pdfOverConfig.close();
} catch (IOException e) {
log.warn(
- "Failed to close File stream for PDFOver config", e); //$NON-NLS-1$
+ "Failed to close File stream for PDFOver config", e); //
}
}
@@ -208,7 +208,7 @@ public class PrepareConfigurationState extends State {
inputStream.close();
} catch (IOException e) {
log.warn(
- "Failed to close Resource stream for PDFOver config", e); //$NON-NLS-1$
+ "Failed to close Resource stream for PDFOver config", e); //
}
}
}
@@ -229,17 +229,17 @@ public class PrepareConfigurationState extends State {
String filename = getStateMachine().getConfigProvider().getConfigurationDirectory()
+ FILE_SEPARATOR + Constants.DEFAULT_LOG4J_FILENAME;
pdfOverConfig = new FileOutputStream(filename);
-
+
while ((byteCount = inputStream.read(buffer)) >= 0) {
pdfOverConfig.write(buffer, 0, byteCount);
}
-
+
PropertyConfigurator.configureAndWatch(filename);
} catch (Exception e) {
log.error(
- "Failed to write log4j config file to config directory", e); //$NON-NLS-1$
+ "Failed to write log4j config file to config directory", e); //
throw new InitializationException(
- "Failed to write log4j config file to config directory", //$NON-NLS-1$
+ "Failed to write log4j config file to config directory", //
e);
} finally {
if (pdfOverConfig != null) {
@@ -247,16 +247,16 @@ public class PrepareConfigurationState extends State {
pdfOverConfig.close();
} catch (IOException e) {
log.warn(
- "Failed to close File stream for log4j config", e); //$NON-NLS-1$
+ "Failed to close File stream for log4j config", e); //
}
}
-
+
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
log.warn(
- "Failed to close Resource stream for log4j config", e); //$NON-NLS-1$
+ "Failed to close Resource stream for log4j config", e); //
}
}
}*/
@@ -269,9 +269,9 @@ public class PrepareConfigurationState extends State {
Zipper.unzip(is, configDir.getAbsolutePath());
} catch (IOException e) {
log.error(
- "Failed to create local configuration directory!", e); //$NON-NLS-1$
+ "Failed to create local configuration directory!", e); //
throw new InitializationException(
- "Failed to create local configuration directory!", //$NON-NLS-1$
+ "Failed to create local configuration directory!", //
e);
}
}
@@ -280,14 +280,14 @@ public class PrepareConfigurationState extends State {
File versionFile = new File(configDir, Constants.CONFIG_VERSION_FILENAME);
try {
BufferedWriter versionWriter = new BufferedWriter(new FileWriter(versionFile));
- String version = Constants.APP_VERSION == null ? "Unknown" : Constants.APP_VERSION; //$NON-NLS-1$
+ String version = Constants.APP_VERSION == null ? "Unknown" : Constants.APP_VERSION; //
versionWriter.write(version);
versionWriter.close();
} catch (IOException e) {
log.error(
- "Failed to create configuration version file!", e); //$NON-NLS-1$
+ "Failed to create configuration version file!", e); //
throw new InitializationException(
- "Failed to create configuration version file!", //$NON-NLS-1$
+ "Failed to create configuration version file!", //
e);
}
}
@@ -295,16 +295,16 @@ public class PrepareConfigurationState extends State {
private void initializeConfig() throws InitializationException {
initializeFromConfigurationFile(getStateMachine()
.getConfigProvider().getConfigurationFile());
-
+
resetSignatureNoteField(getStateMachine().getConfigProvider());
-
+
try {
getStateMachine().getConfigManipulator().saveCurrentConfiguration();
} catch (IOException e) {
log.error(
- "Failed to set local configuration signature note!", e); //$NON-NLS-1$
+ "Failed to set local configuration signature note!", e); //
throw new InitializationException(
- "Failed to set local configuration signature note!", //$NON-NLS-1$
+ "Failed to set local configuration signature note!", //
e);
}
}
@@ -312,7 +312,7 @@ public class PrepareConfigurationState extends State {
private void createConfiguration(File configDir) throws InitializationException {
boolean allOK = false;
- log.info("Creating configuration directory"); //$NON-NLS-1$
+ log.info("Creating configuration directory"); //
if (!configDir.exists()) {
configDir.mkdir();
}
@@ -345,14 +345,14 @@ public class PrepareConfigurationState extends State {
String version;
while ((version = versionReader.readLine()) != null) {
version = version.trim();
- if (version.length() > 0 && !version.startsWith("#")) { //$NON-NLS-1$
- log.trace("configuration version from " + versionFile //$NON-NLS-1$
- + ": " + version); //$NON-NLS-1$
+ if (version.length() > 0 && !version.startsWith("#")) { //
+ log.trace("configuration version from " + versionFile //
+ + ": " + version); //
return version;
}
}
} catch (IOException ex) {
- log.error("failed to read configuration version from " //$NON-NLS-1$
+ log.error("failed to read configuration version from " //
+ versionFile, ex);
} finally {
try {
@@ -362,7 +362,7 @@ public class PrepareConfigurationState extends State {
}
}
}
- log.debug("unknown configuration version"); //$NON-NLS-1$
+ log.debug("unknown configuration version"); //
return null;
}
@@ -373,24 +373,24 @@ public class PrepareConfigurationState extends State {
*/
private void backupAndCreatePdfAsConfiguration(File configDir) throws InitializationException {
try {
- File backup = File.createTempFile(Constants.PDF_AS_CONFIG_BACKUP_FILENAME, ".zip"); //$NON-NLS-1$
+ File backup = File.createTempFile(Constants.PDF_AS_CONFIG_BACKUP_FILENAME, ".zip"); //
OutputStream os = new FileOutputStream(backup);
- Zipper.zip(configDir + FILE_SEPARATOR + "cfg", os, true); //$NON-NLS-1$
+ Zipper.zip(configDir + FILE_SEPARATOR + "cfg", os, true); //
os.close();
unzipPdfAsConfig(configDir);
- File b = new File(configDir, Constants.PDF_AS_CONFIG_BACKUP_FILENAME + ".zip"); //$NON-NLS-1$
+ File b = new File(configDir, Constants.PDF_AS_CONFIG_BACKUP_FILENAME + ".zip"); //
int i = 1;
while (b.exists()) {
- b = new File(configDir, Constants.PDF_AS_CONFIG_BACKUP_FILENAME + i++ + ".zip"); //$NON-NLS-1$
+ b = new File(configDir, Constants.PDF_AS_CONFIG_BACKUP_FILENAME + i++ + ".zip"); //
}
backup.renameTo(b);
updateVersionFile(configDir);
} catch (FileNotFoundException e) {
- log.error("Backup file not found", e); //$NON-NLS-1$
- throw new InitializationException("Backup file not found", e); //$NON-NLS-1$
+ log.error("Backup file not found", e); //
+ throw new InitializationException("Backup file not found", e); //
} catch (IOException e) {
- log.error("Error creating configuration backup", e); //$NON-NLS-1$
- throw new InitializationException("Error creating configuration backup", e); //$NON-NLS-1$
+ log.error("Error creating configuration backup", e); //
+ throw new InitializationException("Error creating configuration backup", e); //
}
}
@@ -405,10 +405,10 @@ public class PrepareConfigurationState extends State {
File configDir = new File(cDir);
File configFile = new File(configDir, Constants.DEFAULT_CONFIG_FILENAME);
if (!configDir.exists() || !configFile.exists()) {
- log.debug("Creating configuration file"); //$NON-NLS-1$
+ log.debug("Creating configuration file"); //
createConfiguration(configDir);
} else {
- log.debug("Configuration directory exists!"); //$NON-NLS-1$
+ log.debug("Configuration directory exists!"); //
// Check PDF-AS config version
File versionFile = new File(configDir, Constants.CONFIG_VERSION_FILENAME);
String configVersion = getVersion(versionFile);
@@ -422,9 +422,9 @@ public class PrepareConfigurationState extends State {
initializeFromArguments(stateMachine.getCmdArgs(),
this.configFileHandler);
} catch (InitializationException e) {
- log.error("Error in cmd line arguments: ", e); //$NON-NLS-1$
+ log.error("Error in cmd line arguments: ", e); //
ErrorDialog error = new ErrorDialog(gui.getMainShell(),
- Messages.getString("error.CmdLineArgs") + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("error.CmdLineArgs") + "\n" + // //
e.getMessage(),
BUTTONS.OK);
error.open();
@@ -440,18 +440,18 @@ public class PrepareConfigurationState extends State {
initializeFromArguments(stateMachine.getCmdArgs(),
this.handler);
} catch (InitializationException e) {
- log.error("Error in cmd line arguments: ", e); //$NON-NLS-1$
+ log.error("Error in cmd line arguments: ", e); //
ErrorDialog error;
-
+
if (e.getCause() instanceof FileNotFoundException) {
error = new ErrorDialog(gui.getMainShell(),
String.format(
- Messages.getString("error.FileNotExist"), //$NON-NLS-1$
+ Messages.getString("error.FileNotExist"), //
e.getCause().getMessage()),
BUTTONS.OK);
} else {
error = new ErrorDialog(gui.getMainShell(),
- Messages.getString("error.CmdLineArgs") + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("error.CmdLineArgs") + "\n" + // //
e.getMessage(),
BUTTONS.OK);
}
@@ -471,7 +471,7 @@ public class PrepareConfigurationState extends State {
final String version = method.getResponseBodyAsString().trim();
if (!VersionComparator.before(Constants.APP_VERSION, version))
return;
-
+
// wait 500ms before invoke the GUI message, because GUI had to be started from
// main thread
try {Thread.sleep(500); } catch (InterruptedException e1) { }
@@ -480,8 +480,8 @@ public class PrepareConfigurationState extends State {
@Override
public void run() {
Dialog info = new Dialog(gui.getMainShell(),
- Messages.getString("version_check.UpdateTitle"), //$NON-NLS-1$
- String.format(Messages.getString("version_check.UpdateText"), //$NON-NLS-1$
+ Messages.getString("version_check.UpdateTitle"), //
+ String.format(Messages.getString("version_check.UpdateText"), //
version),
BUTTONS.OK_CANCEL, ICON.INFORMATION);
if (info.open() == SWT.OK)
@@ -490,17 +490,17 @@ public class PrepareConfigurationState extends State {
try {
Desktop.getDesktop().browse(new URI(Constants.UPDATE_URL));
} catch (Exception e) {
- log.error("Error opening update location ", e); //$NON-NLS-1$
+ log.error("Error opening update location ", e); //
}
} else {
- log.info("SWT Desktop is not supported on this platform"); //$NON-NLS-1$
+ log.info("SWT Desktop is not supported on this platform"); //
Program.launch(Constants.UPDATE_URL);
}
}
}
});
} catch (Exception e) {
- log.error("Error downloading update information: ", e); //$NON-NLS-1$
+ log.error("Error downloading update information: ", e); //
}
}
}).start();
@@ -520,10 +520,10 @@ public class PrepareConfigurationState extends State {
setNextState(new OpenState(stateMachine));
} catch (InitializationException e) {
- log.error("Failed to initialize: ", e); //$NON-NLS-1$
+ log.error("Failed to initialize: ", e); //
ErrorDialog error = new ErrorDialog(getStateMachine()
.getGUIProvider().getMainShell(),
- Messages.getString("error.Initialization"), //$NON-NLS-1$
+ Messages.getString("error.Initialization"), //
BUTTONS.OK);
// error.setException(e);
// setNextState(error);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
index 38049be0..11f5459a 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
@@ -80,33 +80,33 @@ public class PrepareSigningState extends State {
final String proxyPass = configuration.getProxyPass();
if (proxyHost != null && !proxyHost.isEmpty()) {
- log.debug("Setting proxy host to " + proxyHost); //$NON-NLS-1$
- System.setProperty("http.proxyHost", proxyHost); //$NON-NLS-1$
- System.setProperty("https.proxyHost", proxyHost); //$NON-NLS-1$
+ log.debug("Setting proxy host to " + proxyHost); //
+ System.setProperty("http.proxyHost", proxyHost); //
+ System.setProperty("https.proxyHost", proxyHost); //
}
if (proxyPort > 0 && proxyPort <= 0xFFFF) {
String port = Integer.toString(proxyPort);
- log.debug("Setting proxy port to " + port); //$NON-NLS-1$
- System.setProperty("http.proxyPort", port); //$NON-NLS-1$
- System.setProperty("https.proxyPort", port); //$NON-NLS-1$
+ log.debug("Setting proxy port to " + port); //
+ System.setProperty("http.proxyPort", port); //
+ System.setProperty("https.proxyPort", port); //
}
if (proxyUser != null && !proxyUser.isEmpty()) {
- log.debug("Setting proxy username to " + proxyUser); //$NON-NLS-1$
- System.setProperty("http.proxyUser", proxyUser); //$NON-NLS-1$
- System.setProperty("https.proxyUser", proxyUser); //$NON-NLS-1$
+ log.debug("Setting proxy username to " + proxyUser); //
+ System.setProperty("http.proxyUser", proxyUser); //
+ System.setProperty("https.proxyUser", proxyUser); //
}
if (proxyPass != null) {
- log.debug("Setting proxy password"); //$NON-NLS-1$
- System.setProperty("http.proxyPassword", proxyPass); //$NON-NLS-1$
- System.setProperty("https.proxyPassword", proxyPass); //$NON-NLS-1$
+ log.debug("Setting proxy password"); //
+ System.setProperty("http.proxyPassword", proxyPass); //
+ System.setProperty("https.proxyPassword", proxyPass); //
}
if (proxyUser != null && !proxyUser.isEmpty() &&
proxyPass != null && !proxyPass.isEmpty()) {
- log.debug("Enabling proxy authentication"); //$NON-NLS-1$
+ log.debug("Enabling proxy authentication"); //
Authenticator.setDefault(new Authenticator() {
/* (non-Javadoc)
* @see java.net.Authenticator#getPasswordAuthentication()
@@ -116,7 +116,7 @@ public class PrepareSigningState extends State {
if (getRequestorType() == RequestorType.PROXY) {
if (getRequestingHost().equalsIgnoreCase(proxyHost) &&
(getRequestingPort() == proxyPort)) {
- return new PasswordAuthentication(proxyUser,
+ return new PasswordAuthentication(proxyUser,
proxyPass.toCharArray());
}
}
@@ -153,7 +153,7 @@ public class PrepareSigningState extends State {
if (configuration.getSignatureNote() != null
&& !configuration.getSignatureNote().isEmpty()) {
this.state.signatureParameter.setProperty(
- "SIG_NOTE", configuration.getSignatureNote()); //$NON-NLS-1$
+ "SIG_NOTE", configuration.getSignatureNote()); //
}
this.state.signatureParameter
@@ -172,7 +172,7 @@ public class PrepareSigningState extends State {
.prepare(this.state.signatureParameter);
} catch (Exception e) {
- log.error("PrepareDocumentThread: ", e); //$NON-NLS-1$
+ log.error("PrepareDocumentThread: ", e); //
this.state.threadException = e;
} finally {
this.state.updateStateMachine();
@@ -228,7 +228,7 @@ public class PrepareSigningState extends State {
if (this.threadException != null) {
ErrorDialog error = new ErrorDialog(getStateMachine()
.getGUIProvider().getMainShell(),
- Messages.getString("error.PrepareDocument"), //$NON-NLS-1$
+ Messages.getString("error.PrepareDocument"), //
BUTTONS.RETRY_CANCEL);
this.threadException = null;
if (error.open() == SWT.RETRY) {
@@ -249,7 +249,7 @@ public class PrepareSigningState extends State {
} else if (status.getBKU() == BKUs.KS) {
this.setNextState(new KSState(getStateMachine()));
} else {
- log.error("Invalid selected BKU Value \"NONE\" in PrepareSigningState!"); //$NON-NLS-1$
+ log.error("Invalid selected BKU Value \"NONE\" in PrepareSigningState!"); //
this.setNextState(new BKUSelectionState(getStateMachine()));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
index 4b329b47..12412b42 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
@@ -38,12 +38,12 @@ import at.asit.pdfover.signator.Signer;
public class SigningState extends State {
/**
- *
+ *
*/
private final class FinishSignThread implements Runnable {
-
+
private SigningState state;
-
+
/**
* @param signingState
*/
@@ -56,7 +56,7 @@ public class SigningState extends State {
try {
Signer signer = this.state.getStateMachine().getPDFSigner().getPDFSigner();
Status status = this.state.getStateMachine().getStatus();
-
+
status.setSignResult(signer.sign(status.getSigningState()));
} catch(Exception e) {
this.state.threadException = e;
@@ -77,20 +77,20 @@ public class SigningState extends State {
* SLF4J Logger instance
**/
static final Logger log = LoggerFactory.getLogger(SigningState.class);
-
+
Exception threadException = null;
-
+
@Override
public void run() {
Status status = getStateMachine().getStatus();
-
- if(status.getSignResult() == null &&
+
+ if(status.getSignResult() == null &&
this.threadException == null) {
Thread t = new Thread(new FinishSignThread(this));
t.start();
return;
}
-
+
if(this.threadException != null) {
// workaround for PDF-AS nullpointerexception intercepting our IllegalStateException
// cf. issue #52
@@ -102,19 +102,19 @@ public class SigningState extends State {
this.threadException = new SignatureException(new IllegalStateException());
}
- String message = Messages.getString("error.Signatur"); //$NON-NLS-1$
+ String message = Messages.getString("error.Signatur"); //
if (this.threadException instanceof SignatureException) {
Throwable cause = this.threadException;
while (cause.getCause() != null)
cause = cause.getCause();
if (cause instanceof ConnectException)
- message += ": " + cause.getMessage(); //$NON-NLS-1$
+ message += ": " + cause.getMessage(); //
if (cause instanceof IllegalStateException) {
// Dummy exception - don't display error, go back to BKU Selection
this.setNextState(new BKUSelectionState(getStateMachine()));
return;
}
-
+
}
// if we have gotten to this point, this is an actual exception
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java
index 54842137..55aee598 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java
@@ -19,7 +19,7 @@ package at.asit.pdfover.gui.workflow.states;
import at.asit.pdfover.gui.workflow.StateMachine;
/**
- * Base state class
+ * Base state class
*/
public abstract class State {
@@ -38,7 +38,7 @@ public abstract class State {
this.stateMachine = stateMachine;
this.nextState = this;
}
-
+
/**
* Gets the next logical state or null if this their is no state transition
* @return the next state (or null)
@@ -46,7 +46,7 @@ public abstract class State {
public State nextState() {
return this.nextState;
}
-
+
/**
* Sets the next logical state
* @param state
@@ -54,7 +54,7 @@ public abstract class State {
protected void setNextState(State state) {
this.nextState = state;
}
-
+
/**
* Perform main logic for this state
*/
@@ -84,7 +84,7 @@ public abstract class State {
/**
* Update the main window behavior of this state if necessary
- * Should update this.stateMachine.getStatus().getBehavior()
+ * Should update this.stateMachine.getStatus().getBehavior()
*/
public abstract void updateMainWindowBehavior();
}