summaryrefslogtreecommitdiff
path: root/pdf-over-gui
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui')
-rw-r--r--pdf-over-gui/pom.xml796
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java85
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java408
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java116
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java155
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java105
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java122
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java439
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustParser.java379
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUValidator.java93
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java127
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java127
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java47
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java64
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java67
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java76
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java95
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java76
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java70
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java67
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java75
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java67
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java67
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java67
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java74
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java70
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java73
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java67
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java67
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java74
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java67
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java46
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java131
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java404
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java287
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java480
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java371
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java483
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java59
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java71
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java132
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java709
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java77
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/Fido2ConfigurationComposite.java95
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java592
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java717
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterNumberComposite.java283
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterTANComposite.java278
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUFido2Composite.java133
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUFingerprintComposite.java178
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUQRComposite.java240
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/WaitingForAppComposite.java106
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ClickableCanvas.java119
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java123
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java36
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java79
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java160
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java370
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarEndButton.java97
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarMiddleButton.java93
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java174
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java154
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/PasswordInputDialog.java36
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java40
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java36
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java35
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java48
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java35
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java46
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java36
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java36
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java38
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java35
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java39
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java39
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PDFOverGUIException.java58
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java38
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java38
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java59
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore/KeystoreUtils.java28
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java370
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java57
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/LocaleSerializer.java59
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java235
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/UpdateCheckManager.java110
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java101
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java128
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java278
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java77
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationDataInMemory.java196
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java919
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java131
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java128
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java225
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java215
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java668
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java275
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java138
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java228
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java348
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java263
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java158
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java93
-rw-r--r--pdf-over-gui/src/main/jnlp/keystore.ksbin1299 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/jnlp/pdf-over.jnlp40
-rw-r--r--pdf-over-gui/src/main/resources/ReadMe.txt44
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties278
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties270
l---------pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties1
-rw-r--r--pdf-over-gui/src/main/resources/certificates/A-Trust-Root-05.crtbin1485 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/certificates/A-Trust-nQual-01a.crtbin865 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/certificates/A-Trust-nQual-03.crtbin979 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/certificates/ComodoRSACA.crt34
-rw-r--r--pdf-over-gui/src/main/resources/certificates/certificates.xml8
-rw-r--r--pdf-over-gui/src/main/resources/certificates/iaik-tls-ca.cerbin1851 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/cfg/PDFASConfig.zipbin1269830 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/icons/icon.icnsbin117897 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/icons/icon.icobin20606 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/icons/icon.pngbin3288 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/icons/icon144x144.pngbin24430 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/icons/icon16x16.pngbin1267 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/icons/icon24x24.pngbin1084 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/icons/icon32x32.pngbin1534 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/icons/icon48x48.pngbin2412 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/icons/icon96x96.pngbin7003 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/config.pngbin900 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/config_disabled.pngbin807 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/config_p.pngbin921 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/error.pngbin1391 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/fido_logo.pngbin25056 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/handy.pngbin5538 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/icon.pngbin2749 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/karte.pngbin1847 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/pdf-over-icon-1.pngbin10335 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/pdf-over-icon.pngbin14903 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/img/webauthn-logo.pngbin121670 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/installer-mac/background.pngbin2389 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/installer-mac/notarizeAppCommand.sh1
-rw-r--r--pdf-over-gui/src/main/resources/installer-mac/notarizeCheckSingleCommand.sh1
-rw-r--r--pdf-over-gui/src/main/resources/installer-mac/notarizeHistoryCommand.sh1
-rw-r--r--pdf-over-gui/src/main/resources/installer-mac/signscript.sh62
-rw-r--r--pdf-over-gui/src/main/resources/installer-windows/PDF-Over.aip800
-rw-r--r--pdf-over-gui/src/main/resources/izpack-linux/ManifestEntries.mf2
-rw-r--r--pdf-over-gui/src/main/resources/izpack-linux/a-sit-icon.pngbin5978 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/izpack-linux/customicons.xml8
-rw-r--r--pdf-over-gui/src/main/resources/izpack-linux/icon16x16.pngbin1267 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/izpack-linux/install.xml78
-rw-r--r--pdf-over-gui/src/main/resources/izpack-linux/logo.gifbin2627 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/izpack-linux/unix_shortcutSpec.xml32
-rw-r--r--pdf-over-gui/src/main/resources/keystore.jksbin6390 -> 0 bytes
-rw-r--r--pdf-over-gui/src/main/resources/logback.xml30
-rw-r--r--pdf-over-gui/src/main/resources/scripts/pdf-over_linux.sh3
-rw-r--r--pdf-over-gui/src/main/resources/scripts/pdf-over_mac.sh4
-rw-r--r--pdf-over-gui/src/main/resources/scripts/uninstall_linux.sh3
154 files changed, 0 insertions, 19379 deletions
diff --git a/pdf-over-gui/pom.xml b/pdf-over-gui/pom.xml
deleted file mode 100644
index 241143a3..00000000
--- a/pdf-over-gui/pom.xml
+++ /dev/null
@@ -1,796 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>pdf-over</artifactId>
- <groupId>at.a-sit</groupId>
- <version>4.4.3.1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>pdf-over-gui</artifactId>
- <name>PDF-Over GUI</name>
- <properties>
- <pdfover-build.root-dir>${project.basedir}${file.separator}..</pdfover-build.root-dir>
- <pdfover-build.output-dir>${pdfover-build.root-dir}/pdf-over-build</pdfover-build.output-dir>
- <pdfover-build.staging-dir>${project.build.directory}/staging/${pdfover-build.output-filename}</pdfover-build.staging-dir>
- <pdfover-build.swt-version>4.23</pdfover-build.swt-version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.eclipse.swt</groupId>
- <artifactId>${pdfover-build.swt-artifact-id}</artifactId>
- <version>${pdfover-build.swt-version}</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>1.2.10</version>
- </dependency>
- <dependency>
- <groupId>at.a-sit</groupId>
- <artifactId>pdf-over-signer</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents.client5</groupId>
- <artifactId>httpclient5</artifactId>
- <version>5.1.3</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.9.0</version>
- </dependency>
- <dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- <version>20220320</version>
- </dependency>
- <dependency>
- <groupId>org.jsoup</groupId>
- <artifactId>jsoup</artifactId>
- <version>1.14.3</version>
- </dependency>
- <dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
- <version>1.10</version>
- </dependency>
- <dependency>
- <groupId>at.a-sit</groupId>
- <artifactId>pdf-over-commons</artifactId>
- <version>${project.parent.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- </dependency>
- <dependency>
- <groupId>at.a-sit</groupId>
- <artifactId>webauthn-java</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </dependency>
- </dependencies>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-collections4</artifactId>
- <version>4.1</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <build>
- <pluginManagement>
- <plugins>
- <!-- Ignore/Execute plugin execution -->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <!-- copy-dependency plugin -->
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <versionRange>[1.0.0,)</versionRange>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore />
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <version>3.2.0</version>
- <executions>
- <execution>
- <id>auto-clean</id>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- <configuration>
- <filesets>
- <fileset>
- <directory>${pdfover-build.output-dir}</directory>
- </fileset>
- </filesets>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <descriptorRefs>
- <descriptorRef>jar</descriptorRef>
- </descriptorRefs>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
- <classpathPrefix />
- <mainClass>at.asit.pdfover.gui.Main</mainClass>
- </manifest>
- </archive>
- <outputDirectory>${pdfover-build.staging-dir}/lib</outputDirectory>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <!-- copy product jars to izpack staging lib -->
- <id>copy-product-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${pdfover-build.staging-dir}/lib</outputDirectory>
- <excludeTransitive>false</excludeTransitive>
- <stripVersion>false</stripVersion>
- <overWriteReleases>true</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- <excludeScope>system</excludeScope> <!-- this excludes tools.jar, e.g. -->
- <excludeGroupIds>org.codehaus.izpack,org.eclipse.swt</excludeGroupIds>
- </configuration>
- </execution>
- <execution>
- <!-- copy os-specific swt jars to izpack staging dir -->
- <id>copy</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.eclipse.swt</groupId>
- <artifactId>${pdfover-build.swt-artifact-id}</artifactId>
- <version>${pdfover-build.swt-version}</version>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>${pdfover-build.staging-dir}/lib</outputDirectory>
- <destFileName>swt.jar</destFileName>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jarsigner-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <id>sign</id>
- <phase>install</phase>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <archiveDirectory>${pdfover-build.staging-dir}</archiveDirectory>
- <includes>
- <include>*.jar</include>
- </includes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>truezip-maven-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <id>build-archive</id>
- <phase>install</phase> <!-- linux profile: none -->
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <filesets>
- <fileset>
- <directory>${pdfover-build.staging-dir}</directory>
- <outputDirectory>${pdfover-build.output-dir}/${pdfover-build.output-filename}/</outputDirectory>
- </fileset>
- <fileset>
- <directory>${pdfover-build.root-dir}/jre-bundles/${pdfover-build.bundled-jre.archive-filename}/${pdfover-build.bundled-jre.folder-in-archive}</directory>
- <outputDirectory>${pdfover-build.output-dir}/${pdfover-build.output-filename}/jre</outputDirectory>
- </fileset>
- </filesets>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.2.1</version>
- <executions>
- <execution>
- <id>add-manifest-to-izpack</id>
- <phase>none</phase> <!-- linux profile: verify -->
- <goals>
- <goal>exec</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <!-- Add custom manifest entries to izpack installer jar -->
- <executable>jar</executable>
- <workingDirectory>${pdfover-build.staging-dir}</workingDirectory>
- <arguments>
- <argument>-ufm</argument>
- <argument>${pdfover-build.output-dir}/${pdfover-build.output-filename}</argument>
- <argument>ManifestEntries.mf</argument>
- </arguments>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>3.3.0</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>parse-version</goal>
- </goals>
- <configuration>
- <propertyPrefix>pdfover-build.version</propertyPrefix>
- <!-- this produces: pdfover-build.version.majorVersion, pdfover-build.version.minorVersion, pdfover-build.version.incrementalVersion -->
- <!-- see: http://www.mojohaus.org/build-helper-maven-plugin/parse-version-mojo.html -->
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.2</version>
- <executions>
- <execution>
- <id>copy-resources</id>
- <phase>validate</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <encoding>UTF-8</encoding>
- <outputDirectory>${pdfover-build.staging-dir}</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>ReadMe.txt</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources/scripts</directory>
- <filtering>true</filtering>
- <includes>
- <include>*${pdfover-build.os-name}*</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>copy-icons</id>
- <phase>validate</phase> <!-- windows profile: none -->
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${pdfover-build.staging-dir}</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <includes>
- <include>icons/*</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>copy-mac-resources</id>
- <phase>none</phase> <!-- mac profiles: validate -->
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <encoding>UTF-8</encoding>
- <outputDirectory>${pdfover-build.staging-dir}</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/resources/installer-mac</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.akathist.maven.plugins.launch4j</groupId>
- <artifactId>launch4j-maven-plugin</artifactId>
- <version>2.1.1</version>
- <executions>
- <execution>
- <id>l4j-gui</id>
- <phase>none</phase> <!-- overridden to "package" by windows profile -->
- <goals>
- <goal>launch4j</goal>
- </goals>
- <configuration>
- <headerType>gui</headerType>
- <dontWrapJar>true</dontWrapJar>
- <jar>lib/${project.artifactId}-${project.version}.jar</jar>
- <outfile>${pdfover-build.staging-dir}/PDF-Over.exe</outfile>
- <errTitle>Error</errTitle>
- <classPath>
- <mainClass>at.asit.pdfover.gui.Main</mainClass>
- <jarLocation>lib/</jarLocation>
- <preCp>lib/swt.jar</preCp>
- </classPath>
- <chdir>.</chdir>
- <icon>src/main/resources/icons/icon.ico</icon>
- <jre>
- <path>jre</path>
- <bundledJre64Bit>true</bundledJre64Bit>
- </jre>
- <versionInfo>
- <fileVersion>${pdfover-build.version.majorVersion}.${pdfover-build.version.minorVersion}.${pdfover-build.version.incrementalVersion}.0</fileVersion>
- <txtFileVersion>${project.version}</txtFileVersion>
- <fileDescription>PDF-Over PDF signer</fileDescription>
- <copyright>(C) 2012 A-SIT</copyright>
- <productVersion>${pdfover-build.version.majorVersion}.${pdfover-build.version.minorVersion}.${pdfover-build.version.incrementalVersion}.0</productVersion>
- <txtProductVersion>${project.version}</txtProductVersion>
- <productName>PDF-Over</productName>
- <internalName>PDF-Over</internalName>
- <originalFilename>PDF-Over.exe</originalFilename>
- </versionInfo>
- </configuration>
- </execution>
- <execution>
- <id>l4j-cli</id>
- <phase>none</phase>
- <goals>
- <goal>launch4j</goal>
- </goals>
- <configuration>
- <headerType>console</headerType>
- <dontWrapJar>true</dontWrapJar>
- <jar>lib/${project.artifactId}-${project.version}.jar</jar>
- <outfile>${pdfover-build.staging-dir}/PDF-Over-cli.exe</outfile>
- <errTitle>Error</errTitle>
- <classPath>
- <mainClass>at.asit.pdfover.gui.Main</mainClass>
- <jarLocation>lib/</jarLocation>
- <preCp>lib/swt.jar</preCp>
- </classPath>
- <chdir>.</chdir>
- <icon>src/main/resources/icons/icon.ico</icon>
- <jre>
- <path>jre</path>
- </jre>
- <versionInfo>
- <fileVersion>${pdfover-build.version.majorVersion}.${pdfover-build.version.minorVersion}.${pdfover-build.version.incrementalVersion}.0</fileVersion>
- <txtFileVersion>${project.version}</txtFileVersion>
- <fileDescription>PDF-Over PDF signer CLI</fileDescription>
- <copyright>(C) 2012 A-SIT</copyright>
- <productVersion>${pdfover-build.version.majorVersion}.${pdfover-build.version.minorVersion}.${pdfover-build.version.incrementalVersion}.0</productVersion>
- <txtProductVersion>${project.version}</txtProductVersion>
- <productName>PDF-Over</productName>
- <internalName>PDF-Over-cli</internalName>
- <originalFilename>PDF-Over-cli.exe</originalFilename>
- </versionInfo>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <excludes>
- <exclude>installer-mac/*</exclude>
- <exclude>installer-windows/*</exclude>
- <exclude>izpack-linux/*</exclude>
- <exclude>scripts/*</exclude>
- <exclude>ReadMe.txt</exclude>
- <exclude>keystore.jks</exclude>
- </excludes>
- </resource>
- </resources>
- </build>
-
- <profiles>
- <profile>
- <id>linux</id>
- <activation>
- <os>
- <family>linux</family>
- </os>
- <property> <!-- this is set by publish.sh; it prevents this profile from turning on automatically when we're building for another OS -->
- <name>no-native-profile</name>
- <value>!true</value>
- </property>
- </activation>
- <properties>
- <pdfover-build.swt-artifact-id>org.eclipse.swt.gtk.linux.x86_64</pdfover-build.swt-artifact-id>
- <pdfover-build.bundled-jre.archive-filename>OpenJDK17U-jre_x64_linux_hotspot_17.0.3_7.tar.gz</pdfover-build.bundled-jre.archive-filename>
- <pdfover-build.bundled-jre.folder-in-archive>jdk-17.0.3+7-jre</pdfover-build.bundled-jre.folder-in-archive>
- <pdfover-build.os-name>linux</pdfover-build.os-name>
- <pdfover-build.output-filename-without-jar>pdf-over_linux-x86_64</pdfover-build.output-filename-without-jar>
- <pdfover-build.output-filename>${pdfover-build.output-filename-without-jar}.jar</pdfover-build.output-filename>
- </properties>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.2</version>
- <executions>
- <execution>
- <id>copy-izpack-resources</id>
- <phase>validate</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <encoding>UTF-8</encoding>
- <outputDirectory>${pdfover-build.staging-dir}</outputDirectory>
- <resources>
- <resource>
- <directory>${pdfover-build.root-dir}/jre-bundles</directory>
- <includes>
- <include>${pdfover-build.bundled-jre.archive-filename}</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources/izpack-linux</directory>
- <excludes>
- <exclude>*.xml</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>src/main/resources/izpack-linux</directory>
- <filtering>true</filtering>
- <includes>
- <include>*.xml</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>truezip-maven-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <id>build-archive</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.izpack</groupId>
- <artifactId>izpack-maven-plugin</artifactId>
- <version>5.1.3</version>
- <configuration>
- <baseDir>${pdfover-build.staging-dir}</baseDir>
- <installFile>${pdfover-build.staging-dir}/install.xml</installFile>
- <mkdirs>true</mkdirs>
- <outputDirectory>${pdfover-build.output-dir}</outputDirectory>
- <finalName>${pdfover-build.output-filename-without-jar}</finalName>
- <enableAttachArtifact>false</enableAttachArtifact>
- </configuration>
- <executions>
- <execution>
- <id>standard-installer</id>
- <phase>package</phase>
- <goals>
- <goal>izpack</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.2.1</version>
- <executions>
- <execution>
- <id>add-manifest-to-izpack</id>
- <phase>verify</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>windows</id>
- <activation>
- <os>
- <family>windows</family>
- </os>
- <property>
- <name>no-native-profile</name>
- <value>!true</value>
- </property>
- </activation>
- <properties>
- <pdfover-build.swt-artifact-id>org.eclipse.swt.win32.win32.x86_64</pdfover-build.swt-artifact-id>
- <pdfover-build.bundled-jre.archive-filename>OpenJDK17U-jre_x64_windows_hotspot_17.0.3_7.zip</pdfover-build.bundled-jre.archive-filename>
- <pdfover-build.bundled-jre.folder-in-archive>jdk-17.0.3+7-jre</pdfover-build.bundled-jre.folder-in-archive>
- <pdfover-build.os-name>windows</pdfover-build.os-name>
- <pdfover-build.output-filename>pdf-over_windows-x86_64.zip</pdfover-build.output-filename>
- </properties>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.2</version>
- <executions>
- <execution>
- <id>copy-windows-resources</id>
- <phase>validate</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <encoding>UTF-8</encoding>
- <outputDirectory>${pdfover-build.staging-dir}</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/resources/installer-windows</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>copy-icons</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.akathist.maven.plugins.launch4j</groupId>
- <artifactId>launch4j-maven-plugin</artifactId>
- <version>2.1.1</version>
- <executions>
- <execution>
- <id>l4j-gui</id>
- <phase>package</phase>
- </execution>
- <execution>
- <id>l4j-cli</id>
- <phase>package</phase>
- </execution>
- <execution>
- <id>l4j-uninst</id>
- <phase>package</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>mac</id>
- <activation>
- <os>
- <family>mac</family>
- <arch>x86_64</arch>
- </os>
- <property>
- <name>no-native-profile</name>
- <value>!true</value>
- </property>
- </activation>
- <properties>
- <pdfover-build.swt-artifact-id>org.eclipse.swt.cocoa.macosx.x86_64</pdfover-build.swt-artifact-id>
- <pdfover-build.bundled-jre.archive-filename>OpenJDK17U-jre_x64_mac_hotspot_17.0.3_7.zip</pdfover-build.bundled-jre.archive-filename>
- <pdfover-build.bundled-jre.folder-in-archive>jdk-17.0.3+7-jre/Contents/Home</pdfover-build.bundled-jre.folder-in-archive>
- <pdfover-build.os-name>mac</pdfover-build.os-name>
- <pdfover-build.output-filename>pdf-over_mac-x86_64.zip</pdfover-build.output-filename>
- </properties>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.2</version>
- <executions>
- <execution>
- <id>copy-mac-resources</id>
- <phase>validate</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>mac-aarch64</id>
- <activation>
- <os>
- <family>mac</family>
- <arch>aarch64</arch>
- </os>
- <property>
- <name>no-native-profile</name>
- <value>!true</value>
- </property>
- </activation>
- <properties>
- <pdfover-build.swt-artifact-id>org.eclipse.swt.cocoa.macosx.aarch64</pdfover-build.swt-artifact-id>
- <pdfover-build.bundled-jre.archive-filename>OpenJDK17U-jre_aarch64_mac_hotspot_17.0.2_8.zip</pdfover-build.bundled-jre.archive-filename>
- <pdfover-build.bundled-jre.folder-in-archive>jdk-17.0.2+8-jre/Contents/Home</pdfover-build.bundled-jre.folder-in-archive>
- <pdfover-build.os-name>mac</pdfover-build.os-name>
- <pdfover-build.output-filename>pdf-over_mac-aarch64.zip</pdfover-build.output-filename>
- </properties>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.2</version>
- <executions>
- <execution>
- <id>copy-mac-resources</id>
- <phase>validate</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>dummy-sign</id>
- <!-- Standard profile - sign using a dummy cert -->
- <activation>
- <property>
- <!-- Simple hack to deactivate this profile when using pkcs11-sign -->
- <name>!pkcs11-pass</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jarsigner-plugin</artifactId>
- <version>1.4</version>
- <configuration>
- <keystore>src/main/resources/keystore.jks</keystore>
- <alias>test-applet signer</alias>
- <storepass>storepass</storepass>
- <keypass>keypass</keypass>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>pkcs11-sign</id>
- <!-- Activate this profile to sign the package using the secure token -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jarsigner-plugin</artifactId>
- <version>1.2</version>
- <configuration>
- <keystore>NONE</keystore>
- <storetype>PKCS11</storetype>
- <providerClass>iaik.pkcs.pkcs11.provider.IAIKPkcs11</providerClass>
- <alias>a-sit-2</alias>
- <storepass>${pkcs11-pass}</storepass>
- <keystoreConfig>
- <delete>false</delete>
- <gen>false</gen>
- </keystoreConfig>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>ks-sign</id>
- <activation>
- <property>
- <name>ks-file</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jarsigner-plugin</artifactId>
- <version>1.4</version>
- <configuration>
- <keystore>${ks-file}</keystore>
- <alias>code_signing</alias>
- <storepass>${ks-pass}</storepass>
- <keypass>${ks-pass}</keypass>
- <keystoreConfig>
- <delete>false</delete>
- <gen>false</gen>
- </keystoreConfig>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
- <repositories>
- <repository>
- <id>internal-repo</id>
- <name>Internal Repository</name>
- <url>https://apps.egiz.gv.at/maven/</url>
- </repository>
- <repository>
- <id>local-repo</id>
- <url>file://${pdfover-build.root-dir}/repo</url>
- </repository>
- </repositories>
-</project>
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
deleted file mode 100644
index 77e71581..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui;
-
-//Imports
-import java.io.File;
-import java.io.IOException;
-
-import javax.swing.JOptionPane;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.workflow.StateMachine;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import iaik.security.provider.IAIK;
-
-/**
- * Main entry point for production
- */
-public class Main {
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(Main.class);
-// private static URL url=null;
-
- /**
- * @param args
- * @throws IOException
- */
- public static void main(String[] args) throws IOException {
- try {
- log.info("This is " + Constants.APP_NAME_VERSION + ", " +
- "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();
- }
-
- // force loading the IAIK JCE (cf. #95)
- IAIK.addAsProvider();
-
- // force keystore type (Adoptium JRE 17 still ships with JKS, cf. #95)
- System.setProperty("javax.net.ssl.trustStoreType", "jks");
-
- // disable display scaling for AWT components embedded in SWT (cf. #106)
- System.setProperty("sun.java2d.uiScale", "1");
-
- log.debug("Starting stateMachine ...");
- (new StateMachine(args)).start();
- log.debug("Ended stateMachine ...");
- }
- catch (Throwable e) {
-
- log.error("Unhandled error", e);
-
- JOptionPane.showMessageDialog(null,
- "Error occured " + e.getMessage(),
- null, JOptionPane.ERROR_MESSAGE);
- }
-
- // Workaround for remaining AWT-Shutdown thread on OSX
- System.exit(0);
- }
-
-
-}
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
deleted file mode 100644
index a382bf4d..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui;
-
-// Imports
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.EnumMap;
-import java.util.Map;
-
-import at.asit.pdfover.commons.Constants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Monitor;
-import org.eclipse.swt.widgets.Shell;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.composites.StateComposite;
-import at.asit.pdfover.gui.controls.Dialog;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.Dialog.ICON;
-import at.asit.pdfover.gui.controls.MainBarButton;
-import at.asit.pdfover.gui.controls.MainBarEndButton;
-import at.asit.pdfover.gui.controls.MainBarMiddleButton;
-import at.asit.pdfover.gui.controls.MainBarRectangleButton;
-import at.asit.pdfover.gui.controls.MainBarStartButton;
-import at.asit.pdfover.gui.osx.CocoaUIEnhancer;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.states.BKUSelectionState;
-import at.asit.pdfover.gui.workflow.states.ConfigurationUIState;
-import at.asit.pdfover.gui.workflow.states.OpenState;
-import at.asit.pdfover.gui.workflow.states.PositioningState;
-
-/**
- * The Main Window of PDF-Over 4
- */
-public class MainWindow {
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(MainWindow.class);
-
- private Shell shell;
- private Composite mainbar;
- private FormData mainBarFormData;
- private Composite container;
- private FormData containerFormData;
- private StackLayout stack;
- StateMachine stateMachine;
- private MainBarButton btn_sign;
- private MainBarButton btn_position;
- private MainBarButton btn_open;
- private MainBarButton btn_config;
-
- /**
- * Main bar Buttons
- */
- public enum Buttons {
- /** the configuration button */
- CONFIG,
-
- /** the open button */
- OPEN,
-
- /** the position button */
- POSITION,
-
- /** the signature button */
- SIGN,
-
- /** the final button */
- FINAL
- }
-
- private Map<Buttons, MainBarButton> buttonMap;
-
- private MainBarEndButton btn_end;
-
- /**
- * Default constructor
- *
- * @param stateMachine
- * The main workflow
- */
- public MainWindow(StateMachine stateMachine) {
- super();
-
- this.stateMachine = stateMachine;
-
- this.buttonMap = new EnumMap<MainWindow.Buttons, MainBarButton>(
- Buttons.class);
- }
-
- /**
- * Sets top level composite for stack layout
- *
- * @param ctrl
- */
- public void setTopControl(Control ctrl) {
- if(ctrl != null)
- log.debug("Top control: " + ctrl.toString());
- this.stack.topControl = ctrl;
- this.doLayout();
- }
-
- /**
- * Layout the Main Window
- */
- public void doLayout() {
- Control ctrl = this.stack.topControl;
- if (this.container.isDisposed()) {
- //Note: if the conainter is disposed, we are finished here
- return;
- }
- this.container.layout(true, true);
- getShell().layout(true, true);
- // Note: SWT only layouts children! No grandchildren!
- if (ctrl instanceof StateComposite) {
- if (!ctrl.isDisposed()) {
- ((StateComposite) ctrl).reloadResources();
- ((StateComposite) ctrl).doLayout();
- }
- }
- }
-
- /**
- * Gets the container composite
- *
- * @return the container composite
- */
- public Composite getContainer() {
- return this.container;
- }
-
- /**
- * Open the window.
- *
- */
- public void open() {
- createContents();
- }
-
- /**
- * Reload the localization
- */
- public void reloadLocalization() {
- SWTUtils.setLocalizedText(btn_config, "main.configuration");
- SWTUtils.setLocalizedToolTipText(btn_config, "main.configuration");
- SWTUtils.setLocalizedText(btn_open, "common.open");
- SWTUtils.setLocalizedToolTipText(btn_open, "common.open");
-
- SWTUtils.setLocalizedText(btn_position, "main.position");
- SWTUtils.setLocalizedToolTipText(btn_position, "main.position");
-
- SWTUtils.setLocalizedText(btn_sign, "main.signature");
- SWTUtils.setLocalizedToolTipText(btn_sign, "main.signature");
-
- SWTUtils.setLocalizedText(btn_end, "main.done");
- SWTUtils.setLocalizedToolTipText(btn_end, "main.done");
-
- Control ctrl = this.stack.topControl;
- if (ctrl instanceof StateComposite) {
- if (!ctrl.isDisposed()) {
- ((StateComposite) ctrl).reloadResources();
- ((StateComposite) ctrl).doLayout();
- }
- }
- }
-
- /**
- * Create contents of the window.
- */
- protected void createContents() {
- this.shell = new Shell();
- getShell().setSize(this.stateMachine.configProvider.getMainWindowSize());
- if (System.getProperty("os.name").toLowerCase().contains("mac")) {
- if (System.getProperty("os.name").contains("OS X")) {
- hookupOSXMenu();
- }
- }
- try {
- Display display = Display.getCurrent();
- Monitor primary = display.getPrimaryMonitor();
- Rectangle bounds = primary.getBounds();
- Rectangle main = getShell().getBounds();
- getShell().setLocation(
- bounds.x + (bounds.width - main.width) / 2,
- bounds.y + (bounds.height - main.height) / 2);
- }
- catch (SWTError e) {
- log.debug("Cannot get display", e);
- }
- Display.setAppVersion(Constants.APP_VERSION);
- getShell().setText(Constants.APP_NAME);
-
- getShell().addShellListener(new ShellAdapter() {
- @Override
- public void shellClosed(ShellEvent e) {
- log.debug("Closing main window");
- MainWindow.this.stateMachine.configProvider.setMainWindowSizePersistent(Constants.ISNOTNULL(getShell().getSize()));
- try {
- MainWindow.this.stateMachine.configProvider.saveToDisk();
- } catch (IOException e1) {
- log.error("Error saving configuration", e);
- }
- getShell().dispose();
- }
- });
-
- ImageData data = new ImageData(this.getClass().getResourceAsStream(Constants.RES_ICON));
- Image shellicon = new Image(getShell().getDisplay(), data);
-
- getShell().setImage(shellicon);
-
- getShell().setLayout(new FormLayout());
-
- this.mainbar = new Composite(getShell(), SWT.NONE);
- this.mainbar.setLayout(new FormLayout());
- this.mainBarFormData = new FormData();
- this.mainBarFormData.left = new FormAttachment(0, 10);
- this.mainBarFormData.right = new FormAttachment(100, -10);
- this.mainBarFormData.top = new FormAttachment(0, 10);
- this.mainBarFormData.bottom = new FormAttachment(0, Constants.MAINBAR_HEIGHT);
- this.mainbar.setLayoutData(this.mainBarFormData);
-
- this.btn_config = new MainBarRectangleButton(this.mainbar, SWT.NONE);
- SWTUtils.anchor(btn_config).bottom(100).right(0,50).top(0).left(0);
- SWTUtils.setLocalizedText(btn_config, "main.configuration");
- SWTUtils.setLocalizedToolTipText(btn_config, "main.configuration");
- this.btn_config.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseUp(MouseEvent e) {
- MainWindow.this.stateMachine
- .jumpToState(new ConfigurationUIState(
- MainWindow.this.stateMachine));
- }
- });
- this.buttonMap.put(Buttons.CONFIG, this.btn_config);
-
- InputStream is = this.getClass().getResourceAsStream(Constants.RES_IMG_CONFIG);
- ((MainBarRectangleButton) this.btn_config).setEnabledImage(
- new Image(Display.getDefault(), new ImageData(is)));
- is = this.getClass().getResourceAsStream(Constants.RES_IMG_CONFIG_DISABLED);
- ((MainBarRectangleButton) this.btn_config).setDisabledImage(
- new Image(Display.getDefault(), new ImageData(is)));
-
- Composite mainbarContainer = new Composite(this.mainbar, SWT.NONE);
- mainbarContainer.setLayout(new FormLayout());
- SWTUtils.anchor(mainbarContainer).left(btn_config).right(100).top(0).bottom(100);
-
- this.btn_open = new MainBarStartButton(mainbarContainer, SWT.NONE);
- SWTUtils.anchor(btn_open).left(0).right(27, (MainBarButton.SplitFactor / 2)).top(0).bottom(100);
- SWTUtils.setLocalizedText(btn_open, "common.open");
- SWTUtils.setLocalizedToolTipText(btn_open, "common.open");
- this.btn_open.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseUp(MouseEvent e) {
- if (MainWindow.this.stateMachine.status.getCurrentState() instanceof OpenState) {
- ((OpenState) MainWindow.this.stateMachine.status.getCurrentState()).openFileDialog();
- } else {
- MainWindow.this.stateMachine.jumpToState(new OpenState(
- MainWindow.this.stateMachine));
- }
- }
- });
- this.buttonMap.put(Buttons.OPEN, this.btn_open);
-
- this.btn_position = new MainBarMiddleButton(mainbarContainer, SWT.NONE);
- SWTUtils.anchor(btn_position).left(27, -1 * (MainBarButton.SplitFactor / 2)).right(54, (MainBarButton.SplitFactor / 2)).top(0).bottom(100);
- SWTUtils.setLocalizedText(btn_position, "main.position");
- SWTUtils.setLocalizedToolTipText(btn_position, "main.position");
- this.btn_position.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseUp(MouseEvent e) {
- MainWindow.this.stateMachine.jumpToState(new PositioningState(
- MainWindow.this.stateMachine));
- }
- });
- this.buttonMap.put(Buttons.POSITION, this.btn_position);
-
- this.btn_sign = new MainBarMiddleButton(mainbarContainer, SWT.NONE);
- SWTUtils.anchor(btn_sign).left(54, -1 * (MainBarButton.SplitFactor / 2)).right(81, (MainBarButton.SplitFactor / 2)).top(0).bottom(100);
- SWTUtils.setLocalizedText(btn_sign, "main.signature");
- SWTUtils.setLocalizedToolTipText(btn_sign, "main.signature");
- this.btn_sign.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseUp(MouseEvent e) {
- MainWindow.this.stateMachine.jumpToState(new BKUSelectionState(
- MainWindow.this.stateMachine));
- }
- });
- this.buttonMap.put(Buttons.SIGN, this.btn_sign);
-
- this.btn_end = new MainBarEndButton(mainbarContainer, SWT.NONE);
- SWTUtils.anchor(btn_end).left(81, -1 * (MainBarButton.SplitFactor / 2)).right(100).top(0).bottom(100);
- SWTUtils.setLocalizedText(btn_end, "main.done");
- SWTUtils.setLocalizedToolTipText(btn_end, "main.done");
- this.buttonMap.put(Buttons.FINAL, this.btn_end);
-
- this.container = new Composite(getShell(), SWT.RESIZE);
- this.containerFormData = new FormData();
- this.containerFormData.bottom = new FormAttachment(100, -10);
- this.containerFormData.right = new FormAttachment(100, -10);
- this.containerFormData.top = new FormAttachment(0, Constants.MAINBAR_HEIGHT + 10);
- this.containerFormData.left = new FormAttachment(0, 10);
- this.container.setLayoutData(this.containerFormData);
- this.stack = new StackLayout();
- this.container.setLayout(this.stack);
- }
-
- /**
- * Hook up SWT menu under OS X
- */
- private void hookupOSXMenu() {
- log.debug("Hooking up OS X menu");
- CocoaUIEnhancer.hookApplicationMenu(
- getShell().getDisplay(),
- /* quitListener */
- (Event arg0) -> {
- MainWindow.this.stateMachine.exit();
- },
- /* aboutListener */
- (Event arg0) -> {
- Dialog dialog = new Dialog(getShell(),
- Messages.formatString("main.about", Constants.APP_NAME),
- Constants.APP_NAME_VERSION, BUTTONS.OK, ICON.INFORMATION);
- dialog.open();
- },
- /* preferencesListener */
- (Event arg0) -> {
- if (MainWindow.this.stateMachine.status.behavior.getEnabled(Buttons.CONFIG))
- MainWindow.this.stateMachine.jumpToState(new ConfigurationUIState(MainWindow.this.stateMachine));
- }
- );
- }
-
- /**
- * Update MainWindow to fit new status
- */
- public void applyBehavior() {
- MainWindowBehavior behavior = this.stateMachine.status.behavior;
-
- log.debug("Updating MainWindow state for : "
- + this.stateMachine.status.getCurrentState().toString());
-
- for (Buttons button : Buttons.values()) {
- boolean active = behavior.getActive(button);
- boolean enabled = behavior.getEnabled(button);
-
- MainBarButton theButton = this.buttonMap.get(button);
- if (theButton != null) {
- theButton.setEnabled(enabled);
- theButton.setActive(active);
- }
- }
-
- if (behavior.getMainBarVisible()) {
- this.mainBarFormData.bottom = new FormAttachment(0, Constants.MAINBAR_HEIGHT);
- this.containerFormData.top = new FormAttachment(0, Constants.MAINBAR_HEIGHT + 10);
- } else {
- this.mainBarFormData.bottom = new FormAttachment(0, 0);
- this.containerFormData.top = new FormAttachment(0, 10);
- }
-
- getShell().getDisplay().update();
- this.mainbar.layout(true, true);
- this.mainbar.redraw();
- }
-
- /**
- * @return the shell
- */
- public Shell getShell() {
- return this.shell;
- }
-}
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
deleted file mode 100644
index ee78b628..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui;
-
-import java.util.EnumMap;
-import java.util.Map;
-
-import at.asit.pdfover.gui.MainWindow.Buttons;
-
-/**
- * Behavior manipulation for Main Window
- */
-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);
- this.buttonsEnabled = new EnumMap<MainWindow.Buttons, Boolean>(MainWindow.Buttons.class);
- reset();
- }
-
- /**
- * set active buttons
- * @param button
- * @param active
- */
- public void setActive(Buttons button, boolean active) {
- this.buttonsActive.put(button, active);
- }
-
- /**
- * Gets the active state of a button from main bar
- * @param button the button
- * @return the active state
- */
- public boolean getActive(Buttons button) {
- return this.buttonsActive.get(button);
- }
-
- /**
- * Sets the enabled buttons in the main bar
- * @param button
- * @param enabled
- */
- public void setEnabled(Buttons button, boolean enabled) {
- this.buttonsEnabled.put(button, enabled);
- }
-
- /**
- * Get the enabled state of a button in main bar
- * @param button the button
- * @return the enabled state
- */
- public boolean getEnabled(Buttons button) {
- return this.buttonsEnabled.get(button);
- }
-
- /**
- * Resets all behavior to a default state
- * All buttons are inactive
- * All buttons are disabled
- * Main bar is visible
- */
- public void reset() {
- for (Buttons button : Buttons.values()) {
- setActive(button, false);
- setEnabled(button, false);
- }
- setMainBarVisible(true);
- }
-
- /**
- * Sets the main bar visible
- * @param visible
- */
- public void setMainBarVisible(boolean visible) {
- this.mainBarVisible = visible;
- }
-
- /**
- * Gets wether the main bar is visible
- * @return the visibility of the main bar
- */
- public boolean getMainBarVisible() {
- return this.mainBarVisible;
- }
-}
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
deleted file mode 100644
index f06e9f92..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-import at.asit.pdfover.gui.utils.SWTUtils;
-
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Dialog;
-
-import java.util.List;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- *
- */
-public class PlaceholderSelectionGui extends Dialog {
- /**
- * SLF4J Logger instance
- **/
- protected Object result;
- protected Shell shlInfo;
- protected Combo placeholderNameDropDown;
- protected String lblString;
- protected List<String> placeholderList;
- private Button btnCancel;
- private Button btnOk;
- protected int returnValue;
-
-
- /**
- * Create the dialog.
- * @param parent
- * @param style
- * @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;
- }
-
- /**
- * Open the dialog.
- * @return the result
- */
-
- public int open() {
- createContents();
- this.shlInfo.open();
- this.shlInfo.layout();
- Display display = getParent().getDisplay();
- while (!this.shlInfo.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- return this.returnValue;
- }
-
- /**
- * @return
- */
- public int getUserSelection() {
- return this.returnValue;
- }
-
- /**
- * Create contents of the dialog.
- */
- private void createContents() {
- this.shlInfo = new Shell(getParent(), getStyle());
- this.shlInfo.setSize(290, 195);
- 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");
-
- 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.shlInfo.dispose();
- }
- });
- this.btnOk.setText("Ok");
-
- Label lbLabel = new Label(this.shlInfo, SWT.WRAP);
- lbLabel.setBounds(27, 10, 223, 41);
- SWTUtils.setLocalizedText(lbLabel, "positioning.placeholder");
-
- }
-
- /**
- * @param list
- * @param Filling up the placeholder drop down list
- */
- public void addDropDownEntries(List<String> list) {
- for (String name : list) {
- 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
deleted file mode 100644
index 382a3d24..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.bku;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-// Imports
-import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.http.client.config.CookieSpecs;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-
-/**
- *
- */
-public class BKUHelper {
- /**
- * SLF4J Logger instance
- **/
- @SuppressWarnings("unused")
- private static final Logger log = LoggerFactory.getLogger(BKUHelper.class);
-
- /* public static HttpClient getHttpClient(boolean useProxy) {
- HttpClient client = new HttpClient();
- client.getParams().setParameter("http.useragent",
- Constants.APP_NAME_VERSION);
-
- if (useProxy) {
- 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");
- 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
- */
- @SuppressWarnings("deprecation")
- public static HttpClient getHttpClient(boolean useProxy) {
- HttpClient client = new HttpClient();
- client.getParams().setParameter("http.useragent",
- Constants.APP_NAME_VERSION);
-
-
- client.getParams().setParameter("http.protocol.cookie-policy", CookieSpecs.BROWSER_COMPATIBILITY);
-
- if (useProxy) {
- 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");//
- 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
- *
- * @return the HttpClient
- */
- public static HttpClient getHttpClient() {
- return getHttpClient(false);
- }
-}
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
deleted file mode 100644
index 1f68a020..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.bku;
-
-// Imports
-import java.io.IOException;
-import java.net.Socket;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.httpclient.methods.multipart.FilePart;
-import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
-import org.apache.commons.httpclient.methods.multipart.Part;
-import org.apache.commons.httpclient.methods.multipart.StringPart;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.utils.FileUploadSource;
-import at.asit.pdfover.signer.BkuSlConnector;
-import at.asit.pdfover.signer.SignatureException;
-import at.asit.pdfover.signer.pdfas.PdfAs4SLRequest;
-
-/**
- *
- */
-public class LocalBKUConnector implements BkuSlConnector {
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(LocalBKUConnector.class);
-
- private static boolean isAvailable = false;
- public static boolean IsAvailable() { return isAvailable; }
- private static Thread pollingThread = new Thread(() -> {
- while (true) {
- try { Thread.sleep(isAvailable ? 30000 : 5000); } catch (InterruptedException e) {}
- try (Socket socket = new Socket("127.0.0.1", 3495)) {
- isAvailable = true;
- } catch (IOException e) {
- isAvailable = false;
- }
- }
- }, "LocalBKUProbeThread");
- static {
- pollingThread.setDaemon(true);
- pollingThread.start();
- }
-
-
- /**
- * HTTP Response server HEADER
- */
- public final static String BKU_RESPONSE_HEADER_SERVER = "server";
-
- /**
- * HTTP Response user-agent HEADER
- */
- 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-Javadoc)
- * @see at.asit.pdfover.signator.BkuSlConnector#handleSLRequest(java.lang.String)
- */
- @Override
- public String handleSLRequest(PdfAs4SLRequest request) throws SignatureException {
- try {
- HttpClient client = BKUHelper.getHttpClient();
- PostMethod method = new PostMethod(Constants.LOCAL_BKU_URL);
-
- String sl_request = request.xmlRequest;
- if (request.signatureData == null) {
- method.addParameter("XMLRequest", sl_request);
- } else {
- StringPart xmlpart = new StringPart(
- "XMLRequest", sl_request, "UTF-8");
-
- FilePart filepart = new FilePart("fileupload", new FileUploadSource(request.signatureData));
-
- Part[] parts = { xmlpart, filepart };
-
- method.setRequestEntity(new MultipartRequestEntity(parts, method
- .getParams()));
- }
- log.trace("SL REQUEST: " + sl_request);
-
- int returnCode = client.executeMethod(method);
-
- if (returnCode != HttpStatus.SC_OK) {
- throw new HttpException(
- method.getResponseBodyAsString());
- }
-
- return method.getResponseBodyAsString();
- } catch (HttpException e) {
- log.error("LocalBKUConnector: ", e);
- throw new SignatureException(e);
- } catch (IOException e) {
- 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
deleted file mode 100644
index 779e24c6..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
+++ /dev/null
@@ -1,439 +0,0 @@
-package at.asit.pdfover.gui.bku;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Base64;
-import java.util.List;
-import java.util.Optional;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
-import org.apache.hc.client5.http.classic.methods.HttpGet;
-import org.apache.hc.client5.http.classic.methods.HttpPost;
-import org.apache.hc.client5.http.entity.UrlEncodedFormEntity;
-import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder;
-import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
-import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
-import org.apache.hc.client5.http.impl.classic.HttpClients;
-import org.apache.hc.core5.http.ClassicHttpRequest;
-import org.apache.hc.core5.http.ContentType;
-import org.apache.hc.core5.http.Header;
-import org.apache.hc.core5.http.HttpEntity;
-import org.apache.hc.core5.http.HttpStatus;
-import org.apache.hc.core5.http.NameValuePair;
-import org.apache.hc.core5.http.NoHttpResponseException;
-import org.apache.hc.core5.http.ParseException;
-import org.apache.hc.core5.http.ProtocolException;
-import org.apache.hc.core5.http.io.entity.EntityUtils;
-import org.apache.hc.core5.http.message.BasicNameValuePair;
-import org.json.JSONObject;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-import org.jsoup.nodes.Element;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.bku.mobile.ATrustParser;
-import at.asit.pdfover.gui.workflow.states.MobileBKUState;
-import at.asit.pdfover.gui.workflow.states.MobileBKUState.UsernameAndPassword;
-import at.asit.pdfover.signer.BkuSlConnector;
-import at.asit.pdfover.signer.SignatureException;
-import at.asit.pdfover.signer.UserCancelledException;
-import at.asit.pdfover.signer.pdfas.PdfAs4SLRequest;
-import at.asit.webauthn.WebAuthN;
-
-import static at.asit.pdfover.commons.Constants.ISNOTNULL;
-
-public class MobileBKUConnector implements BkuSlConnector {
- private static final Logger log = LoggerFactory.getLogger(MobileBKUConnector.class);
-
- private final @Nonnull MobileBKUState state;
- public MobileBKUConnector(@Nonnull MobileBKUState state) {
- this.state = state;
- this.wantsFido2Default = WebAuthN.isAvailable() && state.getConfig().getFido2ByDefault();
- state.storeRememberedCredentialsTo(this.credentials);
- }
-
- private class UserDisplayedError extends Exception {
- private final @Nonnull String msg;
- @Override public @Nonnull String getMessage() { return this.msg; }
- private UserDisplayedError(@Nonnull String s) { this.msg = s; }
- }
-
- public @Nonnull UsernameAndPassword credentials = new UsernameAndPassword();
-
- /**
- * This method takes the SLRequest from PDF-AS, and blocks until it has obtained a response
- */
- @Override
- public String handleSLRequest(PdfAs4SLRequest slRequest) throws SignatureException, UserCancelledException {
- log.debug("Got security layer request: (has file part: {})\n{}", (slRequest.signatureData != null), slRequest.xmlRequest);
- try (final CloseableHttpClient httpClient = HttpClients.custom().disableRedirectHandling().build()) {
- ClassicHttpRequest currentRequest = buildInitialRequest(slRequest);
- ATrustParser.Result response;
- while ((response = sendHTTPRequest(httpClient, currentRequest)).slResponse == null)
- currentRequest = presentResponseToUserAndReturnNextRequest(ISNOTNULL(response.html));
- log.debug("Returning security layer response:\n{}", response.slResponse);
- return response.slResponse;
- } catch (UserDisplayedError e) {
- state.showUnrecoverableError(e.getMessage());
- throw new IllegalStateException("unreachable", e); /* showUnrecoverableError always throws */
- } catch (UserCancelledException e) {
- throw e;
- } catch (Exception e) {
- throw new SignatureException(e);
- }
- }
-
- /* some anti-infinite-loop safeguards so we don't murder the atrust servers by accident */
- private int loopHTTPRequestCounter = 0;
- private Long lastHTTPRequestTime = null;
- /**
- * Sends the specified request, following redirects (including meta-tag redirects) recursively
- * @return The JSOUP document retrieved
- * @throws IOException on HTTP error codes
- * @throws ProtocolException
- * @throws URISyntaxException
- * @throws InterruptedException
- */
- private @Nonnull ATrustParser.Result sendHTTPRequest(CloseableHttpClient httpClient, ClassicHttpRequest request) throws IOException, ProtocolException, URISyntaxException, UserDisplayedError {
- long now = System.nanoTime();
- if ((lastHTTPRequestTime != null) && ((now - lastHTTPRequestTime) < 2e+9)) { /* less than 2s since last request */
- ++loopHTTPRequestCounter;
- if (loopHTTPRequestCounter > 250)
- throw new IOException("Infinite loop protection triggered");
- } else {
- loopHTTPRequestCounter = 0;
- }
- lastHTTPRequestTime = now;
-
- log.debug("Sending {} request to '{}'...", request.getMethod(), request.getUri().toString());
- try (final CloseableHttpResponse response = httpClient.execute(request)) {
- int httpStatus = response.getCode();
- if ((httpStatus == HttpStatus.SC_MOVED_PERMANENTLY) || (httpStatus == HttpStatus.SC_MOVED_TEMPORARILY)) {
- Header redirectPath = response.getHeader("location");
- if (redirectPath == null)
- throw new IOException("Received HTTP redirect, but no Location header.");
- return sendHTTPRequest(httpClient, buildRedirectedRequest(request.getUri(), redirectPath.getValue()));
- }
-
- if (httpStatus != HttpStatus.SC_OK) {
- switch (httpStatus) {
- case HttpStatus.SC_REQUEST_TOO_LONG: throw new UserDisplayedError(Messages.getString("atrusterror.http_413"));
- default: throw new UserDisplayedError(Messages.formatString("atrusterror.http_generic", httpStatus, Optional.ofNullable(response.getReasonPhrase()).orElse("(null)")));
- }
- }
-
- Header refreshHeader = response.getHeader("refresh");
- if (refreshHeader != null)
- return sendHTTPRequest(httpClient, buildRefreshHeaderRequest(request.getUri(), refreshHeader.getValue()));
-
- HttpEntity responseEntity = response.getEntity();
- if (responseEntity == null)
- throw new IOException("Did not get a HTTP body (entity == null)");
-
- ContentType contentType = ContentType.parse(responseEntity.getContentType());
- String entityBody = EntityUtils.toString(response.getEntity(),contentType.getCharset());
- if (entityBody == null)
- throw new IOException("Did not get a HTTP body (entity content == null)");
-
- if ("text/html".equals(contentType.getMimeType())) {
- Document resultDocument = Jsoup.parse(entityBody, request.getUri().toASCIIString());
- if (resultDocument == null)
- {
- log.error("Failed to parse A-Trust server response as HTML:\n{}", entityBody);
- throw new IOException("Failed to parse HTML");
- }
-
- Element metaRefresh = resultDocument.selectFirst("meta[http-equiv=\"refresh\"i]");
- if (metaRefresh != null) {
- String refreshContent = metaRefresh.attr("content");
- if (!refreshContent.isEmpty())
- return sendHTTPRequest(httpClient, buildRefreshHeaderRequest(request.getUri(), refreshContent));
- }
- return ATrustParser.Parse(resultDocument);
- } else {
- return ATrustParser.Parse(request.getUri(), contentType.getMimeType(), entityBody);
- }
- }
- }
-
- /**
- * Builds a HttpRequest for the given base URI and (potentially relative) redirect path
- */
- private static @Nonnull ClassicHttpRequest buildRedirectedRequest(URI baseURI, String redirectLocation) {
- log.debug("following redirect: {}", redirectLocation);
- return new HttpGet(baseURI.resolve(redirectLocation));
- }
-
- /**
- * Builds a HttpRequest for redirection to a given Refresh header value
- */
- private static @Nonnull ClassicHttpRequest buildRefreshHeaderRequest(URI baseURI, String refreshHeader) throws IOException {
- // refresh value is delay in seconds, semicolon, URL=, url
- Pattern pattern = Pattern.compile("^\\s*[0-9\\.]+\\s*;\\s*(?:[uU][rR][lL]\s*=\s*)(.+)$");
- Matcher matcher = pattern.matcher(refreshHeader);
- if (!matcher.matches())
- throw new IOException("Got invalid Refresh header with value \"" + refreshHeader + "\".");
- String redirectURL = matcher.group(1);
- return buildRedirectedRequest(baseURI, redirectURL);
- }
-
- /**
- * Builds the initial request to A-Trust based on the specified SL request
- */
- private static @Nonnull ClassicHttpRequest buildInitialRequest(PdfAs4SLRequest slRequest) {
- HttpPost post = new HttpPost(Constants.MOBILE_BKU_URL);
- if (slRequest.signatureData != null) {
- post.setEntity(MultipartEntityBuilder.create()
- .addBinaryBody("fileupload", slRequest.signatureData.getByteArray(), ContentType.APPLICATION_PDF, "sign.pdf")
- .addTextBody("XMLRequest", slRequest.xmlRequest)
- .build());
- } else {
- post.setEntity(UrlEncodedFormEntityBuilder.create()
- .add("XMLRequest", slRequest.xmlRequest)
- .build());
- }
- return post;
- }
-
- private static @Nonnull ClassicHttpRequest buildFormSubmit(@Nonnull ATrustParser.HTMLResult html, @CheckForNull String submitButton) {
- HttpPost post = new HttpPost(html.formTarget);
-
- var builder = MultipartEntityBuilder.create();
- for (var pair : html.iterateFormOptions())
- builder.addTextBody(pair.getKey(), pair.getValue());
-
- if (submitButton != null) {
- var submitButtonElm = html.htmlDocument.selectFirst(submitButton);
- if (submitButtonElm != null) {
- if ("input".equalsIgnoreCase(submitButtonElm.tagName())) {
- if ("submit".equalsIgnoreCase(submitButtonElm.attr("type"))) {
- String name = submitButtonElm.attr("name");
- if (!name.isEmpty())
- builder.addTextBody(name, submitButtonElm.attr("value"));
- } else {
- log.warn("Skipped specified submitButton {}, type is {} (not submit)", submitButton, submitButtonElm.attr("type"));
- }
- } else {
- log.warn("Skipped specified submitButton {}, tag name is {} (not input)", submitButton, submitButtonElm.tagName());
- }
- } else {
- log.warn("Skipped specified submitButton {}, element not found", submitButton);
- }
- }
-
- post.setEntity(builder.build());
- return post;
- }
-
- private static class LongPollThread extends Thread implements AutoCloseable {
-
- private final CloseableHttpClient httpClient = HttpClients.createDefault();
- private final HttpGet request;
- private final Runnable signal;
- private boolean done = false;
-
- @Override
- public void run() {
- long timeout = System.nanoTime() + (300l * 1000l * 1000l * 1000l); /* a-trust timeout is 5 minutes */
- log.debug("longPollThread hello");
- while (!done) {
- try (final CloseableHttpResponse response = httpClient.execute(request)) {
- JSONObject jsonResponse = new JSONObject(EntityUtils.toString(response.getEntity()));
- if (jsonResponse.getBoolean("Fin"))
- signal.run();
- else if (jsonResponse.getBoolean("Wait"))
- {
- log.debug("longPollThread continue...");
- continue;
- }
- else if (jsonResponse.getBoolean("Error"))
- signal.run(); /* will trigger reload and find error; this is the same thing a-trust does */
- else {
- log.warn("Unknown long poll response:\n{}", jsonResponse.toString(2));
- break;
- }
- } catch (NoHttpResponseException e) {
- if (timeout <= System.nanoTime())
- signal.run(); /* reload to find the timeout error */
- continue; /* httpclient timeout */
- } catch (IOException | ParseException | IllegalStateException e) {
- if (done) break;
- log.warn("QR code long polling exception", e);
- /* sleep so we don't hammer a-trust too hard in case this goes wrong */
- try { Thread.sleep(5000); } catch (InterruptedException e2) {}
- }
- }
- log.debug("longPollThread goodbye");
- }
-
- public LongPollThread(URI uri, Runnable signal) {
- this.request = new HttpGet(uri);
- this.signal = signal;
- }
-
- @Override
- public void close() {
- done = true;
- if (this.request != null)
- this.request.abort();
-
- if (this.isAlive())
- try { this.join(1000); } catch (InterruptedException e) {}
-
- if (this.httpClient != null)
- try { this.httpClient.close(); } catch (IOException e) { log.warn("Auto-close of long-poll HTTP client threw exception", e); }
- }
-
- }
-
- private boolean wantsFido2Default;
- /**
- * Main lifting function for MobileBKU UX
- * @return the next request to make
- */
- private @Nonnull ClassicHttpRequest presentResponseToUserAndReturnNextRequest(@Nonnull ATrustParser.HTMLResult html) throws UserCancelledException {
- if ((html.errorBlock == null) && (html.usernamePasswordBlock == null)) { /* successful username/password auth */
- if ((this.credentials.username != null) && (this.credentials.password != null))
- state.rememberCredentialsIfNecessary(this.credentials);
- }
-
- if (wantsFido2Default && (html.fido2Link != null)) {
- wantsFido2Default = false;
- return new HttpGet(html.fido2Link);
- }
-
- if (html.autoSkipBlock != null) {
- return buildFormSubmit(html, html.autoSkipBlock.submitButton);
- }
- if (html.interstitialBlock != null) {
- this.state.showInformationMessage(html.interstitialBlock.interstitialMessage);
- return buildFormSubmit(html, html.interstitialBlock.submitButton);
- }
- if (html.errorBlock != null) {
- try {
- this.credentials.password = null;
- this.state.clearRememberedPassword();
-
- if (html.errorBlock.isRecoverable)
- this.state.showRecoverableError(html.errorBlock.errorText);
- else
- this.state.showUnrecoverableError(html.errorBlock.errorText);
- return buildFormSubmit(html, "#Button_Back");
- } catch (UserCancelledException e) {
- return buildFormSubmit(html, "#Button_Cancel");
- }
- }
- if (html.usernamePasswordBlock != null) {
- try {
- while ((this.credentials.username == null) || (this.credentials.password == null)) {
- this.state.getCredentialsFromUserTo(this.credentials, html.usernamePasswordBlock.errorMessage);
- }
- html.usernamePasswordBlock.setUsernamePassword(this.credentials.username, this.credentials.password);
- return buildFormSubmit(html, "#Button_Identification");
- } catch (UserCancelledException e) {
- return buildFormSubmit(html, "#Button_Cancel");
- }
- }
- if (html.smsTanBlock != null) {
- MobileBKUState.SMSTanResult result = this.state.getSMSTanFromUser(
- html.smsTanBlock.referenceValue, html.signatureDataLink,
- html.fido2Link != null, html.smsTanBlock.errorMessage);
-
- switch (result.type) {
- case TO_FIDO2: if (html.fido2Link != null) return new HttpGet(html.fido2Link);
- case SMSTAN: html.smsTanBlock.setTAN(result.smsTan); return buildFormSubmit(html, "#SignButton");
- }
- return new HttpGet(html.htmlDocument.baseUri());
- }
- if (html.qrCodeBlock != null) {
- try (LongPollThread longPollThread = new LongPollThread(html.qrCodeBlock.pollingURI, () -> { this.state.signalQRScanned(); })) {
- this.state.showQRCode(html.qrCodeBlock.referenceValue, html.qrCodeBlock.qrCodeURI, html.signatureDataLink, html.smsTanLink != null, html.fido2Link != null, html.qrCodeBlock.errorMessage);
- longPollThread.start();
- var result = this.state.waitForQRCodeResult();
- switch (result) {
- case UPDATE: break;
- case TO_FIDO2: if (html.fido2Link != null) return new HttpGet(html.fido2Link); break;
- case TO_SMS: if (html.smsTanLink != null) return new HttpGet(html.smsTanLink); break;
- }
- return new HttpGet(html.htmlDocument.baseUri());
- }
- }
- if (html.waitingForAppBlock != null) {
- try (LongPollThread longPollThread = new LongPollThread(html.waitingForAppBlock.pollingURI, () -> { this.state.signalAppOpened(); })) {
- this.state.showWaitingForAppOpen(html.waitingForAppBlock.referenceValue, html.signatureDataLink, html.smsTanLink != null, html.fido2Link != null);
- longPollThread.start();
- var result = this.state.waitForAppOpen();
- switch (result) {
- case UPDATE: break;
- case TO_FIDO2: if (html.fido2Link != null) return new HttpGet(html.fido2Link); break;
- case TO_SMS: if (html.smsTanLink != null) return new HttpGet(html.smsTanLink); break;
- }
- return new HttpGet(html.htmlDocument.baseUri());
- }
- }
- if (html.waitingForBiometryBlock != null) {
- try (LongPollThread longPollThread = new LongPollThread(html.waitingForBiometryBlock.pollingURI, () -> { this.state.signalAppBiometryDone(); })) {
- this.state.showWaitingForAppBiometry(html.waitingForBiometryBlock.referenceValue, html.signatureDataLink, html.smsTanLink != null, html.fido2Link != null);
- longPollThread.start();
- var result = this.state.waitForAppBiometry();
- switch (result) {
- case UPDATE: break;
- case TO_FIDO2: if (html.fido2Link != null) return new HttpGet(html.fido2Link); break;
- case TO_SMS: if (html.smsTanLink != null) return new HttpGet(html.smsTanLink); break;
- }
- return new HttpGet(html.htmlDocument.baseUri());
- }
- }
- if (html.fido2Block != null) {
-
- var fido2Result = this.state.promptUserForFIDO2Auth(html.fido2Block.fidoOptions, html.signatureDataLink, html.smsTanLink != null);
-
- switch (fido2Result.type) {
- case TO_SMS: return new HttpGet(html.smsTanLink);
- case CREDENTIAL: break;
- }
-
- var fido2Assertion = ISNOTNULL(fido2Result.credential);
-
- Base64.Encoder base64 = Base64.getEncoder();
-
- JSONObject aTrustAssertion = new JSONObject();
- aTrustAssertion.put("id", fido2Assertion.id);
- aTrustAssertion.put("rawId", base64.encodeToString(fido2Assertion.rawId));
- aTrustAssertion.put("type", fido2Assertion.type);
- aTrustAssertion.put("extensions", new JSONObject()); // TODO fix extensions in library
-
- JSONObject aTrustAssertionResponse = new JSONObject();
- aTrustAssertion.put("response", aTrustAssertionResponse);
- aTrustAssertionResponse.put("authenticatorData", base64.encodeToString(fido2Assertion.response.authenticatorData));
- aTrustAssertionResponse.put("clientDataJson", base64.encodeToString(fido2Assertion.response.clientDataJSON));
- aTrustAssertionResponse.put("signature", base64.encodeToString(fido2Assertion.response.signature));
- if (fido2Assertion.response.userHandle != null)
- aTrustAssertionResponse.put("userHandle", base64.encodeToString(fido2Assertion.response.userHandle));
- else
- aTrustAssertionResponse.put("userHandle", JSONObject.NULL);
-
- html.fido2Block.setFIDOResult(aTrustAssertion.toString());
- return buildFormSubmit(html, "#FidoContinue");
- }
- throw new IllegalStateException("No top-level block is set? Something has gone terribly wrong.");
- }
-
- private static class UrlEncodedFormEntityBuilder {
- private UrlEncodedFormEntityBuilder() {}
- private List<NameValuePair> values = new ArrayList<>();
- public static @Nonnull UrlEncodedFormEntityBuilder create() { return new UrlEncodedFormEntityBuilder(); }
- public @Nonnull UrlEncodedFormEntityBuilder add(String key, String value) { values.add(new BasicNameValuePair(key, value)); return this; }
- public @Nonnull UrlEncodedFormEntity build() { return new UrlEncodedFormEntity(values, Charset.forName("utf-8")); }
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustParser.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustParser.java
deleted file mode 100644
index 89f53629..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustParser.java
+++ /dev/null
@@ -1,379 +0,0 @@
-package at.asit.pdfover.gui.bku.mobile;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.jsoup.Jsoup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static at.asit.pdfover.commons.Constants.ISNOTNULL;
-
-public class ATrustParser {
- private static final Logger log = LoggerFactory.getLogger(ATrustParser.class);
-
- private static class ComponentParseFailed extends Exception {}
-
- private static class TopLevelFormBlock {
- protected final @Nonnull org.jsoup.nodes.Document htmlDocument;
- protected final @Nonnull Map<String, String> formOptions;
- protected TopLevelFormBlock(@Nonnull org.jsoup.nodes.Document d, @Nonnull Map<String,String> fO) { this.htmlDocument = d; this.formOptions = fO; }
-
- protected void abortIfElementMissing(@Nonnull String selector) throws ComponentParseFailed {
- if (this.htmlDocument.selectFirst(selector) != null) return;
- log.debug("Tested for element {} -- not found.", selector);
- throw new ComponentParseFailed();
- }
- protected @Nonnull org.jsoup.nodes.Element getElementEnsureNotNull(@Nonnull String selector) throws ComponentParseFailed {
- var elm = this.htmlDocument.selectFirst(selector);
- if (elm == null) { log.warn("Expected element not found in response: {}", selector); throw new ComponentParseFailed(); }
- return elm;
- }
- protected @Nonnull String getAttributeEnsureNotNull(@Nonnull String selector, @Nonnull String attribute) throws ComponentParseFailed {
- var elm = getElementEnsureNotNull(selector);
- if (!elm.hasAttr(attribute)) { log.warn("Element {} is missing expected attribute '{}'.", selector, attribute); throw new ComponentParseFailed(); }
- return ISNOTNULL(elm.attr(attribute));
- }
- protected @Nonnull URI getURIAttributeEnsureNotNull(@Nonnull String selector, @Nonnull String attribute) throws ComponentParseFailed {
- String value = getAttributeEnsureNotNull(selector, attribute);
- try {
- return new URI(value);
- } catch (URISyntaxException e) {
- if (attribute.startsWith("abs:"))
- attribute = ISNOTNULL(attribute.substring(4));
- log.warn("Element {} attribute {} is '{}', could not be parsed as URI", selector, attribute, getAttributeEnsureNotNull(selector, attribute));
- throw new ComponentParseFailed();
- }
- }
- protected @Nonnull URI getLongPollURI() throws ComponentParseFailed {
- var pollingScriptElm = getElementEnsureNotNull("#jsLongPoll script");
- String pollingScript = pollingScriptElm.data();
- int startIdx = pollingScript.indexOf("qrpoll(\"");
- if (startIdx < 0) { log.warn("Failed to find 'qrpoll(\"' in jsLongPoll script:\n{}", pollingScript); throw new ComponentParseFailed(); }
- startIdx += 8;
-
- int endIdx = pollingScript.indexOf("\");", startIdx);
- if (endIdx < 0) { log.warn("Failed to find qrpoll terminator '\");' in jsLongPoll script:\n{}", pollingScript); throw new ComponentParseFailed(); }
-
- String pollingUriString = pollingScript.substring(startIdx, endIdx);
- try {
- return ISNOTNULL(new URI(pollingScriptElm.baseUri()).resolve(pollingUriString));
- } catch (URISyntaxException e) {
- log.warn("Long-poll URI '{}' could not be parsed", pollingUriString);
- throw new ComponentParseFailed();
- }
- }
- }
-
- public static class AutoSkipBlock extends TopLevelFormBlock {
- public final @Nonnull String submitButton;
-
- private AutoSkipBlock(@Nonnull org.jsoup.nodes.Document htmlDocument, @Nonnull Map<String, String> formOptions) throws ComponentParseFailed {
- super(htmlDocument, formOptions);
- if (htmlDocument.baseUri().contains("/tanAppInfo.aspx")) {
- this.submitButton = "#NextBtn";
- } else { throw new ComponentParseFailed(); }
- }
- }
-
- public static class InterstitialBlock extends TopLevelFormBlock {
- public final @Nonnull String submitButton;
- public final @Nonnull String interstitialMessage;
-
- private InterstitialBlock(@Nonnull org.jsoup.nodes.Document htmlDocument, @Nonnull Map<String, String> formOptions) throws ComponentParseFailed {
- super(htmlDocument, formOptions);
- if (htmlDocument.baseUri().contains("/ExpiresInfo.aspx")) {
- this.interstitialMessage = ISNOTNULL(getElementEnsureNotNull("#Label2").ownText());
- this.submitButton = "#Button_Next";
- } else { throw new ComponentParseFailed(); }
- }
- }
-
- public static class ErrorBlock extends TopLevelFormBlock {
- public final boolean isRecoverable;
- public final @Nonnull String errorText;
-
- private ErrorBlock(@Nonnull org.jsoup.nodes.Document htmlDocument, @Nonnull Map<String, String> formOptions) throws ComponentParseFailed {
- super(htmlDocument, formOptions);
-
- try {
- String documentPath = new URI(htmlDocument.baseUri()).getPath();
- String aspxFile = documentPath.substring(documentPath.lastIndexOf('/'));
-
- // gods this is such a hack, why can't they have a proper error element or something
- if (!(aspxFile.startsWith("/error") && aspxFile.endsWith(".aspx")))
- throw new ComponentParseFailed();
- } catch (URISyntaxException ex) {
- log.warn("Failed to parse document base URI as URI? ({})", htmlDocument.baseUri());
- throw new ComponentParseFailed();
- }
-
- this.isRecoverable = (htmlDocument.selectFirst("#Button_Back") != null);
-
- StringBuilder errorText = new StringBuilder(getElementEnsureNotNull("#Label1").ownText().trim());
- var detailLabel = this.htmlDocument.selectFirst("#LabelDetail");
- if (detailLabel != null)
- errorText.append("\n").append(detailLabel.ownText().trim());
- this.errorText = ISNOTNULL(errorText.toString());
- }
- }
-
- public static class UsernamePasswordBlock extends TopLevelFormBlock {
- private final @Nonnull String usernameKey;
- private final @Nonnull String passwordKey;
- public final @CheckForNull String errorMessage;
-
- public void setUsernamePassword(String username, String password) {
- formOptions.put(usernameKey, username); formOptions.put(passwordKey, password);
- }
-
- private UsernamePasswordBlock(@Nonnull org.jsoup.nodes.Document htmlDocument, @Nonnull Map<String, String> formOptions) throws ComponentParseFailed {
- super(htmlDocument, formOptions);
- abortIfElementMissing("#handynummer");
- this.usernameKey = getAttributeEnsureNotNull("#handynummer", "name");
- this.passwordKey = getAttributeEnsureNotNull("#signaturpasswort", "name");
- this.errorMessage = null;
- }
- }
-
- public static class SMSTanBlock extends TopLevelFormBlock {
- private final @Nonnull String tanKey;
- public final @Nonnull String referenceValue;
- public final @CheckForNull String errorMessage;
-
- public void setTAN(String tan) {
- formOptions.put(tanKey, tan);
- }
-
- private SMSTanBlock(@Nonnull org.jsoup.nodes.Document htmlDocument, @Nonnull Map<String, String> formOptions) throws ComponentParseFailed {
- super(htmlDocument, formOptions);
- abortIfElementMissing("#input_tan");
- this.tanKey = getAttributeEnsureNotNull("#input_tan", "name");
- this.referenceValue = ISNOTNULL(getElementEnsureNotNull("#vergleichswert").ownText());
- this.errorMessage = null;
- }
- }
-
- public static class QRCodeBlock extends TopLevelFormBlock {
- public final @Nonnull String referenceValue;
- public final @Nonnull URI qrCodeURI;
- public final @Nonnull URI pollingURI;
- public final @Nullable String errorMessage;
-
- private QRCodeBlock(@Nonnull org.jsoup.nodes.Document htmlDocument, @Nonnull Map<String, String> formOptions) throws ComponentParseFailed {
- super(htmlDocument, formOptions);
- abortIfElementMissing("#qrimage");
-
- this.referenceValue = ISNOTNULL(getElementEnsureNotNull("#vergleichswert").ownText());
- this.qrCodeURI = getURIAttributeEnsureNotNull("#qrimage", "abs:src");
- this.pollingURI = getLongPollURI();
-
- this.errorMessage = null;
- }
- }
-
- public static class WaitingForAppBlock extends TopLevelFormBlock {
- public final @Nonnull String referenceValue;
- public final @Nonnull URI pollingURI;
-
- private WaitingForAppBlock(@Nonnull org.jsoup.nodes.Document htmlDocument, @Nonnull Map<String, String> formOptions) throws ComponentParseFailed {
- super(htmlDocument, formOptions);
- abortIfElementMissing("#smartphoneAnimation");
-
- this.referenceValue = ISNOTNULL(getElementEnsureNotNull("#vergleichswert").ownText());
- this.pollingURI = getLongPollURI();
- }
- }
-
- public static class WaitingForBiometryBlock extends TopLevelFormBlock {
- public final @Nonnull String referenceValue;
- public final @Nonnull URI pollingURI;
-
- private WaitingForBiometryBlock(@Nonnull org.jsoup.nodes.Document htmlDocument, @Nonnull Map<String, String> formOptions) throws ComponentParseFailed {
- super(htmlDocument, formOptions);
- abortIfElementMissing("#biometricimage");
-
- this.referenceValue = ISNOTNULL(getElementEnsureNotNull("#vergleichswert").ownText());
- this.pollingURI = getLongPollURI();
- }
- }
-
- public static class Fido2Block extends TopLevelFormBlock {
- public final @Nonnull String fidoOptions;
- private final @Nonnull String credentialResultKey;
-
- public void setFIDOResult(String result) { formOptions.put(credentialResultKey, result); }
-
- private Fido2Block(@Nonnull org.jsoup.nodes.Document htmlDocument, @Nonnull Map<String, String> formOptions) throws ComponentParseFailed {
- super(htmlDocument, formOptions);
- abortIfElementMissing("#fidoBlock");
- this.fidoOptions = getAttributeEnsureNotNull("#credentialOptions", "value");
- this.credentialResultKey = getAttributeEnsureNotNull("#credentialResult", "name");
- }
- }
-
- public static class HTMLResult {
- public final @Nonnull org.jsoup.nodes.Document htmlDocument;
- public final @Nonnull URI formTarget;
- public final @Nonnull Map<String, String> formOptions = new HashMap<>();
-
- public @Nonnull Iterable<Map.Entry<String, String>> iterateFormOptions() { return ISNOTNULL(formOptions.entrySet()); }
-
- /* optional links (any number may or may not be null) */
- public final @CheckForNull URI signatureDataLink;
- public final @CheckForNull URI smsTanLink;
- public final @CheckForNull URI fido2Link;
-
- /* top-level blocks (exactly one is not null) */
- public final @CheckForNull AutoSkipBlock autoSkipBlock;
- public final @CheckForNull InterstitialBlock interstitialBlock;
- public final @CheckForNull ErrorBlock errorBlock;
- public final @CheckForNull UsernamePasswordBlock usernamePasswordBlock;
- public final @CheckForNull SMSTanBlock smsTanBlock;
- public final @CheckForNull QRCodeBlock qrCodeBlock;
- public final @CheckForNull WaitingForAppBlock waitingForAppBlock;
- public final @CheckForNull WaitingForBiometryBlock waitingForBiometryBlock;
- public final @CheckForNull Fido2Block fido2Block;
-
- private void validate() {
- Set<String> populated = new HashSet<>();
-
- if (autoSkipBlock != null) populated.add("autoSkipBlock");
- if (interstitialBlock != null) populated.add("interstitialBlock");
- if (errorBlock != null) populated.add("errorBlock");
- if (usernamePasswordBlock != null) populated.add("usernamePasswordBlock");
- if (smsTanBlock != null) populated.add("smsTanBlock");
- if (qrCodeBlock != null) populated.add("qrCodeBlock");
- if (waitingForAppBlock != null) populated.add("waitingForAppBlock");
- if (waitingForBiometryBlock != null) populated.add("waitingForBiometryBlock");
- if (fido2Block != null) populated.add("fido2Block");
-
- switch (populated.size()) {
- case 0: log.error("Did not find any top-level blocks.\n{}", this.htmlDocument.toString()); break;
- case 1: /* passed */ return;
- default: log.error("Found too many top-level blocks: {}\n", String.join(", ", populated), this.htmlDocument.toString()); break;
- }
- throw new IllegalArgumentException("Unknown A-Trust page reached?");
- }
-
- private @Nullable URI getHrefIfExists(String selector) {
- var elm = htmlDocument.selectFirst(selector);
- if (elm == null) return null;
-
- String url = elm.absUrl("href");
- try {
- return new URI(url);
- } catch (Exception e) {
- log.warn("Invalid {} href attribute: {} ({})", selector, elm.attr("href"), url);
- return null;
- }
- }
-
- /**
- * tries to parse T using its constructor; if ComponentParseFailed is thrown, swallows it
- */
- private <T extends TopLevelFormBlock> @Nullable T TryParseMainBlock(Class<T> clazz) {
- try {
- return clazz.getDeclaredConstructor(org.jsoup.nodes.Document.class, Map.class).newInstance(this.htmlDocument, this.formOptions);
- } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | IllegalArgumentException | SecurityException e) {
- log.error("Internal parser error; check your method signatures?", e);
- return null;
- } catch (InvocationTargetException wrappedE) {
- Throwable e = wrappedE.getCause();
- if (!(e instanceof ComponentParseFailed)) {
- if (e instanceof RuntimeException)
- throw (RuntimeException)e;
- log.warn("Unexpected parser failure.", e);
- }
- return null;
- }
- }
-
- private HTMLResult(@Nonnull org.jsoup.nodes.Document htmlDocument) {
- log.trace("Now parsing:\n{}", htmlDocument.toString());
- this.htmlDocument = htmlDocument;
-
- var forms = htmlDocument.getElementsByTag("form");
- if (forms.size() != 1) {
- log.error("Found {} forms in A-Trust response document, expected 1. Document:\n{}", forms.size(), htmlDocument.toString());
- throw new IllegalArgumentException("Failed to parse A-Trust response page");
- }
-
- var mainForm = ISNOTNULL(forms.first()); /* size check above */
- String formAction = mainForm.absUrl("action");
- try {
- this.formTarget = new URI(formAction);
- } catch (URISyntaxException e) {
- log.error("Invalid form target in page: {} ({})", mainForm.attr("action"), formAction, e);
- throw new IllegalArgumentException("Failed to parse A-Trust response page");
- }
-
- for (var input : mainForm.select("input")) {
- String name = input.attr("name");
-
- if (name.isEmpty())
- continue;
-
- /* submit inputs omitted here, they only get sent if they are "clicked", cf. MobileBKUConnector::buildFormSubmit */
- if ("submit".equalsIgnoreCase(input.attr("type")))
- continue;
-
- this.formOptions.put(name, input.attr("value"));
- }
-
- this.signatureDataLink = getHrefIfExists("#LinkList a[href*=\"ShowSigobj.aspx\"]"); /* grr, they didn't give it an ID */
- this.smsTanLink = getHrefIfExists("#SmsButton");
- this.fido2Link = getHrefIfExists("#FidoButton"); // TODO hide the button if unsupported?
-
- this.autoSkipBlock = TryParseMainBlock(AutoSkipBlock.class);
- this.interstitialBlock = TryParseMainBlock(InterstitialBlock.class);
- this.errorBlock = TryParseMainBlock(ErrorBlock.class);
- this.usernamePasswordBlock = TryParseMainBlock(UsernamePasswordBlock.class);
- this.smsTanBlock = TryParseMainBlock(SMSTanBlock.class);
- this.qrCodeBlock = TryParseMainBlock(QRCodeBlock.class);
- this.waitingForAppBlock = TryParseMainBlock(WaitingForAppBlock.class);
- this.waitingForBiometryBlock = TryParseMainBlock(WaitingForBiometryBlock.class);
- this.fido2Block = TryParseMainBlock(Fido2Block.class);
-
- validate();
- }
- }
-
- public static class Result {
- public final @CheckForNull String slResponse;
- public final @CheckForNull HTMLResult html;
-
- private Result(@Nonnull String slResponse) { this.slResponse = slResponse; this.html = null; }
- private Result(@Nonnull org.jsoup.nodes.Document htmlDocument) { this.slResponse = null; this.html = new HTMLResult(htmlDocument); }
- }
-
- public static @Nonnull Result Parse(@Nonnull org.jsoup.nodes.Document htmlDocument) { return new Result(htmlDocument); }
-
- public static @Nonnull Result Parse(URI baseURI, String contentType, @Nonnull String content) {
- if (contentType.equals("text/html"))
- {
- var document = Jsoup.parse(content, baseURI.toASCIIString());
- if (document == null)
- {
- log.error("Failed to parse HTML (document == null):\n{}", content);
- throw new IllegalArgumentException("A-Trust parsing failed");
- }
- return Parse(document);
- }
-
- if (contentType.endsWith("/xml"))
- return new Result(content);
-
- log.error("Unknown content-type \"{}\" from URI {}", contentType, baseURI.toString());
- throw new IllegalArgumentException("Unknown A-Trust page reached?");
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUValidator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUValidator.java
deleted file mode 100644
index 89dbdf4f..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUValidator.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.bku.mobile;
-
-// Imports
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import at.asit.pdfover.gui.exceptions.InvalidPasswordException;
-import at.asit.pdfover.gui.exceptions.PasswordTooLongException;
-import at.asit.pdfover.gui.exceptions.PasswordTooShortException;
-
-/**
- *
- */
-public class MobileBKUValidator {
-
- /**
- * 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]+)$";
-
- /**
- * Validates the Mobile phone number
- *
- * @param number
- * @return the normalized Phone number
- */
- public static String normalizeMobileNumber(String number) {
- // Verify number and normalize
-
- number = number.trim();
-
- String numberWithoutWhitespace = number.replaceAll("\\s","");
- // Compile and use regular expression
- Pattern pattern = Pattern.compile(NUMBER_REGEX);
- Matcher matcher = pattern.matcher(numberWithoutWhitespace);
-
- if (!matcher.find())
- return number; /* might be an idA username, return unchanged */
-
- if (matcher.groupCount() != 6) {
- return number;
- }
-
- String countryCode = matcher.group(1);
-
- String normalNumber = matcher.group(6);
-
- if (countryCode.equals("10301")) {
- // A-Trust Testnumber! Don't change
- return numberWithoutWhitespace;
- }
-
- countryCode = countryCode.replace("00", "+");
-
- if (countryCode.equals("0")) {
- countryCode = "+43";
- }
-
- return countryCode + normalNumber;
- }
-
- /**
- * Validate given Password for Mobile BKU
- *
- * @param password
- * @throws InvalidPasswordException
- */
- public static void validatePassword(String password)
- throws InvalidPasswordException {
- if (password.length() < 5)
- throw new PasswordTooShortException();
- if (password.length() > 200)
- throw new PasswordTooLongException();
- }
-}
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
deleted file mode 100644
index 16a47a42..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-
-/**
- * CLI Argument base class
- *
- * Implementing arguments have to be registered in PrepareConfigurationState
- */
-public abstract class Argument {
-
- private String helpTextKey = null;
-
- private String[] commandOptions = null;
-
- private StateMachine stateMachine;
-
- /**
- * @param commandOptions
- * @param helpTextKey
- */
- protected Argument(String[] commandOptions, String helpTextKey) {
- this.helpTextKey = helpTextKey;
- this.commandOptions = commandOptions;
- }
-
- /**
- * Set the state machine
- * Used for configuration overlay manipulator and status
- * @param stateMachine the state machine
- */
- protected void setStateMachine(StateMachine stateMachine) {
- this.stateMachine = stateMachine;
- }
-
- protected ConfigurationManager getConfiguration() {
- return this.stateMachine.configProvider;
- }
-
- /**
- * Get the status
- * @return the status
- */
- protected Status getStatus() {
- return this.stateMachine.status;
- }
-
- /**
- * Set help text key
- * @param key
- */
- protected void setHelpTextKey(String key) {
- this.helpTextKey = key;
- }
-
- /**
- * Gets help text
- * @return help text
- */
- public String getHelpText() {
- return Messages.getString(this.helpTextKey);
- }
-
- /**
- * Set the command option in format: -...
- *
- * Examples: -h
- *
- * @param value
- */
- protected void setCommandOptions(String[] value) {
- this.commandOptions = value;
- }
-
- /**
- * Get the command option
- *
- * Examples: -h
- * @return the command option
- */
- public String[] getCommandOptions() {
- return this.commandOptions;
- }
-
- /**
- * 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
- * @return returns the argumentOffset ending the section of this Argument
- * @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
deleted file mode 100644
index 108ccb47..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.gui.workflow.StateMachine;
-
-/**
- * Handler to process CLI Arguments
- */
-public class ArgumentHandler {
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(ArgumentHandler.class);
-
- private Map<String, Argument> cliArguments = new LinkedHashMap<String, Argument>();
-
- private StateMachine stateMachine = null;
-
- private boolean requiredExit = false;
-
- /**
- * Constructor
- *
- * @param stateMachine
- */
- public ArgumentHandler(StateMachine stateMachine) {
- this.stateMachine = stateMachine;
- }
-
- /**
- * Gets available Arguments
- *
- * @return the list of available arguments
- */
- public Set<Argument> getArguments() {
- return new LinkedHashSet<Argument>(this.cliArguments.values());
- }
-
- /**
- * Adds a CLIArgument to the handler
- *
- * @param cliArgument the CLIArgument subclass to add
- */
- public void addCLIArgument(Class<? extends Argument> cliArgument) {
-
- Argument arg;
- try {
- arg = cliArgument.getDeclaredConstructor().newInstance();
-
- arg.setStateMachine(this.stateMachine);
-
- String[] commandOptions = arg.getCommandOptions();
-
- if (commandOptions == null) {
- return;
- }
-
- for (int i = 0; i < commandOptions.length; i++) {
- this.cliArguments.put(commandOptions[i], arg);
- }
- } catch (Exception e) {
- log.error("Error instantiating CLI argument" , e);
- }
- }
-
- /**
- * Handle CLI Arguments
- *
- * @param args
- * @throws InitializationException
- */
- public void handleArguments(String[] args) throws InitializationException {
-
- for (int i = 0; i < args.length; i++) {
- if (this.cliArguments.containsKey(args[i])) {
- 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")) {
- i = this.cliArguments.get("-i").handleArgument(args, i-1, this);
- }
- }
- }
- }
-
- /**
- * Set by a cli argument if it wants the program to exit
- *
- * @param requireExit
- */
- public void setRequireExit(boolean requireExit) {
- this.requiredExit = requireExit;
- }
-
- /**
- * Checks if one argument required the program to exit immediately
- *
- * @return true or false
- */
- public boolean doesRequireExit() {
- return this.requiredExit;
- }
-}
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
deleted file mode 100644
index 23d00c06..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-
-/**
- * CLI Argument to set the BKU to use
- */
-public class AutomaticPositioningArgument extends Argument {
- /**
- * Constructor
- */
- public AutomaticPositioningArgument() {
- 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,
- * at.asit.pdfover.gui.cliarguments.ArgumentHandler)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- getConfiguration().setAutoPositionSignatureOverlay();
- return argOffset;
- }
-
-}
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
deleted file mode 100644
index e69383f7..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.BKUs;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to set the BKU to use
- */
-public class BKUArgument extends Argument {
- /**
- * Constructor
- */
- public BKUArgument() {
- super(
- 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,
- * at.asit.pdfover.gui.cliarguments.ArgumentHandler)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- if (args.length > argOffset + 1) {
-
- 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);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index 725a28f9..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to set the configuration file
- */
-public class ConfigFileArgument extends Argument {
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(ConfigFileArgument.class);
-
- /**
- * Constructor
- */
- public ConfigFileArgument() {
- 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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- if (args.length > argOffset + 1) {
-
- String configFile = args[argOffset + 1];
-
- getConfiguration().setConfigurationFileName(configFile);
-
- return argOffset + 1;
- }
- } catch (Exception ex) {
- log.error("Configuration File Argument invalid!", ex);
- throw new InitializationException(
- Messages.getString("argument.invalid.config") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index fe88d37e..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import java.io.File;
-import java.io.FileNotFoundException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to set the emblem file to use for signature
- */
-public class EmblemArgument extends Argument {
- /**
- * Constructor
- */
- public EmblemArgument() {
- super(new String[] {"-e"}, "argument.help.emblem");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(EmblemArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- if (args.length > argOffset + 1) {
-
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.emblem") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index 0bcdaba6..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Constants;
-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" },
- "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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- Set<Argument> arguments = handler.getArguments();
-
- Iterator<Argument> argumentIterator = arguments.iterator();
-
- StringBuilder message = new StringBuilder(Messages.getString("argument.info.help"));
- message.append("\n");
-
- while(argumentIterator.hasNext()) {
- Argument argument = argumentIterator.next();
-
- for (int i = 0; i < argument.getCommandOptions().length; i++) {
- message.append(argument.getCommandOptions()[i]);
-
- if(i < argument.getCommandOptions().length -1) {
- message.append(", ");
- }
- }
-
- message.append(":\n");
- boolean first = true;
- for (String line : argument.getHelpText().split("\\.\\s+")) {
- message.append(" ");
- if (first) first = false; else message.append(" ");
- message.append(line);
- message.append("\n");
- }
- }
-
- String msg = message.toString();
- System.out.println(msg);
-
- Display display = Display.getCurrent();
- if (display != null) {
- MessageBox box = new MessageBox(new Shell(display), SWT.ICON_INFORMATION | SWT.OK);
- box.setText(Constants.APP_NAME_VERSION);
- box.setMessage(msg);
- box.open();
- }
-
- 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
deleted file mode 100644
index b636b825..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import java.io.File;
-import java.io.FileNotFoundException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to set the input document to sign
- */
-public class InputDocumentArgument extends Argument {
- /**
- * Constructor
- */
- public InputDocumentArgument() {
- super(new String[] {"-i"}, "argument.help.input");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(InputDocumentArgument.class);
-
- /* (non-Javadoc)
- * @see at.asit.pdfovewr.gui.cliarguments.CLIArgument#handleArgument(java.lang.String[], int, at.asit.pdfover.gui.workflow.StateMachine, at.asit.pdfover.gui.cliarguments.ArgumentHandler)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- if (args.length > argOffset + 1) {
-
- String signatureDocument = args[argOffset + 1];
-
- File signatureDocumentFile = new File(signatureDocument);
-
- if(!signatureDocumentFile.exists()) {
- throw new FileNotFoundException(signatureDocument);
- }
-
- getStatus().document = signatureDocumentFile;
-
- return argOffset + 1;
- }
- } catch (Exception ex) {
- log.error("Document to sign argument invalid!", ex);
- throw new InitializationException(
- Messages.getString("argument.invalid.input") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index f3e7c1e2..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.signer.pdfas.PdfAs4SignatureParameter;
-
-/**
- * CLI Argument to set the visibility of signature
- */
-public class InvisibleProfile extends Argument {
- /**
- * Constructor
- */
- public InvisibleProfile() {
- super(new String[] {"-v"}, "argument.help.vis");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(InvisibleProfile.class);
-
- /* (non-Javadoc)
- * @see at.asit.pdfovewr.gui.cliarguments.CLIArgument#handleArgument(java.lang.String[], int, at.asit.pdfover.gui.workflow.StateMachine, at.asit.pdfover.gui.cliarguments.ArgumentHandler)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- log.info("Set Profile Invisible");
-
- if (args.length > argOffset + 1) {
- // TODO: this is a colossal monumental terrible hack
- PdfAs4SignatureParameter.PROFILE_VISIBILITY=false;
- log.debug("We are setting the profile visibility to false");
- return argOffset + 1;
- }
-
- } catch (Exception ex) {
- log.error("Signature Profile Visibilty Error", ex);
- throw new InitializationException(
- Messages.getString("argument.invalid.vis") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index 1ef7531e..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide the keystore alias
- */
-public class KeystoreAliasArgument extends Argument {
- /**
- * Constructor
- */
- public KeystoreAliasArgument() {
- super(new String[] {"-ksalias"}, "argument.help.keystorealias");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(KeystoreAliasArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index adc40dae..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import java.io.File;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.gui.exceptions.KeystoreDoesntExistException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide the keystore file
- */
-public class KeystoreFileArgument extends Argument {
- /**
- * Constructor
- */
- public KeystoreFileArgument() {
- super(new String[] {"-ks"}, "argument.help.keystorefile");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(KeystoreFileArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index f41bbeaa..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide the keystore key password
- */
-public class KeystoreKeyPassArgument extends Argument {
- /**
- * Constructor
- */
- public KeystoreKeyPassArgument() {
- super(new String[] {"-kskeypass"}, "argument.help.keystorekeypass");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(KeystoreKeyPassArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index 3c759743..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide the keystore password
- */
-public class KeystoreStorePassArgument extends Argument {
- /**
- * Constructor
- */
- public KeystoreStorePassArgument() {
- super(new String[] {"-kspass"}, "argument.help.keystorestorepass");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(KeystoreStorePassArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index fa29ba5d..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide the keystore type
- */
-public class KeystoreTypeArgument extends Argument {
- /**
- * Constructor
- */
- public KeystoreTypeArgument() {
- super(new String[] {"-kstype"}, "argument.help.keystoretype");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(KeystoreTypeArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index 047bf79c..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to show the usage message
- */
-public class OutputFolderArgument extends Argument {
- /**
- * Constructor
- */
- public OutputFolderArgument() {
- super(new String[] {"-o"}, "argument.help.output");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(OutputFolderArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- if (args.length > argOffset + 1) {
- String outputFolder = args[argOffset + 1];
-
-// File outputFolderDir = new File(outputFolder);
-// if(!outputFolderDir.exists()) {
-// throw new FileNotFoundException(outputFolder);
-// }
-// if(!outputFolderDir.isDirectory()) {
-// throw new IOException(outputFolderDir + Messages.getString("argument.error.output"));
-// }
-
- getConfiguration().setDefaultOutputFolderOverlay(outputFolder);
-
- return argOffset + 1;
- }
- } catch (Exception ex) {
- log.error("Output folder argument invalid!", ex);
- throw new InitializationException(
- Messages.getString("argument.invalid.output") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index cbfb1925..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.bku.mobile.MobileBKUValidator;
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide Mobile BKU password
- */
-public class PasswordArgument extends Argument {
- /**
- * Constructor
- */
- public PasswordArgument() {
- super(new String[] {"-p"}, "argument.help.password");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(PasswordArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- if (args.length > argOffset + 1) {
-
- String password = args[argOffset + 1];
-
- MobileBKUValidator.validatePassword(password);
-
- getConfiguration().setDefaultMobilePasswordOverlay(password);
-
- return argOffset + 1;
- }
- } catch (Exception ex) {
- log.error("Mobile BKU password argument invalid!", ex);
- throw new InitializationException(
- Messages.getString("argument.invalid.password") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index cc43d7e3..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.bku.mobile.MobileBKUValidator;
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide Mobile BKU phone number to use
- */
-public class PhoneNumberArgument extends Argument {
- /**
- * Constructor
- */
- public PhoneNumberArgument() {
- super(new String[] {"-n" }, "argument.help.number");
- }
-
-
- /**
- * SLF4J Logger instance
- **/
- 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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
-
- try {
- if (args.length > argOffset + 1) {
-
- String number = args[argOffset + 1];
-
- number = MobileBKUValidator.normalizeMobileNumber(number);
-
- getConfiguration().setDefaultMobileNumberOverlay(number);
-
- return argOffset + 1;
- }
- } catch (Exception ex) {
- log.error("Phone Number Argument invalid!", ex);
- throw new InitializationException(
- Messages.getString("argument.invalid.number") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index a77872e5..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide the proxy host
- */
-public class ProxyHostArgument extends Argument {
- /**
- * Constructor
- */
- public ProxyHostArgument() {
- super(new String[] {"-proxy"}, "argument.help.proxyhost");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(ProxyHostArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index f9c4e533..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide the proxy password
- */
-public class ProxyPassArgument extends Argument {
- /**
- * Constructor
- */
- public ProxyPassArgument() {
- super(new String[] {"-proxypass"}, "argument.help.proxypass");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(ProxyPassArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.proxypass") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index ff9e84df..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.gui.exceptions.InvalidPortException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide the proxy port
- */
-public class ProxyPortArgument extends Argument {
- /**
- * Constructor
- */
- public ProxyPortArgument() {
- super(new String[] {"-proxyport"}, "argument.help.proxyport");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(ProxyPortArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.proxyport") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index 82944f9b..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * CLI Argument to provide the proxy username
- */
-public class ProxyUserArgument extends Argument {
- /**
- * Constructor
- */
- public ProxyUserArgument() {
- super(new String[] {"-proxyuser"}, "argument.help.proxyuser");
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(ProxyUserArgument.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)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- try {
- 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);
- throw new InitializationException(
- Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), ex);
- }
-
- throw new InitializationException(
- 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
deleted file mode 100644
index 0c4247fd..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.cliarguments;
-
-import at.asit.pdfover.gui.exceptions.InitializationException;
-
-/**
- * CLI Argument to set the BKU to use
- */
-public class SkipFinishArgument extends Argument {
- /**
- * Constructor
- */
- public SkipFinishArgument() {
- 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,
- * at.asit.pdfover.gui.cliarguments.ArgumentHandler)
- */
- @Override
- public int handleArgument(String[] args, int argOffset,
- ArgumentHandler handler)
- throws InitializationException {
- getConfiguration().setSkipFinishOverlay(true);
- return argOffset;
- }
-}
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
deleted file mode 100644
index 9c73c2e5..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.BKUs;
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.controls.ClickableCanvas;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- * Composite for BKU selection
- */
-public class BKUSelectionComposite extends StateComposite {
-
- static final Logger log = LoggerFactory.getLogger(BKUSelectionComposite.class);
-
- private BKUs selected = BKUs.NONE;
-
- private ClickableCanvas cc_mobile;
- private ClickableCanvas cc_karte;
- private Button btnMobile;
- private Button btnCard;
- private Button btnKS = null;
-
- public BKUs getSelected() { return this.selected; }
-
- public void setSelected(final BKUs selected) {
- this.selected = selected;
- this.state.updateStateMachine();
- }
-
- public void setLocalBKUEnabled(boolean state) {
- this.btnCard.setEnabled(state);
- this.cc_karte.setEnabled(false);
- }
-
- /**
- * Sets whether keystore option is enabled
- * @param enabled
- */
- public void setKeystoreEnabled(boolean enabled) {
- if (enabled) {
- this.btnKS = new Button(this, SWT.NONE);
- SWTUtils.anchor(this.btnKS).top(this.btnCard, 10).left(this.btnMobile, 0, SWT.LEFT).right(this.btnCard, 0, SWT.RIGHT);
- SWTUtils.addSelectionListener(btnKS, () -> { setSelected(BKUs.KS); });
-
- reloadResources();
- } else if (this.btnKS != null) {
- this.btnKS.dispose();
- this.btnKS = null;
- }
- }
-
- /**
- * Create the composite.
- * @param parent
- * @param style
- * @param state
- */
- public BKUSelectionComposite(Composite parent, int style, State state) {
- super(parent, style, state);
-
- this.setLayout(new FormLayout());
-
- this.cc_mobile = new ClickableCanvas(this, SWT.NATIVE | SWT.RESIZE);
- SWTUtils.anchor(cc_mobile).right(50, -5).top(40, -20);
- Image mobile = new Image(getDisplay(), new ImageData(this.getClass().getResourceAsStream(Constants.RES_IMG_MOBILE)));
- cc_mobile.setImage(mobile);
- SWTUtils.setFontHeight(cc_mobile, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addMouseDownListener(cc_mobile, () -> { setSelected(BKUs.MOBILE); });
-
- this.cc_karte = new ClickableCanvas(this, SWT.NATIVE | SWT.RESIZE);
- SWTUtils.anchor(cc_karte).left(50, 5).top(40, -20);
- Image karte = new Image(getDisplay(), this.getClass().getResourceAsStream(Constants.RES_IMG_CARD));
- cc_karte.setImage(karte);
- SWTUtils.setFontHeight(cc_karte, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addMouseDownListener(cc_karte, () -> { setSelected(BKUs.LOCAL); });
-
-
- this.btnMobile = new Button(this, SWT.NONE);
- SWTUtils.anchor(btnMobile).top(cc_mobile, 10).right(50,-5);
- int mobilesize = cc_mobile.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
- int btnmsize = this.btnMobile.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
- SWTUtils.reanchor(btnMobile).width(Math.max(btnmsize, mobilesize));
- SWTUtils.addSelectionListener(btnMobile, () -> { setSelected(BKUs.MOBILE); });
-
- this.btnCard = new Button(this, SWT.NONE);
- SWTUtils.anchor(btnCard).top(cc_karte, 10).left(50,5);
- int cardsize = cc_karte.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
- int btncsize = this.btnCard.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
- SWTUtils.reanchor(btnCard).width(Math.max(btncsize, cardsize));
- SWTUtils.addSelectionListener(btnCard, () -> { setSelected(BKUs.LOCAL); });
-
- reloadResources();
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(btnMobile, "bku_selection.mobile");
- SWTUtils.setLocalizedText(btnCard, "bku_selection.card");
- if (this.btnKS != null)
- SWTUtils.setLocalizedText(btnKS, "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
deleted file mode 100644
index aa757305..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.composites.configuration.AboutComposite;
-import at.asit.pdfover.gui.composites.configuration.AdvancedConfigurationComposite;
-import at.asit.pdfover.gui.composites.configuration.ConfigurationCompositeBase;
-import at.asit.pdfover.gui.composites.configuration.Fido2ConfigurationComposite;
-import at.asit.pdfover.gui.composites.configuration.KeystoreConfigurationComposite;
-import at.asit.pdfover.gui.composites.configuration.SimpleConfigurationComposite;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.exceptions.ResumableException;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- * Composite for hosting configuration composites
- */
-public class ConfigurationComposite extends StateComposite {
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(ConfigurationComposite.class);
-
- /**
- * configuration provider
- */
- ConfigurationManager configProvider = null;
-
- /**
- * simple configuration composite
- */
- ConfigurationCompositeBase simpleConfigComposite;
-
- /**
- * advanced configuration composite
- */
- ConfigurationCompositeBase advancedConfigComposite;
-
- /**
- * advanced configuration composite
- */
- ConfigurationCompositeBase keystoreConfigComposite = null;
-
- ConfigurationCompositeBase fido2ConfigComposite;
-
- /**
- * about page composite
- */
- ConfigurationCompositeBase aboutConfigComposite;
-
- private final Iterable<ConfigurationCompositeBase> _compositeIterable = new Iterable<>() {
- @Override
- public Iterator<ConfigurationCompositeBase> iterator() {
- return new Iterator<>() {
- int i = 0;
- @Override
- public boolean hasNext() {
- return i < 5;
- }
-
- @Override
- public ConfigurationCompositeBase next() {
- if ((i == 2) && (keystoreConfigComposite == null)) ++i;
- switch (++i) {
- case 1: return simpleConfigComposite;
- case 2: return advancedConfigComposite;
- case 3: return keystoreConfigComposite;
- case 4: return fido2ConfigComposite;
- case 5: return aboutConfigComposite;
- }
- throw new NoSuchElementException();
- }
- };
- }
- };
- private Iterable<ConfigurationCompositeBase> composites() { return _compositeIterable; }
-
- /**
- * The TabFolder
- */
- TabFolder tabFolder;
-
- /**
- * configuration container Keeps state for current configuration changes
- */
- ConfigurationDataInMemory configurationContainer = new ConfigurationDataInMemory();
-
- /**
- * The stack layout
- */
- StackLayout compositeStack = new StackLayout();
-
- /**
- * SWT style
- */
- int style;
-
- /**
- * base configuration container
- */
- Composite containerComposite;
-
- /**
- * checks whether the user is done
- */
- boolean userDone = false;
-
- private TabItem simpleTabItem;
-
- private TabItem advancedTabItem;
-
- private TabItem keystoreTabItem;
-
- private TabItem fido2TabItem;
-
- private TabItem aboutTabItem;
-
- private Button btnSpeichern;
-
- private Button btnAbbrechen;
-
- /**
- * Create the composite.
- *
- * @param parent
- * @param style
- * @param state
- */
- public ConfigurationComposite(Composite parent, int style, State state) {
- super(parent, SWT.FILL | style, state);
- this.style = SWT.FILL | style;
-
- this.setLayout(new FormLayout());
-
- this.containerComposite = new Composite(this, SWT.FILL | SWT.RESIZE);
-
- this.tabFolder = new TabFolder(this.containerComposite, SWT.NONE);
- SWTUtils.anchor(tabFolder).bottom(100, -5).right(100, -5).top(0, 5).left(0, 5);
- SWTUtils.setFontHeight(tabFolder, Constants.TEXT_SIZE_NORMAL);
-
- this.simpleTabItem = new TabItem(this.tabFolder, SWT.NONE);
- ScrolledComposite simpleCompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
- this.simpleTabItem.setControl(simpleCompositeScr);
- this.simpleConfigComposite = new SimpleConfigurationComposite(simpleCompositeScr, SWT.NONE, state, configurationContainer);
- simpleCompositeScr.setContent(simpleConfigComposite);
- simpleCompositeScr.setExpandHorizontal(true);
- simpleCompositeScr.setExpandVertical(true);
- simpleCompositeScr.setMinSize(simpleConfigComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
-
- this.advancedTabItem = new TabItem(this.tabFolder, SWT.NONE);
- ScrolledComposite advancedCompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
- this.advancedTabItem.setControl(advancedCompositeScr);
- this.advancedConfigComposite = new AdvancedConfigurationComposite(advancedCompositeScr, SWT.NONE, state, configurationContainer, this);
- advancedCompositeScr.setContent(advancedConfigComposite);
- advancedCompositeScr.setExpandHorizontal(true);
- advancedCompositeScr.setExpandVertical(true);
- advancedCompositeScr.setMinSize(advancedConfigComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
-
- this.fido2TabItem = new TabItem(this.tabFolder, SWT.NONE);
- ScrolledComposite fido2CompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
- this.fido2TabItem.setControl(fido2CompositeScr);
- this.fido2ConfigComposite = new Fido2ConfigurationComposite(fido2CompositeScr, SWT.NONE, state, configurationContainer);
- fido2CompositeScr.setContent(fido2ConfigComposite);
- fido2CompositeScr.setExpandHorizontal(true);
- fido2CompositeScr.setExpandVertical(true);
- fido2CompositeScr.addListener(SWT.Resize, (e) -> {
- int widthHint = fido2CompositeScr.getClientArea().width - 50; /* offset for scroll bar */
- fido2CompositeScr.setMinSize(null);
- fido2CompositeScr.setMinSize(fido2CompositeScr.computeSize(widthHint, SWT.DEFAULT));
- });
-
- this.aboutTabItem = new TabItem(this.tabFolder, SWT.NONE);
- ScrolledComposite aboutCompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
- this.aboutTabItem.setControl(aboutCompositeScr);
- this.aboutConfigComposite = new AboutComposite(aboutCompositeScr, SWT.NONE, state, configurationContainer);
- aboutCompositeScr.setContent(aboutConfigComposite);
- aboutCompositeScr.setExpandHorizontal(true);
- aboutCompositeScr.setExpandVertical(true);
- aboutCompositeScr.addListener(SWT.Resize, (event) -> {
- int widthHint = aboutCompositeScr.getClientArea().width - 50; /* offset for scroll bar */
- aboutCompositeScr.setMinSize(null);
- aboutCompositeScr.setMinSize(aboutCompositeScr.computeSize(widthHint, SWT.DEFAULT));
- });
-
- this.tabFolder.setSelection(this.simpleTabItem);
-
- this.btnSpeichern = new Button(this, SWT.NONE);
- SWTUtils.anchor(btnSpeichern).right(100, -5).bottom(100);
- SWTUtils.setFontHeight(btnSpeichern, Constants.TEXT_SIZE_BUTTON);
- this.btnSpeichern.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- getShell().setText(Constants.APP_NAME);
- if (ConfigurationComposite.this.storeConfiguration()) {
- ConfigurationComposite.this.userDone = true;
- ConfigurationComposite.this.state.updateStateMachine();
- }
- }
- });
-
- this.btnAbbrechen = new Button(this, SWT.NONE);
- SWTUtils.anchor(btnAbbrechen).right(btnSpeichern, -10).bottom(btnSpeichern, 0, SWT.BOTTOM);
- SWTUtils.setFontHeight(btnAbbrechen, Constants.TEXT_SIZE_BUTTON);
- this.btnAbbrechen.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- getShell().setText(Constants.APP_NAME);
- ConfigurationComposite.this.userDone = true;
- ConfigurationComposite.this.state.updateStateMachine();
- }
- });
-
- SWTUtils.anchor(containerComposite).top(0, 5).bottom(btnSpeichern, -10).left(0, 5).right(100, -5);
- this.containerComposite.setLayout(this.compositeStack);
- this.compositeStack.topControl = this.tabFolder;
-
- getShell().setText(Constants.APP_NAME_VERSION + " [" + System.getProperty("java.vendor") + " Java " + System.getProperty("java.version") + "]");
-
- reloadResources();
- this.doLayout();
- }
-
- private boolean keystoreInitialized = false;
-
- /**
- * Set whether keystore tab is enabled
- * @param enabled whether keystore tab is enabled
- */
- public void keystoreEnabled(boolean enabled) {
- if (enabled && this.keystoreConfigComposite == null) {
- this.keystoreTabItem = new TabItem(this.tabFolder, SWT.NONE, 2);
- SWTUtils.setLocalizedText(keystoreTabItem, "config.Keystore");
-
- ScrolledComposite keystoreCompositeScr = new ScrolledComposite(
- this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
- this.keystoreTabItem.setControl(keystoreCompositeScr);
- this.keystoreConfigComposite = new KeystoreConfigurationComposite(
- keystoreCompositeScr, SWT.NONE, this.state,
- this.configurationContainer);
- keystoreCompositeScr.setContent(this.keystoreConfigComposite);
- keystoreCompositeScr.setExpandHorizontal(true);
- keystoreCompositeScr.setExpandVertical(true);
- keystoreCompositeScr.setMinSize(this.keystoreConfigComposite
- .computeSize(SWT.DEFAULT, SWT.DEFAULT));
- if (!this.keystoreInitialized) {
- this.keystoreConfigComposite.initConfiguration(this.configProvider);
- this.keystoreInitialized = true;
- }
- this.keystoreConfigComposite.loadConfiguration();
-
- reloadResources();
- } else if (!enabled && this.keystoreConfigComposite != null){
- this.keystoreTabItem.dispose();
- this.keystoreConfigComposite = null;
- }
- }
-
- /**
- * Sets the configuration provider
- *
- * @param provider
- */
- public void setConfigProvider(ConfigurationManager provider) {
- if (provider.crashOnConfig) /* for testing initialization error handlers */
- throw new RuntimeException("A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.\n(CRASH=config is set.)");
-
- this.configProvider = provider;
- if (this.configProvider != null) {
- for (ConfigurationCompositeBase c : composites())
- c.initConfiguration(this.configProvider);
-
- for (ConfigurationCompositeBase c : composites())
- c.loadConfiguration();
- }
- }
-
- boolean storeConfiguration() {
- try {
- for (ConfigurationCompositeBase c : composites()) {
- int resumeIndex = 0;
- while (true) {
- try {
- c.validateSettings(resumeIndex);
- break;
- } catch (ResumableException e) {
- log.info("Settings validation failed!", e);
- ErrorDialog dialog = new ErrorDialog(getShell(),
- e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
- int rc = dialog.open();
-
- if (rc == SWT.ABORT)
- return false;
- if (rc == SWT.IGNORE)
- resumeIndex = e.getResumeIndex();
- }
- }
- }
- } catch (Exception e) {
- log.error("Settings validation failed!", e);
- String message = e.getMessage();
- if (message == null)
- message = Messages.getString("error.Unexpected");
- ErrorDialog dialog = new ErrorDialog(getShell(), message,
- BUTTONS.OK);
- dialog.open();
- return false;
- }
-
- // Write current Configuration
- for (ConfigurationCompositeBase c : composites())
- c.storeConfiguration(this.configProvider);
-
- while (true) {
- // Save current config to file
- try {
- this.configProvider.saveToDisk();
- return true;
- } catch (IOException e) {
- log.error("Failed to save configuration to file!", e);
- ErrorDialog dialog = new ErrorDialog(getShell(),
- Messages.getString("error.FailedToSaveSettings"), BUTTONS.RETRY_CANCEL);
- int rc = dialog.open();
- if (rc == SWT.CANCEL)
- return false;
- }
- }
- }
-
- /**
- * Checks if the user has finished working with the configuration composite
- *
- * @return if the user is done
- */
- public boolean isUserDone() {
- return this.userDone;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
- */
- @Override
- public void onDisplay() {
- Control ctrl = this.compositeStack.topControl;
- this.containerComposite.layout(true, true);
- getShell().layout(true, true);
- // Note: SWT only layouts children! No grandchildren!
- if (ctrl instanceof StateComposite) {
- ((StateComposite) ctrl).doLayout();
- }
- setFocus();
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(simpleTabItem, "config.Simple");
- SWTUtils.setLocalizedText(advancedTabItem, "config.Advanced");
- SWTUtils.setLocalizedText(fido2TabItem, "config.FIDO2");
- SWTUtils.setLocalizedText(aboutTabItem, "config.About", Constants.APP_NAME);
- if (this.keystoreConfigComposite != null)
- SWTUtils.setLocalizedText(keystoreTabItem, "config.Keystore");
-
- SWTUtils.setLocalizedText(btnSpeichern, "common.Save");
- SWTUtils.setLocalizedText(btnAbbrechen, "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
deleted file mode 100644
index 852afecc..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-// Imports
-import java.io.File;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.dnd.DropTargetAdapter;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- * Composite for input document selection
- */
-public class DataSourceSelectComposite extends StateComposite {
-
- /**
- * Open the input document selection dialog
- */
- public void openFileDialog() {
- FileDialog dialog = new FileDialog(
- DataSourceSelectComposite.this.getShell(), SWT.OPEN);
- dialog.setFilterExtensions(new String[] { "*.pdf", "*" });
- dialog.setFilterNames(new String[] {
- Messages.getString("common.PDFExtension_Description"),
- Messages.getString("common.AllExtension_Description") });
- String fileName = dialog.open();
- File file = null;
- if (fileName != null) {
- file = new File(fileName);
- if (file.exists()) {
- DataSourceSelectComposite.this.setSelected(file);
- }
- }
- }
-
- /**
- * Selection adapter for file browsing
- */
- private final class FileBrowseDialogListener extends SelectionAdapter {
- /**
- * Empty constructor
- */
- public FileBrowseDialogListener() {
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- openFileDialog();
- }
- }
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(DataSourceSelectComposite.class);
-
- /**
- * Set this value through the setter method!!
- */
- private File selected = null;
-
- /**
- * Sets the selected file and calls update to the workflow
- *
- * @param selected
- */
- protected void setSelected(File selected) {
- this.selected = selected;
- this.state.updateStateMachine();
- }
-
- /**
- * Gets the selected file
- *
- * @return the selected file
- */
- public File getSelected() {
- return this.selected;
- }
-
- void MarkDragEnter() {
- this.backgroundColor = this.activeBackground;
- 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);
- this.btn_open.setBackground(this.backgroundColor);
- 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
- */
- public DataSourceSelectComposite(Composite parent, int style, State state) {
- super(parent, style, state);
-
- this.activeBackground = Constants.MAINBAR_ACTIVE_BACK_LIGHT;
- this.inactiveBackground = this.getBackground();//Constants.MAINBAR_INACTIVE_BACK;
- this.inactiveBorder = Constants.MAINBAR_ACTIVE_BACK_LIGHT;
- 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);
-
- this.drop_area = new Composite(this, SWT.RESIZE);
- SWTUtils.anchor(drop_area).left(0, 30).right(100, -30).top(0, 30).bottom(100, -30);
- 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,
- 10, 10);
- 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 };
- dnd_target.setTransfer(types);
-
- dnd_target.addDropListener(new DropTargetAdapter() {
- @Override
- public void drop(DropTargetEvent event) {
- if (fileTransfer.isSupportedType(event.currentDataType)) {
- if (event.data == null) {
- log.error("Dropped file name was null");
- return;
- }
- String[] files = (String[]) event.data;
- if (files.length > 0) {
- // Only taking first file ...
- File file = new File(files[0]);
- if (!file.exists()) {
- log.error(Messages.formatString("error.FileNotExist", files[0]));
- return;
- }
- DataSourceSelectComposite.this.setSelected(file);
- }
- }
- }
-
- @Override
- public void dragOperationChanged(DropTargetEvent event) {
- event.detail = DND.DROP_COPY;
- }
-
- @Override
- public void dragEnter(DropTargetEvent event) {
- // only accept transferable files
- for (int i = 0; i < event.dataTypes.length; i++) {
- if (fileTransfer.isSupportedType(event.dataTypes[i])) {
- event.currentDataType = event.dataTypes[i];
- event.detail = DND.DROP_COPY;
- MarkDragEnter();
- return;
- }
- }
- event.detail = DND.DROP_NONE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.dnd.DropTargetAdapter#dragLeave(org.eclipse.swt.dnd.DropTargetEvent)
- */
- @Override
- public void dragLeave(DropTargetEvent event) {
- MarkDragLeave();
- super.dragLeave(event);
- }
- });
-
- this.lbl_drag = new Label(this.drop_area, SWT.NONE | SWT.RESIZE );
- this.lbl_drag2 = new Label(this.drop_area, SWT.NONE | SWT.RESIZE );
- SWTUtils.anchor(lbl_drag).left(0, 10).right(100, -10).bottom(lbl_drag2, -10);
- SWTUtils.anchor(lbl_drag2).left(0, 10).right(100, -10).top(50, -10);
- SWTUtils.setFontHeight(lbl_drag, Constants.TEXT_SIZE_BIG);
- SWTUtils.setFontHeight(lbl_drag2, Constants.TEXT_SIZE_NORMAL);
- this.lbl_drag.setAlignment(SWT.CENTER);
- this.lbl_drag2.setAlignment(SWT.CENTER);
-
- this.btn_open = new Button(this.drop_area, SWT.NATIVE | SWT.RESIZE);
- SWTUtils.anchor(btn_open).left(lbl_drag2, 0, SWT.CENTER).top(lbl_drag2, 10);
- SWTUtils.setFontHeight(btn_open, Constants.TEXT_SIZE_BUTTON);
-
- reloadResources();
-
- this.btn_open.addSelectionListener(new FileBrowseDialogListener());
- this.drop_area.pack();
- this.redrawDrop();
- }
-
- Composite drop_area;
-
- private Label lbl_drag2;
-
- private Label lbl_drag;
-
- private Button btn_open;
-
- @Override
- public void onDisplay() {
- this.drop_area.layout(true, true);
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lbl_drag, "dataSourceSelection.DropLabel");
- SWTUtils.setLocalizedText(lbl_drag2, "dataSourceSelection.DropLabel2");
- SWTUtils.setLocalizedText(btn_open, "dataSourceSelection.browse");
- }
-}
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
deleted file mode 100644
index 96dc3982..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-// Imports
-import java.awt.Desktop;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import org.apache.commons.io.FilenameUtils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.controls.Dialog;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.Dialog.ICON;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.pdfover.signer.DocumentSource;
-
-/**
- * GUI component for Output State
- */
-public class OutputComposite extends StateComposite {
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(OutputComposite.class);
-
- private Link lnk_saved_file;
-
- private Button btn_save;
-
- private Label lbl_success_message;
-
- private DocumentSource signedDocument;
-
- private File inputFile;
-
- String outputDir = null;
-
- String tempDirectory = null;
-
- File outputFile = null;
-
- private boolean saveFailed = false;
-
- private String postFix = null;
-
- /**
- * Create the composite.
- *
- * @param parent
- * The parent composite
- * @param style
- * The swt style
- * @param state
- * The owning state
- */
- public OutputComposite(Composite parent, int style, State state) {
- super(parent, style, state);
-
- this.setLayout(new FormLayout());
-
- this.lbl_success_message = new Label(this, SWT.NATIVE | SWT.RESIZE);
- FormData fd_lbl_success_message = new FormData();
- fd_lbl_success_message.top = new FormAttachment(40, 0);
- fd_lbl_success_message.left = new FormAttachment(0);
- fd_lbl_success_message.right = new FormAttachment(100);
- this.lbl_success_message.setLayoutData(fd_lbl_success_message);
- this.lbl_success_message.setAlignment(SWT.CENTER);
-
- FontData[] fD1 = this.lbl_success_message.getFont().getFontData();
- fD1[0].setHeight(Constants.TEXT_SIZE_BIG);
- this.lbl_success_message.setFont(new Font(Display.getCurrent(), fD1[0]));
-
- this.lnk_saved_file = new Link(this, SWT.NATIVE | SWT.RESIZE);
- FormData fd_lnk_saved_file = new FormData();
- fd_lnk_saved_file.top = new FormAttachment(this.lbl_success_message, 10);
- fd_lnk_saved_file.left = new FormAttachment(this.lbl_success_message, 0,
- SWT.CENTER);
- // fd_lnk_saved_file.right = new FormAttachment(100);
- this.lnk_saved_file.setLayoutData(fd_lnk_saved_file);
-
- this.lnk_saved_file.addSelectionListener(new OpenSelectionListener());
-
- FontData[] fD2 = this.lnk_saved_file.getFont().getFontData();
- fD2[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.lnk_saved_file.setFont(new Font(Display.getCurrent(), fD2[0]));
-
- this.btn_save = new Button(this, SWT.NATIVE | SWT.RESIZE);
-
- FontData[] fD_btn_save = this.btn_save.getFont().getFontData();
- fD_btn_save[0].setHeight(Constants.TEXT_SIZE_BUTTON);
- this.btn_save.setFont(new Font(Display.getCurrent(), fD_btn_save[0]));
-
- FormData fd_btn_save = new FormData();
- fd_btn_save.top = new FormAttachment(this.lnk_saved_file, 10);
- fd_btn_save.left = new FormAttachment(this.lnk_saved_file, 0,
- SWT.CENTER);
- this.btn_save.setLayoutData(fd_btn_save);
-
- this.btn_save.addSelectionListener(new SaveSelectionListener());
- enableSaveButton(false);
-
- reloadResources();
- }
-
- /**
- * @param outputDir
- * the outputDir to set
- */
- public void setOutputDir(String outputDir) {
- this.outputDir = outputDir;
- }
-
- /**
- * @return the outputDir
- */
- public String getOutputDir() {
- return this.outputDir;
- }
-
- /**
- * Sets the input file
- *
- * @param inputFile
- * the input file
- */
- public void setInputFile(File inputFile) {
- this.inputFile = inputFile;
- }
-
- /**
- * Gets the input file
- *
- * @return the input file
- */
- public File getInputFile() {
- return this.inputFile;
- }
-
- /**
- * @param tempDirectory
- */
- public void setTempDir(String tempDirectory) {
- this.tempDirectory = tempDirectory;
- }
-
- /**
- * Gets the signed document
- *
- * @return the signed document
- */
- public DocumentSource getSignedDocument() {
- return this.signedDocument;
- }
-
- /**
- * Sets the signed document
- *
- * @param signedDocument
- * the signed document
- */
- public void setSignedDocument(final DocumentSource signedDocument) {
- this.signedDocument = signedDocument;
- }
-
- /**
- * Return whether the last save was successful
- * @return whether the last save was successful
- */
- public boolean getSaveSuccessful() {
- return !this.saveFailed;
- }
-
- private void enableSaveButton(boolean doEnable)
- {
- this.btn_save.setEnabled(doEnable);
- this.btn_save.setVisible(doEnable);
- }
-
- public void setSaveFilePostFix(String postFix){
- this.postFix = postFix;
- }
-
- public String getSaveFilePostFix(){
- if (this.postFix == null){
- this.postFix = Constants.DEFAULT_POSTFIX;
- }
- return this.postFix;
- }
-
- /**
- * 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.
- */
- public void saveDocument() {
- File inputFolder = getInputFile().getAbsoluteFile().getParentFile();
- String fileName = getInputFile().getName();
- String proposedName = getSignedFileName(fileName);
- String outputFileName;
-
- String outputFolder = getOutputDir();
- if (!this.saveFailed && outputFolder != null && !outputFolder.trim().isEmpty()) {
- // Output folder configured, try to save there
-
- File f = new File(outputFolder);
- if (f.isDirectory()) {
- if (!outputFolder.endsWith(File.separator)) {
- outputFolder += File.separator;
- }
- outputFileName = outputFolder + proposedName;
- } else {
- outputFileName = outputFolder;
- }
- } else {
- // Ask user where to save
-
- FileDialog save = new FileDialog(this.getShell(),
- SWT.SAVE | SWT.NATIVE);
- 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 + "'");
-
- this.outputFile = saveResultAsFile(inputFolder, outputFileName);
- this.saveFailed = (this.outputFile == null);
-
- // If saving failed, enable save button
- enableSaveButton(this.saveFailed);
- reloadResources();
- layout(true);
- }
-
- /**
- * 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
- */
- private File saveResultAsFile(File inputFolder, String target) {
- if (target == null)
- return null;
-
- File targetFile = new File(target);
- if (!targetFile.isAbsolute())
- targetFile = new File(inputFolder, target);
-
- if (targetFile.exists()) {
- Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"),
- Messages.formatString("output.file_ask_overwrite", targetFile.getName()),
- BUTTONS.OK_CANCEL, ICON.QUESTION);
- if (dialog.open() == SWT.CANCEL)
- {
- return null;
- }
- }
-
- DocumentSource source = this.getSignedDocument();
- boolean retry;
-
- do {
- retry = false;
- try {
- FileOutputStream outstream = new FileOutputStream(targetFile);
- outstream.write(source.getByteArray(), 0,
- source.getByteArray().length);
- outstream.close();
- } catch (FileNotFoundException e) {
- log.warn("Failed to open output file", e);
- ErrorDialog dialog = new ErrorDialog(getShell(),
- Messages.formatString("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);
- ErrorDialog dialog = new ErrorDialog(getShell(),
- Messages.formatString("output.save_failed",
- targetFile.getName(), e.getLocalizedMessage()),
- BUTTONS.RETRY_CANCEL);
- if (dialog.open() == SWT.CANCEL)
- return null;
- retry = true;
- }
- } while (retry);
-
- if (!targetFile.exists())
- {
- log.error("Tried to save file " + targetFile.getName() +
- ", but it doesn't exist");
- return null;
- }
- return targetFile;
- }
-
- /**
- * Get the proposed filename of a signed document for a given input filename
- * @param name input filename
- * @return proposed output filename
- */
- private String getSignedFileName(String name) {
- name = FilenameUtils.getName(name);
- String extension = FilenameUtils.getExtension(name);
- name = FilenameUtils.removeExtension(name);
- return name + getSaveFilePostFix() + FilenameUtils.EXTENSION_SEPARATOR + extension;
- }
-
- /**
- * SelectionListener for save button
- */
- private final class SaveSelectionListener extends SelectionAdapter {
- /**
- * Empty constructor
- */
- public SaveSelectionListener() {
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- try {
- OutputComposite.this.saveDocument();
- } catch (Exception ex) {
- log.error("SaveSelectionListener: ", ex);
- }
- }
- }
-
- /**
- * Selection Listener for open button
- */
- private final class OpenSelectionListener extends SelectionAdapter {
- /**
- * Empty constructor
- */
- public OpenSelectionListener() {
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- try {
- if (OutputComposite.this.outputFile == null)
- return;
-
- if (!OutputComposite.this.outputFile.exists())
- return;
-
- // Normalize filename
- File f = new File(FilenameUtils.normalize(
- OutputComposite.this.outputFile.getAbsolutePath()));
- log.debug("Trying to open " + f.toString());
- // work around for the case of Linux and Java version 8
- if (isSpecialCase()) {
- reReloadResources(f.toString());
- return;
- }
- else if (Desktop.isDesktopSupported()) {
- Desktop.getDesktop().open(f);
- } else {
- log.info("AWT Desktop is not supported on this platform");
- Program.launch(f.getAbsolutePath());
- }
- } catch (IOException ex) {
- log.error("OpenSelectionListener: ", ex);
- ErrorDialog error = new ErrorDialog(getShell(),
- Messages.formatString("error.FailedToOpenDocument",
- ex.getLocalizedMessage()), BUTTONS.RETRY_CANCEL);
- if (error.open() == SWT.RETRY)
- widgetSelected(e);
- }
- }
- }
-
- /**
- * @return true when linux and java version <= 8
- *
- */
- public boolean isSpecialCase() {
-
- boolean isSCase = false;
- try {
- 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());
- isSCase = false;
- }
- return isSCase;
- }
-
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lbl_success_message, "output.success_message");
- if (this.outputFile == null) {
- SWTUtils.setLocalizedText(lnk_saved_file, "output.link_save_message");
- } else {
- SWTUtils.setLocalizedText(lnk_saved_file, "output.link_open_message");
- }
- SWTUtils.setLocalizedText(btn_save, "common.Save");
- }
-
- /**
- * @param str
- */
- public void reReloadResources(String str) {
- SWTUtils.setLocalizedText(lbl_success_message, "output.success_message");
- if (this.outputFile == null) {
- SWTUtils.setLocalizedText(lnk_saved_file, "output.link_save_message");
- } else {
- String str2 = "File location: " + str;
- this.lbl_success_message.setText(str2);
- this.lnk_saved_file.setText("");
- }
- SWTUtils.setLocalizedText(btn_save, "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
deleted file mode 100644
index b4d06546..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-// Imports
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.EventQueue;
-import java.awt.Frame;
-import java.awt.Image;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.awt.event.MouseWheelEvent;
-import java.awt.event.MouseWheelListener;
-import java.awt.geom.Point2D;
-
-import org.apache.pdfbox.pdmodel.PDDocument;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.awt.SWT_AWT;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.pdfover.signer.SignaturePosition;
-
-/**
- * Composite which allows to position the signature on a preview of the document
- */
-public class PositioningComposite extends StateComposite {
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(PositioningComposite.class);
-
- SignaturePanel viewer = null;
- Frame frame = null;
- Composite mainArea = null;
- Composite bottomBar = null;
- Button btnNewPage = null;
- Label lblPage = null;
- ScrollBar scrollbar = null;
-
- private SignaturePosition position = null;
- int currentPage = 0;
- int numPages = 0;
-
- /**
- * Create the composite.
- *
- * @param parent
- * @param style
- * @param state
- */
- public PositioningComposite(Composite parent, int style, State state) {
- super(parent, style, state);
- this.setLayout(new FormLayout());
-
- this.bottomBar = new Composite(this, SWT.NONE);
- SWTUtils.anchor(bottomBar).left(0).right(100).bottom(100);
- this.bottomBar.setLayout(new FormLayout());
-
- this.btnSign = new Button(this.bottomBar, SWT.PUSH);
- SWTUtils.anchor(btnSign).right(100).top(0);
- this.getShell().setDefaultButton(this.btnSign);
-
- this.btnNewPage = new Button(this.bottomBar, SWT.TOGGLE);
- SWTUtils.anchor(btnNewPage).right(btnSign).top(0);
-
- this.lblPage = new Label(this.bottomBar, SWT.CENTER);
- SWTUtils.anchor(lblPage).left(0).right(btnNewPage, 5).bottom(100);
-
- this.mainArea = new Composite(this, SWT.EMBEDDED | SWT.V_SCROLL);
- SWTUtils.anchor(mainArea).left(0).right(100).top(0).bottom(bottomBar, -5);
- this.scrollbar = this.mainArea.getVerticalBar();
-
- this.frame = SWT_AWT.new_Frame(this.mainArea);
- this.frame.addKeyListener(this.keyListener);
- this.frame.addMouseWheelListener(this.mouseListener);
-
- this.viewer = new SignaturePanel();
- this.viewer.setSignaturePlaceholderBorderColor(new Color(
- Constants.MAINBAR_ACTIVE_BACK_DARK.getRed(),
- Constants.MAINBAR_ACTIVE_BACK_DARK.getGreen(),
- Constants.MAINBAR_ACTIVE_BACK_DARK.getBlue()));
- this.frame.add(this.viewer, BorderLayout.CENTER);
-
- SWTUtils.addSelectionListener(btnNewPage, () -> {
- if (this.currentPage > this.numPages)
- showPage(this.numPages);
- else
- showPage(this.numPages + 1);
- requestFocus();
- });
-
- SWTUtils.addSelectionListener(btnSign, this::setFinalPosition);
-
- SWTUtils.addSelectionListener(scrollbar, () -> { this.showPage(this.scrollbar.getSelection()); });
-
- reloadResources();
- requestFocus();
- }
-
- @Override public void onDisplay() { if (this.viewer.getSigPagePos() == null) this.btnSign.setEnabled(false); }
-
- /**
- * Set the PDF Document to display
- *
- * @param document
- * document to display
- */
- public void displayDocument(final PDDocument document) {
- EventQueue.invokeLater(() -> {
- this.viewer.setDocument(document);
- getDisplay().asyncExec(() -> this.btnSign.setEnabled(true));
- });
-
- if (document != null)
- {
- this.numPages = document.getNumberOfPages();
- this.scrollbar.setValues(1, 1, this.numPages + 1, 1, 1, 1);
- showPage(this.numPages);
- }
- }
-
- @Override
- public void dispose() {
- this.viewer.setDocument(null);
- super.dispose();
- }
-
- /**
- * Request focus (to enable keyboard input)
- */
- public void requestFocus() {
- getDisplay().asyncExec(() -> {
- if (!this.isDisposed() && !this.mainArea.isDisposed()) {
- this.mainArea.setFocus();
- EventQueue.invokeLater(() -> {
- if (!this.isDisposed()) {
- if (!this.frame.hasFocus()) {
- this.frame.requestFocus();
- }
- }
- });
- }
- });
- }
-
- /**
- * Set the signature placeholder image Must be called _after_
- * displayDocument
- *
- * @param placeholder
- * signature placeholder
- * @param width
- * width of the placeholder in page space
- * @param height
- * height of the placeholder in page space
- */
- public void setPlaceholder(final Image placeholder) {
- EventQueue.invokeLater(() -> {
- if (this.viewer == null)
- return;
- this.viewer.setSignaturePlaceholder(placeholder);
- });
- }
-
- KeyListener keyListener = new KeyAdapter() {
- @Override
- public void keyPressed(KeyEvent e) {
- int newPage = PositioningComposite.this.currentPage;
- int sigXOffset = 0;
- int sigYOffset = 0;
-
- switch (e.getKeyCode()) {
- case KeyEvent.VK_PAGE_DOWN:
- if (PositioningComposite.this.currentPage < PositioningComposite.this.numPages)
- ++newPage;
- break;
-
- case KeyEvent.VK_PAGE_UP:
- if (PositioningComposite.this.currentPage > 1)
- --newPage;
- break;
-
- case KeyEvent.VK_END:
- newPage = PositioningComposite.this.numPages;
- break;
-
- case KeyEvent.VK_HOME:
- newPage = 1;
- break;
-
- case KeyEvent.VK_ENTER:
- setFinalPosition();
- break;
-
- case KeyEvent.VK_LEFT:
- case KeyEvent.VK_KP_LEFT:
- sigXOffset -= Constants.SIGNATURE_KEYBOARD_POSITIONING_OFFSET;
- break;
-
- case KeyEvent.VK_RIGHT:
- case KeyEvent.VK_KP_RIGHT:
- sigXOffset += Constants.SIGNATURE_KEYBOARD_POSITIONING_OFFSET;
- break;
-
- case KeyEvent.VK_UP:
- case KeyEvent.VK_KP_UP:
- sigYOffset += Constants.SIGNATURE_KEYBOARD_POSITIONING_OFFSET;
- break;
-
- case KeyEvent.VK_DOWN:
- case KeyEvent.VK_KP_DOWN:
- sigYOffset -= Constants.SIGNATURE_KEYBOARD_POSITIONING_OFFSET;
- break;
- }
-
- if (newPage != PositioningComposite.this.currentPage)
- showPage(newPage);
-
- if (sigXOffset != 0 || sigYOffset != 0)
- translateSignaturePosition(sigXOffset, sigYOffset);
- }
- };
-
- MouseWheelListener mouseListener = new MouseWheelListener() {
- private long lastEventTime = 0;
-
- @Override
- public void mouseWheelMoved(MouseWheelEvent e) {
- e.consume();
- // Workaround for Linux: Events fire twice
- if (e.getWhen() == this.lastEventTime)
- return;
- this.lastEventTime = e.getWhen();
-
- int change = e.isShiftDown() ? 5 : 1;
- int newPage = PositioningComposite.this.currentPage;
-
- if (e.getWheelRotation() < 0) {
- newPage = Math.max(1, newPage - change);
- } else if (e.getWheelRotation() > 0) {
- newPage = Math.min(newPage + change, PositioningComposite.this.numPages);
- }
-
- if (newPage != PositioningComposite.this.currentPage)
- showPage(newPage);
- }
- };
-
- private Button btnSign;
-
- void showPage(final int page) {
- final int previousPage = this.currentPage;
- this.currentPage = page;
- getDisplay().asyncExec(() -> {
- int currentPage = this.currentPage;
- int numPages = this.numPages;
- if ((previousPage > numPages) && (currentPage <= numPages)) {
- // Was on new page
- SWTUtils.setLocalizedText(btnNewPage, "positioning.newPage");
- this.btnNewPage.setSelection(false);
- this.bottomBar.layout();
- this.scrollbar.setMaximum(numPages + 1);
- } else if ((previousPage <= numPages) && (currentPage > numPages)) {
- // Go to new page
- SWTUtils.setLocalizedText(btnNewPage, "positioning.removeNewPage");
- this.btnNewPage.setSelection(true);
- this.bottomBar.layout();
- this.scrollbar.setMaximum(numPages + 2);
- }
- this.scrollbar.setSelection(currentPage);
- SWTUtils.setLocalizedText(lblPage, "positioning.page", currentPage, numPages);
- });
- EventQueue.invokeLater(() -> {
- PositioningComposite.this.viewer.showPage(page);
- });
- }
-
- /**
- * Translate the signature placeholder position
- *
- * @param sigXOffset
- * signature placeholder horizontal position offset
- * @param sigYOffset
- * signature placeholder vertical position offset (negative is down)
- */
- public void translateSignaturePosition(final int sigXOffset, final int sigYOffset) {
- EventQueue.invokeLater(() -> {
- this.viewer.translateSignaturePagePosition(sigXOffset, sigYOffset);
- });
- }
-
- /**
- * Set the signature position and continue to the next state
- *
- * @param position
- * the signature position
- */
- void setFinalPosition() {
- if (this.currentPage == 0) {
- this.position = new SignaturePosition();
- } else {
- Point2D pos = this.viewer.getSigPagePos();
- if (pos == null) return;
-
- this.position = new SignaturePosition(
- pos.getX(),
- pos.getY(),
- this.currentPage);
- }
- PositioningComposite.this.state.updateStateMachine();
- }
-
- /**
- * Set the signature position
- *
- * @param x
- * the horizontal signature position
- * @param y
- * the vertical signature position
- * @param page
- * the page the signature is on
- */
- public void setPosition(double x, double y, int page) {
- showPage(page);
- if (this.viewer != null)
- this.viewer.setSignaturePosition(x, y);
- }
-
- /**
- * Get the signature position
- *
- * @return the signature position
- */
- public SignaturePosition getPosition() {
- return this.position;
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(btnNewPage, (this.currentPage <= this.numPages) ? "positioning.newPage" : "positioning.removeNewPage");
- SWTUtils.setLocalizedText(btnSign, "positioning.sign");
- SWTUtils.setLocalizedText(lblPage, "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
deleted file mode 100644
index df880459..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
+++ /dev/null
@@ -1,483 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-// Imports
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Cursor;
-import java.awt.Dimension;
-import java.awt.Graphics;
-import java.awt.Image;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-
-import javax.annotation.CheckForNull;
-import javax.swing.JPanel;
-
-import org.apache.pdfbox.pdmodel.PDDocument;
-import org.apache.pdfbox.pdmodel.PDPage;
-import org.apache.pdfbox.pdmodel.common.PDRectangle;
-import org.apache.pdfbox.rendering.PDFRenderer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- *
- */
-public class SignaturePanel extends JPanel {
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(SignaturePanel.class);
-
- /** Default serial version ID */
- private static final long serialVersionUID = 1L;
-
- /** The PDF file being displayed */
- private PDDocument pdf = null;
- private PDFRenderer renderer = null;
-
- /** The image of the rendered PDF page being displayed */
- Image currentImage = null;
-
- /** The current scale for rendering pdf to image */
- private float pageToImageScale;
- /** The current scale for rendering image to screen */
- private double imageToScreenScale;
- /* scaling */
- private enum U {
- /* (0,0) is bottom-left of page */
- PAGE_ABS,
- /* (0,0) is top-left of page */
- PAGE_REL,
- /* pixels, (0,0) is top-left of image */
- IMAGE,
- /* pixels, (0,0) is top-left of image */
- SCREEN_REL,
- /* pixels, (0,0) is top-left of canvas */
- SCREEN_ABS };
- private enum Dim { X, Y };
- private double scale(double v, U from, U to, Dim d)
- {
- if (from == to) return v;
-
- if (from == U.PAGE_ABS) {
- return scale((d == Dim.X) ? v : (this.pageHeight - v), U.PAGE_REL, to, d);
- } else if (from == U.PAGE_REL) {
- if (to == U.PAGE_ABS)
- return ((d == Dim.X) ? v : (this.pageHeight - v));
- else
- return scale(v * this.pageToImageScale, U.IMAGE, to, d);
- } else if (from == U.IMAGE) {
- if ((to == U.PAGE_ABS) || (to == U.PAGE_REL))
- return scale(v / this.pageToImageScale, U.PAGE_REL, to, d);
- else
- return scale(v * this.imageToScreenScale, U.SCREEN_REL, to, d);
- } else if (from == U.SCREEN_REL) {
- if (to == U.SCREEN_ABS)
- return (v + ((d == Dim.X) ? this.offX : this.offY));
- else
- return scale(v / this.imageToScreenScale, U.IMAGE, to, d);
- } else if (from == U.SCREEN_ABS) {
- return scale(v - ((d == Dim.X) ? this.offX : this.offY), U.SCREEN_REL, to, d);
- } else throw new RuntimeException("unreachable");
- }
-
- private float pageWidth = 0;
- private float pageHeight = 0;
- /** The horizontal offset of the image from the left edge of the panel */
- private int offX = 0;
- /** The vertical offset of the image from the top of the panel */
- private int offY = 0;
- /** The position of the top-left corner of the signature, in absolute page space */
- private Point2D sigPagePos = null;
- public @CheckForNull Point2D getSigPagePos() { return this.sigPagePos; }
- /** The signature placeholder image */
- private Image sigPlaceholder = null;
- /** Width of the signature placeholder in page space */
- private int sigPageWidth = 0;
- /** Height of the signature placeholder in page space */
- private int sigPageHeight = 0;
- /** Color of the signature placeholder border */
- private Color sigPlaceholderBorderColor = Color.BLUE;
- /** Current page */
- private int currentPageNo = 0;
- /** Number of pages in the document */
- private int numPages = 0;
- /** Cursor types */
- private static enum Cursors {DEFAULT, HAND, MOVE};
- /** Default arrow cursor */
- private final Cursor defaultCursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
- /** Hand cursor */
- private final Cursor handCursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
- /** Move cursor */
- private final Cursor moveCursor = Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR);
- /** Current cursor */
- private Cursors currentCursor = Cursors.DEFAULT;
-
- /**
- * Create a new PagePanel.
- */
- public SignaturePanel() {
- super(new BorderLayout());
- setDocument(null);
- setFocusable(true);
- addMouseListener(this.mouseListener);
- addMouseMotionListener(this.mouseListener);
- }
-
- /**
- * Set a new document to be displayed
- * @param pdf the PDFFile to be displayed
- */
- public void setDocument(PDDocument pdf) {
- this.pdf = pdf;
- this.sigPagePos = null;
- if (pdf != null)
- {
- this.renderer = new PDFRenderer(pdf);
- this.numPages = pdf.getNumberOfPages();
- this.currentPageNo = -1;
- showPage(this.numPages);
- }
- else
- {
- this.renderer = null;
- this.currentPageNo = 0;
- this.numPages = 0;
- renderPageToImage();
- repaint();
- }
- }
-
- /**
- * 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
- */
- public void setSignaturePlaceholder(Image placeholder) {
- this.sigPlaceholder = placeholder;
- // TODO figure out why this is divided by 4 (factor ported from old code)
- this.sigPageWidth = placeholder.getWidth(null) / 4;
- this.sigPageHeight = placeholder.getHeight(null) / 4;
- renderPageToImage();
- if (this.sigPagePos != null)
- setSignaturePosition(this.sigPagePos.getX(), this.sigPagePos.getY());
- repaint();
- }
-
- /**
- * Set the color of the signature placeholder border
- * @param color new signature placeholder border color
- */
- public void setSignaturePlaceholderBorderColor(Color color) {
- this.sigPlaceholderBorderColor = color;
- }
-
- /**
- * Change the currently displayed page
- * @param page the number of the page to display
- */
- public void showPage(int page) {
- if (this.currentPageNo == page) return;
- this.currentPageNo = page;
- renderPageToImage();
- repaint();
- }
-
- /**
- * 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() {
- showPage(this.numPages + 1);
- }
-
- /**
- * Set the signature placeholder position
- * @param x the horizontal signature position
- * @param y the vertical signature position
- */
- public void setSignaturePosition(double x, double y)
- {
- this.sigPagePos = new Point2D.Double(
- clamp(x, 0, this.pageWidth - this.sigPageWidth),
- clamp(y, this.sigPageHeight, this.pageHeight)
- );
- repaint();
- }
-
- public void translateSignaturePagePosition(float dX, float dY) {
- setSignaturePosition(this.sigPagePos.getX() + dX, this.sigPagePos.getY() + dY);
- }
-
- /**
- * Stop the generation of any previous page, and draw the new one.
- *
- * @param page the PDFPage to draw.
- */
- private synchronized void renderPageToImage() {
- if (this.pdf == null)
- {
- this.currentImage = null;
- return;
- }
-
- boolean newPage = false;
- PDPage currentPage;
- // set up the new page
- if (this.currentPageNo > this.numPages)
- {
- // New last page - use old last page as template
- currentPage = this.pdf.getPage(this.numPages-1);
- newPage = true;
- }
- else
- currentPage = this.pdf.getPage(this.currentPageNo-1);
-
-
- if (currentPage == null) {
- // no page
- this.currentImage = null;
- return;
- }
-
- boolean isRotated = ((currentPage.getRotation()%180) == 90);
- PDRectangle actualPageSize = currentPage.getBBox();
- this.pageWidth = isRotated ? actualPageSize.getHeight() : actualPageSize.getWidth();
- this.pageHeight = isRotated ? actualPageSize.getWidth() : actualPageSize.getHeight();
- this.pageToImageScale = getToolkit().getScreenSize().height / this.pageHeight;
-
- // get the new image
- if (newPage)
- {
- int renderHeight = (int)(0.5 + this.scale(this.pageHeight, U.PAGE_REL, U.IMAGE, Dim.X));
- int renderWidth = (int)(0.5 + this.scale(this.pageWidth, U.PAGE_REL, U.IMAGE, Dim.Y));
- this.currentImage = new BufferedImage(renderWidth, renderHeight, BufferedImage.TYPE_INT_RGB);
- Graphics g = this.currentImage.getGraphics();
- g.setColor(Color.WHITE);
- g.fillRect(0, 0, renderWidth, renderHeight);
- }
- else
- {
- int whichPage = Math.min(this.currentPageNo, this.numPages);
-
- try {
- this.currentImage = renderer.renderImage(whichPage-1, this.pageToImageScale);
- } catch (IOException e) {
- log.error(String.format("Failed to render image for page %d of %d", whichPage, this.numPages), e);
- this.currentImage = null;
- }
- }
-
- if (this.sigPagePos == null)
- {
- setSignaturePosition(
- this.pageWidth * .5,
- this.pageHeight * .75
- );
- }
- }
-
- /**
- * Draw the image.
- */
- @Override
- public void paint(Graphics g) {
- Dimension renderPanelSize = getSize();
- g.setColor(getBackground());
- g.fillRect(0, 0, getWidth(), getHeight());
- if (this.currentImage == null) {
- g.setColor(Color.black);
- g.drawString(Messages.getString("common.working"), getWidth() / 2 - 30, getHeight() / 2);
- } else {
- this.imageToScreenScale = Math.min(
- renderPanelSize.getWidth() / this.currentImage.getWidth(null),
- renderPanelSize.getHeight() / this.currentImage.getHeight(null));
- // draw the image
- int actualRenderWidth = (int)(this.currentImage.getWidth(null) * this.imageToScreenScale);
- int actualRenderHeight = (int)(this.currentImage.getHeight(null) * this.imageToScreenScale);
-
- // draw it centered within the panel
- this.offX = (renderPanelSize.width - actualRenderWidth) / 2;
- this.offY = (renderPanelSize.height - actualRenderHeight) / 2;
-
- // draw document
- g.drawImage(this.currentImage, this.offX, this.offY, actualRenderWidth, actualRenderHeight, null);
-
-
- // draw signature
- int sigX = (int) this.scale(this.sigPagePos.getX(), U.PAGE_ABS, U.SCREEN_ABS, Dim.X);
- int sigY = (int) this.scale(this.sigPagePos.getY(), U.PAGE_ABS, U.SCREEN_ABS, Dim.Y);
- if (this.sigPlaceholder == null) {
- g.setColor(Color.red);
- g.drawRect(sigX, sigY, 100, 40);
- }
- else {
- int sigScreenWidth = (int)this.scale(this.sigPageWidth, U.PAGE_REL, U.SCREEN_REL, Dim.X);
- int sigScreenHeight = (int)this.scale(this.sigPageHeight, U.PAGE_REL, U.SCREEN_REL, Dim.Y);
- g.drawImage(this.sigPlaceholder, sigX, sigY, sigScreenWidth, sigScreenHeight, null);
- g.setColor(this.sigPlaceholderBorderColor);
- g.drawRect(sigX, sigY, sigScreenWidth-1, sigScreenHeight-1);
- }
- }
- }
-
- /**
- * Handles notification of the fact that some part of the image changed.
- * Repaints that portion.
- *
- * @return true if more updates are desired.
- */
- @Override
- public boolean imageUpdate(Image img, int infoflags, int x, int y,
- int width, int height) {
- if ((infoflags & (SOMEBITS | ALLBITS)) != 0) {
- repaint(x + this.offX, y + this.offY, width, height);
- }
- return ((infoflags & (ALLBITS | ERROR | ABORT)) == 0);
- }
-
- private MouseAdapter mouseListener = new MouseAdapter() {
-
- private boolean doDrag = false;
- private int dragXOffset = 0;
- private int dragYOffset = 0;
-
- private void updateSigPosDrag(MouseEvent evt) {
- SignaturePanel.this.setSignaturePosition(
- SignaturePanel.this.scale(evt.getX() - this.dragXOffset, U.SCREEN_ABS, U.PAGE_ABS, Dim.X),
- SignaturePanel.this.scale(evt.getY() - this.dragYOffset, U.SCREEN_ABS, U.PAGE_ABS, Dim.Y)
- );
- }
-
- /** Handles a mouseMoved event */
- @Override
- public void mouseMoved(MouseEvent evt) {
- try {
- boolean onSig = isOnSignature(evt);
- setCursor(onSig ? Cursors.HAND : Cursors.DEFAULT);
- } catch (NullPointerException e) {
- // do nothing
- }
- }
-
- /** Handles a mousePressed event */
- @Override
- public void mousePressed(MouseEvent evt) {
- if (evt.getButton() == MouseEvent.BUTTON1)
- {
- this.doDrag = true;
- if (isOnSignature(evt)) {
- /* offsets (in screen units) from top-left corner of signature to cursor on drag start */
- this.dragXOffset = (int)(evt.getX() - SignaturePanel.this.scale(SignaturePanel.this.sigPagePos.getX(), U.PAGE_ABS, U.SCREEN_ABS, Dim.X));
- this.dragYOffset = (int)(evt.getY() - SignaturePanel.this.scale(SignaturePanel.this.sigPagePos.getY(), U.PAGE_ABS, U.SCREEN_ABS, Dim.Y));
- } else {
- this.dragXOffset = 0;
- this.dragYOffset = 0;
- }
- updateSigPosDrag(evt);
- setCursor(Cursors.MOVE);
- }
- }
-
- /** Handles a mouseReleased event */
- @Override
- public void mouseReleased(MouseEvent evt) {
- this.doDrag = false;
- boolean onSig = isOnSignature(evt);
- setCursor(onSig ? Cursors.HAND : Cursors.DEFAULT);
- }
-
- /**
- * Handles a mouseDragged event.
- */
- @Override
- public void mouseDragged(MouseEvent evt) {
- if (this.doDrag)
- updateSigPosDrag(evt);
- }
- };
-
- /**
- * Sets the mouse cursor
- * @param cursor cursor to set
- */
- void setCursor(Cursors cursor)
- {
- if (this.currentCursor == cursor)
- return;
- this.currentCursor = cursor;
- Cursor cur = null;
- switch (cursor) {
- case DEFAULT:
- cur = this.defaultCursor;
- break;
- case HAND:
- cur = this.handCursor;
- break;
- case MOVE:
- cur = this.moveCursor;
- break;
- }
- this.getParent().setCursor(cur);
- }
-
- /**
- * Check whether given point is on signature placeholder
- * @param x x coordinate (screen)
- * @param y y coordinate (screen)
- * @return true if given point is on signature placeholder
- */
- private boolean isOnSignature(MouseEvent evt)
- {
- if (this.sigPagePos == null)
- return false;
-
- Rectangle2D sig = new Rectangle2D.Double(
- this.scale(this.sigPagePos.getX(), U.PAGE_ABS, U.SCREEN_ABS, Dim.X),
- this.scale(this.sigPagePos.getY(), U.PAGE_ABS, U.SCREEN_ABS, Dim.Y),
- this.scale(this.sigPageWidth, U.PAGE_REL, U.SCREEN_REL, Dim.X),
- this.scale(this.sigPageHeight, U.PAGE_REL, U.SCREEN_REL, Dim.Y)
- );
- return sig.contains(evt.getX(), evt.getY());
- }
-
- /**
- * Clamp x to be within [min-max]
- * @param x int to clamp
- * @param min minimum value
- * @param max maximum value
- * @return clamped x
- */
- private static double clamp(double x, double min, double max)
- {
- if (x < min)
- x = min;
- else if (x > max)
- x = max;
- return x;
- }
-}
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
deleted file mode 100644
index 085f7b71..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-// Imports
-import org.eclipse.swt.widgets.Composite;
-
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- * Composite interface for workflow state gui implementations
- */
-public abstract class StateComposite extends Composite {
-
- /**
- * Current State
- */
- protected State state;
-
- /**
- * The base class for state composites
- *
- * @param parent The parent Composite
- * @param style The Composite style
- * @param state The current State
- */
- public StateComposite(Composite parent, int style, State state) {
- super(parent, style);
- this.state = state;
- }
-
- public final void doLayout() { this.layout(true,true); this.onDisplay(); }
-
- /**
- * Reloads the localizeable resources
- */
- public abstract void reloadResources();
-
- /**
- * Called when the control is .display()ed
- */
- public void onDisplay() {}
-
- // allow subclassing of SWT components
- @Override protected final void checkSubclass() {}
-}
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
deleted file mode 100644
index dc18155a..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.ProgressBar;
-
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- *
- */
-public class WaitingComposite extends StateComposite {
- private Label lbl_description;
-
- /**
- * Create the composite.
- * @param parent
- * @param style
- * @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);
- fd_lbl_description.left = new FormAttachment(0, +10);
- fd_lbl_description.right = new FormAttachment(100, -10);
- this.lbl_description.setLayoutData(fd_lbl_description);
- this.lbl_description.setAlignment(SWT.CENTER);
- SWTUtils.setLocalizedText(lbl_description, "waiting.message");
-
- ProgressBar progressBar = new ProgressBar(this, SWT.HORIZONTAL | SWT.INDETERMINATE);
- FormData fd_progressBar = new FormData();
- fd_progressBar.top = new FormAttachment(50, +10);
- fd_progressBar.bottom = new FormAttachment(50, +40);
- fd_progressBar.left = new FormAttachment(50, -100);
- fd_progressBar.right = new FormAttachment(50, +100);
- progressBar.setLayoutData(fd_progressBar);
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lbl_description, "waiting.message");
- }
-}
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
deleted file mode 100644
index 14f7a015..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package at.asit.pdfover.gui.composites.configuration;
-
-import java.awt.Desktop;
-import java.io.File;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.utils.UpdateCheckManager;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.gui.workflow.states.State;
-
-public class AboutComposite extends ConfigurationCompositeBase {
- static final Logger log = LoggerFactory.getLogger(AboutComposite.class);
- private Link lnkAbout;
- private Link lnkDataProtection;
- private Label lblDataProtection;
- private Link lnkUpdateCheckStatus;
- private Button btnUpdateCheck;
- private Button btnOpenLogDirectory;
- private UpdateCheckManager.Status latestUpdateStatus;
- /**
- * @param parent
- * @param style
- */
- public AboutComposite(Composite parent, int style, State state, ConfigurationDataInMemory container) {
- super(parent, style, state, container);
-
- setLayout(new FormLayout());
-
- this.lnkAbout = new Link(this, SWT.WRAP);
- SWTUtils.anchor(lnkAbout).top(0,5).right(100,-5).left(0,5);
- SWTUtils.setFontHeight(lnkAbout, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.addSelectionListener(lnkAbout, (e) -> { SWTUtils.openURL(Messages.getString("config.LicenseURL")); });
-
- this.lblDataProtection = new Label(this, SWT.WRAP);
- SWTUtils.anchor(lblDataProtection).top(lnkAbout, 15).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(lblDataProtection, Constants.TEXT_SIZE_BIG);
- SWTUtils.setFontStyle(lblDataProtection, SWT.BOLD);
-
- this.lnkDataProtection = new Link(this, SWT.WRAP);
- SWTUtils.anchor(lnkDataProtection).top(lblDataProtection,10).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(lnkDataProtection, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.addSelectionListener(lnkDataProtection, (e) -> { SWTUtils.openURL(Messages.getString("config.DataProtectionURL")); });
-
- this.lnkUpdateCheckStatus = new Link(this, SWT.NONE);
- SWTUtils.anchor(lnkUpdateCheckStatus).bottom(100, -5).left(0,5);
- SWTUtils.setFontHeight(lnkUpdateCheckStatus, Constants.TEXT_SIZE_BUTTON);
- UpdateCheckManager.registerStatusCallback((s) -> { if (isDisposed()) return; latestUpdateStatus = s; getDisplay().asyncExec(() -> { RefreshUpdateStatusText(); }); });
- SWTUtils.addSelectionListener(lnkUpdateCheckStatus, (e) -> {
- if (latestUpdateStatus == UpdateCheckManager.Status.OUTDATED)
- Program.launch(Constants.UPDATE_URL);
- else
- UpdateCheckManager.checkNow(getShell());
- });
-
- this.btnUpdateCheck = new Button(this, SWT.CHECK);
- SWTUtils.anchor(btnUpdateCheck).bottom(lnkUpdateCheckStatus,-5).left(0,5);
- SWTUtils.setFontHeight(btnUpdateCheck, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addSelectionListener(btnUpdateCheck, (e) -> {
- boolean enabled = btnUpdateCheck.getSelection();
- this.configurationContainer.updateCheck = enabled;
- if (enabled)
- UpdateCheckManager.checkNow(getShell());
- });
-
- this.btnOpenLogDirectory = new Button(this, SWT.NONE);
- SWTUtils.anchor(btnOpenLogDirectory).bottom(100, -5).right(100, -5);
- SWTUtils.setFontHeight(btnOpenLogDirectory, Constants.TEXT_SIZE_BUTTON);
-
- SWTUtils.reanchor(lnkDataProtection).bottom(btnUpdateCheck,-5);
-
- SWTUtils.addSelectionListener(btnOpenLogDirectory, (e) -> {
- try {
- if (Desktop.isDesktopSupported())
- Desktop.getDesktop().open(new File(Constants.CONFIG_DIRECTORY + File.separator + "logs"));
- } catch (Exception ex) {
- log.warn("Failed to open log directory: ", ex);
- }
- });
-
- // Load localized strings
- reloadResources();
- }
-
- private void RefreshUpdateStatusText() {
- SWTUtils.setLocalizedText(lnkUpdateCheckStatus, "config.UpdateStatus." + latestUpdateStatus.name());
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lnkAbout, "config.AboutText");
- SWTUtils.setLocalizedText(lblDataProtection, "config.DataProtection");
- SWTUtils.setLocalizedText(lnkDataProtection, "config.DataProtectionStatement");
- SWTUtils.setLocalizedText(btnUpdateCheck, "advanced_config.UpdateCheck");
- SWTUtils.setLocalizedToolTipText(btnUpdateCheck, "advanced_config.UpdateCheck_ToolTip");
- SWTUtils.setLocalizedText(btnOpenLogDirectory, "config.ShowLogDirectory");
- RefreshUpdateStatusText();
- }
-
- @Override
- public void initConfiguration(ConfigurationManager provider) {
- this.configurationContainer.updateCheck = provider.getUpdateCheck();
- }
-
- @Override
- public void loadConfiguration() {
- btnUpdateCheck.setSelection(this.configurationContainer.updateCheck);
- }
-
- @Override
- public void storeConfiguration(ConfigurationManager store) {
- store.setUpdateCheckPersistent(this.configurationContainer.updateCheck);
- }
-
- @Override
- public void validateSettings(int resumeFrom) throws Exception {}
-} \ No newline at end of file
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
deleted file mode 100644
index df1a809b..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java
+++ /dev/null
@@ -1,709 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites.configuration;
-
-// Imports
-import java.io.File;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Locale;
-import java.util.stream.Collectors;
-
-import javax.annotation.Nonnull;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.BKUs;
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.commons.Profile;
-import at.asit.pdfover.gui.composites.ConfigurationComposite;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.controls.ErrorMarker;
-import at.asit.pdfover.gui.exceptions.InvalidPortException;
-import at.asit.pdfover.gui.exceptions.OutputfolderDoesntExistException;
-import at.asit.pdfover.gui.exceptions.OutputfolderNotADirectoryException;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- * Composite for advanced configuration
- *
- * Contains the simple configuration composite
- */
-public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(AdvancedConfigurationComposite.class);
-
- private ConfigurationComposite configurationComposite;
-
- private Group grpSignatur;
- private Group grpPlaceholder;
- Button btnAutomatischePositionierung;
- Button btnPdfACompat;
- Button btnPlatzhalterVerwenden;
- Button btnSignatureFieldsUsage;
- Button btnEnablePlaceholderUsage;
-
- private Group grpBkuAuswahl;
- Combo cmbBKUAuswahl;
- List<String> bkuStrings;
- Button btnKeystoreEnabled;
-
- private final Group grpSpeicherort;
- private final Label lblDefaultOutputFolder;
- Text txtOutputFolder;
- private final Button btnBrowse;
- private final Label lblSaveFilePostFix;
- private final Text txtSaveFilePostFix;
-
- private final Group grpLocaleAuswahl;
- Combo cmbLocaleAuswahl;
-
- private Group grpProxy;
- private Label lblProxyHost;
- private Text txtProxyHost;
- private ErrorMarker proxyHostErrorMarker;
- private Label lblProxyPort;
- private Text txtProxyPort;
- private ErrorMarker txtProxyPortErrorMarker;
- FormData fd_txtProxyPort;
- FormData fd_txtProxyPortErrorMarker;
-
- /**
- * @param parent
- * @param style
- * @param state
- * @param container
- * @param config
- */
- public AdvancedConfigurationComposite(Composite parent, int style, State state, ConfigurationDataInMemory container,
- ConfigurationComposite config) {
- super(parent, style, state, container);
- this.configurationComposite = config;
- setLayout(new FormLayout());
-
- FormLayout STANDARD_LAYOUT = new FormLayout();
- STANDARD_LAYOUT.marginHeight = 10;
- STANDARD_LAYOUT.marginWidth = 5;
-
- this.grpLocaleAuswahl = new Group(this, SWT.NONE);
- this.grpLocaleAuswahl.setLayout(STANDARD_LAYOUT);
- SWTUtils.anchor(grpLocaleAuswahl).top(0, 5).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(grpLocaleAuswahl, Constants.TEXT_SIZE_NORMAL);
-
- this.grpSignatur = new Group(this, SWT.NONE);
- this.grpSignatur.setLayout(STANDARD_LAYOUT);
- SWTUtils.anchor(grpSignatur).top(grpLocaleAuswahl,5).right(100,-5).left(0,5);
- SWTUtils.setFontHeight(grpSignatur, Constants.TEXT_SIZE_NORMAL);
-
- this.grpPlaceholder = new Group(this, SWT.NONE);
- this.grpPlaceholder.setLayout(STANDARD_LAYOUT);
- SWTUtils.anchor(grpPlaceholder).top(grpSignatur, 5).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(grpPlaceholder, Constants.TEXT_SIZE_NORMAL);
-
- this.grpBkuAuswahl = new Group(this, SWT.NONE);
- this.grpBkuAuswahl.setLayout(STANDARD_LAYOUT);
- SWTUtils.anchor(grpBkuAuswahl).top(grpPlaceholder, 5).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(grpBkuAuswahl, Constants.TEXT_SIZE_NORMAL);
-
- this.grpSpeicherort = new Group(this, SWT.NONE);
- grpSpeicherort.setLayout(new GridLayout(3, false));
- SWTUtils.anchor(grpSpeicherort).left(0,5).top(grpBkuAuswahl, 5).right(100,-5);
- SWTUtils.setFontHeight(grpSpeicherort, Constants.TEXT_SIZE_NORMAL);
-
- this.grpProxy = new Group(this, SWT.NONE);
- SWTUtils.anchor(grpProxy).right(100,-5).top(grpSpeicherort, 5).left(0,5);
- this.grpProxy.setLayout(new GridLayout(2, false));
- SWTUtils.setFontHeight(grpProxy, Constants.TEXT_SIZE_NORMAL);
-
- this.btnAutomatischePositionierung = new Button(this.grpSignatur, SWT.CHECK);
- SWTUtils.anchor(btnAutomatischePositionierung).right(100,-5).top(0).left(0,5);
- SWTUtils.setFontHeight(btnAutomatischePositionierung, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addSelectionListener(btnAutomatischePositionierung, e -> { performPositionSelection(btnAutomatischePositionierung.getSelection()); });
-
- this.btnPdfACompat = new Button(this.grpSignatur, SWT.CHECK);
- SWTUtils.anchor(btnPdfACompat).right(100,-5).top(btnAutomatischePositionierung, 5).left(0,5);
- SWTUtils.setFontHeight(btnPdfACompat, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addSelectionListener(btnPdfACompat, e -> { performPdfACompatSelection(btnPdfACompat.getSelection()); });
-
- this.btnEnablePlaceholderUsage = new Button(this.grpPlaceholder, SWT.CHECK);
- SWTUtils.anchor(btnEnablePlaceholderUsage).top(0,5).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(btnEnablePlaceholderUsage, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addSelectionListener(btnEnablePlaceholderUsage, e -> { performEnableUsePlaceholder(btnEnablePlaceholderUsage.getSelection()); });
-
- this.btnPlatzhalterVerwenden = new Button(this.grpPlaceholder, SWT.RADIO);
- SWTUtils.anchor(btnPlatzhalterVerwenden).right(100,-5).top(btnEnablePlaceholderUsage,5).left(0,5);
- SWTUtils.setFontHeight(btnPlatzhalterVerwenden, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addSelectionListener(btnPlatzhalterVerwenden, e -> { performUseMarkerSelection(btnPlatzhalterVerwenden.getSelection()); });
-
- this.btnSignatureFieldsUsage = new Button(this.grpPlaceholder, SWT.RADIO);
- SWTUtils.anchor(btnSignatureFieldsUsage).right(100,-5).top(btnPlatzhalterVerwenden, 5).left(0,5);
- SWTUtils.setFontHeight(btnSignatureFieldsUsage, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addSelectionListener(btnSignatureFieldsUsage, e -> { performUseSignatureFieldsSelection(btnSignatureFieldsUsage.getSelection()); });
-
- this.cmbBKUAuswahl = new Combo(this.grpBkuAuswahl, SWT.READ_ONLY);
- SWTUtils.anchor(cmbBKUAuswahl).right(100,-5).top(0).left(0,5);
- SWTUtils.setFontHeight(cmbBKUAuswahl, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.scrollPassthrough(cmbBKUAuswahl);
-
- this.bkuStrings = Arrays.stream(BKUs.values()).map(s -> Messages.getString("BKU."+s)).collect(Collectors.toList());
- this.cmbBKUAuswahl.setItems(bkuStrings.toArray(new String[0]));
- SWTUtils.addSelectionListener(cmbBKUAuswahl, e -> {
- int selectionIndex = getBKUElementIndex(configurationContainer.defaultBKU);
- if (cmbBKUAuswahl.getSelectionIndex() != selectionIndex) {
- selectionIndex = cmbBKUAuswahl.getSelectionIndex();
- performBKUSelectionChanged(cmbBKUAuswahl.getItem(selectionIndex));
- }
- });
-
- this.btnKeystoreEnabled = new Button(this.grpBkuAuswahl, SWT.CHECK);
- SWTUtils.anchor(btnKeystoreEnabled).right(100,-5).top(cmbBKUAuswahl,5).left(0,5);
- SWTUtils.setFontHeight(btnKeystoreEnabled, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addSelectionListener(btnKeystoreEnabled, e -> { performKeystoreEnabledSelection(btnKeystoreEnabled.getSelection()); });
-
- this.lblDefaultOutputFolder = new Label(this.grpSpeicherort, SWT.NONE);
- SWTUtils.setFontHeight(lblDefaultOutputFolder, Constants.TEXT_SIZE_NORMAL);
-
- this.txtOutputFolder = new Text(this.grpSpeicherort, SWT.BORDER);
- txtOutputFolder.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
- SWTUtils.setFontHeight(txtOutputFolder, Constants.TEXT_SIZE_NORMAL);
-
- this.txtOutputFolder.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- performOutputFolderChanged(txtOutputFolder.getText());
- }
- });
-
- this.btnBrowse = new Button(this.grpSpeicherort, SWT.NONE);
- btnBrowse.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- SWTUtils.setFontHeight(btnBrowse, Constants.TEXT_SIZE_BUTTON);
-
- SWTUtils.addSelectionListener(btnBrowse, e -> {
- DirectoryDialog dlg = new DirectoryDialog(AdvancedConfigurationComposite.this.getShell());
-
- // Set the initial filter path according
- // to anything they've selected or typed in
- dlg.setFilterPath(AdvancedConfigurationComposite.this.txtOutputFolder.getText());
-
- // Change the title bar text
- SWTUtils.setLocalizedText(dlg, "advanced_config.OutputFolder.Dialog_Title");
-
- // Customizable message displayed in the dialog
- dlg.setMessage(Messages.getString("advanced_config.OutputFolder.Dialog"));
-
- // Calling open() will open and run the dialog.
- // It will return the selected directory, or
- // null if user cancels
- String dir = dlg.open();
- if (dir != null) {
- // Set the text box to the new selection
- performOutputFolderChanged(dir);
- }
- });
-
- this.lblSaveFilePostFix = new Label(this.grpSpeicherort, SWT.NONE);
- SWTUtils.setLocalizedText(lblSaveFilePostFix, "AdvancedConfigurationComposite.lblSaveFilePostFix.text");
- SWTUtils.setFontHeight(lblSaveFilePostFix, Constants.TEXT_SIZE_NORMAL);
-
- this.txtSaveFilePostFix = new Text(this.grpSpeicherort, SWT.BORDER);
- txtSaveFilePostFix.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
- SWTUtils.setFontHeight(txtSaveFilePostFix, Constants.TEXT_SIZE_NORMAL);
-
- this.txtSaveFilePostFix.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- if (txtSaveFilePostFix.getText().trim().isEmpty())
- txtSaveFilePostFix.setText(Constants.DEFAULT_POSTFIX);
- performPostFixChanged(Constants.ISNOTNULL(txtSaveFilePostFix.getText()));
- }
- });
-
- this.cmbLocaleAuswahl = new Combo(this.grpLocaleAuswahl, SWT.READ_ONLY);
- SWTUtils.anchor(cmbLocaleAuswahl).right(100,-5).top(0).left(0,5);
- SWTUtils.setFontHeight(cmbLocaleAuswahl, Constants.TEXT_SIZE_NORMAL);;
- this.cmbLocaleAuswahl.setItems(Arrays.stream(Constants.SUPPORTED_LOCALES).map(l -> l.getDisplayLanguage()).toArray(String[]::new));
- SWTUtils.scrollPassthrough(cmbLocaleAuswahl);
-
- SWTUtils.addSelectionListener(cmbLocaleAuswahl, e -> {
- Locale currentLocale = configurationContainer.interfaceLocale;
- Locale selectedLocale = Constants.SUPPORTED_LOCALES[cmbLocaleAuswahl.getSelectionIndex()];
- if (!currentLocale.equals(selectedLocale)) {
- performLocaleSelectionChanged(selectedLocale);
- }
- });
-
- this.lblProxyHost = new Label(this.grpProxy, SWT.NONE);
- do { /* grid positioning */
- GridData gd_lblProxyHost = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
- gd_lblProxyHost.widthHint = 66;
- this.lblProxyHost.setLayoutData(gd_lblProxyHost);
- this.lblProxyHost.setBounds(0, 0, 57, 15);
- } while (false);
- SWTUtils.setFontHeight(lblProxyHost, Constants.TEXT_SIZE_NORMAL);
-
- 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);
- SWTUtils.anchor(txtProxyHost).right(100,-42).top(0).left(0,5);
- SWTUtils.setFontHeight(txtProxyHost, Constants.TEXT_SIZE_NORMAL);
-
- this.proxyHostErrorMarker = new ErrorMarker(compProxyHostContainer, SWT.NONE, "");
- SWTUtils.anchor(proxyHostErrorMarker).left(100,-32).right(100).top(0).bottom(0,32);
- this.proxyHostErrorMarker.setVisible(false);
-
- this.txtProxyHost.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- processProxyHostChanged();
- }
- });
-
- this.txtProxyHost.addTraverseListener(e -> {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- processProxyHostChanged();
- }
- });
-
- this.lblProxyPort = new Label(this.grpProxy, SWT.NONE);
- this.lblProxyPort.setBounds(0, 0, 57, 15);
- SWTUtils.setFontHeight(lblProxyPort, Constants.TEXT_SIZE_NORMAL);
-
- Composite compProxyPortContainer = new Composite(this.grpProxy, SWT.NONE);
- compProxyPortContainer.setLayout(new FormLayout());
- compProxyPortContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
-
- this.txtProxyPort = new Text(compProxyPortContainer, SWT.BORDER);
- SWTUtils.anchor(txtProxyPort).top(0,0).left(0,5).right(100,-42);
- SWTUtils.setFontHeight(txtProxyPort, Constants.TEXT_SIZE_NORMAL);
-
- this.txtProxyPort.addTraverseListener(e -> {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- processProxyPortChanged();
- }
- });
-
- this.txtProxyPortErrorMarker = new ErrorMarker(compProxyPortContainer, SWT.NONE, "");
- SWTUtils.anchor(txtProxyPortErrorMarker).left(100,-32).right(100).top(0).bottom(0,32);
- this.txtProxyPortErrorMarker.setVisible(false);
-
- this.txtProxyPort.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- processProxyPortChanged();
- }
- });
-
- reloadResources();
- }
-
- private void performPostFixChanged(@Nonnull String postfix) {
-
- log.debug("Save file postfix changed to : {}", postfix);
- this.configurationContainer.saveFilePostFix = postfix;
- AdvancedConfigurationComposite.this.txtSaveFilePostFix.setText(postfix);
- }
-
- void performOutputFolderChanged(String foldername) {
- log.debug("Selected Output folder: {}", foldername);
- this.configurationContainer.outputFolder = foldername;
- AdvancedConfigurationComposite.this.txtOutputFolder.setText(foldername);
- }
-
- int getBKUElementIndex(BKUs bku) {
- 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);
- return 0;
- }
- return i;
- }
-
- void performBKUSelectionChanged(@Nonnull BKUs selected) {
- log.debug("Selected BKU: {}", selected);
- this.configurationContainer.defaultBKU = selected;
- this.cmbBKUAuswahl.select(this.getBKUElementIndex(selected));
- }
-
- void performBKUSelectionChanged(String selected) {
- try {
- BKUs bkuvalue = resolveBKU(selected);
- this.performBKUSelectionChanged(bkuvalue);
- } catch (Exception ex) {
- log.error("Failed to parse BKU value: {} {}", selected, ex);
- ErrorDialog dialog = new ErrorDialog(getShell(), Messages.getString("error.InvalidBKU"), BUTTONS.OK);
- dialog.open();
- }
- }
-
- @Nonnull BKUs resolveBKU(String localizedBKU) {
- int blen = BKUs.values().length;
-
- for (int i = 0; i < blen; i++) {
- String lookup = "BKU." + BKUs.values()[i].toString();
- if (Messages.getString(lookup).equals(localizedBKU)) {
- return Constants.ISNOTNULL(BKUs.values()[i]);
- }
- }
-
- return BKUs.NONE;
- }
-
- 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);
- return i;
- }
- }
-
- log.warn("NO Locale match for {}", locale);
- return 0;
- }
-
- void performLocaleSelectionChanged(Locale selected) {
- log.debug("Selected Locale: {}", selected);
- this.configurationContainer.interfaceLocale = selected;
- this.cmbLocaleAuswahl.select(this.getLocaleElementIndex(selected));
- }
-
- void performPositionSelection(boolean automatic) {
- log.debug("Selected Position: {}", automatic);
- this.configurationContainer.autoPositionSignature = automatic;
- this.btnAutomatischePositionierung.setSelection(automatic);
- }
-
- void performUseMarkerSelection(boolean useMarker) {
- this.configurationContainer.setUseMarker(useMarker);
- this.btnPlatzhalterVerwenden.setSelection(useMarker);
- }
-
- void performUseSignatureFieldsSelection(boolean useFields) {
- this.configurationContainer.setUseSignatureFields(useFields);
- this.btnSignatureFieldsUsage.setSelection(useFields);
- }
-
- void performEnableUsePlaceholder(boolean enable) {
- this.btnPlatzhalterVerwenden.setEnabled(enable);
- this.btnSignatureFieldsUsage.setEnabled(enable);
- this.configurationContainer.enabledPlaceholderUsage = enable;
- this.btnEnablePlaceholderUsage.setSelection(enable);
- }
-
- void performPdfACompatSelection(boolean compat) {
- this.configurationContainer.signaturePDFACompat = compat;
- this.btnPdfACompat.setSelection(compat);
- }
-
- void performKeystoreEnabledSelection(boolean enabled) {
- this.configurationContainer.keystoreEnabled = enabled;
- this.btnKeystoreEnabled.setSelection(enabled);
- this.configurationComposite.keystoreEnabled(enabled);
-
- int ksIndex = getBKUElementIndex(BKUs.KS);
- String ksText = this.bkuStrings.get(ksIndex);
- if (enabled) {
- if (!this.cmbBKUAuswahl.getItem(ksIndex).equals(ksText))
- this.cmbBKUAuswahl.add(ksText, ksIndex);
- } else {
- int i = this.cmbBKUAuswahl.indexOf(ksText);
- if (i != -1) {
- if (this.cmbBKUAuswahl.getSelectionIndex() == i)
- performBKUSelectionChanged(BKUs.NONE);
- this.cmbBKUAuswahl.remove(i);
- }
- }
- }
-
- void processProxyHostChanged() {
- try {
- this.proxyHostErrorMarker.setVisible(false);
- plainProxyHostSetter();
- } catch (Exception ex) {
- this.proxyHostErrorMarker.setVisible(true);
- this.proxyHostErrorMarker.setToolTipText(ex.getMessage());
- log.error("processProxyHost: ", ex);
- }
- }
-
- /**
- *
- */
- private void plainProxyHostSetter() {
- String host = this.txtProxyHost.getText();
- this.configurationContainer.proxyHost = host;
- }
-
- void processProxyPortChanged() {
- try {
- this.txtProxyPortErrorMarker.setVisible(false);
- plainProxyPortSetter();
- } catch (Exception ex) {
- this.txtProxyPortErrorMarker.setVisible(true);
- this.txtProxyPortErrorMarker.setToolTipText(ex.getMessage());
- log.error("processProxyPort: ", ex);
- }
- }
-
- /**
- * @throws InvalidPortException
- */
- private void plainProxyPortSetter() throws InvalidPortException {
- String portString = this.txtProxyPort.getText();
- int port = -1;
- if (portString == null || portString.trim().isEmpty()) {
- port = -1;
- } else {
- try {
- port = Integer.parseInt(portString);
- } catch (NumberFormatException e) {
- throw new InvalidPortException(portString, e);
- }
- }
- this.configurationContainer.setProxyPort(port);
- }
-
- @Override
- public void initConfiguration(ConfigurationManager provider) {
- this.configurationContainer.autoPositionSignature = provider.getAutoPositionSignaturePersistent();
- this.configurationContainer.setUseMarker(provider.getUseMarker());
- this.configurationContainer.setUseSignatureFields(provider.getUseSignatureFields());
- this.configurationContainer.enabledPlaceholderUsage = provider.getEnablePlaceholderUsage();
- this.configurationContainer.signaturePDFACompat = provider.getSignaturePdfACompat();
-
- this.configurationContainer.defaultBKU = provider.getDefaultBKUPersistent();
- this.configurationContainer.keystoreEnabled = provider.getKeyStoreEnabledPersistent();
-
- this.configurationContainer.outputFolder = provider.getDefaultOutputFolderPersistent();
- this.configurationContainer.saveFilePostFix = provider.getSaveFilePostFix();
-
- this.configurationContainer.interfaceLocale = provider.getInterfaceLocale();
-
- this.configurationContainer.proxyHost = provider.getProxyHostPersistent();
- try {
- this.configurationContainer.setProxyPort(provider.getProxyPortPersistent());
- } catch (InvalidPortException e) {
- log.error("Failed to set proxy port!", e);
- }
- this.configurationContainer.proxyUser = provider.getProxyUserPersistent();
- this.configurationContainer.proxyPass = provider.getProxyPassPersistent();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.composites.BaseConfigurationComposite#loadConfiguration()
- */
- @Override
- public void loadConfiguration() {
- // load advanced settings
- performBKUSelectionChanged(this.configurationContainer.defaultBKU);
- String outputFolder = this.configurationContainer.outputFolder;
- if (outputFolder != null) {
- performOutputFolderChanged(outputFolder);
- }
- performPostFixChanged(this.configurationContainer.saveFilePostFix);
- performPositionSelection(this.configurationContainer.autoPositionSignature);
- performUseMarkerSelection(this.configurationContainer.getUseMarker());
- performUseSignatureFieldsSelection(this.configurationContainer.getUseSignatureFields());
- performEnableUsePlaceholder(this.configurationContainer.enabledPlaceholderUsage);
- performLocaleSelectionChanged(this.configurationContainer.interfaceLocale);
- performPdfACompatSelection(this.configurationContainer.signaturePDFACompat);
- performKeystoreEnabledSelection(this.configurationContainer.keystoreEnabled);
-
- int port = this.configurationContainer.getProxyPort();
- if (port > 0) {
- this.txtProxyPort.setText(Integer.toString(port));
- }
-
- String host = this.configurationContainer.proxyHost;
- if (host != null) {
- this.txtProxyHost.setText(host);
- }
-
- }
-
- @Override
- public void storeConfiguration(ConfigurationManager store) {
- store.setAutoPositionSignaturePersistent(this.configurationContainer.autoPositionSignature);
- store.setUseMarkerPersistent(this.configurationContainer.getUseMarker());
- store.setUseSignatureFieldsPersistent(this.configurationContainer.getUseSignatureFields());
- store.setEnablePlaceholderUsagePersistent(this.configurationContainer.enabledPlaceholderUsage);
- store.setSignaturePdfACompatPersistent(this.configurationContainer.signaturePDFACompat);
-
- store.setDefaultBKUPersistent(this.configurationContainer.defaultBKU);
- store.setKeyStoreEnabledPersistent(this.configurationContainer.keystoreEnabled);
-
- store.setDefaultOutputFolderPersistent(this.configurationContainer.outputFolder);
- store.setSaveFilePostFixPersistent(this.configurationContainer.saveFilePostFix);
- store.setInterfaceLocalePersistent(this.configurationContainer.interfaceLocale);
-
- String hostOld = store.getProxyHostPersistent();
- String hostNew = this.configurationContainer.proxyHost;
- 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");
- System.clearProperty("https.proxyHost");
- }
- store.setProxyHostPersistent(hostNew);
-
- int portOld = store.getProxyPortPersistent();
- int portNew = this.configurationContainer.getProxyPort();
- if (portOld != -1 && portNew == -1) {
- // cf. above
- System.clearProperty("http.proxyPort");
- System.clearProperty("https.proxyPort");
- }
- store.setProxyPortPersistent(portNew);
-
- String userOld = store.getProxyUserPersistent();
- String userNew = this.configurationContainer.proxyUser;
- if (userOld != null && !userOld.isEmpty() && (userNew == null || userNew.isEmpty())) {
- // cf. above
- System.clearProperty("http.proxyUser");
- System.clearProperty("https.proxyUser");
- }
- store.setProxyUserPersistent(userNew);
-
- String passOld = store.getProxyPassPersistent();
- String passNew = this.configurationContainer.proxyPass;
- if (passOld != null && passNew == null) {
- // cf. above
- System.clearProperty("http.proxyPassword");
- System.clearProperty("https.proxyPassword");
- }
- store.setProxyPassPersistent(passNew);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings()
- */
- @Override
- public void validateSettings(int resumeIndex) throws Exception {
-
- String foldername = this.configurationContainer.outputFolder;
-
- switch (resumeIndex) {
- case 0:
- if (foldername != null && !foldername.isEmpty()) {
- File outputFolder = new File(foldername);
- if (!outputFolder.exists()) {
- throw new OutputfolderDoesntExistException(outputFolder, 1);
- }
- if (!outputFolder.isDirectory()) {
- throw new OutputfolderNotADirectoryException(outputFolder);
- }
- }
- // Fall through
- case 1:
- this.plainProxyHostSetter();
- // Fall through
- case 2:
- this.plainProxyPortSetter();
- // Fall through
- // case 3:
- // this.plainProxyUserSetter();
- // // Fall through
- // case 4:
- // this.plainProxyPassSetter();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(grpSignatur, "advanced_config.Signature_Title");
- SWTUtils.setLocalizedText(btnAutomatischePositionierung, "advanced_config.AutoPosition");
- SWTUtils.setLocalizedToolTipText(btnAutomatischePositionierung, "advanced_config.AutoPosition_ToolTip");
- SWTUtils.setLocalizedText(grpPlaceholder, "advanced_config.Placeholder_Title");
- SWTUtils.setLocalizedText(btnPlatzhalterVerwenden, "advanced_config.UseMarker");
- SWTUtils.setLocalizedToolTipText(btnPlatzhalterVerwenden, "advanced_config.UseMarker_ToolTip");
- SWTUtils.setLocalizedText(btnSignatureFieldsUsage, "advanced_config.UseSignatureFields");
- SWTUtils.setLocalizedToolTipText(btnSignatureFieldsUsage, "advanced_config.UseSignatureFields_ToolTip");
- SWTUtils.setLocalizedText(btnEnablePlaceholderUsage, "advanced_config.Placeholder_Enabled");
- SWTUtils.setLocalizedText(btnPdfACompat, "advanced_config.PdfACompat");
- SWTUtils.setLocalizedToolTipText(btnPdfACompat, "advanced_config.PdfACompat_ToolTip");
-
- SWTUtils.setLocalizedText(grpBkuAuswahl, "advanced_config.BKUSelection_Title");
- SWTUtils.setLocalizedToolTipText(cmbBKUAuswahl, "advanced_config.BKUSelection_ToolTip");
- SWTUtils.setLocalizedText(btnKeystoreEnabled, "advanced_config.KeystoreEnabled");
- SWTUtils.setLocalizedToolTipText(btnKeystoreEnabled, "advanced_config.KeystoreEnabled_ToolTip");
-
- SWTUtils.setLocalizedText(grpSpeicherort, "advanced_config.OutputFolder_Title");
- SWTUtils.setLocalizedText(lblDefaultOutputFolder, "advanced_config.OutputFolder");
- SWTUtils.setLocalizedToolTipText(txtOutputFolder, "advanced_config.OutputFolder_ToolTip");
- SWTUtils.setLocalizedText(btnBrowse, "common.browse");
-
- SWTUtils.setLocalizedText(grpLocaleAuswahl, "advanced_config.LocaleSelection_Title");
- SWTUtils.setLocalizedToolTipText(cmbLocaleAuswahl, "advanced_config.LocaleSelection_ToolTip");
-
- SWTUtils.setLocalizedText(grpProxy, "advanced_config.Proxy_Title");
- SWTUtils.setLocalizedText(lblProxyHost, "advanced_config.ProxyHost");
- SWTUtils.setLocalizedToolTipText(txtProxyHost, "advanced_config.ProxyHost_ToolTip");
- this.txtProxyHost.setMessage(Messages.getString("advanced_config.ProxyHost_Template"));
- SWTUtils.setLocalizedText(lblProxyPort, "advanced_config.ProxyPort");
- SWTUtils.setLocalizedToolTipText(txtProxyPort, "advanced_config.ProxyPort_ToolTip");
- this.txtProxyPort.setMessage(Messages.getString("advanced_config.ProxyPort_Template"));
- // StateComposite.setLocalizedText(lblProxyUser, "advanced_config.ProxyUser");
-
- // this.txtProxyUser.setToolTipText(Messages
- // .getString("advanced_config.ProxyUser_ToolTip"));
- // this.txtProxyUser.setMessage(Messages
- // .getString("advanced_config.ProxyUser_Template"));
- // StateComposite.setLocalizedText(lblProxyPass, "advanced_config.ProxyPass");
-
- // this.txtProxyPass.setToolTipText(Messages
- // .getString("advanced_config.ProxyPass_ToolTip"));
- // this.txtProxyPass.setMessage(Messages
- // .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
deleted file mode 100644
index 54207292..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites.configuration;
-
-
-import org.eclipse.swt.widgets.Composite;
-
-import at.asit.pdfover.gui.composites.StateComposite;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- * Base class for configuration composites
- */
-public abstract class ConfigurationCompositeBase extends StateComposite {
-
- /**
- * the configuration container
- */
- protected ConfigurationDataInMemory configurationContainer;
-
- /**
- * @param parent
- * @param style
- * @param state
- * @param configuration
- */
- public ConfigurationCompositeBase(Composite parent, int style, State state, ConfigurationDataInMemory configuration) {
- super(parent, style, state);
- this.configurationContainer = configuration;
- }
-
- /**
- * Initialize ConfigurationContainer from ConfigProviderImpl
- * @param provider the ConfigProviderImpl to load config from
- */
- public abstract void initConfiguration(ConfigurationManager provider);
-
- /**
- * Load configuration from ConfigurationContainer
- */
- public abstract void loadConfiguration();
-
- /**
- * Store configuration from ConfigurationContainer to ConfigProvider
- * @param store the ConfigProviderImpl to store config to
- */
- public abstract void storeConfiguration(ConfigurationManager store);
-
- /**
- * 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
- */
- public abstract void validateSettings(int resumeFrom) throws Exception;
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/Fido2ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/Fido2ConfigurationComposite.java
deleted file mode 100644
index 9b2d3ef1..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/Fido2ConfigurationComposite.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package at.asit.pdfover.gui.composites.configuration;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Link;
-
-import com.sun.jna.Platform;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.webauthn.WebAuthN;
-
-public class Fido2ConfigurationComposite extends ConfigurationCompositeBase {
-
- private Link lnkInfoText;
- private Link unsupportedText;
-
- private Group grpFidoSettings;
- private Button btnFido2ByDefault;
-
- public Fido2ConfigurationComposite(Composite parent, int style, State state, ConfigurationDataInMemory container) {
- super(parent, style, state, container);
- setLayout(new FormLayout());
-
- this.lnkInfoText = new Link(this, SWT.WRAP);
- SWTUtils.anchor(lnkInfoText).top(0,5).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(lnkInfoText, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.addSelectionListener(lnkInfoText, () -> { SWTUtils.openURL(Messages.getString("config.fido2.InfoURL")); });
-
- this.unsupportedText = new Link(this, SWT.WRAP);
- SWTUtils.anchor(unsupportedText).top(lnkInfoText,5).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(unsupportedText, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.addSelectionListener(unsupportedText, () -> { SWTUtils.openURL("https://developers.yubico.com/libfido2/#_installation"); });
-
- FormLayout STANDARD_LAYOUT = new FormLayout();
- STANDARD_LAYOUT.marginHeight = 10;
- STANDARD_LAYOUT.marginWidth = 5;
-
- this.grpFidoSettings = new Group(this, SWT.NONE);
- this.grpFidoSettings.setLayout(STANDARD_LAYOUT);
- SWTUtils.anchor(grpFidoSettings).top(lnkInfoText,10).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(grpFidoSettings, Constants.TEXT_SIZE_NORMAL);
-
- this.btnFido2ByDefault = new Button(this.grpFidoSettings, SWT.CHECK);
- SWTUtils.anchor(btnFido2ByDefault).top(0).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(btnFido2ByDefault, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addSelectionListener(btnFido2ByDefault, () -> { this.configurationContainer.fido2ByDefault = btnFido2ByDefault.getSelection(); });
-
- if (WebAuthN.isAvailable())
- this.unsupportedText.setVisible(false);
- else
- this.grpFidoSettings.setVisible(false);
-
- reloadResources();
- }
-
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lnkInfoText, "config.fido2.AboutFIDO");
- SWTUtils.setLocalizedText(grpFidoSettings, "config.fido2.Group");
- SWTUtils.setLocalizedText(btnFido2ByDefault, "config.fido2.ByDefault");
-
- if (Platform.isLinux() || Platform.isMac())
- SWTUtils.setLocalizedText(unsupportedText, "config.fido2.UnsupportedTryLibFido2");
- else {
- SWTUtils.setFontStyle(unsupportedText, SWT.BOLD);
- SWTUtils.setLocalizedText(unsupportedText, "config.fido2.UnsupportedPlatform");
- }
- }
-
- @Override
- public void initConfiguration(ConfigurationManager provider) {
- this.configurationContainer.fido2ByDefault = provider.getFido2ByDefault();
- }
-
- @Override
- public void loadConfiguration() {
- btnFido2ByDefault.setSelection(this.configurationContainer.fido2ByDefault);
- }
-
- @Override
- public void storeConfiguration(ConfigurationManager store) {
- store.setFido2ByDefaultPersistent(this.configurationContainer.fido2ByDefault);
- }
-
- @Override
- public void validateSettings(int resumeIndex) 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
deleted file mode 100644
index a477422e..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
+++ /dev/null
@@ -1,592 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites.configuration;
-
-// Imports
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.UnrecoverableKeyException;
-import java.security.cert.CertificateException;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Vector;
-
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.apache.commons.lang3.tuple.Pair;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.controls.PasswordInputDialog;
-import at.asit.pdfover.gui.exceptions.CantLoadKeystoreException;
-import at.asit.pdfover.gui.exceptions.KeystoreAliasDoesntExistException;
-import at.asit.pdfover.gui.exceptions.KeystoreAliasNoKeyException;
-import at.asit.pdfover.gui.exceptions.KeystoreDoesntExistException;
-import at.asit.pdfover.gui.exceptions.KeystoreKeyPasswordException;
-import at.asit.pdfover.gui.keystore.KeystoreUtils;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory.KeyStorePassStorageType;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- *
- */
-public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(KeystoreConfigurationComposite.class);
-
- private Group grpKeystore;
- private Label lblKeystoreFile;
- Text txtKeystoreFile;
- private Button btnBrowse;
- private Label lblKeystoreType;
- Combo cmbKeystoreType;
- private Button btnLoad;
- private Label lblKeystoreAlias;
- Combo cmbKeystoreAlias;
- private Label lblKeystorePassStoreType;
- Combo cmbKeystorePassStoreType;
- private Label lblKeystoreStorePass;
- Text txtKeystoreStorePass;
- private Label lblKeystoreKeyPass;
- Text txtKeystoreKeyPass;
-
- private KeyStore ks;
-
- /**
- * @param parent
- * @param style
- * @param state
- * @param container
- */
- public KeystoreConfigurationComposite(
- org.eclipse.swt.widgets.Composite parent, int style, State state,
- ConfigurationDataInMemory container) {
- super(parent, style, state, container);
- setLayout(new FormLayout());
-
- this.grpKeystore = new Group(this, SWT.NONE | SWT.RESIZE);
- FormLayout layout = new FormLayout();
- layout.marginHeight = 10;
- layout.marginWidth = 5;
- this.grpKeystore.setLayout(layout);
-
- SWTUtils.anchor(grpKeystore).top(0,5).left(0,5).right(100,-5);
- SWTUtils.setFontHeight(this.grpKeystore, Constants.TEXT_SIZE_NORMAL);
-
- this.lblKeystoreFile = new Label(this.grpKeystore, SWT.NONE);
- SWTUtils.anchor(lblKeystoreFile).top(0).left(0,5);
- FormData fd_lblKeystoreFile = new FormData();
- fd_lblKeystoreFile.top = new FormAttachment(0);
- fd_lblKeystoreFile.left = new FormAttachment(0, 5);
- this.lblKeystoreFile.setLayoutData(fd_lblKeystoreFile);
- SWTUtils.setFontHeight(lblKeystoreFile, Constants.TEXT_SIZE_NORMAL);
-
- this.txtKeystoreFile = new Text(grpKeystore, SWT.BORDER);
- this.btnBrowse = new Button(grpKeystore, SWT.NONE);
- SWTUtils.setFontHeight(txtKeystoreFile, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.setFontHeight(btnBrowse, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.anchor(txtKeystoreFile).top(lblKeystoreFile, 5).left(0,15).right(btnBrowse,-5);
- SWTUtils.anchor(btnBrowse).top(lblKeystoreFile, 5).right(100,-5);
-
- this.lblKeystoreType = new Label(grpKeystore, SWT.NONE);
- SWTUtils.anchor(lblKeystoreType).top(txtKeystoreFile, 5).left(0,5);
- SWTUtils.setFontHeight(lblKeystoreType, Constants.TEXT_SIZE_NORMAL);
-
- this.btnLoad = new Button(this.grpKeystore, SWT.NONE);
- SWTUtils.anchor(btnLoad).top(lblKeystoreType, 5).right(100,-5);
- SWTUtils.setFontHeight(btnLoad, Constants.TEXT_SIZE_BUTTON);
-
- this.cmbKeystoreType = new Combo(grpKeystore, SWT.READ_ONLY);
- SWTUtils.anchor(cmbKeystoreType).top(lblKeystoreType, 5).left(0,15).right(btnLoad, -5);
- SWTUtils.setFontHeight(cmbKeystoreType, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.scrollPassthrough(cmbKeystoreType);
-
- this.lblKeystoreAlias = new Label(grpKeystore, SWT.NONE);
- SWTUtils.anchor(lblKeystoreAlias).top(cmbKeystoreType, 5).left(0, 5);
- SWTUtils.setFontHeight(lblKeystoreAlias, Constants.TEXT_SIZE_NORMAL);
-
- this.cmbKeystoreAlias = new Combo(grpKeystore, SWT.NONE);
- SWTUtils.anchor(cmbKeystoreAlias).top(lblKeystoreAlias, 5).left(0,15).right(100,-5);
- SWTUtils.setFontHeight(cmbKeystoreAlias, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.scrollPassthrough(cmbKeystoreAlias);
-
- this.lblKeystorePassStoreType = new Label(this.grpKeystore, SWT.NONE);
- SWTUtils.anchor(lblKeystorePassStoreType).top(cmbKeystoreAlias, 5).left(0,5);
- SWTUtils.setFontHeight(lblKeystorePassStoreType, Constants.TEXT_SIZE_NORMAL);
-
- this.cmbKeystorePassStoreType = new Combo(grpKeystore, SWT.READ_ONLY);
- SWTUtils.anchor(cmbKeystorePassStoreType).top(lblKeystorePassStoreType, 5).left(0,15).right(100,-5);
- SWTUtils.setFontHeight(cmbKeystorePassStoreType, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.scrollPassthrough(cmbKeystorePassStoreType);
-
- this.lblKeystoreStorePass = new Label(grpKeystore, SWT.NONE);
- SWTUtils.anchor(lblKeystoreStorePass).top(cmbKeystorePassStoreType, 5).left(0,5);
- SWTUtils.setFontHeight(lblKeystoreStorePass, Constants.TEXT_SIZE_NORMAL);
-
- this.txtKeystoreStorePass = new Text(grpKeystore, SWT.BORDER | SWT.PASSWORD);
- SWTUtils.anchor(txtKeystoreStorePass).right(100, -5).top(lblKeystoreStorePass, 5).left(0,15);
- SWTUtils.setFontHeight(txtKeystoreStorePass, Constants.TEXT_SIZE_NORMAL);
-
- this.lblKeystoreKeyPass = new Label(grpKeystore, SWT.NONE);
- SWTUtils.anchor(lblKeystoreKeyPass).top(txtKeystoreStorePass, 5).left(0,5);
- SWTUtils.setFontHeight(lblKeystoreKeyPass, Constants.TEXT_SIZE_NORMAL);
-
- this.txtKeystoreKeyPass = new Text(grpKeystore, SWT.BORDER | SWT.PASSWORD);
- SWTUtils.anchor(txtKeystoreKeyPass).top(lblKeystoreKeyPass, 5).left(0,15).right(100,-5);
- SWTUtils.setFontHeight(txtKeystoreKeyPass, Constants.TEXT_SIZE_NORMAL);
-
- this.txtKeystoreFile.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- performKeystoreFileChanged(KeystoreConfigurationComposite.this.txtKeystoreFile.getText());
- }
- });
-
- this.btnBrowse.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(
- KeystoreConfigurationComposite.this.getShell(), SWT.OPEN);
- dialog.setFilterExtensions(new String[] {
- "*.p12;*.pkcs12;*.pfx;*.ks;*.jks", "*.p12;*.pkcs12;*.pfx;", "*.ks;*.jks*.", "*" });
- dialog.setFilterNames(new String[] {
- 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) {
- file = new File(fileName);
- if (file.exists()) {
- performKeystoreFileChanged(fileName);
- }
- }
- }
- });
-
- this.cmbKeystoreType.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- performKeystoreTypeChanged(
- KeystoreConfigurationComposite.this.keystoreTypes.get(
- KeystoreConfigurationComposite.this.cmbKeystoreType.getItem(
- KeystoreConfigurationComposite.this.cmbKeystoreType.getSelectionIndex())));
- }
- });
-
- this.txtKeystoreStorePass.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- performKeystoreStorePassChanged(KeystoreConfigurationComposite.
- this.txtKeystoreStorePass.getText());
- }
-
- });
-
- this.btnLoad.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- File f = new File(KeystoreConfigurationComposite.this
- .configurationContainer.keystoreFile);
- try {
- loadKeystore();
- } catch (KeyStoreException ex) {
- log.error("Error loading keystore", ex);
- showErrorDialog(Messages.getString("error.KeyStore"));
- } catch (FileNotFoundException ex) {
- log.error("Error loading keystore", ex);
- showErrorDialog(Messages.formatString(
- "error.KeyStoreFileNotExist", f.getName()));
- } catch (NoSuchAlgorithmException ex) {
- log.error("Error loading keystore", ex);
- showErrorDialog(Messages.getString("error.KeyStore"));
- } catch (CertificateException ex) {
- log.error("Error loading keystore", ex);
- showErrorDialog(Messages.getString("error.KeyStore"));
- } catch (IOException ex) {
- log.error("Error loading keystore", ex);
- showErrorDialog(Messages.getString("error.KeyStore"));
- } catch (NullPointerException ex) {
- log.error("Error loading keystore - NPE?", ex);
- showErrorDialog(Messages.getString("error.KeyStore"));
- } catch (UnrecoverableKeyException ex) {
- log.warn("Error loading keystore, invalid password", ex);
- showErrorDialog(Messages.getString("error.KeyStoreStorePass"));
- }
- }
- });
-
- this.cmbKeystoreAlias.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- performKeystoreAliasChanged(
- KeystoreConfigurationComposite.this.cmbKeystoreAlias.getItem(
- KeystoreConfigurationComposite.this.cmbKeystoreAlias.getSelectionIndex()));
- }
- });
- this.cmbKeystoreAlias.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- performKeystoreAliasChanged(KeystoreConfigurationComposite.this.cmbKeystoreAlias.getText());
- }
- });
-
- this.cmbKeystorePassStoreType.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- performKeystorePassStorageTypeChanged(
- keystorePassStorageTypeOptions.get(
- KeystoreConfigurationComposite.this.cmbKeystorePassStoreType.getSelectionIndex()
- ).getLeft()
- );
- }
- });
-
- this.txtKeystoreKeyPass.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- performKeystoreKeyPassChanged(KeystoreConfigurationComposite.this.txtKeystoreKeyPass.getText());
- }
- });
-
- // Load localized strings
-
- reloadResources();
- }
-
- void showErrorDialog(String error) {
- ErrorDialog e = new ErrorDialog(getShell(), error, BUTTONS.OK);
- e.open();
- }
-
- void loadKeystore() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException, UnrecoverableKeyException {
- this.cmbKeystoreAlias.remove(0, this.cmbKeystoreAlias.getItemCount()-1);
-
- ConfigurationDataInMemory config = this.configurationContainer;
- this.ks = null;
- String pass = config.keystoreStorePass;
-
- while (this.ks == null)
- {
- if (pass == null)
- {
- pass = new PasswordInputDialog(
- getShell(),
- Messages.getString("keystore_config.KeystoreStorePass"),
- Messages.getString("keystore.KeystoreStorePassEntry")).open();
- if (pass == null)
- throw new UnrecoverableKeyException("User cancelled password input");
- }
-
- try {
- this.ks = KeystoreUtils.tryLoadKeystore(new File(config.keystoreFile), config.keystoreType, pass);
- } catch (UnrecoverableKeyException ex) {
- new ErrorDialog(getShell(), Messages.getString("error.KeyStoreStorePass"), BUTTONS.OK).open();
- pass = null;
- }
- }
- config.keystoreStorePass = pass;
-
- Enumeration<String> aliases = this.ks.aliases();
- while (aliases.hasMoreElements())
- this.cmbKeystoreAlias.add(aliases.nextElement());
- }
-
- /**
- * @param fileName
- */
- protected void performKeystoreFileChanged(String fileName) {
- log.debug("Selected keystore file: " + fileName);
- this.configurationContainer.keystoreFile = fileName;
- KeystoreConfigurationComposite.this.txtKeystoreFile.setText(fileName);
- int i = fileName.lastIndexOf('.');
- if (i > 0) {
- String ext = fileName.substring(i+1);
- if (
- ext.equalsIgnoreCase("p12") ||
- ext.equalsIgnoreCase("pkcs12") ||
- ext.equalsIgnoreCase("pfx"))
- performKeystoreTypeChanged("PKCS12");
- else if (
- ext.equalsIgnoreCase("ks") ||
- ext.equalsIgnoreCase("jks"))
- performKeystoreTypeChanged("JCEKS");
- }
- }
-
- /**
- * @param type
- */
- protected void performKeystoreTypeChanged(String type) {
- log.debug("Selected keystore type: " + type);
- this.configurationContainer.keystoreType = type;
- for (int i = 0; i < this.cmbKeystoreType.getItemCount(); ++i) {
- if (this.keystoreTypes.get(this.cmbKeystoreType.getItem(i)).equals(type)) {
- this.cmbKeystoreType.select(i);
- break;
- }
- }
- }
-
- protected void performKeystorePassStorageTypeChanged(KeyStorePassStorageType p) {
- this.configurationContainer.keystorePassStorageType = p;
- for (int i=0; i<keystorePassStorageTypeOptions.size(); ++i)
- {
- if (keystorePassStorageTypeOptions.get(i).getLeft() == p)
- {
- this.cmbKeystorePassStoreType.select(i);
- break;
- }
- }
-
- boolean showPasswordFields = (p == KeyStorePassStorageType.DISK);
- this.lblKeystoreKeyPass.setVisible(showPasswordFields);
- this.txtKeystoreKeyPass.setVisible(showPasswordFields);
- this.lblKeystoreStorePass.setVisible(showPasswordFields);
- this.txtKeystoreStorePass.setVisible(showPasswordFields);
- if (showPasswordFields)
- { /* get rid of potential nulls */
- performKeystoreKeyPassChanged(this.txtKeystoreKeyPass.getText());
- performKeystoreStorePassChanged(this.txtKeystoreStorePass.getText());
- }
- }
-
- /**
- * @param storepass
- */
- protected void performKeystoreStorePassChanged(String storepass) {
- log.debug("Changed keystore store password");
- this.configurationContainer.keystoreStorePass = storepass;
- if (storepass == null)
- this.txtKeystoreStorePass.setText("");
- else
- this.txtKeystoreStorePass.setText(storepass);
- }
-
- /**
- * @param alias
- */
- protected void performKeystoreAliasChanged(String alias) {
- log.debug("Selected keystore alias: " + alias);
- this.configurationContainer.keystoreAlias = alias;
- this.cmbKeystoreAlias.setText(alias);
- }
-
- /**
- * @param keypass
- */
- protected void performKeystoreKeyPassChanged(String keypass) {
- log.debug("Changed keystore key password");
- this.configurationContainer.keystoreKeyPass = keypass;
- if (keypass == null)
- this.txtKeystoreKeyPass.setText("");
- else
- this.txtKeystoreKeyPass.setText(keypass);
- }
-
- @Override
- public void initConfiguration(ConfigurationManager provider) {
- ConfigurationDataInMemory config = this.configurationContainer;
- config.keystoreFile = provider.getKeyStoreFilePersistent();
- config.keystoreType = provider.getKeyStoreTypePersistent();
- config.keystoreAlias = provider.getKeyStoreAliasPersistent();
- config.keystorePassStorageType = provider.getKeyStorePassStorageType();
- if (config.keystorePassStorageType == KeyStorePassStorageType.DISK) {
- config.keystoreStorePass = provider.getKeyStoreStorePassPersistent();
- config.keystoreKeyPass = provider.getKeyStoreKeyPassPersistent();
- } else if (config.keystorePassStorageType == KeyStorePassStorageType.MEMORY) {
- config.keystoreStorePass = provider.getKeyStoreStorePass();
- config.keystoreKeyPass = provider.getKeyStoreKeyPass();
- }
- }
-
- /*
- * (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#loadConfiguration
- * ()
- */
- @Override
- public void loadConfiguration() {
- // Initialize form fields from configuration Container
- ConfigurationDataInMemory config = this.configurationContainer;
-
- String ks = config.keystoreFile;
- performKeystoreFileChanged(ks);
- performKeystoreTypeChanged(config.keystoreType);
- performKeystorePassStorageTypeChanged(config.keystorePassStorageType);
- performKeystoreStorePassChanged(config.keystoreStorePass);
- try {
- File ksf = new File(ks);
- if (ksf.exists() && config.keystoreStorePass != null)
- loadKeystore();
- } catch (Exception e) {
- log.info("Failed to load keystore on init", e);
- }
- performKeystoreAliasChanged(config.keystoreAlias);
- performKeystoreKeyPassChanged(config.keystoreKeyPass);
- }
-
- @Override
- public void storeConfiguration(ConfigurationManager store) {
- ConfigurationDataInMemory config = this.configurationContainer;
- store.setKeyStoreFilePersistent(config.keystoreFile);
- store.setKeyStoreTypePersistent(config.keystoreType);
- store.setKeyStoreAliasPersistent(config.keystoreAlias);
- store.setKeyStorePassStorageTypePersistent(config.keystorePassStorageType);
- if (config.keystorePassStorageType == KeyStorePassStorageType.DISK)
- {
- store.setKeyStoreStorePassPersistent(config.keystoreStorePass);
- store.setKeyStoreKeyPassPersistent(config.keystoreKeyPass);
- }
- else if (config.keystorePassStorageType == KeyStorePassStorageType.MEMORY)
- {
- store.setKeyStoreStorePassOverlay(config.keystoreStorePass);
- store.setKeyStoreKeyPassOverlay(config.keystoreKeyPass);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings
- * ()
- */
- @Override
- public void validateSettings(int resumeFrom) throws Exception {
- ConfigurationDataInMemory config = this.configurationContainer;
- switch (resumeFrom) {
- case 0:
- String fname = config.keystoreFile;
-
- if (fname.isEmpty())
- break; //no checks required
-
- File f = new File(fname);
- if (!f.exists() || !f.isFile())
- throw new KeystoreDoesntExistException(f, 4); //skip next checks
- // Fall through
- case 1:
- try {
- if (config.keystoreStorePass != null) /* don't cause password prompts, just silently accept if there is no saved password */
- loadKeystore();
- } catch (Exception e) {
- throw new CantLoadKeystoreException(e, 4); //skip next checks
- }
- // Fall through
- case 2:
- {
- if (this.ks != null)
- {
- String alias = config.keystoreAlias;
- if (!this.ks.containsAlias(alias))
- throw new KeystoreAliasDoesntExistException(alias, 4); //skip next check
- if (!this.ks.isKeyEntry(alias))
- throw new KeystoreAliasNoKeyException(alias, 4); //skip next check
- }
- }
- // Fall through
- case 3:
- try {
- String alias = config.keystoreAlias;
- String keypass = config.keystoreKeyPass;
- if ((this.ks != null) && (keypass != null))
- { /* if no keypass is specified, this will happen at signature time */
- this.ks.getKey(alias, keypass.toCharArray());
- }
- } catch (Exception e) {
- throw new KeystoreKeyPasswordException(4);
- }
- }
- }
-
-
- Map<String, String> keystoreTypes;
- private void reloadKeystoreTypeStrings() {
- this.keystoreTypes = new HashMap<String, String>();
- this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_PKCS12"), "PKCS12");
- this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_JKS"), "JCEKS");
- }
-
- Vector<Pair<KeyStorePassStorageType, String>> keystorePassStorageTypeOptions;
- private void reloadKeystorePassStorageTypeStrings() {
- keystorePassStorageTypeOptions = new Vector<Pair<KeyStorePassStorageType, String>>();
- java.util.function.BiConsumer<KeyStorePassStorageType, String> add = (k,v) -> {
- keystorePassStorageTypeOptions.add(new ImmutablePair<KeyStorePassStorageType,String>(k,Messages.getString(v)));
- };
- add.accept(null, "keystore_config.SaveToWhere.None");
- add.accept(KeyStorePassStorageType.MEMORY, "keystore_config.SaveToWhere.Memory");
- add.accept(KeyStorePassStorageType.DISK, "keystore_config.SaveToWhere.Disk");
-
- int n = keystorePassStorageTypeOptions.size();
- cmbKeystorePassStoreType.setVisibleItemCount(n);
- cmbKeystorePassStoreType.setItems();
- for (int i=0; i<n; ++i)
- cmbKeystorePassStoreType.add(keystorePassStorageTypeOptions.get(i).getRight());
- }
-
-
- @Override
-
- public void reloadResources() {
- SWTUtils.setLocalizedText(grpKeystore, "keystore_config.Keystore_Title");
- SWTUtils.setLocalizedText(lblKeystoreFile, "keystore_config.KeystoreFile");
- SWTUtils.setLocalizedText(btnBrowse, "common.browse");
- SWTUtils.setLocalizedToolTipText(txtKeystoreFile, "keystore_config.KeystoreFile_ToolTip");
- SWTUtils.setLocalizedText(lblKeystoreType, "keystore_config.KeystoreType");
- reloadKeystoreTypeStrings();
- SWTUtils.setLocalizedText(lblKeystorePassStoreType, "keystore_config.SaveToWhere.Header");
- reloadKeystorePassStorageTypeStrings();
- this.cmbKeystoreType.setItems(this.keystoreTypes.keySet().toArray(new String[0]));
- SWTUtils.setLocalizedText(lblKeystoreStorePass, "keystore_config.KeystoreStorePass");
- SWTUtils.setLocalizedToolTipText(txtKeystoreStorePass, "keystore_config.KeystoreStorePass_ToolTip");
- SWTUtils.setLocalizedText(btnLoad, "keystore_config.Load");
- SWTUtils.setLocalizedToolTipText(btnLoad, "keystore_config.Load_ToolTip");
- SWTUtils.setLocalizedText(lblKeystoreAlias, "keystore_config.KeystoreAlias");
- SWTUtils.setLocalizedText(lblKeystoreKeyPass, "keystore_config.KeystoreKeyPass");
- SWTUtils.setLocalizedToolTipText(txtKeystoreKeyPass, "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
deleted file mode 100644
index cf24dca3..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
+++ /dev/null
@@ -1,717 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites.configuration;
-
-// Imports
-import java.io.File;
-import java.util.Arrays;
-import java.util.Locale;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.dnd.DropTargetAdapter;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Scale;
-import org.eclipse.swt.widgets.Text;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.commons.Profile;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.controls.ErrorMarker;
-import at.asit.pdfover.gui.exceptions.InvalidEmblemFile;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.pdfover.signer.Emblem;
-import at.asit.pdfover.signer.pdfas.PdfAs4SignatureParameter;
-import at.asit.pdfover.signer.pdfas.PdfAs4SignaturePlaceholder;
-
-/**
- *
- */
-public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(SimpleConfigurationComposite.class);
-
- private Group grpHandySignatur;
- private Label lblMobileNumber;
- protected Text txtMobileNumber;
- protected ErrorMarker txtMobileNumberErrorMarker;
-
- private Group grpPreview;
- protected Canvas cSigPreview;
- protected Button btnClearImage;
- private Button btnBrowseLogo;
-
- private Group grpSignatureNote;
- private Label lblSignatureNote;
- protected Text txtSignatureNote;
- private Button btnSignatureNoteDefault;
-
- protected final Group grpSignatureLang;
- protected final Combo cmbSignatureLang;
-
- final Group grpLogoOnlyTargetSize;
- final Label lblLogoOnlyTargetSizeCurrentValue;
- /** in millimeters */
- final Scale sclLogoOnlyTargetSize;
- private void updateLogoOnlyTargetSizeCurrentValueLabel() {
- lblLogoOnlyTargetSizeCurrentValue.setText(String.format("%4.1fcm", configurationContainer.logoOnlyTargetSize / 10.0));
- }
-
- protected String logoFile = null;
-
- protected final Group grpSignatureProfile;
- protected final Combo cmbSignatureProfiles;
-
-
-
-
- /**
- * @param parent
- * @param style
- * @param state
- * @param container
- */
- public SimpleConfigurationComposite(
- org.eclipse.swt.widgets.Composite parent, int style, State state,
- ConfigurationDataInMemory container) {
- super(parent, style, state, container);
- setLayout(new FormLayout());
-
- this.grpHandySignatur = new Group(this, SWT.NONE | SWT.RESIZE);
- SWTUtils.anchor(grpHandySignatur).right(100,-5).left(0,5).top(0,5);
- grpHandySignatur.setLayout(new GridLayout(2, false));
- SWTUtils.setFontHeight(grpHandySignatur, Constants.TEXT_SIZE_NORMAL);
-
- this.lblMobileNumber = new Label(grpHandySignatur, SWT.NONE | SWT.RESIZE);
- this.lblMobileNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
- SWTUtils.setFontHeight(lblMobileNumber, Constants.TEXT_SIZE_NORMAL);
-
- Composite compMobileNumerContainer = new Composite(this.grpHandySignatur, SWT.NONE);
- compMobileNumerContainer.setLayout(new FormLayout());
- compMobileNumerContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
-
- this.txtMobileNumber = new Text(compMobileNumerContainer, SWT.BORDER | SWT.RESIZE);
- SWTUtils.anchor(txtMobileNumber).left(0,5).right(100,-42).top(0);
- SWTUtils.setFontHeight(txtMobileNumber, Constants.TEXT_SIZE_NORMAL);
-
- this.txtMobileNumberErrorMarker = new ErrorMarker(compMobileNumerContainer, SWT.NONE, "");
- this.txtMobileNumberErrorMarker.setVisible(false);
- SWTUtils.anchor(txtMobileNumberErrorMarker).left(100,-32).right(100).top(0).bottom(0,32);
-
- this.txtMobileNumber.addTraverseListener(e -> {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- processNumberChanged();
- }
- });
-
- this.txtMobileNumber.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- processNumberChanged();
- }
- });
-
- this.grpSignatureProfile = new Group(this, SWT.NONE);
- SWTUtils.anchor(grpSignatureProfile).right(100,-5).left(0,5).top(grpHandySignatur, 5);
- this.grpSignatureProfile.setLayout(new FormLayout());
- SWTUtils.setFontHeight(grpSignatureProfile, Constants.TEXT_SIZE_NORMAL);
-
- this.cmbSignatureProfiles = new Combo(this.grpSignatureProfile, SWT.READ_ONLY);
- SWTUtils.anchor(cmbSignatureProfiles).left(0,10).right(100,-10).top(0,10).bottom(100,-10);
- SWTUtils.setFontHeight(cmbSignatureProfiles, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.scrollPassthrough(cmbSignatureProfiles);
- this.cmbSignatureProfiles.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- Profile current = SimpleConfigurationComposite.this.configurationContainer.getSignatureProfile();
- int index = SimpleConfigurationComposite.this.cmbSignatureProfiles.getSelectionIndex();
- Profile selected = Profile.values()[index];
- if (!current.equals(selected)) {
- performProfileSelectionChanged(selected);
- }
- }
- });
-
- this.grpSignatureLang = new Group(this, SWT.NONE);
- SWTUtils.anchor(grpSignatureLang).right(100,-5).top(grpSignatureProfile, 5).left(0,5);
- this.grpSignatureLang.setLayout(new FormLayout());
- SWTUtils.setFontHeight(grpSignatureLang, Constants.TEXT_SIZE_NORMAL);
-
- this.cmbSignatureLang = new Combo(this.grpSignatureLang, SWT.READ_ONLY);
- SWTUtils.anchor(cmbSignatureLang).left(0,10).right(100,-10).top(0,10).bottom(100,-10);
- SWTUtils.setFontHeight(cmbSignatureLang, Constants.TEXT_SIZE_NORMAL);
- SWTUtils.scrollPassthrough(cmbSignatureLang);
- this.cmbSignatureLang.setItems(Arrays.stream(Constants.SUPPORTED_LOCALES).map(l -> l.getDisplayLanguage()).toArray(String[]::new));
-
- this.cmbSignatureLang.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- Locale currentLocale = SimpleConfigurationComposite.this.configurationContainer.signatureLocale;
- Locale selectedLocale = Constants.SUPPORTED_LOCALES[SimpleConfigurationComposite.this.cmbSignatureLang.getSelectionIndex()];
- if (!currentLocale.equals(selectedLocale)) {
- performSignatureLangSelectionChanged(selectedLocale, currentLocale);
- }
- }
- });
-
- this.grpSignatureNote = new Group(this, SWT.NONE);
- SWTUtils.anchor(grpSignatureNote).right(100,-5).top(grpSignatureLang,5).left(0,5);
- this.grpSignatureNote.setLayout(new GridLayout(2, false));
- SWTUtils.setFontHeight(grpSignatureNote, Constants.TEXT_SIZE_NORMAL);
-
- this.lblSignatureNote = new Label(this.grpSignatureNote, SWT.NONE);
- do { /* grid positioning */
- GridData gd_lblSignatureNote = new GridData(SWT.LEFT, SWT.CENTER,
- false, false, 1, 1);
- gd_lblSignatureNote.widthHint = 66;
- this.lblSignatureNote.setLayoutData(gd_lblSignatureNote);
- this.lblSignatureNote.setBounds(0, 0, 57, 15);
- } while (false);
- SWTUtils.setFontHeight(lblSignatureNote, Constants.TEXT_SIZE_NORMAL);
-
- Composite compSignatureNoteContainer = new Composite(this.grpSignatureNote, SWT.NONE);
- compSignatureNoteContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
- compSignatureNoteContainer.setLayout(new FormLayout());
-
- this.txtSignatureNote = new Text(compSignatureNoteContainer, SWT.BORDER);
- SWTUtils.anchor(txtSignatureNote).top(0,0).left(0,5).right(100,-42);
- SWTUtils.setFontHeight(txtSignatureNote, Constants.TEXT_SIZE_NORMAL);
-
- this.txtSignatureNote.addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- processSignatureNoteChanged();
- }
- });
-
- this.txtSignatureNote.addTraverseListener(e -> {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- processSignatureNoteChanged();
- }
- });
-
- Composite compSignatureNoteButtonContainer = new Composite(this.grpSignatureNote, SWT.NONE);
- compSignatureNoteButtonContainer.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 2, 1));
- compSignatureNoteButtonContainer.setLayout(new FormLayout());
-
- this.btnSignatureNoteDefault = new Button(compSignatureNoteButtonContainer, SWT.NONE);
- SWTUtils.anchor(btnSignatureNoteDefault).top(0,0).right(100,-42);
- SWTUtils.setFontHeight(btnSignatureNoteDefault, Constants.TEXT_SIZE_BUTTON);
- this.btnSignatureNoteDefault.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- SimpleConfigurationComposite.this.txtSignatureNote.setText(getDefaultSignatureBlockNoteTextFor(null, null));
- }
- });
-
- this.grpLogoOnlyTargetSize = new Group(this, SWT.NONE);
- SWTUtils.anchor(grpLogoOnlyTargetSize).left(0,5).right(100,-5).top(grpSignatureProfile,5);
- this.grpLogoOnlyTargetSize.setLayout(new FormLayout());
- SWTUtils.setFontHeight(grpLogoOnlyTargetSize, Constants.TEXT_SIZE_NORMAL);
-
- Label lblLOTSLeft = new Label(this.grpLogoOnlyTargetSize, SWT.HORIZONTAL);
- SWTUtils.anchor(lblLOTSLeft).top(0, 5).left(0, 15);
- lblLOTSLeft.setText("1cm");
- SWTUtils.setFontHeight(lblLOTSLeft, Constants.TEXT_SIZE_NORMAL);
-
- Label lblLOTSRight = new Label(this.grpLogoOnlyTargetSize, SWT.HORIZONTAL);
- SWTUtils.anchor(lblLOTSRight).top(0,5).right(100, -5);
- lblLOTSRight.setText("20cm");
- SWTUtils.setFontHeight(lblLOTSRight, Constants.TEXT_SIZE_NORMAL);
-
- this.sclLogoOnlyTargetSize = new Scale(this.grpLogoOnlyTargetSize, SWT.HORIZONTAL);
- SWTUtils.anchor(sclLogoOnlyTargetSize).top(0,5).left(lblLOTSLeft,5).right(lblLOTSRight,-5);
- sclLogoOnlyTargetSize.setMinimum(10);
- sclLogoOnlyTargetSize.setMaximum(200);
- sclLogoOnlyTargetSize.setIncrement(1);
- sclLogoOnlyTargetSize.setPageIncrement(1);
- SWTUtils.scrollPassthrough(sclLogoOnlyTargetSize);
- SWTUtils.addSelectionListener(sclLogoOnlyTargetSize, e ->
- {
- configurationContainer.logoOnlyTargetSize = sclLogoOnlyTargetSize.getSelection();
- this.updateLogoOnlyTargetSizeCurrentValueLabel();
- });
- sclLogoOnlyTargetSize.addFocusListener(new FocusAdapter() {
- public void focusLost(FocusEvent e) { signatureBlockPreviewChanged(); };
- });
-
- this.lblLogoOnlyTargetSizeCurrentValue = new Label(this.grpLogoOnlyTargetSize, SWT.HORIZONTAL);
- SWTUtils.anchor(lblLogoOnlyTargetSizeCurrentValue).top(sclLogoOnlyTargetSize, 5).left(0,5).right(100,-5);
- lblLogoOnlyTargetSizeCurrentValue.setAlignment(SWT.CENTER);
- SWTUtils.setFontHeight(lblLogoOnlyTargetSizeCurrentValue, Constants.TEXT_SIZE_NORMAL);
-
- this.grpPreview = new Group(this, SWT.NONE);
- SWTUtils.anchor(grpPreview).left(0,5).right(100,-5).top(grpSignatureNote, 5).height(250);
- this.grpPreview.setLayout(new FormLayout());
- SWTUtils.setFontHeight(grpPreview, Constants.TEXT_SIZE_NORMAL);
-
- Composite containerComposite = new Composite(this.grpPreview, SWT.NONE);
- SWTUtils.anchor(containerComposite).left(0).right(100).top(0).bottom(100);
- containerComposite.setLayout(new FormLayout());
-
- this.btnBrowseLogo = new Button(containerComposite, SWT.NONE);
- SWTUtils.anchor(btnBrowseLogo).top(0,5).right(50,-5);
- SWTUtils.setFontHeight(btnBrowseLogo, Constants.TEXT_SIZE_BUTTON);
-
- this.btnClearImage = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btnClearImage).top(0,5).left(50, 5);
- SWTUtils.setFontHeight(btnClearImage, Constants.TEXT_SIZE_BUTTON);
- this.btnClearImage.setEnabled(false);
-
- this.cSigPreview = new Canvas(containerComposite, SWT.RESIZE);
- SWTUtils.anchor(cSigPreview).left(0, 5).right(100,-5).top(btnBrowseLogo,5).bottom(100,-5);
- SWTUtils.setFontHeight(cSigPreview, Constants.TEXT_SIZE_NORMAL);
- this.cSigPreview.addPaintListener(e -> SimpleConfigurationComposite.this.paintSignaturePreview(e));
-
- DropTarget dnd_target = new DropTarget(containerComposite, DND.DROP_DEFAULT | DND.DROP_COPY);
- final FileTransfer fileTransfer = FileTransfer.getInstance();
- Transfer[] types = new Transfer[] { fileTransfer };
- dnd_target.setTransfer(types);
-
- dnd_target.addDropListener(new DropTargetAdapter() {
- @Override
- public void drop(DropTargetEvent event) {
- if (fileTransfer.isSupportedType(event.currentDataType)) {
- String[] files = (String[]) event.data;
- if (files.length > 0) {
- // Only taking first file ...
- File file = new File(files[0]);
- if (!file.exists()) {
- log.error("File: {} does not exist!", files[0]); ////
- return;
- }
- performProfileSelectionChanged(Profile.BASE_LOGO);
- processEmblemChanged(file.getAbsolutePath());
- }
- }
- }
-
- @Override
- public void dragOperationChanged(DropTargetEvent event) {
- if (event.detail == DND.DROP_DEFAULT) {
- if ((event.operations & DND.DROP_COPY) != 0) {
- event.detail = DND.DROP_COPY;
- } else {
- event.detail = DND.DROP_NONE;
- }
- }
- }
-
- @Override
- public void dragEnter(DropTargetEvent event) {
- if (event.detail == DND.DROP_DEFAULT) {
- if ((event.operations & DND.DROP_COPY) != 0) {
- event.detail = DND.DROP_COPY;
- } else {
- event.detail = DND.DROP_NONE;
- }
- }
- // Only drop one item!
- if (event.dataTypes.length > 1) {
- event.detail = DND.DROP_NONE;
- return;
- }
- // will accept text but prefer to have files dropped
- for (int i = 0; i < event.dataTypes.length; i++) {
- if (fileTransfer.isSupportedType(event.dataTypes[i])) {
- event.currentDataType = event.dataTypes[i];
- // files should only be copied
- if (event.detail != DND.DROP_COPY) {
- event.detail = DND.DROP_NONE;
- }
- break;
- }
- }
- }
- });
-
- this.btnClearImage.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- SimpleConfigurationComposite.this.processEmblemChanged(null);
- }
- });
- this.btnBrowseLogo.addSelectionListener(new ImageFileBrowser());
-
- this.cSigPreview.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseUp(MouseEvent e) {
- SimpleConfigurationComposite.this.forceFocus();
- }
- });
-
- // Load localized strings
- reloadResources();
- }
-
- private PdfAs4SignatureParameter sigPreviewParam = null;
- private Image sigPreview = null;
- void paintSignaturePreview(PaintEvent evt) {
- if (this.sigPreview == null)
- return;
- Rectangle r = this.sigPreview.getBounds();
- int srcW = r.width;
- int srcH = r.height;
- Point p = ((Canvas)evt.widget).getSize();
- float dstW = p.x;
- float dstH = p.y;
-
- float scale = dstW / srcW;
- if (srcH * scale > dstH)
- scale = dstH / srcH;
-
- float w = srcW * scale;
- float h = srcH * scale;
-
- int x = (int) ((dstW / 2) - (w / 2));
- int y = (int) ((dstH / 2) - (h / 2));
- evt.gc.drawImage(this.sigPreview, 0, 0, srcW, srcH, x, y, (int) w, (int) h);
- }
-
- /**
- *
- */
- private final class ImageFileBrowser extends SelectionAdapter {
- /**
- *
- */
- public ImageFileBrowser() {
- // Nothing to do
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(
- SimpleConfigurationComposite.this.getShell(), SWT.OPEN);
- dialog.setFilterExtensions(new String[] {
- "*.jpg;*.png;*.gif", "*.jpg", "*.png", "*.gif", "*" });
- dialog.setFilterNames(new String[] {
- 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) {
- file = new File(fileName);
- if (file.exists()) {
- processEmblemChanged(fileName);
- }
- }
- }
- }
-
- private void setEmblemFileInternal(final String filename, boolean force)
- throws Exception {
- if (!force && this.configurationContainer.getEmblemPath() != null) {
- if (this.configurationContainer.getEmblemPath().equals(filename)) {
- return; // Ignore ...
- }
- }
-
- this.configurationContainer.setEmblem(filename);
- this.btnClearImage.setEnabled(filename != null);
- this.signatureBlockPreviewChanged();
- this.doLayout();
- }
-
- void signatureBlockPreviewChanged() {
- try {
- PdfAs4SignatureParameter param = new PdfAs4SignatureParameter();
- param.signatureProfile = this.configurationContainer.getSignatureProfile();
- if(this.configurationContainer.signatureNote != null && !this.configurationContainer.signatureNote.isEmpty()) {
- param.signatureNote = this.configurationContainer.signatureNote;
- }
-
- param.signatureLanguage = this.configurationContainer.signatureLocale.getLanguage();
- param.enablePDFACompat = this.configurationContainer.signaturePDFACompat;
- param.targetLogoSize = Math.min(120.0, this.configurationContainer.logoOnlyTargetSize); // TODO WORKAROUND FOR #117
- String image = this.configurationContainer.getEmblemPath();
- if (image != null && !image.trim().isEmpty()) {
- param.emblem = new Emblem(image);
- }
-
- this.sigPreviewParam = param;
- PdfAs4SignaturePlaceholder.For(param, (p) -> {
- if (this.isDisposed())
- return;
-
- this.getDisplay().syncExec(() -> {
- if (this.isDisposed())
- return;
- if (this.sigPreviewParam != param)
- return;
- if (this.sigPreview != null)
- this.sigPreview.dispose();
- if (p.hasImage())
- this.sigPreview = new Image(this.getDisplay(), p.getSWTImage());
- this.cSigPreview.redraw();
- });
- });
- } catch (Exception e) {
- log.error("Failed to load image for display...", e);
- }
- }
-
- void processEmblemChanged(String filename) {
- try {
- setEmblemFileInternal(filename, false);
- } catch (Exception ex) {
- log.error("processEmblemChanged: ", ex);
- ErrorDialog dialog = new ErrorDialog(
- getShell(),
- Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK);
- dialog.open();
- }
- }
-
- void processNumberChanged() {
- try {
- this.txtMobileNumberErrorMarker.setVisible(false);
- plainMobileNumberSetter();
- } catch (Exception ex) {
- this.txtMobileNumberErrorMarker.setVisible(true);
- this.txtMobileNumberErrorMarker.setToolTipText(Messages
- .getString("error.InvalidPhoneNumber"));
- log.error("processNumberChanged: ", ex);
- this.redraw();
- this.doLayout();
- }
- }
-
- 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);
- return i;
- }
- }
-
- log.warn("NO Locale match for {}", locale);
- return 0;
- }
-
- void performSignatureLangSelectionChanged(Locale selected, Locale previous) {
- log.debug("Selected Sign Locale: {}", selected);
- this.configurationContainer.signatureLocale = selected;
- this.cmbSignatureLang.select(this.getLocaleElementIndex(selected));
-
- if ((previous != null) && (txtSignatureNote.getText().equals(getDefaultSignatureBlockNoteTextFor(null, previous))))
- txtSignatureNote.setText(getDefaultSignatureBlockNoteTextFor(null, selected));
-
- signatureBlockPreviewChanged();
- }
-
-
-
- void performProfileSelectionChanged(Profile newProfile) {
- log.debug("Signature Profile {} was selected", newProfile.name());
- Profile oldProfile = this.configurationContainer.getSignatureProfile();
- this.configurationContainer.setSignatureProfile(newProfile);
- this.cmbSignatureProfiles.select(newProfile.ordinal());
-
- if (txtSignatureNote.getText().equals(getDefaultSignatureBlockNoteTextFor(oldProfile, null)))
- txtSignatureNote.setText(getDefaultSignatureBlockNoteTextFor(newProfile, null));
-
- this.grpSignatureLang.setVisible(newProfile.hasText());
- this.grpSignatureNote.setVisible(newProfile.hasText());
- this.grpLogoOnlyTargetSize.setVisible(newProfile.equals(Profile.BASE_LOGO));
-
- SWTUtils.reanchor(grpPreview).top(newProfile.hasText() ? grpSignatureNote : grpLogoOnlyTargetSize, 5);
- this.grpPreview.setVisible(newProfile.isVisibleSignature());
- this.grpPreview.requestLayout();
- signatureBlockPreviewChanged();
- }
-
- String getDefaultSignatureBlockNoteTextFor(Profile profile, Locale locale){
- if (profile == null)
- profile = configurationContainer.getSignatureProfile();
- if (locale == null)
- locale = configurationContainer.signatureLocale;
- return profile.getDefaultSignatureBlockNote(locale);
- }
-
- private void plainMobileNumberSetter() {
- String number = this.txtMobileNumber.getText();
- this.configurationContainer.setMobileNumber(number);
- number = this.configurationContainer.getMobileNumber();
- if (number == null) {
- this.txtMobileNumber.setText("");
- return;
- }
- this.txtMobileNumber.setText(number);
- }
-
- void processSignatureNoteChanged() {
- String note = this.txtSignatureNote.getText();
- this.configurationContainer.signatureNote = note;
- signatureBlockPreviewChanged();
- }
-
- @Override
- public void initConfiguration(ConfigurationManager provider) {
- this.configurationContainer.setMobileNumber(provider.getDefaultMobileNumberPersistent());
-
- try {
- this.configurationContainer.setEmblem(provider.getDefaultEmblemPersistent());
- } catch (InvalidEmblemFile e) {
- log.error("Failed to set emblem!", e);
- }
-
- this.configurationContainer.signatureLocale = provider.getSignatureLocale();
- this.configurationContainer.signatureNote = provider.getSignatureNote();
- this.configurationContainer.logoOnlyTargetSize = provider.getLogoOnlyTargetSize();
- }
-
- /*
- * (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#loadConfiguration
- * ()
- */
- @Override
- public void loadConfiguration() {
- // Initialize form fields from configuration Container
- String number = this.configurationContainer.getMobileNumber();
- if (number != null) {
- this.txtMobileNumber.setText(number);
- }
-
- String emblemFile = this.configurationContainer.getEmblemPath();
- if (emblemFile != null && !emblemFile.trim().isEmpty()) {
- this.logoFile = emblemFile;
- try {
- setEmblemFileInternal(emblemFile, true);
- this.btnClearImage.setSelection(true);
- } catch (Exception e1) {
- log.error("Failed to load emblem: ", e1);
- ErrorDialog dialog = new ErrorDialog(
- getShell(),
- Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK);
- dialog.open();
- }
- }
-
- String note = this.configurationContainer.signatureNote;
-
- if (note != null) {
- this.txtSignatureNote.setText(note);
- }
-
- this.sclLogoOnlyTargetSize.setSelection((int)this.configurationContainer.logoOnlyTargetSize);
- this.updateLogoOnlyTargetSizeCurrentValueLabel();
-
- this.signatureBlockPreviewChanged();
-
- this.performSignatureLangSelectionChanged(this.configurationContainer.signatureLocale, null);
-
- this.performProfileSelectionChanged(this.configurationContainer.getSignatureProfile());
-
- }
-
- @Override
- public void storeConfiguration(ConfigurationManager store) {
- store.setDefaultMobileNumberPersistent(this.configurationContainer.getMobileNumber());
- store.setDefaultEmblemPersistent(this.configurationContainer.getEmblemPath());
- store.setSignatureLocalePersistent(this.configurationContainer.signatureLocale);
- store.setSignatureNotePersistent(this.configurationContainer.signatureNote);
- store.setSignatureProfilePersistent(this.configurationContainer.getSignatureProfile());
- store.setLogoOnlyTargetSizePersistent(this.configurationContainer.logoOnlyTargetSize);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings
- * ()
- */
- @Override
- public void validateSettings(int resumeFrom) throws Exception {
- switch (resumeFrom) {
- case 0:
- this.plainMobileNumberSetter();
- // Fall through
- case 1:
- this.processSignatureNoteChanged();
- break;
- default:
- break;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(grpHandySignatur, "simple_config.MobileBKU_Title");
- SWTUtils.setLocalizedText(lblMobileNumber, "simple_config.PhoneNumber");
- SWTUtils.setLocalizedToolTipText(txtMobileNumber, "simple_config.ExampleNumber_ToolTip");
- this.txtMobileNumber.setMessage(Messages.getString("simple_config.ExampleNumber"));
-
- SWTUtils.setLocalizedText(grpPreview, "simple_config.Preview_Title");
- SWTUtils.setLocalizedText(btnClearImage, "simple_config.ClearEmblem");
- SWTUtils.setLocalizedText(btnBrowseLogo, "simple_config.ReplaceEmblem");
- SWTUtils.setLocalizedText(grpSignatureNote, "simple_config.Note_Title");
- SWTUtils.setLocalizedText(lblSignatureNote, "simple_config.Note");
- SWTUtils.setLocalizedToolTipText(txtSignatureNote, "simple_config.Note_Tooltip");
- SWTUtils.setLocalizedText(btnSignatureNoteDefault, "simple_config.Note_SetDefault");
-
- SWTUtils.setLocalizedText(grpSignatureLang, "simple_config.SigBlockLang_Title");
- SWTUtils.setLocalizedToolTipText(cmbSignatureLang, "simple_config.SigBlockLang_ToolTip");
-
- SWTUtils.setLocalizedText(grpSignatureProfile, "simple_config.SigProfile_Title");
- this.cmbSignatureProfiles.setItems(Arrays.stream(Profile.values()).map(v -> Messages.getString("simple_config."+v.name())).toArray(String[]::new));
-
- SWTUtils.setLocalizedText(grpLogoOnlyTargetSize, "simple_config.LogoOnlyTargetSize_Title");
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterNumberComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterNumberComposite.java
deleted file mode 100644
index 7c02eda0..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterNumberComposite.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites.mobilebku;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.bku.mobile.MobileBKUValidator;
-import at.asit.pdfover.gui.composites.StateComposite;
-import at.asit.pdfover.gui.exceptions.InvalidPasswordException;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- * Composite for entering the phone number for the mobile BKU
- */
-public class MobileBKUEnterNumberComposite extends StateComposite {
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(MobileBKUEnterNumberComposite.class);
-
- /**
- *
- */
- private final SelectionListener okListener = new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!MobileBKUEnterNumberComposite.this.btn_ok.isEnabled()) {
- return;
- }
-
- try {
- String number = MobileBKUEnterNumberComposite.this.txt_number.getText();
-
- MobileBKUEnterNumberComposite.this.setMobileNumber(number);
-
- String password = MobileBKUEnterNumberComposite.this.txt_password.getText();
-
- MobileBKUValidator.validatePassword(password);
-
- MobileBKUEnterNumberComposite.this.mobilePassword = password;
- MobileBKUEnterNumberComposite.this.userAck = true;
-
- MobileBKUEnterNumberComposite.this.btn_ok.setEnabled(false);
-
- } catch(InvalidPasswordException ex) {
- log.info("Validating input for Mobile BKU failed!", ex);
- MobileBKUEnterNumberComposite.this.setErrorMessage(ex.getMessage());
- MobileBKUEnterNumberComposite.this.txt_password.setFocus();
- } catch (Exception ex) {
- log.info("Validating input for Mobile BKU failed!", ex);
- MobileBKUEnterNumberComposite.this.setErrorMessage(Messages.getString("error.InvalidPhoneNumber"));
- MobileBKUEnterNumberComposite.this.txt_number.setFocus();
- return;
- }
- }
- };
-
- /**
- *
- */
- private final SelectionListener cancelListener = new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MobileBKUEnterNumberComposite.this.userCancel = true;
- }
- };
-
-
- String mobileNumber;
-
- String mobilePassword;
-
- Text txt_number;
-
- Text txt_password;
-
- String errorMessage = null;
-
- public boolean userAck = false;
- public boolean userCancel = false;
-
-
- private Label lbl_error;
- private Label lbl_password;
- private Label lbl_number;
-
- Button btn_ok;
- Button btn_cancel;
- Button btn_remember;
-
- /**
- * @return the errorMessage
- */
- public String getErrorMessage() {
- return this.errorMessage;
- }
-
- /**
- * @param errorMessage
- * the errorMessage to set
- */
- public void setErrorMessage(String errorMessage) {
- this.errorMessage = errorMessage;
-
- if (this.errorMessage != null) {
- this.lbl_error.setText(this.errorMessage);
- } else {
- this.lbl_error.setText("");
- }
- }
-
- public boolean isRememberPassword() { return this.btn_remember.getSelection(); }
- public void setRememberPassword(boolean state) { this.btn_remember.setSelection(state); }
-
- /**
- * Create the composite.
- *
- * @param parent
- * @param style
- * @param state
- */
- public MobileBKUEnterNumberComposite(Composite parent, int style, State state) {
- super(parent, style, state);
- setLayout(new FormLayout());
-
- final Composite containerComposite = new Composite(this, SWT.NATIVE);
- containerComposite.addPaintListener(e -> {
- Rectangle clientArea = containerComposite.getClientArea();
-
- //e.gc.setForeground();
- e.gc.setForeground(Constants.MAINBAR_ACTIVE_BACK_DARK);
- e.gc.setLineWidth(3);
- e.gc.setLineStyle(SWT.LINE_SOLID);
- e.gc.drawRoundRectangle(clientArea.x,
- clientArea.y, clientArea.width - 2, clientArea.height - 2,
- 10, 10);
- });
- containerComposite.setLayout(new FormLayout());
- SWTUtils.anchor(containerComposite).top(50, -120).bottom(50, 120).left(50, -200).right(50, 200);
-
- this.txt_number = new Text(containerComposite, SWT.SINGLE | SWT.NATIVE | SWT.BORDER);
- SWTUtils.anchor(txt_number).bottom(50, -10).left(50, 10).right(100, -20);
- this.txt_number.setEditable(true);
-
- this.lbl_number = new Label(containerComposite, SWT.NATIVE);
- this.lbl_number.setAlignment(SWT.RIGHT);
- SWTUtils.anchor(lbl_number).bottom(50, -10).right(50, -10);
-
- ImageData mobileIconData = new ImageData(this.getClass().getResourceAsStream(Constants.RES_IMG_MOBILE));
- Image mobileIcon = new Image(getDisplay(), mobileIconData);
-
- Label lbl_image = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lbl_image).top(20, -1 * (mobileIconData.width / 2)).bottom(20, mobileIconData.width / 2).left(0, 10).width(mobileIconData.width);
- lbl_image.setImage(mobileIcon);
-
- this.txt_password = new Text(containerComposite, SWT.SINGLE | SWT.PASSWORD | SWT.BORDER | SWT.NATIVE);
- SWTUtils.anchor(txt_password).top(50, 10).left(50, 10).right(100, -20);
- this.txt_password.setEditable(true);
-
- this.lbl_password = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lbl_password).top(50, 10).right(50, -10);
- this.lbl_password.setAlignment(SWT.RIGHT);
-
- this.btn_ok = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_ok).bottom(100, -20).right(100, -20);
- this.btn_ok.addSelectionListener(this.okListener);
-
- this.btn_cancel = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_cancel).bottom(100, -20).right(btn_ok, -10);
- this.btn_cancel.addSelectionListener(this.cancelListener);
-
- this.lbl_error = new Label(containerComposite, SWT.WRAP | SWT.NATIVE );
- SWTUtils.anchor(lbl_error).bottom(103, -20).left(5, 0).right(btn_cancel, -10);
-
- this.btn_remember = new Button(containerComposite, SWT.CHECK);
- SWTUtils.anchor(btn_remember).right(100, -10).top(0, 5);
- }
-
- @Override public void onDisplay() {
- getShell().setDefaultButton(this.btn_ok);
- if (this.txt_number.getText().isEmpty()) {
- this.txt_number.setFocus();
- } else {
- this.txt_password.setFocus();
- }
- }
-
- /**
- * enables submit button
- */
- public void enableButton() {
- this.btn_ok.setEnabled(true);
- }
-
- /**
- * @return the mobileNumber
- */
- public String getMobileNumber() {
- return this.mobileNumber;
- }
-
- /**
- * @param mobileNumber
- * the mobileNumber to set
- */
- public void setMobileNumber(String mobileNumber) {
- this.mobileNumber = mobileNumber;
-
- if (this.mobileNumber != null && !this.mobileNumber.isEmpty()) {
- this.txt_number.setText(this.mobileNumber);
- } else {
- this.txt_number.setText("");
- }
- }
-
- /**
- * @return the mobilePassword
- */
- public String getMobilePassword() {
- return this.mobilePassword;
- }
-
-
-
- /**
- * @param mobilePassword
- * the mobilePassword to set
- */
- public void setMobilePassword(String mobilePassword) {
- this.mobilePassword = mobilePassword;
-
- if (this.mobilePassword != null) {
- this.txt_password.setText(this.mobilePassword);
- } else {
- this.txt_password.setText("");
- }
- }
-
- /** (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lbl_number, "mobileBKU.number");
- SWTUtils.setLocalizedText(lbl_password, "mobileBKU.password");
- SWTUtils.setLocalizedText(btn_remember, "mobileBKU.rememberPassword");
- SWTUtils.setLocalizedText(btn_ok, "common.Ok");
- SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
-
- SWTUtils.setLocalizedToolTipText(btn_remember, "mobileBKU.rememberPasswordNote");
- }
-
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterTANComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterTANComposite.java
deleted file mode 100644
index a1e90f51..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterTANComposite.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites.mobilebku;
-
-// Imports
-import java.net.URI;
-import java.util.Objects;
-
-import javax.annotation.CheckForNull;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.beust.jcommander.internal.Nullable;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.composites.StateComposite;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.webauthn.WebAuthN;
-
-/**
- * Composite for entering the TAN for the mobile BKU
- */
-public class MobileBKUEnterTANComposite extends StateComposite {
-
- private void validateAndConfirmTAN() {
- String tan = this.txt_tan.getText();
-
- tan = tan.trim();
-
- if (tan.isEmpty()) {
- this.setMessage(Messages.getString("error.NoTan"));
- return;
- }
-
- if (MobileBKUEnterTANComposite.this.refVal.startsWith(tan)) {
- this.setMessage(Messages.getString("error.EnteredReferenceValue"));
- return;
- }
-
- if (tan.length() > 6) {
- this.setMessage(Messages.getString("error.TanTooLong"));
- return;
- }
-
- this.tan = tan;
- this.userAck = true;
- }
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(MobileBKUEnterTANComposite.class);
-
- private Text txt_tan;
-
- private boolean userAck = false;
- private boolean userCancel = false;
- private boolean userFido2 = false;
-
- private Label lblRefVal;
-
- private String refVal;
-
- private URI signatureDataURI;
-
- /**
- * @param signatureData
- * the signatureData to set
- */
- public void setSignatureDataURI(@Nullable URI uri) {
- this.signatureDataURI = uri;
- this.lnk_sig_data.setVisible(uri != null);
- }
-
- private String tan;
-
- private Link lnk_sig_data;
-
- private Label lblMessage;
- private Label lblRefValLabel;
- private Label lblTan;
-
- private Button btn_ok;
- private Button btn_cancel;
- private Button btn_fido2;
-
- public boolean isDone() { return (this.userAck || this.userCancel || this.userFido2); }
- public boolean isUserAck() { return this.userAck; }
- public boolean isUserCancel() { return this.userCancel; }
- public boolean isUserFido2() { return this.userFido2; }
-
- public void reset() { this.userAck = this.userCancel = this.userFido2 = false; }
-
- /**
- * Set an error message
- * @param errorMessage the error message
- */
- public void setErrorMessage(String errorMessage) {
- if (errorMessage == null)
- this.lblMessage.setText("");
- else
- this.lblMessage.setText(
- Messages.getString("error.Title") + ": " + errorMessage);
- }
-
- public void setFIDO2Enabled(boolean state) {
- this.btn_fido2.setEnabled(state);
- }
-
- /**
- * Sets the message
- *
- * @param msg
- */
- public void setMessage(String msg) {
- this.lblMessage.setText(msg);
- this.lblMessage.redraw();
- this.lblMessage.getParent().layout(true, true);
- }
-
- public String getRefVal() { return this.refVal; }
- public void setRefVal(@CheckForNull String refVal) {
- this.refVal = (refVal != null) ? refVal.trim() : null;
- this.lblRefVal.setText(Objects.requireNonNullElse(this.refVal, ""));
- }
-
- /**
- * @return the tan
- */
- public String getTan() {
- return this.tan;
- }
-
- /**
- * @param tan
- * the tan to set
- */
- public void setTan(String tan) {
- this.tan = tan;
-
- if (this.tan == null) {
- this.txt_tan.setText("");
- } else {
- this.txt_tan.setText(this.tan);
- }
- }
-
- /**
- * Create the composite.
- *
- * @param parent
- * @param style
- * @param state
- */
- public MobileBKUEnterTANComposite(Composite parent, int style, State state) {
- super(parent, style, state);
- setLayout(new FormLayout());
-
- final Composite containerComposite = new Composite(this, SWT.NATIVE);
- containerComposite.addPaintListener(new PaintListener() {
- @Override
- public void paintControl(PaintEvent e) {
- Rectangle clientArea = containerComposite.getClientArea();
-
- // e.gc.setForeground();
- e.gc.setForeground(Constants.MAINBAR_ACTIVE_BACK_DARK);
- e.gc.setLineWidth(3);
- e.gc.setLineStyle(SWT.LINE_SOLID);
- e.gc.drawRoundRectangle(clientArea.x, clientArea.y,
- clientArea.width - 2, clientArea.height - 2, 10, 10);
- }
- });
- containerComposite.setLayout(new FormLayout());
- SWTUtils.anchor(containerComposite).top(50, -120).bottom(50, 120).left(50, -200).right(50, 200);
-
- this.lblRefValLabel = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lblRefValLabel).right(50, -10).bottom(50,-10);
- SWTUtils.setLocalizedText(lblRefValLabel, "tanEnter.ReferenceValue");
- this.lblRefValLabel.setAlignment(SWT.RIGHT);
-
- ImageData mobileIcon = new ImageData(this.getClass().getResourceAsStream(Constants.RES_IMG_MOBILE));
- Label lbl_image = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lbl_image).top(50, -1 * (mobileIcon.width / 2)).bottom(50, mobileIcon.width / 2).left(0, 10).width(mobileIcon.width);
- lbl_image.setImage(new Image(getDisplay(), mobileIcon));
-
- this.lblRefVal = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lblRefVal).left(50,10).right(100,-20).bottom(50,-10);
- this.lblRefVal.setText("");
-
- this.lblTan = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lblTan).right(50,-10).top(50,10);
- SWTUtils.setLocalizedText(lblTan, "tanEnter.TAN");
- this.lblTan.setAlignment(SWT.RIGHT);
-
- this.txt_tan = new Text(containerComposite, SWT.BORDER | SWT.NATIVE);
- SWTUtils.anchor(txt_tan).left(50,10).right(100,-20).top(50,10);
- this.txt_tan.setEditable(true);
-
- this.txt_tan.addTraverseListener((e) -> {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- validateAndConfirmTAN();
- }
- });
-
- this.txt_tan.addModifyListener((e) -> {
- String text = this.txt_tan.getText();
- if (text.length() > 3 && this.getRefVal().startsWith(text.trim()))
- this.setMessage(Messages.getString("error.EnteredReferenceValue"));
- });
-
- this.lnk_sig_data = new Link(containerComposite, SWT.NATIVE | SWT.RESIZE);
- SWTUtils.anchor(lnk_sig_data).right(100,-20).top(0,20);
- lnk_sig_data.setEnabled(true);
- SWTUtils.addSelectionListener(lnk_sig_data, (e) -> { SWTUtils.openURL(this.signatureDataURI); });
-
- this.btn_ok = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_ok).right(100,-20).bottom(100,-20);
- SWTUtils.addSelectionListener(btn_ok, (e) -> { validateAndConfirmTAN(); });
-
- this.btn_cancel = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_cancel).right(btn_ok, -20).bottom(100, -20);
- SWTUtils.addSelectionListener(btn_cancel, (e) -> { this.userCancel = true; });
-
- this.btn_fido2 = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_fido2).right(btn_cancel, -20).bottom(100, -20);
- SWTUtils.addSelectionListener(btn_fido2, (e) -> { this.userFido2 = true; });
- this.btn_fido2.setVisible(WebAuthN.isAvailable());
-
- this.lblMessage = new Label(containerComposite, SWT.WRAP | SWT.NATIVE);
- SWTUtils.anchor(lblMessage).right(btn_fido2, -10).bottom(100, -20);
- }
-
- @Override public void onDisplay() { getShell().setDefaultButton(btn_ok); txt_tan.setFocus(); }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lnk_sig_data, "mobileBKU.show");
- SWTUtils.setLocalizedToolTipText(lnk_sig_data, "mobileBKU.show_tooltip");
- SWTUtils.setLocalizedText(lblRefValLabel, "tanEnter.ReferenceValue");
- SWTUtils.setLocalizedText(lblTan, "tanEnter.TAN");
- SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
- SWTUtils.setLocalizedText(btn_ok, "common.Ok");
- SWTUtils.setLocalizedText(btn_fido2, "tanEnter.FIDO2");
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUFido2Composite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUFido2Composite.java
deleted file mode 100644
index b0506596..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUFido2Composite.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package at.asit.pdfover.gui.composites.mobilebku;
-
-import java.net.URI;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.composites.StateComposite;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.webauthn.PublicKeyCredential;
-import at.asit.webauthn.WebAuthN;
-import at.asit.webauthn.exceptions.WebAuthNUserCancelled;
-import at.asit.webauthn.responsefields.AuthenticatorAssertionResponse;
-
-public class MobileBKUFido2Composite extends StateComposite {
- private static final Logger log = LoggerFactory.getLogger(MobileBKUFido2Composite.class);
-
- private @Nonnull String fido2OptionsString = "";
-
- private PublicKeyCredential<AuthenticatorAssertionResponse> credential;
- private boolean userCancel;
- private boolean userSms;
-
- private Button btn_authenticate;
- private Button btn_cancel;
- private Button btn_sms;
- public void setSMSEnabled(boolean state) { this.btn_sms.setEnabled(state); }
-
- private @CheckForNull URI signatureDataURI;
- private Link lnk_sigData;
- public void setSignatureDataURI(URI uri) { this.signatureDataURI = uri; this.lnk_sigData.setVisible(uri != null); }
-
- public void initialize(@Nonnull String fido2Options) {
- this.fido2OptionsString = fido2Options;
- this.credential = null;
- this.userCancel = this.userSms = false;
- }
-
- public boolean isDone() { return ((this.credential != null) || this.userCancel || this.userSms); }
- public PublicKeyCredential<AuthenticatorAssertionResponse> getResultingCredential() { return this.credential; }
- public boolean wasUserCancelClicked() { return userCancel; }
- public boolean wasUserSMSClicked() { return userSms; }
-
- public void beginAuthentication() {
- if (!btn_authenticate.isEnabled()) return;
-
- SWTUtils.setLocalizedText(btn_authenticate, "common.working");
- btn_authenticate.setEnabled(false);
- new Thread(() -> {
- try {
- this.credential = WebAuthN.buildGetFromJSON(this.fido2OptionsString).get("https://service.a-trust.at");
- } catch (Throwable t) {
- if (!(t instanceof WebAuthNUserCancelled)) {
- log.warn("webauthn operation failed", t);
- }
- } finally {
- this.getDisplay().syncExec(() -> { btn_authenticate.setEnabled(true); this.reloadResources(); });
- this.getDisplay().wake();
- }
- }).start();
- }
-
- public MobileBKUFido2Composite(Composite parent, int style, State state) {
- super(parent, style, state);
- setLayout(new FormLayout());
-
- final Composite containerComposite = new Composite(this, SWT.NATIVE);
- containerComposite.addPaintListener((e) -> {
- Rectangle clientArea = containerComposite.getClientArea();
- e.gc.setForeground(Constants.MAINBAR_ACTIVE_BACK_DARK);
- e.gc.setLineWidth(3);
- e.gc.setLineStyle(SWT.LINE_SOLID);
- e.gc.drawRoundRectangle(clientArea.x, clientArea.y+25,
- clientArea.width - 2, clientArea.height - 27, 10, 10);
-
- });
- containerComposite.setLayout(new FormLayout());
- SWTUtils.anchor(containerComposite).top(50, -145).bottom(50, 120).left(50, -200).right(50, 200);
-
- ImageData webauthnLogoImg = new ImageData(this.getClass().getResourceAsStream(Constants.RES_IMG_WEBAUTHN));
- Label webauthnLogo = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(webauthnLogo).top(0,0).left(0, 10).height(50).width(187);
- webauthnLogo.setBackground(getBackground());
- webauthnLogo.setImage(new Image(getDisplay(), webauthnLogoImg.scaledTo(187, 50)));
-
- ImageData fidoLogoImg = new ImageData(this.getClass().getResourceAsStream(Constants.RES_IMG_FIDO2));
- Label fidoLogo = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(fidoLogo).left(0, 10).bottom(100, -10).height(50).width(81);
- fidoLogo.setImage(new Image(getDisplay(), fidoLogoImg.scaledTo(81, 50)));
-
- this.btn_authenticate = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_authenticate).top(50, -15).left(0, 90).right(100, -90);
- SWTUtils.addSelectionListener(btn_authenticate, this::beginAuthentication);
- btn_authenticate.setEnabled(WebAuthN.isAvailable());
-
- this.btn_cancel = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_cancel).bottom(100, -10).right(100, -10);
- SWTUtils.addSelectionListener(btn_cancel, () -> { this.userCancel = true; });
-
- this.btn_sms = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_sms).bottom(100, -10).right(btn_cancel, -10);
- SWTUtils.addSelectionListener(btn_sms, () -> { this.userSms = true; });
-
- this.lnk_sigData = new Link(containerComposite, SWT.NATIVE | SWT.RESIZE);
- SWTUtils.anchor(lnk_sigData).top(0, 45).right(100, -20);
- SWTUtils.addSelectionListener(lnk_sigData, (e) -> { SWTUtils.openURL(this.signatureDataURI); });
- }
-
- @Override public void onDisplay() { getShell().setDefaultButton(this.btn_authenticate); beginAuthentication(); }
-
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(btn_authenticate, WebAuthN.isAvailable() ? "mobileBKU.authorize" : "common.unavailable");
- SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
- SWTUtils.setLocalizedText(btn_sms, "tanEnter.SMS");
- SWTUtils.setLocalizedText(lnk_sigData, "mobileBKU.show");
- SWTUtils.setLocalizedToolTipText(lnk_sigData, "mobileBKU.show_tooltip");
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUFingerprintComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUFingerprintComposite.java
deleted file mode 100644
index ee9d9a0c..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUFingerprintComposite.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites.mobilebku;
-
-import java.net.URI;
-import java.util.Objects;
-
-import javax.annotation.CheckForNull;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.composites.StateComposite;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.webauthn.WebAuthN;
-
-/**
- * Composite for displaying the QR code for the mobile BKU
- */
-public class MobileBKUFingerprintComposite extends StateComposite {
- private Label lblError;
- private Label lblRefValLabel;
- private Label lblFPLabel;
- private Label lblRefVal;
- private Button btn_sms;
- private Button btn_fido2;
- private Button btn_cancel;
- private Link lnk_sig_data;
- public URI signatureDataURI;
- private String refVal;
-
- private boolean userCancelClicked = false;
- private boolean userSMSClicked = false;
- private boolean userFido2Clicked = false;
- private boolean pollingDone = false;
-
- public void signalPollingDone() { this.pollingDone = true; getDisplay().wake(); }
- public boolean isDone() { return (this.userCancelClicked || this.userSMSClicked || this.userFido2Clicked || this.pollingDone); }
- public boolean wasCancelClicked() { return this.userCancelClicked; }
- public boolean wasSMSClicked() { return this.userSMSClicked; }
- public boolean wasFIDO2Clicked() { return this.userFido2Clicked; }
- public void reset() { this.userCancelClicked = this.userSMSClicked = this.userFido2Clicked = this.pollingDone = false; }
-
- public void setSMSEnabled(boolean state) {
- this.btn_sms.setEnabled(state);
- }
-
- public void setFIDO2Enabled(boolean state) {
- this.btn_fido2.setEnabled(state);
- }
-
- /**
- * Set an error message
- * @param errorMessage the error message
- */
- public void setErrorMessage(String errorMessage) {
- if (errorMessage == null)
- this.lblError.setText("");
- else
- this.lblError.setText(Messages.getString("error.Title") + ": " + errorMessage);
- }
-
- public String getRefVal() { return this.refVal; }
- public void setRefVal(@CheckForNull String refVal) {
- this.refVal = (refVal != null) ? refVal.trim() : null;
- this.lblRefVal.setText(Objects.requireNonNullElse(this.refVal, ""));
- }
-
- /**
- * Create the composite.
- *
- * @param parent
- * @param style
- * @param state
- */
- public MobileBKUFingerprintComposite(Composite parent, int style, State state) {
- super(parent, style, state);
- setLayout(new FormLayout());
-
- final Composite containerComposite = new Composite(this, SWT.NATIVE);
- containerComposite.addPaintListener(new PaintListener() {
- @Override
- public void paintControl(PaintEvent e) {
- Rectangle clientArea = containerComposite.getClientArea();
-
- // e.gc.setForeground();
- e.gc.setForeground(Constants.MAINBAR_ACTIVE_BACK_DARK);
- e.gc.setLineWidth(3);
- e.gc.setLineStyle(SWT.LINE_SOLID);
- e.gc.drawRoundRectangle(clientArea.x, clientArea.y,
- clientArea.width - 2, clientArea.height - 2, 10, 10);
- }
- });
- containerComposite.setLayout(new FormLayout());
- SWTUtils.anchor(containerComposite).top(50, -140).bottom(50, 140).left(50, -200).right(50, 200);
-
- this.lblRefValLabel = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lblRefValLabel).right(50, -10).top(30, -10);
- this.lblRefValLabel.setAlignment(SWT.RIGHT);
-
- ImageData mobileIcon = new ImageData(this.getClass().getResourceAsStream(Constants.RES_IMG_MOBILE));
- Label lbl_image = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lbl_image).top(50, -1 * (mobileIcon.width / 2)).bottom(50, mobileIcon.width / 2).left(0, 10).width(mobileIcon.width);
- lbl_image.setImage(new Image(getDisplay(), mobileIcon));
-
- this.lblRefVal = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lblRefVal).left(50, 10).right(100, -20).top(30, -10);
-
- this.lblFPLabel = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lblFPLabel).left(25, 10).top(lblRefValLabel, 10);
- this.lblFPLabel.setAlignment(SWT.LEFT);
-
- this.lnk_sig_data = new Link(containerComposite, SWT.NATIVE | SWT.RESIZE);
- SWTUtils.anchor(lnk_sig_data).right(100, -20).top(0, 20);
- this.lnk_sig_data.setEnabled(true);
- SWTUtils.addSelectionListener(lnk_sig_data, (e) -> { SWTUtils.openURL(this.signatureDataURI); });
-
- this.btn_cancel = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_cancel).right(100, -20).bottom(100, -20);
- SWTUtils.addSelectionListener(btn_cancel, () -> { this.userCancelClicked = true; });
-
- this.btn_sms = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_sms).right(btn_cancel, -20).bottom(100, -20);
- SWTUtils.addSelectionListener(btn_sms, () -> { this.userSMSClicked = true; });
-
- this.btn_fido2 = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_fido2).right(btn_sms, -20).bottom(100, -20);
- SWTUtils.addSelectionListener(btn_fido2, () -> { this.userFido2Clicked = true; });
- this.btn_fido2.setVisible(WebAuthN.isAvailable());
-
- this.lblError = new Label(containerComposite, SWT.WRAP | SWT.NATIVE);
- SWTUtils.anchor(lblError).right(btn_sms, -10).bottom(100, -20);
-
- reloadResources();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lblRefValLabel, "tanEnter.ReferenceValue");
- SWTUtils.setLocalizedText(lblFPLabel, "tanEnter.FP");
- SWTUtils.setLocalizedText(lnk_sig_data, "mobileBKU.show");
- SWTUtils.setLocalizedToolTipText(lnk_sig_data, "mobileBKU.show_tooltip");
- SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
- SWTUtils.setLocalizedText(btn_sms, "tanEnter.SMS");
- SWTUtils.setLocalizedText(btn_fido2, "tanEnter.FIDO2");
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUQRComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUQRComposite.java
deleted file mode 100644
index 135bb775..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUQRComposite.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites.mobilebku;
-
-// Imports
-import java.io.ByteArrayInputStream;
-import java.net.URI;
-import java.util.Objects;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.composites.StateComposite;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.webauthn.WebAuthN;
-
-/**
- * Composite for displaying the QR code for the mobile BKU
- */
-public class MobileBKUQRComposite extends StateComposite {
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(MobileBKUQRComposite.class);
-
- private Label lblQR;
-
- private boolean userCancelClicked = false;
- private boolean userSMSClicked = false;
- private boolean userFIDO2Clicked = false;
- private boolean pollingDone = false;
-
- private Label lblRefVal;
-
- private String refVal;
-
- private ImageData currentQRImage;
-
- private URI signatureDataURI;
-
- private Label lblError;
- private Label lblRefValLabel;
- private Label lblQRLabel;
-
- private Button btn_fido2;
- private Button btn_sms;
- private Button btn_cancel;
-
- private Link lnk_sig_data;
-
- public void signalPollingDone() { this.pollingDone = true; getDisplay().wake(); }
- public boolean isDone() { return (this.userCancelClicked || this.userSMSClicked || this.userFIDO2Clicked || this.pollingDone); }
- public boolean wasCancelClicked() { return this.userCancelClicked; }
- public boolean wasSMSClicked() { return this.userSMSClicked; }
- public boolean wasFIDO2Clicked() { return this.userFIDO2Clicked; }
- public void reset() { this.userCancelClicked = this.userSMSClicked = this.userFIDO2Clicked = this.pollingDone = false; }
-
- /**
- * Set an error message
- * @param errorMessage the error message
- */
- public void setErrorMessage(String errorMessage) {
- if (errorMessage == null)
- this.lblError.setText("");
- else
- this.lblError.setText(
- Messages.getString("error.Title") + ": " + errorMessage);
- }
-
- public String getRefVal() { return this.refVal; }
- public void setRefVal(@CheckForNull String refVal) {
- this.refVal = (refVal != null) ? refVal.trim() : null;
- this.lblRefVal.setText(Objects.requireNonNullElse(this.refVal, ""));
- }
-
- private void updateQRImage() {
- if (this.currentQRImage == null)
- return;
-
- Point availableSize = this.lblQR.getSize();
- int targetSize = Math.min(availableSize.x, availableSize.y);
- if (targetSize <= 0)
- return;
-
- this.lblQR.setImage(new Image(this.lblQR.getDisplay(), this.currentQRImage.scaledTo(targetSize, targetSize)));
- }
-
- /**
- * @param qrcode
- * the qrcode to set
- */
- public void setQR(byte[] qrcode) {
- if (qrcode == null) {
- setErrorMessage(Messages.getString("error.FailedToLoadQRCode"));
- return;
- }
- try {
- this.currentQRImage = new ImageData(new ByteArrayInputStream(qrcode));
- } catch (SWTException e) {
- log.warn("Failed to load QR code", e);
- setErrorMessage(Messages.getString("error.FailedToLoadQRCode"));
- return;
- }
- updateQRImage();
- }
-
- public void setSMSEnabled(boolean state) {
- this.btn_sms.setEnabled(state);
- }
-
- public void setFIDO2Enabled(boolean state) {
- this.btn_fido2.setEnabled(state);
- }
-
- public void setSignatureDataURI(@Nullable URI uri) {
- this.signatureDataURI = uri;
- this.lnk_sig_data.setVisible(uri != null);
- }
-
- /**
- * Create the composite.
- *
- * @param parent
- * @param style
- * @param state
- */
- public MobileBKUQRComposite(Composite parent, int style, State state) {
- super(parent, style, state);
- setLayout(new FormLayout());
-
- final Composite containerComposite = new Composite(this, SWT.NATIVE);
- SWTUtils.anchor(containerComposite).top(50, -140).bottom(50, 140).left(50, -200).right(50, 200);
- containerComposite.addPaintListener(new PaintListener() {
- @Override
- public void paintControl(PaintEvent e) {
- Rectangle clientArea = containerComposite.getClientArea();
-
- // e.gc.setForeground();
- e.gc.setForeground(Constants.MAINBAR_ACTIVE_BACK_DARK);
- e.gc.setLineWidth(3);
- e.gc.setLineStyle(SWT.LINE_SOLID);
- e.gc.drawRoundRectangle(clientArea.x, clientArea.y,
- clientArea.width - 2, clientArea.height - 2, 10, 10);
- }
- });
- containerComposite.setLayout(new FormLayout());
-
- this.lblRefValLabel = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lblRefValLabel).right(50, -10).top(30, -10);
- this.lblRefValLabel.setAlignment(SWT.RIGHT);
-
- ImageData mobileIcon = new ImageData(this.getClass().getResourceAsStream(Constants.RES_IMG_MOBILE));
- Label lbl_image = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lbl_image).top(50, -1 * (mobileIcon.width / 2)).bottom(50, mobileIcon.width / 2).left(0, 10).width(mobileIcon.width);
- lbl_image.setImage(new Image(getDisplay(), mobileIcon));
-
- this.lblRefVal = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lblRefVal).left(50, 10).right(100, -20).top(30, -10);
-
- this.lblQRLabel = new Label(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(lblQRLabel).right(50, -10).top(lblRefValLabel, 10);
- this.lblQRLabel.setAlignment(SWT.RIGHT);
-
- this.lblQR = new Label(containerComposite, SWT.NATIVE);
- this.lblQR.addListener(SWT.Resize, (e) -> { updateQRImage(); });
-
- this.lnk_sig_data = new Link(containerComposite, SWT.NATIVE | SWT.RESIZE);
- SWTUtils.anchor(lnk_sig_data).right(100, -20).top(0, 20);
- SWTUtils.addSelectionListener(lnk_sig_data, (e) -> { SWTUtils.openURL(this.signatureDataURI); });
-
- this.btn_cancel = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_cancel).right(100, -20).bottom(100, -5);
- SWTUtils.addSelectionListener(btn_cancel, (e) -> { this.userCancelClicked = true; });
-
- this.btn_sms = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_sms).right(btn_cancel, -20).bottom(100, -5);
- SWTUtils.addSelectionListener(btn_sms, (e) -> { this.userSMSClicked = true; });
-
- this.btn_fido2 = new Button(containerComposite, SWT.NATIVE);
- SWTUtils.anchor(btn_fido2).right(btn_sms, -20).bottom(100, -5);
- SWTUtils.addSelectionListener(btn_fido2, (e) -> { this.userFIDO2Clicked = true; });
- this.btn_fido2.setVisible(WebAuthN.isAvailable());
-
- SWTUtils.anchor(lblQR).left(50, 10).right(100, -20).top(lblRefVal, 10).bottom(btn_sms, -10);
-
- this.lblError = new Label(containerComposite, SWT.WRAP | SWT.NATIVE);
- SWTUtils.anchor(lblError).right(btn_sms, -10).bottom(100, -20);
-
- reloadResources();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lblRefValLabel, "tanEnter.ReferenceValue");
- SWTUtils.setLocalizedText(lblQRLabel, "tanEnter.QR");
- SWTUtils.setLocalizedText(lnk_sig_data, "mobileBKU.show");
- SWTUtils.setLocalizedToolTipText(lnk_sig_data, "mobileBKU.show_tooltip");
- SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
- SWTUtils.setLocalizedText(btn_sms, "tanEnter.SMS");
- SWTUtils.setLocalizedText(btn_fido2, "tanEnter.FIDO2");
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/WaitingForAppComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/WaitingForAppComposite.java
deleted file mode 100644
index 24529452..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/WaitingForAppComposite.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites.mobilebku;
-
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.ProgressBar;
-
-import at.asit.pdfover.gui.composites.StateComposite;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.webauthn.WebAuthN;
-
-import org.eclipse.swt.widgets.Button;
-
-/**
- *
- */
-public class WaitingForAppComposite extends StateComposite {
- private Label lbl_description;
- private Button btn_sms;
- private Button btn_cancel;
- private Button btn_fido2;
- private boolean userSMSClicked = false;
- private boolean userCancelClicked = false;
- private boolean userFIDO2Clicked = false;
- private boolean pollingDone = false;
-
- public void signalPollingDone() { this.pollingDone = true; getDisplay().wake(); }
- public boolean isDone() { return (this.userCancelClicked || this.userSMSClicked || this.userFIDO2Clicked || this.pollingDone); }
- public boolean wasCancelClicked() { return this.userCancelClicked; }
- public boolean wasSMSClicked() { return this.userSMSClicked; }
- public boolean wasFIDO2Clicked() { return this.userFIDO2Clicked; }
- public void reset() { this.userCancelClicked = this.userSMSClicked = this.userFIDO2Clicked = this.pollingDone = false; }
-
- public void setSMSEnabled(boolean state) {
- this.btn_sms.setEnabled(state);
- }
-
- public void setFIDO2Enabled(boolean state) {
- this.btn_fido2.setEnabled(state);
- }
-
- /**
- * Create the composite.
- * @param parent
- * @param style
- * @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);
- SWTUtils.anchor(lbl_description).bottom(50, -1).left(0, 10).right(100, -10);
- this.lbl_description.setAlignment(SWT.CENTER);
- SWTUtils.setLocalizedText(lbl_description, "waiting_for_app.message");
-
- ProgressBar progressBar = new ProgressBar(this, SWT.HORIZONTAL | SWT.INDETERMINATE);
- SWTUtils.anchor(progressBar).top(50, 10).bottom(50, 40).left(50,-100).right(50,100);
-
- this.btn_sms = new Button(this, SWT.NONE);
- SWTUtils.anchor(btn_sms).top(progressBar, 24).right(progressBar, 0, SWT.RIGHT);
- SWTUtils.addSelectionListener(btn_sms, (e) -> { this.userSMSClicked = true; });
-
- this.btn_cancel = new Button(this, SWT.NONE);
- SWTUtils.anchor(btn_cancel).top(btn_sms, 0, SWT.TOP).right(btn_sms, -6);
- SWTUtils.addSelectionListener(btn_cancel, (e) -> { this.userCancelClicked = true; });
-
- this.btn_fido2 = new Button(this, SWT.NONE);
- SWTUtils.anchor(btn_fido2).top(btn_cancel, 0, SWT.TOP).right(btn_cancel, -6);
- SWTUtils.addSelectionListener(btn_fido2, (e) -> { this.userFIDO2Clicked = true; });
- this.btn_fido2.setVisible(WebAuthN.isAvailable());
-
- reloadResources();
-
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- SWTUtils.setLocalizedText(lbl_description, "waiting_for_app.message");
- SWTUtils.setLocalizedText(btn_sms, "tanEnter.SMS");
- SWTUtils.setLocalizedText(btn_fido2, "tanEnter.FIDO2");
- SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
- }
-}
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
deleted file mode 100644
index 0f3f1642..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ClickableCanvas.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-
-/**
- *
- */
-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
- public void paintControl(PaintEvent e) {
- ClickableCanvas.this.paintControl(e);
- }
- });
-
- final Cursor hand = new Cursor(this.getDisplay(), SWT.CURSOR_HAND);
-
- this.addListener(SWT.Resize, (Event event) -> {
- ClickableCanvas.this.redraw();
- });
-
- this.setCursor(hand);
-
- }
-
- /**
- * Gets the image
- *
- * @return the image
- */
- public Image getImage() {
- return this.image;
- }
-
- /**
- * Sets the Image
- *
- * @param image
- * the imgage to set
- */
- public void setImage(Image image) {
- this.image = image;
- }
-
- /**
- * Main painting method
- *
- * @param e
- */
- void paintControl(PaintEvent e) {
- this.paintText(e);
- }
-
- /**
- * Paint the text or image on the button
- *
- * @param e
- */
- protected void paintText(PaintEvent e) {
- Point size = this.getSize();
- int width = size.x;
-
- // 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) {
- tmp = new Image(getDisplay(), this.image.getImageData());
- w = (width - this.image.getImageData().width) / 2;
- } else if(this.image.getImageData().width > width) {
- tmp = new Image(getDisplay(), this.image.getImageData().scaledTo(width, width));
- } 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
deleted file mode 100644
index de3fb157..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A Message dialog
- */
-public class Dialog {
-
- private MessageBox box;
-
- /**
- * Message box buttons
- */
- public enum BUTTONS {
- /** Display only ok button */
- OK,
- /** Display buttons ok and cancel */
- OK_CANCEL,
- /** Display retry and cancel buttons */
- RETRY_CANCEL,
- /** Display abort, retry and ignore buttons */
- ABORT_RETRY_IGNORE,
- /** Display yes and no buttons */
- YES_NO
- };
-
- /**
- * Message box icon
- */
- public enum ICON {
- /** Error icon */
- ERROR,
- /** Information icon */
- INFORMATION,
- /** Question icon */
- QUESTION,
- /** Warning icon */
- WARNING,
- /** Working icon */
- WORKING
- };
-
- /**
- * @param parent The parent shell
- * @param title The dialog title
- * @param message The dialog message
- * @param button The BUTTONS to be shown
- * @param icon The ICON to be displayed
- */
- public Dialog(Shell parent, String title, String message, BUTTONS button, ICON icon) {
- this.initialize(parent, title, message, button, icon);
- }
-
- private void initialize(Shell parent, String title, String message, BUTTONS button, ICON icon) {
- int boxstyle = 0;
- switch (icon) {
- case ERROR:
- boxstyle |= SWT.ICON_ERROR;
- break;
- case INFORMATION:
- boxstyle |= SWT.ICON_INFORMATION;
- break;
- case QUESTION:
- boxstyle |= SWT.ICON_QUESTION;
- break;
- case WARNING:
- boxstyle |= SWT.ICON_WARNING;
- break;
- case WORKING:
- boxstyle |= SWT.ICON_WORKING;
- break;
- }
-
- switch(button) {
- case OK:
- boxstyle |= SWT.OK;
- break;
- case OK_CANCEL:
- boxstyle |= SWT.OK | SWT.CANCEL;
- break;
- case RETRY_CANCEL:
- boxstyle |= SWT.RETRY | SWT.CANCEL;
- break;
- case ABORT_RETRY_IGNORE:
- boxstyle |= SWT.RETRY | SWT.ABORT | SWT.IGNORE;
- break;
- case YES_NO:
- boxstyle |= SWT.YES | SWT.NO;
- }
-
- this.box = new MessageBox(parent, boxstyle);
- this.box.setMessage(message);
- this.box.setText(title);
- }
-
- /**
- * Open error dialog
- *
- * @return SWT.OK | SWT.IGNORE | SWT.ABORT | SWT.RETRY | SWT.CANCEL
- */
- public int open() {
- return this.box.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
deleted file mode 100644
index f5b5bf9b..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.widgets.Shell;
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- * An error dialog
- */
-public class ErrorDialog extends Dialog {
- /**
- * @param parent The parent shell
- * @param message The error message
- * @param button The buttons to be shown
- */
- public ErrorDialog(Shell parent, String message, BUTTONS button) {
- 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
deleted file mode 100644
index bd99b887..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import java.io.InputStream;
-
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-
-/**
- *
- */
-public class ErrorMarker extends Label {
-
- /**
- * SLF4J Logger instance
- **/
- @SuppressWarnings("unused")
- private static final Logger log = LoggerFactory.getLogger(ErrorMarker.class);
-
- Image errorImg;
-
- /**
- * Draw an error marker for a faulty entry
- * @param parent the parent composite
- * @param style the SWT style
- * @param message a message describing the error (can be set later through setToolTipText)
- */
- 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));
-
- this.addPaintListener(new PaintListener() {
- final Rectangle imgSize = ErrorMarker.this.errorImg.getBounds();
-
- @Override
- public void paintControl(PaintEvent e) {
- Rectangle dstSize = ErrorMarker.this.getBounds();
- e.gc.drawImage(ErrorMarker.this.errorImg,
- 0, 0, this.imgSize.width, this.imgSize.height,
- 0, 0, dstSize.width, dstSize.height);
- }
- });
-
- setToolTipText(message);
- }
-
- @Override
- protected void checkSubclass() {
- // Allow subclassing
- }
-}
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
deleted file mode 100644
index 4845863f..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-import at.asit.pdfover.gui.utils.SWTUtils;
-
-/**
- *
- */
-public class InputDialog extends org.eclipse.swt.widgets.Dialog {
- /**
- * SLF4J Logger instance
- **/
-// private static final Logger log = LoggerFactory
-// .getLogger(InputDialog.class);
-
- private String prompt;
- String input;
-
- /**
- * SWT flags of the input box
- */
- protected static int TEXT_FLAGS = SWT.BORDER;
-
- /**
- * Create a password input dialog
- * @param parent parent
- * @param title title
- * @param prompt prompt message
- */
- public InputDialog(Shell parent, String title, String prompt) {
- super(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- setText(title);
- setMessage(prompt);
- }
-
- /**
- * Get the prompt message
- * @return the prompt message
- */
- public String getPrompt() {
- return this.prompt;
- }
-
- /**
- * set the prompt message
- * @param message the prompt message
- */
- public void setMessage(String message) {
- this.prompt = message;
- }
-
- /**
- * Get the input
- * @return the input
- */
- public String getInput() {
- return this.input;
- }
-
- /**
- * Get the input
- * @param input the input
- */
- public void setInput(String input) {
- this.input = input;
- }
-
- /**
- * Open the dialog
- * @return the input
- */
- public String open() {
- Shell parent = getParent();
- Shell shell = new Shell(parent, getStyle());
- shell.setText(getText());
- createContents(shell);
- shell.pack();
- shell.open();
- Display display = parent.getDisplay();
- Rectangle bounds = parent.getBounds();
- Rectangle main = shell.getBounds();
- shell.setLocation(
- bounds.x + (bounds.width - main.width) / 2,
- bounds.y + (bounds.height - main.height) / 2);
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- return getInput();
- }
-
- private void createContents(final Shell shell) {
- GridLayout layout = new GridLayout(2, false);
- layout.verticalSpacing = 10;
- layout.marginLeft = 5;
- layout.marginRight = 5;
- layout.marginTop = 5;
- shell.setLayout(layout);
- Label label = new Label(shell, SWT.NONE);
- label.setText(this.prompt);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- label.setLayoutData(data);
- final Text text = new Text(shell, TEXT_FLAGS);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- text.setLayoutData(data);
- Button ok = new Button(shell, SWT.PUSH);
- SWTUtils.setLocalizedText(ok, "common.Ok");
- data = new GridData(GridData.FILL_HORIZONTAL);
- ok.setLayoutData(data);
- ok.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- InputDialog.this.input = text.getText();
- shell.close();
- }
- });
- Button cancel = new Button(shell, SWT.PUSH);
- SWTUtils.setLocalizedText(cancel, "common.Cancel");
- data = new GridData(GridData.FILL_HORIZONTAL);
- cancel.setLayoutData(data);
- cancel.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- InputDialog.this.input = null;
- shell.close();
- }
- });
- shell.setDefaultButton(ok);
- }
-}
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
deleted file mode 100644
index 52bdf55c..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Region;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-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;
-
- /**
- * the used text color
- */
- protected Color textColor = null;
-
- /**
- * the text size
- */
- protected int textsize = Constants.TEXT_SIZE_BUTTON;
-
- private Color inactiveBackground = null;
- private Color activeBackground1 = null;
- private Color borderColor = null;
- private Color activeBackground = null;
-
- private Color inactiveText = null;
-
- private String text = "";
-
- private boolean active = true;
-
- private Image image = null;
-
-
- /**
- * @param parent
- * @param style
- */
- public MainBarButton(Composite parent, int style) {
- super(parent, style);
- this.addPaintListener(new PaintListener() {
-
- @Override
- public void paintControl(PaintEvent e) {
- MainBarButton.this.paintControl(e);
- }
- });
-
- final Cursor hand = new Cursor(this.getDisplay(), SWT.CURSOR_HAND);
-
- this.addListener(SWT.Resize, new Listener() {
-
- @Override
- public void handleEvent(Event event) {
- MainBarButton.this.setRegion(MainBarButton.this
- .getCustomRegion());
- MainBarButton.this.redraw();
- }
- });
-
- this.setCursor(hand);
-
-
- this.inactiveBackground = Constants.MAINBAR_INACTIVE_BACK;
- this.activeBackground1 = Constants.MAINBAR_ACTIVE_BACK_DARK;
- this.activeBackground = Constants.MAINBAR_ACTIVE_BACK_LIGHT;
- //this.textColor = this.getForeground();
- this.textColor = Constants.MAINBAR_ACTIVE_TEXTCOLOR;
- //this.borderColor = new Color(getDisplay(), 0xf9, 0xf9, 0xf9);
- this.borderColor = this.getBackground();
- this.inactiveText = Constants.MAINBAR_INACTIVE_TEXTCOLOR;
- this.textsize = Constants.TEXT_SIZE_BUTTON;
-
- }
-
- /**
- * @param inactiveBackground
- * the inactiveBackground to set
- */
- public void setInactiveBackground(Color inactiveBackground) {
- this.inactiveBackground = inactiveBackground;
- }
-
- /**
- * @param activeBackground
- * the activeBackground to set
- */
- public void setActiveBackground(Color activeBackground) {
- this.activeBackground = activeBackground;
- }
-
- /**
- * @return the textsize
- */
- public int getTextsize() {
- return this.textsize;
- }
-
- /**
- * @param textsize
- * the textsize to set
- */
- public void setTextsize(int textsize) {
- this.textsize = textsize;
- }
-
- /**
- * @param textColor
- * the textColor to set
- */
- public void setTextColor(Color textColor) {
- this.textColor = textColor;
- }
-
- /**
- * @return the borderColor
- */
- public Color getBorderColor() {
- return this.borderColor;
- }
-
- /**
- * @param borderColor
- * the borderColor to set
- */
- public void setBorderColor(Color borderColor) {
- this.borderColor = borderColor;
- }
-
-
- /**
- * Gets the image
- *
- * @return the image
- */
- public Image getImage() {
- return this.image;
- }
-
- /**
- * Sets the Image
- *
- * @param image
- * the imgage to set
- */
- public void setImage(Image image) {
- this.image = image;
- }
-
- /**
- * Sets if this button is active
- *
- * @param active
- * the active state
- */
- public void setActive(boolean active) {
-
- this.active = active;
- if (this.active) {
- this.setBackground(this.activeBackground);
- } else {
- this.setBackground(this.inactiveBackground);
- }
- }
-
- /**
- * Gets if this button is active
- *
- * @return the active state
- */
- public boolean getActive() {
- return this.active;
- }
-
- /**
- * Gets the button text
- *
- * @return the text
- */
- public String getText() {
- return this.text;
- }
-
- /**
- * Sets the text for the button
- *
- * @param text
- * the text to set
- */
- public void setText(String text) {
- this.text = text;
- }
-
- /**
- * Paint 3D style borders
- *
- * @param e
- */
- protected void paintBackground(PaintEvent e) {
- Point size = this.getSize();
- 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);
-
- // RIGTH
- // e.gc.fillGradientRectangle(width, 0, -1 * (width / factor), height,
- // false);
-
- }
-
- /**
- * 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);
- e.gc.setBackground(backcurrent);
-
- this.paintText(e);
- }
-
- /**
- * paint the inner button
- *
- * @param e
- */
- protected void paintButton(PaintEvent e) {
- // could be overwritten by subclasses
- }
-
- /**
- * Paint the text or image on the button
- *
- * @param e
- */
- protected void paintText(PaintEvent e) {
- Point size = this.getSize();
- int height = size.y;
-
- int width = size.x;
-
- // e.gc.fillGradientRectangle(0, 1, width, height / 4, true);
-
- if (this.image == null) {
- Color current = e.gc.getForeground();
-
- if(this.getActive() && this.isEnabled()) {
- e.gc.setForeground(this.textColor);
- } else {
- e.gc.setForeground(this.inactiveText);
- }
-
- String font_name = e.gc.getFont().getFontData()[0].getName();
-
- Font font = new Font(this.getDisplay(), font_name,
- this.getTextsize(),
- e.gc.getFont().getFontData()[0].getStyle());
-
- String text = this.getText();
- e.gc.setFont(font);
- size = e.gc.stringExtent(text);
- int texty = (height - size.y) / 2;
- int textx = (width - size.x) / 2;
- textx = this.changeTextPosition(textx);
- e.gc.drawText(this.getText(), textx, texty, true);
- font.dispose();
-
- e.gc.setForeground(current);
- } else {
-
- //log.debug("Width: " + width + " Height: " + height);
-
- int w = 0;
- Image tmp = null;
- if(this.image.getImageData().width < width) {
- tmp = new Image(getDisplay(), this.image.getImageData());
- w = (width - this.image.getImageData().width) / 2;
- } else if(this.image.getImageData().width > width) {
- tmp = new Image(getDisplay(), this.image.getImageData().scaledTo(width, width));
- } else {
- tmp = new Image(getDisplay(), this.image.getImageData());
- }
-
- e.gc.drawImage(tmp, w, w);
- }
-
- }
-
- /**
- * change the text position
- *
- * @param positionX
- * the position
- * @return the new position
- */
- protected int changeTextPosition(int positionX) {
- return positionX;
- }
-
- /**
- * 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
deleted file mode 100644
index 1e80aa36..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarEndButton.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Region;
-import org.eclipse.swt.widgets.Composite;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- */
-public class MainBarEndButton extends MainBarButton {
- /**
- * @param parent
- * @param style
- */
- public MainBarEndButton(Composite parent, int style) {
- super(parent, style);
- }
-
- /**
- * SLF4J Logger instance
- **/
- @SuppressWarnings("unused")
- private static final Logger log = LoggerFactory.getLogger(MainBarEndButton.class);
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.controls.MainBarButton#paintButton(org.eclipse.swt
- * .events.PaintEvent)
- */
- @Override
- protected void paintButton(PaintEvent e) {
- Point size = this.getSize();
- int height = size.y - 3;
-
- 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);
- e.gc.drawLine(0, height, 0+split, (height) / 2);
- e.gc.drawLine(0+split, (height) / 2, 0, 0);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.controls.MainBarButton#getCustomRegion()
- */
- @Override
- protected Region getCustomRegion() {
- Point size = this.getSize();
-
- int height = size.y - 2;
-
- int split = SplitFactor;
-
- int width = size.x;
-
- Region reg = new Region();
- reg.add(new int[] { 0, 0, width, 0, width, height, 0, height,
- 0 + split, (height) / 2, 0, 0 });
- return reg;
- }
-
- /**
- * change the text position
- * @param positionX the position
- * @return the new position
- */
- @Override
- protected int changeTextPosition(int positionX) {
- return positionX + (SplitFactor / 2);
- }
-}
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
deleted file mode 100644
index 452f0a45..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarMiddleButton.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Region;
-import org.eclipse.swt.widgets.Composite;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- */
-public class MainBarMiddleButton extends MainBarButton {
- /**
- * @param parent
- * @param style
- */
- public MainBarMiddleButton(Composite parent, int style) {
- super(parent, style);
- }
-
- /**
- * SLF4J Logger instance
- **/
- @SuppressWarnings("unused")
- private static final Logger log = LoggerFactory.getLogger(MainBarMiddleButton.class);
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.controls.MainBarButton#paintButton(org.eclipse.swt.events.PaintEvent)
- */
- @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);
- e.gc.drawLine(width, height, 0, height);
- e.gc.drawLine(0, height, 0+split, (height) / 2);
- e.gc.drawLine(0+split, (height) / 2, 0, 0);
-
- }
-
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.controls.MainBarButton#getCustomRegion()
- */
- @Override
- protected Region getCustomRegion() {
- Point size = this.getSize();
-
- 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,
- width + 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
deleted file mode 100644
index 22a73b15..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Region;
-import org.eclipse.swt.widgets.Composite;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- */
-public class MainBarRectangleButton extends MainBarButton {
-
- /**
- * SLF4J Logger instance
- **/
- @SuppressWarnings("unused")
- private static final Logger log = LoggerFactory.getLogger(MainBarRectangleButton.class);
-
- private Image enabledImg = null;
- private Image disabledImg = null;
-
- /**
- * @param parent
- * @param style
- */
- public MainBarRectangleButton(Composite parent, int style) {
- super(parent, style);
- this.setActiveBackground(null);
- this.setInactiveBackground(null);
- }
-
- /**
- * Set the image to display while this control is enabled
- * @param enabledImg enabled image
- */
- public void setEnabledImage(Image enabledImg) {
- this.enabledImg = enabledImg;
- if (getEnabled())
- setImage(enabledImg);
- }
-
- /**
- * Set the image to display while this control is disabled
- * @param disabledImg disabled image
- */
- public void setDisabledImage(Image disabledImg) {
- this.disabledImg = disabledImg;
- if (!getEnabled())
- setImage(disabledImg);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.controls.MainBarButton#paintButton(org.eclipse.swt
- * .events.PaintEvent)
- */
- @Override
- protected void paintButton(PaintEvent e) {
-
- Point size = this.getSize();
-
- int height = size.y - 3;
-
- int width = size.x;
-
- e.gc.drawLine(0, 0, width, 0);
- e.gc.drawLine(width, 0, width, height);
- e.gc.drawLine(width, height, 0, height);
- e.gc.drawLine(0, height, 0, 0);
-
- }
-
- @Override
- protected void paintBackground(PaintEvent e) {
- Point size = this.getSize();
- int height = size.y - 2;
-
- int width = size.x;
-
- int factor = GradientFactor;
-
- 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,
- 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,
- 0, 0 });
-
- Region bottom_reg = new Region();
- bottom_reg.add(new int[] {
- 0, height,
- factor, height-factor,
- width - factor, height-factor,
- width, height, 0, height });
-
- e.gc.setClipping(top_reg);
-
- //TOP
- e.gc.fillGradientRectangle(0, 0, width, factor, true);
-
- e.gc.setClipping(bottom_reg);
-
- //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
- protected Region getCustomRegion() {
- Point size = this.getSize();
-
- int height = size.y - 2;
-
- int width = size.x;
-
- Region reg = new Region();
- reg.add(new int[] { 0, 0, width, 0, width, height, 0, height, 0, 0 });
- return reg;
- }
-
- @Override
- public void setEnabled(boolean enabled) {
- setImage(enabled ? this.enabledImg : this.disabledImg);
- super.setEnabled(enabled);
- }
-}
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
deleted file mode 100644
index ef03fdcb..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Region;
-import org.eclipse.swt.widgets.Composite;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- */
-public class MainBarStartButton extends MainBarButton {
- /**
- * @param parent
- * @param style
- */
- public MainBarStartButton(Composite parent, int style) {
- super(parent, style);
- }
-
- /**
- * SLF4J Logger instance
- **/
- @SuppressWarnings("unused")
- private static final Logger log = LoggerFactory.getLogger(MainBarStartButton.class);
-
- @Override
- protected void paintBackground(PaintEvent e) {
- super.paintBackground(e);
- /*
- Point size = this.getSize();
- int height = size.y - 2;
-
- int split = SplitFactor;
- int width = size.x - split;
-
- int factor = GradientFactor;
-
- 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,
- 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,
- 0, 0 });
-
- Region bottom_reg = new Region();
- bottom_reg.add(new int[] {
- 0, height,
- factor, height-factor,
- width - factor, height-factor,
- width, height, 0, height });
-
- e.gc.setClipping(top_reg);
-
- //TOP
- e.gc.fillGradientRectangle(0, 0, width, factor, true);
-
- e.gc.setClipping(bottom_reg);
-
- //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)
- */
- @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);
- e.gc.drawLine(width, height, 0, height);
- e.gc.drawLine(0, height, 0, 0);
-
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.controls.MainBarButton#getRegion()
- */
- @Override
- protected Region getCustomRegion() {
- Point size = this.getSize();
-
- 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, width + split,
- (height) / 2, width, height, 0, height, 0, 0 });
- return reg;
- }
-
-
- /**
- * change the text position
- * @param positionX the position
- * @return the new position
- */
- @Override
- protected int changeTextPosition(int positionX) {
- return positionX - (SplitFactor / 2);
- }
-}
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
deleted file mode 100644
index 3a15c63a..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/PasswordInputDialog.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.controls;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- *
- */
-public class PasswordInputDialog extends InputDialog {
-
- /**
- * @param parent
- * @param title
- * @param prompt
- */
- public PasswordInputDialog(Shell parent, String title, String prompt) {
- super(parent, title, prompt);
- PasswordInputDialog.TEXT_FLAGS = SWT.BORDER | SWT.PASSWORD;
- }
-}
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
deleted file mode 100644
index 1b18c99c..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-// Imports
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- *
- */
-public class ATrustConnectionException extends Exception {
- /**
- *
- */
- private static final long serialVersionUID = -5826910929587650685L;
-
- /**
- * Constructor
- * @param file
- */
- public ATrustConnectionException() {
- 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
deleted file mode 100644
index 6bb72ffa..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- *
- */
-public class CantLoadKeystoreException extends ResumableException {
- /**
- *
- */
- private static final long serialVersionUID = 7554121273052104624L;
-
- /**
- * @param resumeIndex The resume Index
- * @param cause The original exception
- */
- public CantLoadKeystoreException(Throwable cause, int resumeIndex) {
- 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
deleted file mode 100644
index 8f717391..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-/**
- *
- */
-public class InitializationException extends PDFOverGUIException {
- /**
- *
- */
- private static final long serialVersionUID = 433744698649684034L;
-
- /**
- * @param msg
- * @param cause
- */
- 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
deleted file mode 100644
index 27295b1d..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-// Imports
-import java.io.File;
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- *
- */
-public class InvalidEmblemFile extends PDFOverGUIException {
- /**
- *
- */
- private static final long serialVersionUID = -5826910929131650685L;
-
- /**
- * Constructor
- * @param file
- */
- public InvalidEmblemFile(final File file) {
- super(Messages.formatString("exception.InvalidEmblemFile", file.getAbsolutePath()));
- }
-
- /**
- * Constructor
- * @param file
- * @param reason
- */
- public InvalidEmblemFile(final File file, Throwable reason) {
- super(Messages.formatString("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
deleted file mode 100644
index 2067c0fc..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-/**
- * Base Class for Invalid password exceptions
- */
-public abstract class InvalidPasswordException extends PDFOverGUIException {
-
- /**
- *
- */
- private static final long serialVersionUID = 6735754648793405145L;
-
- /**
- * 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
deleted file mode 100644
index 96c09663..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-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(Messages.formatString("exception.InvalidPort", Integer.toString(port), 1, 0xffff));
- }
-
- /**
- * Constructor with an invalid port string
- * @param source InvalidNumberFormat exception
- * @param portString invalid port string
- */
- public InvalidPortException(String portString, Throwable source) {
- super(Messages.formatString("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
deleted file mode 100644
index da1a2fe9..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- *
- */
-public class KeystoreAliasDoesntExistException extends ResumableException {
- /**
- *
- */
- private static final long serialVersionUID = 2264150118185552023L;
-
- /**
- * @param alias The keystore key alias
- * @param resumeIndex The resume Index
- */
- public KeystoreAliasDoesntExistException(final String alias, int resumeIndex) {
- super(Messages.formatString("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
deleted file mode 100644
index 3b1d28cf..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- *
- */
-public class KeystoreAliasNoKeyException extends ResumableException {
- /**
- *
- */
- private static final long serialVersionUID = -4030764219866181859L;
-
- /**
- * @param alias The keystore key alias
- * @param resumeIndex The resume Index
- */
- public KeystoreAliasNoKeyException(final String alias, int resumeIndex) {
- super(Messages.formatString("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
deleted file mode 100644
index 9cd205d4..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-import java.io.File;
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- *
- */
-public class KeystoreDoesntExistException extends ResumableException {
- /**
- *
- */
- private static final long serialVersionUID = 8213496549933275086L;
-
- /**
- * @param keystore The keystore file
- * @param resumeIndex The resume Index
- */
- public KeystoreDoesntExistException(final File keystore, int resumeIndex) {
- super(Messages.formatString("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
deleted file mode 100644
index 907c5577..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- *
- */
-public class KeystoreKeyPasswordException extends ResumableException {
- /**
- *
- */
- private static final long serialVersionUID = 7734648200275150410L;
-
- /**
- * @param resumeIndex The resume Index
- */
- public KeystoreKeyPasswordException(int resumeIndex) {
- 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
deleted file mode 100644
index cddaec98..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-import java.io.File;
-
-import at.asit.pdfover.commons.Messages;
-
-/**
- *
- */
-public class OutputfolderDoesntExistException extends ResumableException {
- /**
- *
- */
- private static final long serialVersionUID = -1005495921021280599L;
-
- /**
- * @param folder The file
- * @param resumeIndex The resume Index
- */
- public OutputfolderDoesntExistException(final File folder, int resumeIndex) {
- super(Messages.formatString("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
deleted file mode 100644
index 9355ff87..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-// Imports
-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(Messages.formatString("exception.PathNotDirectory", folder.getAbsolutePath()));
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PDFOverGUIException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PDFOverGUIException.java
deleted file mode 100644
index bdfbe41d..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PDFOverGUIException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-/**
- * Base class for GUI Exceptions
- */
-public class PDFOverGUIException extends Exception {
- /**
- * Serial Version UID
- */
- private static final long serialVersionUID = -3942861617701033882L;
-
- /**
- * Constructor
- */
- public PDFOverGUIException() {
- }
-
- /**
- * Constructor
- * @param msg Exception message
- */
- public PDFOverGUIException(String msg) {
- super(msg);
- }
-
- /**
- * Constructor
- * @param cause Exception causing this one
- */
- public PDFOverGUIException(Throwable cause) {
- super(cause);
- }
-
- /**
- * Constructor
- * @param msg Exception message
- * @param cause Exception causing this one
- */
- public PDFOverGUIException(String msg, Throwable cause) {
- super(msg, cause);
- }
-
-}
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
deleted file mode 100644
index 6ea2b662..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-import at.asit.pdfover.commons.Messages;
-
-// Imports
-
-/**
- *
- */
-public class PasswordTooLongException extends InvalidPasswordException {
-
- /**
- * Constructor
- */
- public PasswordTooLongException() {
- 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
deleted file mode 100644
index ac1eafb0..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.exceptions;
-
-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"));
- }
-
-}
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
deleted file mode 100644
index 7cec826f..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-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
- * @param resumeIndex Validator index to resume from
- */
- public ResumableException(String msg, int resumeIndex) {
- super(msg);
- this.resumeIndex = resumeIndex;
- }
-
- /**
- * Create a new resumable exception, thrown by a validator which can be ignored
- * @param msg Error message
- * @param cause Exception causing this one
- * @param resumeIndex Validator index to resume from
- */
- public ResumableException(String msg, Throwable cause, int resumeIndex) {
- super(msg, cause);
- this.resumeIndex = resumeIndex;
- }
-
- /**
- * Return the validator index to resume from
- * @return the resumeIndex
- */
- public int getResumeIndex() {
- return this.resumeIndex;
- }
-
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore/KeystoreUtils.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore/KeystoreUtils.java
deleted file mode 100644
index 8b7bb59c..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore/KeystoreUtils.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package at.asit.pdfover.gui.keystore;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.UnrecoverableKeyException;
-import java.security.cert.CertificateException;
-
-public class KeystoreUtils {
- public static KeyStore tryLoadKeystore(File location, String storeType, String storePass) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException, UnrecoverableKeyException {
- KeyStore ks = KeyStore.getInstance(storeType);
- FileInputStream fis = new FileInputStream(location);
- try
- {
- ks.load(fis, storePass.toCharArray());
- } catch (IOException e) {
- UnrecoverableKeyException keyCause = (UnrecoverableKeyException)e.getCause();
- if (keyCause != null)
- throw keyCause;
- else
- throw e;
- }
- return ks;
- }
-}
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
deleted file mode 100644
index 60e39aac..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright 2014 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-
-package at.asit.pdfover.gui.osx;
-
-import java.lang.reflect.Method;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.internal.C;
-import org.eclipse.swt.internal.Callback;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Listener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-
-/**
- * Provide a hook to connecting the Preferences, About and Quit menu items of
- * the Mac OS X Application menu when using the SWT Cocoa bindings.
- * <p>
- * 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
- * href="http://www.transparentech.com/opensource/cocoauienhancer"
- * >CocoaUIEnhancer - Connect the About, Preferences and Quit menus in Mac OS X
- * Cocoa SWT and JFace applications</a>.
- * </p>
- * <p>
- * This class works with both the 32-bit and 64-bit versions of the SWT Cocoa
- * bindings.
- * <p>
- * <p>
- * This class is released under the Eclipse Public License (<a
- * href="http://www.eclipse.org/legal/epl-v10.html">EPL</a>).
- */
-public class CocoaUIEnhancer {
- static final Logger log = LoggerFactory.getLogger(CocoaUIEnhancer.class);
-
- private static final long kAboutMenuItem = 0;
- private static final long kPreferencesMenuItem = 2;
- // private static final long kServicesMenuItem = 4;
- private static final long kHideApplicationMenuItem = 6;
- private static final long kQuitMenuItem = 10;
-
- static long sel_toolbarButtonClicked_;
- static long sel_preferencesMenuItemSelected_;
- static long sel_aboutMenuItemSelected_;
- static long sel_hideApplicationMenuItemSelected_;
-
- static Callback proc3Args;
-
- /**
- * Class invoked via the Callback object to run the about and preferences
- * actions.
- */
- private static class MenuHookObject {
-
- final Listener about;
- final Listener pref;
-
- public MenuHookObject(final Listener aboutListener,
- final Listener preferencesListener) {
- this.about = aboutListener;
- this.pref = preferencesListener;
- }
-
- /**
- * Will be called on 32bit SWT.
- * @param id
- * @param sel
- * @param arg0
- * @return x
- */
- @SuppressWarnings("unused")
- public int actionProc(final int id, final int sel, final int arg0) {
- return (int) this.actionProc((long) id, (long) sel, (long) arg0);
- }
-
- /**
- * Will be called on 64bit SWT.
- * @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");
- this.about.handleEvent(null);
- }
- } else if (sel == sel_preferencesMenuItemSelected_) {
- if (log.isDebugEnabled()) {
- log.debug("[MenuHookObject - actionProc] : Preferences");
- }
- this.pref.handleEvent(null);
-
- } else {
- if (log.isDebugEnabled()) {
- log.debug("[MenuHookObject - actionProc] : Unknow selection!");
- }
- }
- // Return value is not used.
- return 99;
- }
-
- // Getters and setters
- @SuppressWarnings("unused")
- public Listener getAbout() {
- return this.about;
- }
-
- @SuppressWarnings("unused")
- public Listener getPref() {
- return this.pref;
- }
- }
-
- /**
- * 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
- * The listener to invoke when the Quit menu is invoked.
- * @param aboutListener
- * The listener to invoke when the About menu is invoked.
- * @param preferencesListener
- * The listener to invoke when the Preferences menu is invoked.
- */
- public static void hookApplicationMenu(final Display display,
- final Listener quitListener, final Listener aboutListener,
- final Listener preferencesListener) {
- // This is our callbackObject whose 'actionProc' method will be called
- // when the About or
- // Preferences menuItem is invoked.
- final MenuHookObject target = new MenuHookObject(aboutListener,
- preferencesListener);
-
- try {
- // Initialize the menuItems.
- initialize(target);
- } catch (final Exception e) {
- throw new IllegalStateException(e);
- }
-
- // Connect the quit/exit menu.
- if (!display.isDisposed()) {
- display.addListener(SWT.Close, quitListener);
- }
-
- // Schedule disposal of callback object
- display.disposeExec(() -> {
- CocoaUIEnhancer.invoke(proc3Args, "dispose");
- });
- }
-
- private static void initialize(final Object callbackObject) throws Exception {
-
- final Class<?> osCls = classForName("org.eclipse.swt.internal.cocoa.OS");
-
- // Register names in objective-c.
- if (sel_toolbarButtonClicked_ == 0) {
- // sel_toolbarButtonClicked_ = registerName( osCls, "toolbarButtonClicked:" );
- sel_preferencesMenuItemSelected_ = registerName(osCls,
- "preferencesMenuItemSelected:");
- sel_aboutMenuItemSelected_ = registerName(osCls,
- "aboutMenuItemSelected:");
- }
-
- // Create an SWT Callback object that will invoke the actionProc method
- // of our internal
- // callbackObject.
- 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);
- if (proc3 == 0) {
- SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- }
-
- 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",
- 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),
- wrapPointer(sel_preferencesMenuItemSelected_),
- wrapPointer(proc3), "@:@" });
- invoke(osCls, "class_addMethod", new Object[] { wrapPointer(cls),
- wrapPointer(sel_aboutMenuItemSelected_), wrapPointer(proc3),
- "@:@" });
-
- // Get the Mac OS X Application menu.
- final Object sharedApplication = invoke(nsapplicationCls,
- "sharedApplication");
- final Object mainMenu = invoke(sharedApplication, "mainMenu");
- final Object mainMenuItem = invoke(nsmenuCls, mainMenu, "itemAtIndex",
- new Object[] { wrapPointer(0) });
- final Object appMenu = invoke(mainMenuItem, "submenu");
-
- // Create the About <application-name> menu command
- final Object aboutMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex",
- new Object[] { wrapPointer(kAboutMenuItem) });
- final Object nsStrAbout = invoke(nsstringCls, "stringWith",
- new Object[] { Messages.formatString("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) });
- final Object nsStrQuit = invoke(nsstringCls, "stringWith",
- new Object[] { Messages.formatString("main.quit", Constants.APP_NAME) });
- invoke(nsmenuitemCls, quitMenuItem, "setTitle",
- new Object[] { nsStrQuit });
-
- // Rename the hide action.
- final Object hideMenuItem = invoke(nsmenuCls, appMenu,
- "itemAtIndex",
- new Object[] { wrapPointer(kHideApplicationMenuItem) });
- final Object nsStrHide = invoke(nsstringCls, "stringWith",
- new Object[] { Messages.formatString("main.hide", Constants.APP_NAME) });
- invoke(nsmenuitemCls, hideMenuItem, "setTitle",
- new Object[] { nsStrHide });
-
- // Enable the Preferences menuItem.
- final Object prefMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex",
- new Object[] { wrapPointer(kPreferencesMenuItem) });
- invoke(nsmenuitemCls, prefMenuItem, "setEnabled", new Object[] { true });
-
- // Set the action to execute when the About or Preferences menuItem is
- // invoked.
-
- // We don't need to set the target here as the current target is the
- // SWTApplicationDelegate
- // and we have registerd the new selectors on it. So just set the new
- // action to invoke the
- // selector.
- invoke(nsmenuitemCls, prefMenuItem, "setAction",
- new Object[] { wrapPointer(sel_preferencesMenuItemSelected_) });
- 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",
- new Object[] { name });
- return convertToLong(object);
- }
-
- private static long convertToLong(final Object object) {
- if (object instanceof Integer) {
- final Integer i = (Integer) object;
- return i.longValue();
- }
- if (object instanceof Long) {
- final Long l = (Long) object;
- return l.longValue();
- }
- return 0;
- }
-
- private static Object wrapPointer(final long value) {
- final Class<?> PTR_CLASS = C.PTR_SIZEOF == 8 ? long.class : int.class;
- if (PTR_CLASS == long.class) {
- return Long.valueOf(value);
- }
- return Integer.valueOf((int) value);
- }
-
- private static Object invoke(final Class<?> clazz, final String methodName,
- final Object[] args) {
- return invoke(clazz, null, methodName, args);
- }
-
- private static Object invoke(final Class<?> clazz, final Object target,
- final String methodName, final Object[] args) {
- try {
- final Class<?>[] signature = new Class<?>[args.length];
- for (int i = 0; i < args.length; i++) {
- final Class<?> thisClass = args[i].getClass();
- if (thisClass == Integer.class) {
- signature[i] = int.class;
- } else if (thisClass == Long.class) {
- signature[i] = long.class;
- } else if (thisClass == Byte.class) {
- signature[i] = byte.class;
- } else if (thisClass == Boolean.class) {
- signature[i] = boolean.class;
- } else {
- signature[i] = thisClass;
- }
- }
- final Method method = clazz.getMethod(methodName, signature);
- return method.invoke(target, args);
- } catch (final Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- private static Class<?> classForName(final String classname) {
- try {
- final Class<?> cls = Class.forName(classname);
- return cls;
- } catch (final ClassNotFoundException e) {
- throw new IllegalStateException(e);
- }
- }
-
- private static Object invoke(final Class<?> cls, final String methodName) {
- return invoke(cls, methodName, (Class<?>[]) null, (Object[]) null);
- }
-
- private static Object invoke(final Class<?> cls, final String methodName,
- final Class<?>[] paramTypes, final Object... arguments) {
- try {
- final Method m = cls.getDeclaredMethod(methodName, paramTypes);
- return m.invoke(null, arguments);
- } catch (final Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- static Object invoke(final Object obj, final String methodName) {
- return invoke(obj, methodName, (Class<?>[]) null, (Object[]) null);
- }
-
- private static Object invoke(final Object obj, final String methodName,
- final Class<?>[] paramTypes, final Object... arguments) {
- try {
- final Method m = obj.getClass().getDeclaredMethod(methodName,
- paramTypes);
- return m.invoke(obj, arguments);
- } catch (final Exception e) {
- throw new IllegalStateException(e);
- }
- }
-}
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
deleted file mode 100644
index b0ff16ea..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.utils;
-
-// Imports
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.commons.httpclient.methods.multipart.PartSource;
-
-import at.asit.pdfover.signer.DocumentSource;
-
-/**
- *
- */
-public class FileUploadSource implements PartSource {
-
- private DocumentSource source;
-
- /**
- * Constructor
- *
- * @param source
- * the source
- */
- public FileUploadSource(DocumentSource source) {
- this.source = source;
- }
-
- @Override
- public long getLength() {
- return this.source.getLength();
- }
-
- @Override
- public String getFileName() {
- return "sign.pdf";
- }
-
- @Override
- public InputStream createInputStream() throws IOException {
- return this.source.getInputStream();
- }
-}
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
deleted file mode 100644
index 5d90ae6f..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/LocaleSerializer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.utils;
-
-// Imports
-import java.util.Locale;
-
-import javax.annotation.Nonnull;
-
-import at.asit.pdfover.commons.Constants;
-
-/**
- *
- */
-public class LocaleSerializer {
- /**
- * Parse a locale from a string
- * @param localeString the string
- * @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++) {
- if(locale[i].toString().equals(localeString)) {
- targetLocale = locale[i];
- break;
- }
- }
- return targetLocale;
- }
-
- /**
- * creates a parsable string for a locale
- * @param locale the locale
- * @return the parsable string
- */
- public static @Nonnull String getParsableString(Locale locale) {
- return Constants.ISNOTNULL(locale.toString());
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java
deleted file mode 100644
index 22e52467..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java
+++ /dev/null
@@ -1,235 +0,0 @@
-package at.asit.pdfover.gui.utils;
-
-import java.awt.Desktop;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.function.Consumer;
-
-import javax.annotation.Nullable;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Messages;
-
-public final class SWTUtils {
-
- private static final Logger log = LoggerFactory.getLogger(SWTUtils.class);
-
- /* oh how i miss C++, and compile-time safety; this would be so much cleaner as a templated function */
- private static void genericSetText(Object swtObj, String text) {
- try {
- Method m = swtObj.getClass().getMethod("setText", String.class);
- m.invoke(swtObj, text);
- } catch (NoSuchMethodException | IllegalAccessException e) {
- log.error("Attempted to setLocalizedText on object of type {}, which does not have an accessible setText method", swtObj.getClass().getSimpleName(), e);
- } catch (InvocationTargetException e) {
- log.error("Failed to setLocalizedText on object of type {}", swtObj.getClass().getSimpleName(), e);
- }
-
- try {
- // request re-layout if possible, changing the text content will change the bounding box
- Method m = swtObj.getClass().getMethod("requestLayout");
- m.invoke(swtObj);
- } catch (NoSuchMethodException | IllegalAccessException e) {
- // do nothing, this may not exist on every control we use
- } catch (InvocationTargetException e) {
- log.error("Failed to re-layout {}", swtObj.getClass().getSimpleName(), e);
- }
- }
- public static void setLocalizedText(Object o, String messageKey) { genericSetText(o, Messages.getString(messageKey)); }
- public static void setLocalizedText(Object o, String formatMessageKey, Object... formatArgs) { genericSetText(o, Messages.formatString(formatMessageKey, formatArgs)); }
-
- private static void genericSetToolTipText(Object swtObj, String text) {
- try {
- Method m = swtObj.getClass().getMethod("setToolTipText", String.class);
- m.invoke(swtObj, text);
- } catch (NoSuchMethodException | IllegalAccessException e) {
- log.error("Attempted to setLocalizedToolTipText on object of type {}, which does not have an accessible setToolTipText method", swtObj.getClass().getSimpleName(), e);
- } catch (InvocationTargetException e) {
- log.error("Failed to setLocalizedToolTipText on object of type {}", swtObj.getClass().getSimpleName(), e);
- }
- }
- public static void setLocalizedToolTipText(Object o, String messageKey) { genericSetToolTipText(o, Messages.getString(messageKey));}
-
- public static void disableEventDefault(Control c, int event) {
- c.addListener(event, (Event e) -> { e.doit = false; });
- }
-
- public static void scrollPassthrough(Control c) {
- c.addListener(SWT.MouseVerticalWheel, (Event e) -> {
- // disable default handling
- e.doit = false;
-
- // find containing ScrolledComposite
- Composite target = c.getParent();
- while ((target != null) && !(target instanceof ScrolledComposite))
- target = target.getParent();
-
- if (target == null)
- return;
-
- // scroll containing ScrolledComposite
- ScrolledComposite sTarget = (ScrolledComposite)target;
- Point origin = sTarget.getOrigin();
- origin.y -= (e.count * 10);
- sTarget.setOrigin(origin);
- });
- }
-
- public static void setFontHeight(Control c, int height) {
- FontData[] fD = c.getFont().getFontData();
- fD[0].setHeight(height);
- Font font = new Font(c.getDisplay(), fD[0]);
- c.setFont(font);
- }
-
- public static void setFontStyle(Control c, int style) {
- FontData[] fD = c.getFont().getFontData();
- fD[0].setStyle(style);
- Font font = new Font(c.getDisplay(), fD[0]);
- c.setFont(font);
- }
-
- public static class AnchorSetter {
- private final Control c;
- private final FormData fd;
- private AnchorSetter(Control c, boolean isNew)
- {
- this.c = c;
- if (isNew) {
- this.fd = new FormData();
- this.c.setLayoutData(this.fd);
- } else {
- Object layoutData = this.c.getLayoutData();
- try {
- this.fd = (FormData)layoutData;
- } catch (ClassCastException e) {
- log.error("Tried to reanchor() object with layout data of type {} (not FormData)", layoutData.getClass().getSimpleName(), e);
- throw new RuntimeException("Invalid reanchor() use");
- }
- }
- }
-
- 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(Control control) { return top(new FormAttachment(control)); }
- 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(Control control) { return left(new FormAttachment(control)); }
- 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(Control control) { return right(new FormAttachment(control)); }
- 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(Control control) { return bottom(new FormAttachment(control)); }
- public AnchorSetter bottom(int num, int offset) { return bottom(new FormAttachment(num, offset)); }
- public AnchorSetter bottom(int num) { return bottom(new FormAttachment(num)); }
- }
- public static AnchorSetter anchor(Control c) { return new AnchorSetter(c, true); }
- public static AnchorSetter reanchor(Control c) { return new AnchorSetter(c, false); }
-
- /**
- * functional-interface wrapper around swtObj.addSelectionListener
- * @param swtObj SWT widget supporting addSelectionListener
- * @param callback widgetSelected method
- */
- public static void addSelectionListener(Object swtObj, Consumer<SelectionEvent> callback) {
- try {
- Method m = swtObj.getClass().getMethod("addSelectionListener", SelectionListener.class);
- m.invoke(swtObj, new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { callback.accept(e); } });
- } catch (NoSuchMethodException | IllegalAccessException e) {
- log.error("Attempted to pass object of type {} to addSelectionListener; object does not have an accessible addSelectionListener method", swtObj.getClass().getSimpleName(), e);
- } catch (InvocationTargetException e) {
- log.error("Failed to add selection listener on object of type {}", swtObj.getClass().getSimpleName(), e);
- }
- }
-
- /**
- * @see SWTUtils#addSelectionListener(Object, Consumer)
- */
- public static void addSelectionListener(Object swtObj, Runnable callback) {
- addSelectionListener(swtObj, (e) -> { callback.run(); });
- }
-
- /**
- * functional-interface wrapper around swtObj.addMouseListener
- * @param swtObj SWT widget supporting addMouseListener
- * @param callback mouseDown method
- */
- public static void addMouseDownListener(Object swtObj, Consumer<MouseEvent> callback) {
- try {
- Method m = swtObj.getClass().getMethod("addMouseListener", MouseListener.class);
- m.invoke(swtObj, new MouseAdapter() { @Override public void mouseDown (MouseEvent e) { callback.accept(e); } });
- } catch (NoSuchMethodException | IllegalAccessException e) {
- log.error("Attempted to pass object of type {} to addMouseDownListener; object does not have an accessible addMouseListener method", swtObj.getClass().getSimpleName(), e);
- } catch (InvocationTargetException e) {
- log.error("Failed to add selection listeer on object of type {}", swtObj.getClass().getSimpleName(), e);
- }
- }
-
- /**
- * @see SWTUtils#addMouseDownListener(Object, Consumer)
- */
- public static void addMouseDownListener(Object swtObj, Runnable callback) {
- addMouseDownListener(swtObj, (e) -> { callback.run(); });
- }
-
- public static void openURL(@Nullable URI uri) {
- try {
- if (uri == null) return;
- if (Desktop.isDesktopSupported()) {
- Desktop.getDesktop().browse(uri);
- } else {
- Program.launch(uri.toURL().toExternalForm());
- }
- } catch (Exception e) {
- log.warn("Failed to open URI: {}", uri, e);
- }
- }
-
- public static void openURL(@Nullable String uri) {
- if (uri == null) return;
- try {
- openURL(new URI(uri));
- } catch (URISyntaxException e) {
- log.warn("Failed to open URI: {}", uri, e);
- }
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/UpdateCheckManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/UpdateCheckManager.java
deleted file mode 100644
index 168f5b18..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/UpdateCheckManager.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package at.asit.pdfover.gui.utils;
-
-import java.util.ArrayList;
-import java.util.function.Consumer;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.bku.BKUHelper;
-import at.asit.pdfover.gui.controls.Dialog;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.Dialog.ICON;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-public final class UpdateCheckManager {
- private static final Logger log = LoggerFactory.getLogger(UpdateCheckManager.class);
- private static Thread updateCheckThread = null;
- private static boolean needsCheck = false;
-
- public enum Status { NOT_CHECKED, CHECKING, OUTDATED, UP_TO_DATE, FAILED };
- private static Status currentStatus = Status.NOT_CHECKED;
- public static Status getCurrentStatus() {
- synchronized (UpdateCheckManager.class) {
- return currentStatus;
- }
- }
-
- private static ArrayList<Consumer<Status>> statusCallbacks = new ArrayList<>();
- public static void registerStatusCallback(Consumer<Status> f) {
- synchronized (UpdateCheckManager.class) {
- statusCallbacks.add(f);
- f.accept(currentStatus);
- }
- }
-
- private static void setStatus(Status status) {
- synchronized(UpdateCheckManager.class) {
- currentStatus = status;
- for (Consumer<Status> f : statusCallbacks)
- f.accept(status);
- }
- }
-
- private static String latestVersionNotified = null;
- private static Status runCheck(Shell shell) {
- HttpClient client = (HttpClient) BKUHelper.getHttpClient();
- GetMethod method = new GetMethod(Constants.CURRENT_RELEASE_URL);
- try {
- client.executeMethod(method);
- final String version = method.getResponseBodyAsString().trim();
- if (!VersionComparator.before(Constants.APP_VERSION, version))
- return Status.UP_TO_DATE;
-
- if ((latestVersionNotified == null) || VersionComparator.before(latestVersionNotified, version)) {
- latestVersionNotified = version;
- // invoke GUI message in main thread
- shell.getDisplay().asyncExec(() -> {
- Dialog info = new Dialog(shell,
- Messages.getString("version_check.UpdateTitle"),
- Messages.formatString("version_check.UpdateText", version),
- BUTTONS.OK_CANCEL, ICON.INFORMATION);
-
- if (info.open() == SWT.OK)
- SWTUtils.openURL(Constants.UPDATE_URL);
- });
- }
-
- return Status.OUTDATED;
- } catch (Exception e) {
- log.error("Error downloading update information: ", e);
- return Status.FAILED;
- }
- }
-
- public static void checkNow(Shell shell) {
- if (Constants.APP_VERSION == null)
- return;
-
- synchronized (UpdateCheckManager.class) {
- if (updateCheckThread != null)
- return;
-
- needsCheck = true;
- updateCheckThread = new Thread(() -> {
- synchronized(UpdateCheckManager.class) {
- setStatus(Status.CHECKING);
- }
- while (true) {
- Status status = runCheck(shell);
- synchronized (UpdateCheckManager.class) {
- if (!UpdateCheckManager.needsCheck) {
- setStatus(status);
- UpdateCheckManager.updateCheckThread = null;
- return;
- }
- UpdateCheckManager.needsCheck = false;
- setStatus(Status.CHECKING);
- }
- }
- });
- updateCheckThread.start();
- }
- }
-}
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
deleted file mode 100644
index 9d06dfb1..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.utils;
-
-// Imports
-import java.util.Comparator;
-
-/**
- *
- */
-public class VersionComparator implements Comparator<String> {
- /* (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- @Override
- public int compare(String v1, String v2) {
- String[] v1Parts = v1.split("\\.|-");
- String[] v2Parts = v2.split("\\.|-");
-
- int length = Math.max(v1Parts.length, v2Parts.length);
- for (int i = 0; i < length; ++i) {
- int v1Part = 0;
- try {
- if (i < v1Parts.length)
- v1Part = Integer.parseInt(v1Parts[i]);
- } catch (NumberFormatException e) {
- if (v1Parts[i].equals("SNAPSHOT"))
- v1Part = Integer.MAX_VALUE;
- }
-
- int v2Part = 0;
- try {
- if (i < v2Parts.length)
- v2Part = Integer.parseInt(v2Parts[i]);
- } catch (NumberFormatException e) {
- if (v2Parts[i].equals("SNAPSHOT"))
- v2Part = Integer.MAX_VALUE;
- }
-
- if (v1Part < v2Part)
- return -1;
- if (v1Part > v2Part)
- return 1;
- }
- return 0;
- }
-
- /**
- * Compare two version strings (static version)
- * @param v1 version 1
- * @param v2 version 2
- * @return -1 if v1 &lt; v2, 0 if v1 = v2, 1 if v1 &gt; v2
- */
- public static int compare_s(String v1, String v2) {
- VersionComparator vc = new VersionComparator();
- return vc.compare(v1, v2);
- }
-
- /**
- * Check two version strings for equality
- * @param v1 version 1
- * @param v2 version 2
- * @return v1 == v2
- */
- public static boolean equals(String v1, String v2) {
- return compare_s(v1, v2) == 0;
- }
-
- /**
- * Check two version strings for order
- * @param v1 version 1
- * @param v2 version 2
- * @return v1 &lt; v2
- */
- public static boolean before(String v1, String v2) {
- return compare_s(v1, v2) < 0;
- }
-
- /**
- * Check two version strings for order
- * @param v1 version 1
- * @param v2 version 2
- * @return v1 &gt; v2
- */
- public static boolean after(String v1, String v2) {
- return compare_s(v1, v2) > 0;
- }
-}
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
deleted file mode 100644
index a25de58a..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.utils;
-
-// Imports
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Zipper/unzipper to backup/extract configuration
- */
-public class Zipper {
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(Zipper.class);
-
- /**
- * Compresses the source path to Zip File output stream
- * @param sourcePath
- * @param os
- * @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
- * @param sourcePath
- * @param os
- * @param doDelete whether to delete content after compression
- * @throws IOException
- */
- public static void zip(String sourcePath, OutputStream os, boolean doDelete) throws IOException {
- ZipOutputStream zos = new ZipOutputStream(os);
- File dir = new File(sourcePath);
- zip(dir, dir.toURI(), zos, doDelete);
- zos.close();
- }
-
- private static void zip(File f, URI root, ZipOutputStream zos, boolean doDelete) throws IOException {
- if (f.isDirectory()) {
- File[] subDirs = f.listFiles();
- for (File subDir : subDirs) {
- zip(subDir, root, zos, doDelete);
- if (doDelete && !f.toURI().equals(root))
- subDir.delete();
- }
- } else {
- URI path = root.relativize(f.toURI());
- ZipEntry entry = new ZipEntry(path.toString());
- zos.putNextEntry(entry);
- byte[] buffer = new byte[1024];
- int len;
- BufferedInputStream is = new BufferedInputStream(new FileInputStream(f));
- while ((len = is.read(buffer)) >= 0)
- zos.write(buffer, 0, len);
- is.close();
- zos.closeEntry();
- if (doDelete)
- f.delete();
- }
- }
-
- /**
- * Extracts Zip File input stream to target path
- * @param is
- * @param targetPath
- * @throws IOException
- */
- public static void unzip(InputStream is, String targetPath) throws IOException {
- ZipInputStream zis = new ZipInputStream(is);
- ZipEntry entry;
- // while there are entries I process them
- while ((entry = zis.getNextEntry()) != null) {
- log.debug("entry: " + entry.getName() + ", " ////
- + entry.getSize());
- // consume all the data from this entry
-
- if (entry.isDirectory()) {
- 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());
- }
- }
- continue;
- }
- byte[] buffer = new byte[1024];
- int len;
- BufferedOutputStream out = new BufferedOutputStream(
- 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/StateMachine.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java
deleted file mode 100644
index b5df6ff3..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow;
-
-//Imports
-import java.lang.reflect.Constructor;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.MainWindow;
-import at.asit.pdfover.gui.composites.StateComposite;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.gui.workflow.states.PrepareConfigurationState;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- * Workflow holds logical state of signing process and updates the current
- * logical state
- */
-public class StateMachine {
-
- private static final Logger log = LoggerFactory.getLogger(StateMachine.class);
-
- public final Status status;
- public final ConfigurationManager configProvider;
- public final String[] cmdLineArgs;
-
- /**
- * Default constructor
- *
- * @param cmdLineArgs
- */
- public StateMachine(String[] cmdLineArgs) {
- this.status = new Status();
- this.status.setCurrentState(new PrepareConfigurationState(this));
- this.configProvider = new ConfigurationManager();
- this.cmdLineArgs = cmdLineArgs;
- }
-
- /**
- * Sets the workflow 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 state
- *
- * @param state
- */
- public void jumpToState(State state) {
- this.status.setCurrentState(state);
- this.invokeUpdate();
- }
-
- /**
- * Update workflow logic and let state machine do its job...
- */
- public synchronized void update() {
- State next = null;
- while (this.status.getCurrentState() != null) {
- State current = this.status.getCurrentState();
- try {
- current.run();
- } catch (Exception e) {
- log.error("StateMachine update: ", e);
- ErrorDialog errorState = new ErrorDialog(this.getMainShell(),
- Messages.getString("error.Unexpected"), BUTTONS.OK);
- //errorState.setException(e);
- //jumpToState(errorState);
- errorState.open();
- this.exit();
- }
-
- if (this.exit) {
- // exit request ignore
- next = null;
- this.status.setCurrentState(next);
- } else {
-
- if (this.mainWindow != null && !this.mainWindow.getShell().isDisposed()) {
- log.debug("Allowing MainWindow to update its state for " + current);
- current.updateMainWindowBehavior();
- this.mainWindow.applyBehavior();
- this.mainWindow.doLayout();
- }
-
- // TODO: i really want this to be a return value from run()
- next = current.nextState();
- if (next == current) {
- break;
- }
-
- if (next == null) {
- log.info("Next state is null -> exit");
- this.status.setCurrentState(next);
- break;
- }
-
- log.debug("Changing state from: "
- + current + " to "
- + next.toString());
- this.status.setCurrentState(next);
- }
- }
- }
-
- /**
- * Invoke Update in UI (Main) Thread
- */
- public void invokeUpdate() {
- if (this.display != null) {
- this.display.asyncExec(() -> {
- this.update();
- });
- }
- }
-
- private Display display = null;
-
- private Shell shell = null;
-
- private Composite container = null;
-
- private MainWindow mainWindow = null;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.workflow.StateMachine#display(org.eclipse.swt.widgets
- * .Composite)
- */
- public void display(StateComposite composite) {
- this.mainWindow.setTopControl(composite);
- }
-
- private void createMainWindow() {
- try {
-
- this.display = Display.getDefault();
-
- this.mainWindow = new MainWindow(this);
- this.mainWindow.open();
-
- this.shell = this.mainWindow.getShell();
-
- this.container = this.mainWindow.getContainer();
-
- this.shell.open();
- this.shell.layout();
- } catch (Exception e) {
- log.warn("Main-Window creation FAILED.", e);
- this.display = null;
- this.mainWindow = null;
- this.shell = null;
- this.container = null;
- throw e;
- }
- }
-
- /**
- * Gets the Shell for drawing the ui
- *
- * @return Composite
- */
- public synchronized Composite getComposite() {
- // Main window will be built on first call
- // returns SWT Composite container for states to draw their GUI
-
- if (this.container == null) {
- this.createMainWindow();
- }
-
- return this.container;
- }
-
- public <T> T createComposite(Class<T> compositeClass, int style, State state) {
- T composite = null;
- try {
- Constructor<T> constructor = compositeClass.getDeclaredConstructor(
- Composite.class, int.class, State.class);
- composite = constructor.newInstance(getComposite(), style, state);
- } catch (Exception e) {
- log.error("Could not create Composite for Class "
- + compositeClass.getName(), e);
- }
- return composite;
- }
-
- /**
- * Only returns a shell if one was already created ...
- *
- * @return
- */
- private Shell nonCreatingGetShell() {
- return this.shell;
- }
-
- private boolean exit = false;
-
- /**
- * Exists the Workflow
- */
- public void exit() {
- this.exit = true;
- if (this.shell != null) {
- this.shell.dispose();
- }
- }
-
- /**
- * Only returns a shell if one was already created ...
- *
- * @return
- */
- private Display nonCreatingGetDisplay() {
- return this.display;
- }
-
- /**
- * Workflow main entrance point
- */
- public void start() {
-
- // Call update to start processing ...
- update();
-
- // if a user interaction is required we have a shell ...
- Shell shell = nonCreatingGetShell();
- Display display = nonCreatingGetDisplay();
-
- if (this.status.getCurrentState() == null) {
- if (shell != null) {
- this.shell.dispose();
- }
- }
-
- if (shell != null && display != null) {
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- display.dispose();
- }
- }
-
-
- public synchronized Shell getMainShell() {
- if(this.shell == null) {
- this.createMainWindow();
- }
-
- return this.shell;
- }
-
- public void reloadResources() {
- this.mainWindow.reloadLocalization();
- }
-}
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
deleted file mode 100644
index ba5e5fd5..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow;
-
-// Imports
-import java.io.File;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.BKUs;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.pdfover.signer.SignResult;
-import at.asit.pdfover.signer.SignaturePosition;
-import at.asit.pdfover.signer.pdfas.PdfAs4SigningState;
-
-public class Status {
- private static final Logger log = LoggerFactory.getLogger(Status.class);
-
- public File document = null;
-
- public SignaturePosition signaturePosition = null;
-
- public BKUs bku = BKUs.NONE;
-
- private State currentState = null;
-
- private State previousState = null;
-
- public PdfAs4SigningState signingState = null;
-
- public SignResult signResult = null;
-
- public final MainWindowBehavior behavior;
-
- public boolean searchForPlacehoderSignature = false;
-
- public Status() {
- this.behavior = new MainWindowBehavior();
- }
-
- public State getCurrentState() {
- return this.currentState;
- }
-
- public void setCurrentState(State newState) {
- log.debug("Changing from " + currentState + " to " + newState);
-
- if ((previousState != null) && (previousState != currentState) && (previousState != newState))
- {
- // Reference to previous state will be lost - perform cleanup
- log.debug("Cleaning up " + previousState);
- previousState.cleanUp();
- }
-
- this.previousState = currentState;
- this.currentState = newState;
- }
-
- public State getPreviousState() {
- return this.previousState;
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationDataInMemory.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationDataInMemory.java
deleted file mode 100644
index adf03913..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationDataInMemory.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.config;
-
-// Imports
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.util.Locale;
-import java.util.Objects;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
-import at.asit.pdfover.commons.Profile;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Display;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.BKUs;
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.bku.mobile.MobileBKUValidator;
-import at.asit.pdfover.gui.exceptions.InvalidEmblemFile;
-import at.asit.pdfover.gui.exceptions.InvalidPortException;
-
-import static at.asit.pdfover.commons.Constants.ISNOTNULL;
-
-/**
- * Implementation of the configuration container
- */
-public class ConfigurationDataInMemory {
- /**
- * SLF4J Logger instance
- **/
- @SuppressWarnings("unused")
- private static final Logger log = LoggerFactory.getLogger(ConfigurationDataInMemory.class);
-
- /** the emblem size (in mm) for logo only signatures */
- public double logoOnlyTargetSize = Constants.DEFAULT_LOGO_ONLY_SIZE;
-
- /** the emblem File */
- protected String emblemFile = null;
- public String getEmblemPath() { return this.emblemFile; }
- public void setEmblem(String emblemFile) throws InvalidEmblemFile {
- if (emblemFile == null || emblemFile.trim().isEmpty()) {
- // Ok to set no file ...
- } else {
- File imageFile = new File(emblemFile);
- if (!imageFile.exists()) {
- throw new InvalidEmblemFile(imageFile,
- new FileNotFoundException(emblemFile));
- }
-
- try {
- Image img = new Image(Display.getDefault(), new ImageData(
- emblemFile));
-
- img.dispose();
- } catch (Exception ex) {
- throw new InvalidEmblemFile(imageFile, ex);
- }
- }
-
- this.emblemFile = emblemFile;
- }
-
- /** The mobile phone number */
- protected @CheckForNull String mobileNumber = null;
- public @CheckForNull String getMobileNumber() { return this.mobileNumber; }
- public void setMobileNumber(String number) {
- if(number == null || number.trim().isEmpty()) {
- this.mobileNumber = null;
- return;
- }
- this.mobileNumber = MobileBKUValidator.normalizeMobileNumber(number);
- }
-
- /** The mobile phone password */
- public @CheckForNull String mobilePassword = null;
-
- public boolean rememberPassword = false;
-
- /** Holds the proxy host */
- public @CheckForNull String proxyHost = null;
-
- /** Holds the proxy port number */
- protected int proxyPort = -1;
- public int getProxyPort() { return this.proxyPort; }
- public void setProxyPort(int port) throws InvalidPortException {
- if(port > 0 && port <= 0xFFFF) {
- this.proxyPort = port;
- return;
- }
- if(port == -1) {
- this.proxyPort = -1;
- return;
- }
- throw new InvalidPortException(port);
- }
-
- /** Holds the proxy username */
- public @CheckForNull String proxyUser = null;
-
- /** Holds the proxy password */
- public @CheckForNull String proxyPass = null;
-
- /** Holds the default BKU to use */
- public @Nonnull BKUs defaultBKU = BKUs.NONE;
-
- /** Holds the output folder */
- public @CheckForNull String outputFolder = null;
-
- /** Holds the signatureNote */
- public @CheckForNull String signatureNote = null;
-
- /** Holds the locale */
- public @CheckForNull Locale interfaceLocale = null;
-
- /** Holds the signature locale */
- public @CheckForNull Locale signatureLocale = null;
-
- /** Holds the PDF/A compatibility setting */
- public boolean signaturePDFACompat = false;
-
- /** Holds the default signature position */
- public boolean autoPositionSignature = false;
-
- /** Keystore signing options */
- public enum KeyStorePassStorageType { MEMORY, DISK };
- public @CheckForNull Boolean keystoreEnabled = null;
- public @CheckForNull String keystoreFile = null;
- public @CheckForNull String keystoreType = null;
- public @CheckForNull String keystoreAlias = null;
- public @CheckForNull KeyStorePassStorageType keystorePassStorageType = null;
- public @CheckForNull String keystoreStorePass = null;
- public @CheckForNull String keystoreKeyPass = null;
-
- /** Whether to automatically check for updates */
- public boolean updateCheck = true;
-
- /** Holds the main window size
- *
- * @IMPORTANT this must always be valid and non-null, even if configuration failed to load for whatever reason (it is used by error handlers!)
- */
- public @Nonnull Point mainWindowSize = new Point(Constants.DEFAULT_MAINWINDOW_WIDTH, Constants.DEFAULT_MAINWINDOW_HEIGHT);
-
- /** Whether to skip the output state */
- public boolean skipFinish = false;
-
- /** Whether to use an existing signature marker. */
- protected boolean useMarker = false;
- public boolean getUseMarker() { return this.useMarker; }
- public void setUseMarker(boolean useMarker) {
- this.useMarker = useMarker;
- if (useMarker) setUseSignatureFields(false);
- }
-
- /** Either QR-Code or signature fields as marker */
- protected boolean useSignatureFields = false;
- public boolean getUseSignatureFields() { return this.useSignatureFields; }
- public void setUseSignatureFields(boolean useFields) {
- this.useSignatureFields = useFields;
- if (useFields) setUseMarker(false);
- }
-
- /** describes if the placeholder search is enabled */
- public boolean enabledPlaceholderUsage = false;
-
- /** The Signature Profile */
- protected @CheckForNull Profile signatureProfile = null;
- public @Nonnull Profile getSignatureProfile() {
- return ISNOTNULL(Objects.requireNonNullElse(this.signatureProfile, Profile.SIGNATURBLOCK_SMALL));
- }
- public void setSignatureProfile(Profile profile) { this.signatureProfile = profile; }
-
- public @Nonnull String saveFilePostFix = Constants.DEFAULT_POSTFIX;
-
- /** whether fido2 authentication should be selected by default */
- public boolean fido2ByDefault = false;
-
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java
deleted file mode 100644
index 39071667..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java
+++ /dev/null
@@ -1,919 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.config;
-
-// Imports
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Locale;
-import java.util.Properties;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
-import at.asit.pdfover.commons.Profile;
-
-import org.apache.commons.io.FileUtils;
-import org.eclipse.swt.graphics.Point;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.BKUs;
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.exceptions.InvalidEmblemFile;
-import at.asit.pdfover.gui.exceptions.InvalidPortException;
-import at.asit.pdfover.gui.utils.LocaleSerializer;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory.KeyStorePassStorageType;
-import at.asit.pdfover.commons.Messages;
-
-import static at.asit.pdfover.commons.Constants.ISNOTNULL;
-
-/**
- * Implementation of the configuration provider and manipulator
- */
-public class ConfigurationManager {
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(ConfigurationManager.class);
-
- private String configurationFile = Constants.DEFAULT_CONFIG_FILENAME;
-
- private boolean loaded = false;
-
- // The persistent configuration read from the config file
- private ConfigurationDataInMemory configuration;
-
- // The configuration overlay built from the cmd line args
- private ConfigurationDataInMemory configurationOverlay;
-
- // whether the configuration screen should crash on startup (for debugging purposes)
- public boolean crashOnConfig = false;
-
- /**
- * Constructor
- */
- public ConfigurationManager() {
- this.configuration = new ConfigurationDataInMemory();
- this.configurationOverlay = new ConfigurationDataInMemory();
- }
-
- static public void factoryResetPersistentConfig() {
- // tell logback to close all file handles
- ((ch.qos.logback.classic.LoggerContext)LoggerFactory.getILoggerFactory()).stop();
-
- File configDirectory = new File(Constants.CONFIG_DIRECTORY);
- File backupDirectory = new File(Constants.CONFIG_BACKUP_DIRECTORY);
-
- // delete existing backup, if any
- FileUtils.deleteQuietly(backupDirectory);
-
- // attempt 1: try to move the old config directory to a backup location
- try {
- FileUtils.moveDirectory(
- configDirectory,
- backupDirectory
- );
- } catch (Exception e) {
- System.out.println("Failed move config directory to backup location:");
- e.printStackTrace();
-
- // attempt 2: try to simply force delete the config directory
- try {
- FileUtils.forceDelete(configDirectory);
- } catch (Exception e2) {
- System.out.println("Failed to delete config directory:");
- e2.printStackTrace();
-
- // attempt 3: try to schedule the config directory for force deletion on JVM exit
- try {
- FileUtils.forceDeleteOnExit(configDirectory);
- } catch (Exception e3) {
- System.out.println("Failed to schedule config directory for deletion:");
- e3.printStackTrace();
- }
- }
- }
- }
-
- /* load from disk */
- public void loadFromDisk() throws IOException {
- if (loaded)
- throw new RuntimeException("ConfigProvider double load?");
-
- Properties diskConfig = new Properties();
-
- diskConfig.load(new FileInputStream(Constants.CONFIG_DIRECTORY + File.separator + getConfigurationFileName()));
-
- { /* for testing of error handlers */
- String crashProperty = diskConfig.getProperty("CRASH");
- if ("startup".equalsIgnoreCase(crashProperty))
- throw new RuntimeException("A robot must obey the orders given it by human beings except where such orders would conflict with the First Law.\n(CRASH=startup is set.)");
- else if ("config".equalsIgnoreCase(crashProperty))
- this.crashOnConfig = true;
- else if (crashProperty != null)
- log.warn("Unknown value '{}' for CRASH property -- you want 'startup' or 'config'.", crashProperty);
- }
-
- setDefaultEmblemPersistent(diskConfig.getProperty(Constants.CFG_EMBLEM));
- try {
- String strProp = diskConfig.getProperty(Constants.CFG_LOGO_ONLY_SIZE);
- if (strProp != null)
- setLogoOnlyTargetSizePersistent(Double.parseDouble(strProp));
- } catch (NumberFormatException e) { log.info("Invalid value for CFG_LOGO_ONLY_SIZE ignored.", e); }
-
- setDefaultMobileNumberPersistent(diskConfig.getProperty(Constants.CFG_MOBILE_NUMBER));
- setRememberMobilePasswordPersistent(Constants.TRUE.equals(diskConfig.getProperty(Constants.CFG_MOBILE_PASSWORD_REMEMBER)));
-
- setProxyHostPersistent(diskConfig.getProperty(Constants.CFG_PROXY_HOST));
- setProxyUserPersistent(diskConfig.getProperty(Constants.CFG_PROXY_USER));
- setProxyPassPersistent(diskConfig.getProperty(Constants.CFG_PROXY_PASS));
-
- setDefaultOutputFolderPersistent(diskConfig.getProperty(Constants.CFG_OUTPUT_FOLDER));
-
- String postFix = diskConfig.getProperty(Constants.CFG_POSTFIX);
- if (postFix == null)
- setSaveFilePostFixPersistent(Constants.DEFAULT_POSTFIX);
- else
- setSaveFilePostFixPersistent(postFix);
-
- String localeString = diskConfig.getProperty(Constants.CFG_LOCALE);
-
- Locale targetLocale = LocaleSerializer.parseFromString(localeString);
- if (targetLocale != null)
- setInterfaceLocalePersistent(targetLocale);
-
- String signatureLocaleString = diskConfig.getProperty(Constants.CFG_SIGNATURE_LOCALE);
-
- Locale signatureTargetLocale = LocaleSerializer.parseFromString(signatureLocaleString);
- if (signatureTargetLocale != null)
- setSignatureLocalePersistent(signatureTargetLocale);
-
- String useMarker = diskConfig.getProperty(Constants.CFG_USE_MARKER);
- if (useMarker != null)
- setUseMarkerPersistent(useMarker.equalsIgnoreCase(Constants.TRUE));
-
- String useSignatureFields = diskConfig.getProperty(Constants.CFG_USE_SIGNATURE_FIELDS);
- if (useSignatureFields != null)
- setUseSignatureFieldsPersistent(useSignatureFields.equalsIgnoreCase(Constants.TRUE));
-
- String enablePlaceholder = diskConfig.getProperty(Constants.CFG_ENABLE_PLACEHOLDER);
- if (enablePlaceholder != null)
- setEnablePlaceholderUsagePersistent(enablePlaceholder.equalsIgnoreCase(Constants.TRUE));
-
- String signatureProfileName = diskConfig.getProperty(Constants.SIGNATURE_PROFILE);
- if (signatureProfileName != null)
- setSignatureProfilePersistent(Profile.getProfile(signatureProfileName));
-
- if (diskConfig.containsKey(Constants.CFG_SIGNATURE_NOTE))
- setSignatureNotePersistent(diskConfig.getProperty(Constants.CFG_SIGNATURE_NOTE));
- else
- setSignatureNotePersistent(getSignatureProfile().getDefaultSignatureBlockNote(getSignatureLocale()));
-
- String compat = diskConfig.getProperty(Constants.CFG_SIGNATURE_PDFA_COMPAT);
- if (compat != null)
- setSignaturePdfACompatPersistent(compat.equalsIgnoreCase(Constants.TRUE));
-
- String proxyPortString = diskConfig.getProperty(Constants.CFG_PROXY_PORT);
- if (proxyPortString != null && !proxyPortString.trim().isEmpty())
- {
- int port = Integer.parseInt(proxyPortString);
-
- if (port > 0 && port <= 0xFFFF)
- setProxyPortPersistent(port);
- else
- log.warn("Proxy port is out of range!: " + port);
- }
-
- // Set Default BKU
- String bkuString = diskConfig.getProperty(Constants.CFG_BKU);
- BKUs defaultBKU = BKUs.NONE;
- if (bkuString != null) {
- try {
- defaultBKU = BKUs.valueOf(bkuString);
- } catch (IllegalArgumentException ex) {
- log.error("Invalid BKU config value " + bkuString + " using none!");
- defaultBKU = BKUs.NONE;
- } catch (NullPointerException ex) {
- log.error("Invalid BKU config value " + bkuString + " using none!");
- defaultBKU = BKUs.NONE;
- }
- }
- setDefaultBKUPersistent(defaultBKU);
-
- // Set MainWindow size
- int width = Constants.DEFAULT_MAINWINDOW_WIDTH;
- int height = Constants.DEFAULT_MAINWINDOW_HEIGHT;
- String size = diskConfig.getProperty(Constants.CFG_MAINWINDOW_SIZE);
- parse: {
- if (size == null)
- break parse;
- int pos = size.indexOf(',');
- if (pos <= 0)
- break parse;
-
- try {
- 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);
- // ignore parsing exception
- }
- }
- this.configuration.mainWindowSize = new Point(width, height);
-
- // Set Signature Position
- String signaturePositionStr = diskConfig.getProperty(Constants.CFG_SIGNATURE_POSITION);
- setAutoPositionSignaturePersistent(signaturePositionStr != null && signaturePositionStr.trim().equals("auto"));
-
- //Set keystore stuff
- String keystoreEnabled = diskConfig.getProperty(Constants.CFG_KEYSTORE_ENABLED);
- if (keystoreEnabled != null)
- setKeyStoreEnabledPersistent(keystoreEnabled.equalsIgnoreCase(Constants.TRUE));
- setKeyStoreFilePersistent(diskConfig.getProperty(Constants.CFG_KEYSTORE_FILE));
- setKeyStoreTypePersistent(diskConfig.getProperty(Constants.CFG_KEYSTORE_TYPE));
- setKeyStoreAliasPersistent(diskConfig.getProperty(Constants.CFG_KEYSTORE_ALIAS));
- setKeyStoreStorePassPersistent(diskConfig.getProperty(Constants.CFG_KEYSTORE_STOREPASS));
- setKeyStoreKeyPassPersistent(diskConfig.getProperty(Constants.CFG_KEYSTORE_KEYPASS));
- String storeTypeOnDisk = diskConfig.getProperty(Constants.CFG_KEYSTORE_PASSSTORETYPE);
- if (storeTypeOnDisk == null) /* auto-detect based on old config */
- {
- String oldKeyPass = getKeyStoreKeyPassPersistent();
- String oldStorePass = getKeyStoreStorePassPersistent();
- if ((oldKeyPass != null && !oldKeyPass.trim().isEmpty()) || (oldStorePass != null && !oldStorePass.trim().isEmpty())) /* previously stored password exists */
- storeTypeOnDisk = "disk";
- else
- storeTypeOnDisk = "memory";
- }
- if ("disk".equals(storeTypeOnDisk))
- setKeyStorePassStorageTypePersistent(KeyStorePassStorageType.DISK);
- else if ("memory".equals(storeTypeOnDisk))
- setKeyStorePassStorageTypePersistent(KeyStorePassStorageType.MEMORY);
- else
- setKeyStorePassStorageTypePersistent(null);
-
- // Set update check
- String updateCheck = diskConfig.getProperty(Constants.CFG_UPDATE_CHECK);
- if (updateCheck != null)
- setUpdateCheckPersistent(!updateCheck.equalsIgnoreCase(Constants.FALSE));
-
- setFido2ByDefaultPersistent(Constants.TRUE.equalsIgnoreCase(diskConfig.getProperty(Constants.CFG_FIDO2_BY_DEFAULT)));
-
- log.info("Successfully loaded config from: " + getConfigurationFileName());
- loaded = true;
- }
-
- private void setProperty(@Nonnull Properties props, @Nonnull String key, @Nonnull String value) { props.setProperty(key, value); }
- private void setPropertyIfNotNull(@Nonnull Properties props, @Nonnull String key, @CheckForNull String value) { if (value != null) setProperty(props, key, value); }
- private void setPropertyIfNotBlank(@Nonnull Properties props, @Nonnull String key, @Nonnull String value) { if (!value.isEmpty()) setProperty(props, key, value); }
- /* save to file */
- public void saveToDisk() throws IOException {
- String filename = this.getConfigurationFileName();
- File configFile = new File(Constants.CONFIG_DIRECTORY + File.separator + filename);
-
- Properties props = new Properties();
- props.clear();
-
- setProperty(props, Constants.CFG_BKU, ISNOTNULL(getDefaultBKUPersistent().name()));
-
- setPropertyIfNotNull(props, Constants.CFG_PROXY_HOST, getProxyHostPersistent());
- int proxyPort = getProxyPortPersistent();
- if (proxyPort != -1)
- setProperty(props, Constants.CFG_PROXY_PORT, ISNOTNULL(Integer.toString(proxyPort)));
- setPropertyIfNotNull(props, Constants.CFG_PROXY_USER, getProxyUserPersistent());
- setPropertyIfNotNull(props, Constants.CFG_PROXY_PASS, getProxyPassPersistent());
-
- setPropertyIfNotNull(props, Constants.CFG_EMBLEM, getDefaultEmblemPersistent());
- setProperty(props, Constants.CFG_LOGO_ONLY_SIZE, ISNOTNULL(Double.toString(getLogoOnlyTargetSize())));
-
- setPropertyIfNotNull(props, Constants.CFG_SIGNATURE_NOTE, getSignatureNote());
- setPropertyIfNotNull(props, Constants.CFG_MOBILE_NUMBER, getDefaultMobileNumberPersistent());
- if (getRememberMobilePassword())
- setProperty(props, Constants.CFG_MOBILE_PASSWORD_REMEMBER, Constants.TRUE);
- setPropertyIfNotNull(props, Constants.CFG_OUTPUT_FOLDER, getDefaultOutputFolderPersistent());
- setProperty(props, Constants.CFG_POSTFIX, getSaveFilePostFix());
-
- Point size = this.configuration.mainWindowSize;
- setProperty(props, Constants.CFG_MAINWINDOW_SIZE, size.x + "," + size.y);
-
- Locale configLocale = getInterfaceLocale();
- if(configLocale != null) {
- setProperty(props, Constants.CFG_LOCALE, LocaleSerializer.getParsableString(configLocale));
- }
-
- Locale signatureLocale = this.getSignatureLocale();
- if(signatureLocale != null) {
- setProperty(props, Constants.CFG_SIGNATURE_LOCALE, LocaleSerializer.getParsableString(signatureLocale));
- }
-
- if (getUseMarker())
- setProperty(props, Constants.CFG_USE_MARKER, Constants.TRUE);
-
- if (getUseSignatureFields()) {
- setProperty(props, Constants.CFG_USE_SIGNATURE_FIELDS, Constants.TRUE);
- }
-
- if (getEnablePlaceholderUsage()) {
- setProperty(props, Constants.CFG_ENABLE_PLACEHOLDER, Constants.TRUE);
- }
-
- if (getSignaturePdfACompat())
- setProperty(props, Constants.CFG_SIGNATURE_PDFA_COMPAT, Constants.TRUE);
-
- if (!getAutoPositionSignaturePersistent())
- setProperty(props, Constants.CFG_SIGNATURE_POSITION, "");
- else
- setProperty(props, Constants.CFG_SIGNATURE_POSITION, "auto");
-
- if (Constants.THEME != Constants.Themes.DEFAULT)
- setProperty(props, Constants.CFG_THEME, ISNOTNULL(Constants.THEME.name()));
-
- if (getKeyStoreEnabledPersistent())
- setProperty(props, Constants.CFG_KEYSTORE_ENABLED, Constants.TRUE);
- setPropertyIfNotBlank(props, Constants.CFG_KEYSTORE_FILE, getKeyStoreFilePersistent());
- setPropertyIfNotBlank(props, Constants.CFG_KEYSTORE_TYPE, getKeyStoreTypePersistent());
- setPropertyIfNotBlank(props, Constants.CFG_KEYSTORE_ALIAS, getKeyStoreAliasPersistent());
-
- KeyStorePassStorageType keystorePassStorageType = getKeyStorePassStorageType();
- if (keystorePassStorageType == null)
- setProperty(props, Constants.CFG_KEYSTORE_PASSSTORETYPE, "none");
- else if (keystorePassStorageType == KeyStorePassStorageType.MEMORY)
- setProperty(props, Constants.CFG_KEYSTORE_PASSSTORETYPE, "memory");
- else if (keystorePassStorageType == KeyStorePassStorageType.DISK)
- setProperty(props, Constants.CFG_KEYSTORE_PASSSTORETYPE, "disk");
-
- if (keystorePassStorageType == KeyStorePassStorageType.DISK)
- {
- String keystoreStorePass = getKeyStoreStorePassPersistent();
- if (keystoreStorePass == null)
- keystoreStorePass = "";
- setProperty(props, Constants.CFG_KEYSTORE_STOREPASS, keystoreStorePass);
- String keystoreKeyPass = getKeyStoreKeyPassPersistent();
- if (keystoreKeyPass == null)
- keystoreKeyPass = "";
- setProperty(props, Constants.CFG_KEYSTORE_KEYPASS, keystoreKeyPass);
- }
-
- if (!getUpdateCheck())
- setProperty(props, Constants.CFG_UPDATE_CHECK, Constants.FALSE);
-
- if (getFido2ByDefault())
- setProperty(props, Constants.CFG_FIDO2_BY_DEFAULT, Constants.TRUE);
-
- setProperty(props, Constants.SIGNATURE_PROFILE, ISNOTNULL(getSignatureProfile().name()));
-
-
- FileOutputStream outputstream = new FileOutputStream(configFile, false);
-
- props.store(outputstream, "Configuration file was generated!");
-
- log.info("Configuration file saved to " + configFile.getAbsolutePath());
- }
-
- static private <T> T fallThroughOnNull(T one, T two) { return (one != null) ? one : two; }
-
- public void setConfigurationFileName(String configurationFile)
- {
- if (this.configurationFile.equals(configurationFile))
- return;
- if (this.loaded)
- throw new RuntimeException("Cannot change configuration file path after it has been loaded");
- this.configurationFile = configurationFile;
- }
- public String getConfigurationFileName() { return this.configurationFile; }
-
- public void setDefaultBKUPersistent(@Nonnull BKUs bku) {
- this.configuration.defaultBKU = bku;
- }
-
- public void setDefaultBKUOverlay(@Nonnull BKUs bku) {
- this.configurationOverlay.defaultBKU = bku;
- }
-
- public @Nonnull BKUs getDefaultBKU() {
- BKUs bku = this.configurationOverlay.defaultBKU;
- if (bku == BKUs.NONE)
- bku = getDefaultBKUPersistent();
- return bku;
- }
-
- public @Nonnull BKUs getDefaultBKUPersistent() {
- return this.configuration.defaultBKU;
- }
-
- public void setAutoPositionSignaturePersistent(boolean state) {
- this.configuration.autoPositionSignature = state;
- }
-
- public void setAutoPositionSignatureOverlay() {
- this.configurationOverlay.autoPositionSignature = true;
- }
-
- public boolean getAutoPositionSignature() {
- return this.configurationOverlay.autoPositionSignature || getAutoPositionSignaturePersistent();
- }
-
- public boolean getAutoPositionSignaturePersistent() {
- return this.configuration.autoPositionSignature;
- }
-
- public void setDefaultMobileNumberPersistent(String number) {
- if (number == null || number.trim().isEmpty()) {
- this.configuration.setMobileNumber(null);
- } else {
- this.configuration.setMobileNumber(number);
- }
- }
-
- public void setDefaultMobileNumberOverlay(String number) {
- if (number == null || number.trim().isEmpty()) {
- this.configurationOverlay.setMobileNumber(null);
- } else {
- this.configurationOverlay.setMobileNumber(number);
- }
- }
-
- public @CheckForNull String getDefaultMobileNumber() {
- return fallThroughOnNull(this.configurationOverlay.getMobileNumber(), getDefaultMobileNumberPersistent());
- }
-
- public @CheckForNull String getDefaultMobileNumberPersistent() {
- return this.configuration.getMobileNumber();
- }
-
- public void setDefaultMobilePasswordOverlay(String password) {
- if (password == null || password.trim().isEmpty()) {
- this.configurationOverlay.mobilePassword = null;
- } else {
- this.configurationOverlay.mobilePassword = password;
- }
- }
-
- public @CheckForNull String getDefaultMobilePassword() {
- /* this does not exist as a permanent config variable */
- return this.configurationOverlay.mobilePassword;
- }
-
- public boolean getRememberMobilePassword() {
- return this.configuration.rememberPassword;
- }
-
- public void setRememberMobilePasswordPersistent(boolean state) {
- this.configuration.rememberPassword = state;
- }
-
- public void setDefaultEmblemPersistent(String emblem) {
- try {
- if (emblem == null || emblem.trim().isEmpty()) {
- this.configuration.setEmblem(null);
- } else {
- this.configuration.setEmblem(emblem);
- }
- } catch (InvalidEmblemFile e) {
- log.error("Error setting emblem file", e);
- try {
- this.configuration.setEmblem(null);
- } catch (InvalidEmblemFile e1) {
- // Ignore
- }
- }
- }
-
- public void setDefaultEmblemOverlay(String emblem) {
- try {
- if (emblem == null || emblem.trim().isEmpty()) {
- this.configurationOverlay.setEmblem(null);
- } else {
- this.configurationOverlay.setEmblem(emblem);
- }
- } catch (InvalidEmblemFile e) {
- log.error("Error setting emblem file", e);
- try {
- this.configurationOverlay.setEmblem(null);
- } catch (InvalidEmblemFile e1) {
- // Ignore
- }
- }
- }
-
- public @CheckForNull String getDefaultEmblemPath() {
- return fallThroughOnNull(this.configurationOverlay.getEmblemPath(), getDefaultEmblemPersistent());
- }
-
- public @CheckForNull String getDefaultEmblemPersistent() {
- return this.configuration.getEmblemPath();
- }
-
- public void setLogoOnlyTargetSizePersistent(double v) {
- this.configuration.logoOnlyTargetSize = v;
- }
-
- public double getLogoOnlyTargetSize() {
- return this.configuration.logoOnlyTargetSize;
- }
-
- public void setProxyHostPersistent(String host) {
- if (host == null || host.trim().isEmpty()) {
- this.configuration.proxyHost = null;
- } else {
- this.configuration.proxyHost = host;
- }
- }
-
- public void setProxyHostOverlay(String host) {
- if (host == null || host.trim().isEmpty()) {
- this.configurationOverlay.proxyHost = null;
- } else {
- this.configurationOverlay.proxyHost = host;
- }
- }
-
- public @CheckForNull String getProxyHost() {
- return fallThroughOnNull(this.configurationOverlay.proxyHost, getProxyHostPersistent());
- }
-
- public @CheckForNull String getProxyHostPersistent() {
- return this.configuration.proxyHost;
- }
-
- public void setProxyPortPersistent(int port) {
- try {
- this.configuration.setProxyPort(port);
- } catch (InvalidPortException e) {
- log.error("Error setting proxy port" , e);
- // ignore
- }
- }
-
- public void setProxyPortOverlay(int port) {
- try {
- this.configurationOverlay.setProxyPort(port);
- } catch (InvalidPortException e) {
- log.error("Error setting proxy port" , e);
- // ignore
- }
- }
-
- public int getProxyPort() {
- int port = this.configurationOverlay.getProxyPort();
- if (port == -1) // TODO -1 is a terrible, no good, very bad hack
- port = getProxyPortPersistent();
- return port;
- }
-
- public int getProxyPortPersistent() {
- return this.configuration.getProxyPort();
- }
-
- public void setProxyUserPersistent(String user) {
- if (user == null || user.trim().isEmpty()) {
- this.configuration.proxyUser = null;
- } else {
- this.configuration.proxyUser = user;
- }
- }
-
- public void setProxyUserOverlay(String user) {
- if (user == null || user.trim().isEmpty()) {
- this.configurationOverlay.proxyUser = null;
- } else {
- this.configurationOverlay.proxyUser = user;
- }
- }
-
- public @CheckForNull String getProxyUser() {
- return fallThroughOnNull(this.configurationOverlay.proxyUser, getProxyUserPersistent());
- }
-
- public @CheckForNull String getProxyUserPersistent() {
- return this.configuration.proxyUser;
- }
-
- public void setProxyPassPersistent(String pass) {
- if (pass == null || pass.trim().isEmpty()) {
- this.configuration.proxyPass = null;
- } else {
- this.configuration.proxyPass = pass;
- }
- }
-
- public void setProxyPassOverlay(String pass) {
- if (pass == null || pass.trim().isEmpty()) {
- this.configurationOverlay.proxyPass = null;
- } else {
- this.configurationOverlay.proxyPass = pass;
- }
- }
-
- public @CheckForNull String getProxyPass() {
- return fallThroughOnNull(this.configurationOverlay.proxyPass, getProxyPassPersistent());
- }
-
- public @CheckForNull String getProxyPassPersistent() {
- return this.configuration.proxyPass;
- }
-
- public void setDefaultOutputFolderPersistent(String outputFolder) {
- if (outputFolder == null || outputFolder.trim().isEmpty()) {
- this.configuration.outputFolder = null;
- } else {
- this.configuration.outputFolder = outputFolder;
- }
- }
-
- public void setDefaultOutputFolderOverlay(String outputFolder) {
- if (outputFolder == null || outputFolder.trim().isEmpty()) {
- this.configurationOverlay.outputFolder = null;
- } else {
- this.configurationOverlay.outputFolder = outputFolder;
- }
- }
-
- public @CheckForNull String getDefaultOutputFolder() {
- return fallThroughOnNull(this.configurationOverlay.outputFolder, getDefaultOutputFolderPersistent());
- }
-
- public @CheckForNull String getDefaultOutputFolderPersistent() {
- return this.configuration.outputFolder;
- }
-
- public void setSignatureNotePersistent(String note) {
- if (note == null || note.trim().isEmpty()) {
- this.configuration.signatureNote = null;
- } else {
- this.configuration.signatureNote = note;
- }
- }
-
- public @CheckForNull String getSignatureNote() {
- return this.configuration.signatureNote;
- }
-
- public void setInterfaceLocalePersistent(Locale locale) {
- if(locale == null) {
- this.configuration.interfaceLocale = Messages.getDefaultLocale();
- } else {
- this.configuration.interfaceLocale = locale;
- Locale.setDefault(locale);
- Messages.setLocale(locale);
- }
- }
-
- public @Nonnull Locale getInterfaceLocale() {
- Locale locale = this.configuration.interfaceLocale;
- if (locale == null)
- locale = Messages.getDefaultLocale();
- return locale;
- }
-
- public void setSignatureLocalePersistent(Locale locale) {
- if(locale == null) {
- this.configuration.signatureLocale = Messages.getDefaultLocale();
- } else {
- this.configuration.signatureLocale = locale;
- }
- }
-
- public @Nonnull Locale getSignatureLocale() {
- Locale locale = this.configuration.signatureLocale;
- if (locale == null)
- locale = Messages.getDefaultLocale();
- return locale;
- }
-
- public void setSignaturePdfACompatPersistent(boolean compat) {
- this.configuration.signaturePDFACompat = compat;
- }
-
- public boolean getSignaturePdfACompat() {
- return this.configuration.signaturePDFACompat;
- }
-
- public void setKeyStoreEnabledPersistent(Boolean enabled) {
- this.configuration.keystoreEnabled = enabled;
- }
-
- public void setKeyStoreEnabledOverlay(Boolean enabled) {
- this.configurationOverlay.keystoreEnabled = enabled;
- }
-
- public boolean getKeyStoreEnabled() {
- return ISNOTNULL(fallThroughOnNull(this.configurationOverlay.keystoreEnabled, getKeyStoreEnabledPersistent()));
- }
-
- public boolean getKeyStoreEnabledPersistent() {
- return ISNOTNULL(fallThroughOnNull(this.configuration.keystoreEnabled, Boolean.FALSE));
- }
-
- public void setKeyStoreFilePersistent(@CheckForNull String file) {
- if (file == null || file.trim().isEmpty()) {
- this.configuration.keystoreFile = "";
- } else {
- this.configuration.keystoreFile = file;
- }
- }
-
- public void setKeyStoreFileOverlay(@CheckForNull String file) {
- if (file == null || file.trim().isEmpty()) {
- this.configurationOverlay.keystoreFile = null;
- } else {
- this.configurationOverlay.keystoreFile = file;
- }
- }
-
- public @Nonnull String getKeyStoreFile() {
- return ISNOTNULL(fallThroughOnNull(this.configurationOverlay.keystoreFile, getKeyStoreFilePersistent()));
- }
-
- public @Nonnull String getKeyStoreFilePersistent() {
- return ISNOTNULL(this.configuration.keystoreFile);
- }
-
- public void setKeyStoreTypePersistent(@CheckForNull String type) {
- if (type == null || type.trim().isEmpty()) {
- this.configuration.keystoreType = "";
- } else {
- this.configuration.keystoreType = type;
- }
- }
-
- public void setKeyStoreTypeOverlay(@CheckForNull String type) {
- if (type == null || type.trim().isEmpty()) {
- this.configurationOverlay.keystoreType = null;
- } else {
- this.configurationOverlay.keystoreType = type;
- }
- }
-
- public @Nonnull String getKeyStoreType() {
- return ISNOTNULL(fallThroughOnNull(this.configurationOverlay.keystoreType, getKeyStoreTypePersistent()));
- }
-
- public @Nonnull String getKeyStoreTypePersistent() {
- return ISNOTNULL(this.configuration.keystoreType);
- }
-
- public void setKeyStoreAliasPersistent(@CheckForNull String alias) {
- if (alias == null || alias.trim().isEmpty()) {
- this.configuration.keystoreAlias = "";
- } else {
- this.configuration.keystoreAlias = alias;
- }
- }
-
- public void setKeyStoreAliasOverlay(@CheckForNull String alias) {
- if (alias == null || alias.trim().isEmpty()) {
- this.configurationOverlay.keystoreAlias = null;
- } else {
- this.configurationOverlay.keystoreAlias = alias;
- }
- }
-
- public @Nonnull String getKeyStoreAlias() {
- return ISNOTNULL(fallThroughOnNull(this.configurationOverlay.keystoreAlias, getKeyStoreAliasPersistent()));
- }
-
- public @Nonnull String getKeyStoreAliasPersistent() {
- return ISNOTNULL(this.configuration.keystoreAlias);
- }
-
- public void setKeyStorePassStorageTypePersistent(@CheckForNull KeyStorePassStorageType type) {
- this.configuration.keystorePassStorageType = type;
- }
-
- public @CheckForNull KeyStorePassStorageType getKeyStorePassStorageType() {
- return this.configuration.keystorePassStorageType;
- }
-
- public void setKeyStoreStorePassPersistent(@CheckForNull String storePass) {
- this.configuration.keystoreStorePass = storePass;
- }
-
- public void setKeyStoreStorePassOverlay(@CheckForNull String storePass) {
- this.configurationOverlay.keystoreStorePass = storePass;
- }
-
- public @CheckForNull String getKeyStoreStorePass() {
- String storePass = this.configurationOverlay.keystoreStorePass;
- if (storePass != null)
- return storePass;
- if (getKeyStorePassStorageType() != KeyStorePassStorageType.DISK)
- return null;
- return getKeyStoreStorePassPersistent();
- }
-
- public @CheckForNull String getKeyStoreStorePassPersistent() {
- return this.configuration.keystoreStorePass;
- }
-
- public void setKeyStoreKeyPassPersistent(@CheckForNull String keyPass) {
- this.configuration.keystoreKeyPass = keyPass;
- }
-
- public void setKeyStoreKeyPassOverlay(@CheckForNull String keyPass) {
- this.configurationOverlay.keystoreKeyPass = keyPass;
- }
-
- public @CheckForNull String getKeyStoreKeyPass() {
- String keyPass = this.configurationOverlay.keystoreKeyPass;
- if (keyPass != null)
- return keyPass;
- if (getKeyStorePassStorageType() != KeyStorePassStorageType.DISK)
- return null;
- return getKeyStoreKeyPassPersistent();
- }
-
- public @CheckForNull String getKeyStoreKeyPassPersistent() {
- return this.configuration.keystoreKeyPass;
- }
-
- public void setUpdateCheckPersistent(boolean checkUpdate) {
- this.configuration.updateCheck = checkUpdate;
- }
-
- public boolean getUpdateCheck() {
- return this.configuration.updateCheck;
- }
-
- public void setMainWindowSizePersistent(@Nonnull Point size) {
- this.configuration.mainWindowSize = size;
- }
-
- public @Nonnull Point getMainWindowSize() {
- return this.configuration.mainWindowSize;
- }
-
- public boolean getSkipFinish() {
- return this.configurationOverlay.skipFinish;
- }
-
- public void setSkipFinishOverlay(boolean skipFinish) {
- this.configurationOverlay.skipFinish = skipFinish;
- }
-
- public boolean getUseSignatureFields() {
- return this.configuration.getUseSignatureFields();
- }
-
- public void setUseSignatureFieldsPersistent(boolean useFields) {
- this.configuration.setUseSignatureFields(useFields);
- if (useFields) setUseMarkerPersistent(false);
- }
-
- public boolean getUseMarker() {
- return this.configuration.getUseMarker();
- }
-
- public void setUseMarkerPersistent(boolean useMarker) {
- this.configuration.setUseMarker(useMarker);
- if (useMarker) setUseSignatureFieldsPersistent(false);
- }
-
- public void setSaveFilePostFixPersistent(@Nonnull String postFix) {
- this.configuration.saveFilePostFix = postFix;
- }
-
- public @Nonnull String getSaveFilePostFix(){
- return this.configuration.saveFilePostFix;
- }
-
- public @Nonnull Profile getSignatureProfile() {
- return ISNOTNULL(fallThroughOnNull(this.configuration.signatureProfile, Profile.SIGNATURBLOCK_SMALL));
- }
-
- public void setSignatureProfilePersistent(Profile profile) {
- this.configuration.signatureProfile = profile;
- }
-
- public void setEnablePlaceholderUsagePersistent(boolean bool) {
- this.configuration.enabledPlaceholderUsage = bool;
- }
-
- public boolean getEnablePlaceholderUsage() {
- return this.configuration.enabledPlaceholderUsage;
- }
-
- public void setFido2ByDefaultPersistent(boolean bool) {
- this.configuration.fido2ByDefault = bool;
- }
-
- public boolean getFido2ByDefault() {
- return this.configuration.fido2ByDefault;
- }
-
-}
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
deleted file mode 100644
index d1bdfe0d..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-//Imports
-import java.io.File;
-
-import org.eclipse.swt.SWT;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.bku.LocalBKUConnector;
-import at.asit.pdfover.commons.BKUs;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.composites.BKUSelectionComposite;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-
-/**
- * Decides which BKU to use (preconfigured or let user choose)
- */
-public class BKUSelectionState extends State {
-
- /**
- * @param stateMachine
- */
- public BKUSelectionState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
- /**
- * SLF4J Logger instance
- **/
- @SuppressWarnings("unused")
- private static final Logger log = LoggerFactory.getLogger(BKUSelectionState.class);
-
- private BKUSelectionComposite selectionComposite = null;
- private BKUSelectionComposite getSelectionComposite() {
- if (this.selectionComposite == null) {
- this.selectionComposite =
- getStateMachine().createComposite(BKUSelectionComposite.class, SWT.RESIZE, this);
- }
-
- return this.selectionComposite;
- }
-
- private boolean isKeystoreEnabled() {
- if (getStateMachine().configProvider.getKeyStoreEnabled()) {
- File ks = new File(getStateMachine().configProvider.getKeyStoreFile());
- return ks.exists();
- } else
- return false;
- }
-
- @Override
- public void run() {
- Status status = getStateMachine().status;
- State previousState = status.getPreviousState();
-
- final boolean hasLocalBKU = LocalBKUConnector.IsAvailable();
- final boolean hasKeystore = isKeystoreEnabled();
- if (
- (previousState instanceof OpenState) ||
- (previousState instanceof PositioningState)
- ) {
- if (!hasLocalBKU && !hasKeystore)
- status.bku = BKUs.MOBILE;
- } else if (!(previousState instanceof BKUSelectionState)) {
- status.bku = BKUs.NONE;
- }
-
- if(status.bku == BKUs.NONE) {
- BKUSelectionComposite selection = this.getSelectionComposite();
- selection.setLocalBKUEnabled(hasLocalBKU);
- selection.setKeystoreEnabled(hasKeystore);
-
- getStateMachine().display(selection);
- selection.layout();
-
- status.bku = selection.getSelected();
-
- if(status.bku == BKUs.NONE) {
- return;
- }
- }
- this.setNextState(new PrepareSigningState(getStateMachine()));
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- if (this.selectionComposite != null)
- this.selectionComposite.dispose();
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.reset();
- behavior.setEnabled(Buttons.CONFIG, true);
- behavior.setEnabled(Buttons.OPEN, true);
- behavior.setEnabled(Buttons.POSITION, true);
- behavior.setActive(Buttons.OPEN, true);
- behavior.setActive(Buttons.POSITION, true);
- behavior.setActive(Buttons.SIGN, true);
- }
-
- @Override
- public String toString() {
- return this.getClass().getName();
- }
-}
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
deleted file mode 100644
index 7393f13e..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-// Imports
-import org.eclipse.swt.SWT;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.composites.ConfigurationComposite;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-
-/**
- *
- */
-public class ConfigurationUIState extends State {
- private static final Logger log = LoggerFactory.getLogger(ConfigurationUIState.class);
-
- private ConfigurationComposite configurationComposite = null;
-
- private ConfigurationComposite getConfigurationComposite() {
- if (this.configurationComposite == null) {
- this.configurationComposite =
- getStateMachine().createComposite(ConfigurationComposite.class, SWT.RESIZE, this);
- this.configurationComposite.setConfigProvider(getStateMachine().configProvider);
- }
-
- return this.configurationComposite;
- }
-
- /**
- * @param stateMachine
- */
- public ConfigurationUIState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#run()
- */
- @Override
- public void run() {
- Status status = getStateMachine().status;
-
- ConfigurationComposite config;
- try {
- config = this.getConfigurationComposite();
- getStateMachine().display(config);
- } catch (Exception e) {
- log.error("Failed to initialize config UI", e);
- ErrorDialog error = new ErrorDialog(
- getStateMachine().getMainShell(),
- Messages.getString("error.ConfigInitialization"),
- BUTTONS.YES_NO
- );
-
- int selection = error.open();
- if (selection == SWT.YES)
- {
- ConfigurationManager.factoryResetPersistentConfig();
- getStateMachine().exit();
- return;
- }
-
- throw e;
- }
-
- if(config.isUserDone())
- {
- this.reloadResources();
- State previousState = status.getPreviousState();
- if (previousState instanceof OutputState)
- this.setNextState(new OpenState(getStateMachine()));
- else
- this.setNextState(previousState); // TODO do we need to tell a previous state to refresh from config settings? (positioning preview)
- }
- }
-
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- if(this.configurationComposite != null)
- this.configurationComposite.dispose();
- }
-
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#updateMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- // Leave the state as it is
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.setEnabled(Buttons.CONFIG, false);
- behavior.setMainBarVisible(false);
- }
-
- /**
- * Triggers to reload the resources
- */
- public void reloadResources() {
- getStateMachine().reloadResources();
- }
-}
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
deleted file mode 100644
index 42a2f605..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-// Imports
-import java.io.File;
-import java.security.Key;
-import java.security.KeyStore;
-import java.security.UnrecoverableKeyException;
-
-import org.eclipse.swt.SWT;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.keystore.KeystoreUtils;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.controls.PasswordInputDialog;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory.KeyStorePassStorageType;
-import at.asit.pdfover.signer.SignatureException;
-import at.asit.pdfover.signer.pdfas.PdfAs4SigningState;
-
-/**
- * Logical state for performing the BKU Request to a local BKU
- */
-public class KSState extends State {
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(KSState.class);
-
- /**
- * Constructor
- * @param stateMachine the StateMachine
- */
- public KSState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
- private void showError(String messageKey, Object... args)
- {
- new ErrorDialog(getStateMachine().getMainShell(), Messages.formatString(messageKey, args), BUTTONS.OK).open();
- }
-
- private boolean askShouldRetry(String messageKey, Object... args)
- {
- return SWT.RETRY == (new ErrorDialog(getStateMachine().getMainShell(), Messages.formatString(messageKey, args), BUTTONS.RETRY_CANCEL).open());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.workflow.WorkflowState#update(at.asit.pdfover.gui
- * .workflow.Workflow)
- */
- @Override
- public void run() {
- Status status = getStateMachine().status;
-
- PdfAs4SigningState signingState = status.signingState;
- ConfigurationManager config = getStateMachine().configProvider;
-
- try {
- String file = config.getKeyStoreFile();
- File f = new File(file);
- if (!f.isFile()) {
- log.error("Keystore not found");
- if (askShouldRetry("error.KeyStoreFileNotExist", f.getName()))
- this.run();
- else
- this.setNextState(new BKUSelectionState(getStateMachine()));
- return;
- }
- String type = config.getKeyStoreType();
- KeyStore keyStore = null;
- String storePass = config.getKeyStoreStorePass();
- while (keyStore == null) {
- if (storePass == null)
- {
- storePass = new PasswordInputDialog(
- getStateMachine().getMainShell(),
- Messages.getString("keystore_config.KeystoreStorePass"),
- Messages.getString("keystore.KeystoreStorePassEntry")).open();
-
- if (storePass == null)
- {
- this.setNextState(new BKUSelectionState(getStateMachine()));
- return;
- }
- }
-
- try {
- keyStore = KeystoreUtils.tryLoadKeystore(f, type, storePass);
- } catch (UnrecoverableKeyException e) {
- showError("error.KeyStoreStorePass");
- storePass = null;
- } catch (Exception e) {
- throw new SignatureException("Failed to load keystore", e);
- }
- }
-
- /* we've successfully unlocked the key store, save the entered password if requested */
- if (config.getKeyStorePassStorageType() == KeyStorePassStorageType.DISK)
- {
- /* only save to disk if the current keystore file is the one saved to disk */
- /* (might not be true if overridden from CLI) */
- if (file.equals(config.getKeyStoreFilePersistent()))
- config.setKeyStoreStorePassPersistent(storePass);
- else
- config.setKeyStoreStorePassOverlay(storePass);
- }
- else if (config.getKeyStorePassStorageType() == KeyStorePassStorageType.MEMORY)
- config.setKeyStoreStorePassOverlay(storePass);
-
- /* next, try to load the key from the now-unlocked keystore */
- String alias = config.getKeyStoreAlias();
- Key key = null;
- String keyPass = config.getKeyStoreKeyPass();
- while (key == null) {
- if (keyPass == null) {
- keyPass = new PasswordInputDialog(
- getStateMachine().getMainShell(),
- Messages.getString("keystore_config.KeystoreKeyPass"),
- Messages.getString("keystore.KeystoreKeyPassEntry")).open();
-
- if (keyPass == null)
- {
- this.setNextState(new BKUSelectionState(getStateMachine()));
- return;
- }
- }
-
- try {
- key = keyStore.getKey(alias, keyPass.toCharArray());
- if (key == null) /* alias does not exist */
- {
- if (!askShouldRetry("error.KeyStoreAliasExist", alias))
- {
- this.setNextState(new BKUSelectionState(getStateMachine()));
- return;
- }
- continue;
- }
- } catch (UnrecoverableKeyException e) {
- showError("error.KeyStoreKeyPass");
- keyPass = null;
- } catch (Exception e) {
- throw new SignatureException("Failed to load key from store", e);
- }
- }
-
- if (config.getKeyStorePassStorageType() == KeyStorePassStorageType.DISK)
- {
- if (file.equals(config.getKeyStoreFilePersistent()))
- config.setKeyStoreKeyPassPersistent(keyPass);
- else
- config.setKeyStoreKeyPassOverlay(keyPass);
- }
- else if (config.getKeyStorePassStorageType() == KeyStorePassStorageType.MEMORY)
- config.setKeyStoreKeyPassOverlay(keyPass);
-
- signingState.setKeystoreSigner(file, alias, storePass, keyPass, type);
- } catch (SignatureException e) {
- log.error("Error loading keystore", e);
- if (askShouldRetry("error.KeyStore"))
- this.run(); /* recurse */
- else
- this.setNextState(new BKUSelectionState(getStateMachine()));
- return;
- }
-
- // OK
- this.setNextState(new at.asit.pdfover.gui.workflow.states.SigningState(getStateMachine()));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- // No composite - no cleanup necessary
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.reset();
- behavior.setActive(Buttons.OPEN, true);
- behavior.setActive(Buttons.POSITION, true);
- behavior.setActive(Buttons.SIGN, true);
- }
-
- @Override
- public String toString() {
- return this.getClass().getName();
- }
-}
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
deleted file mode 100644
index f1bfa5b9..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-// Imports
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.eclipse.swt.SWT;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.bku.BKUHelper;
-import at.asit.pdfover.gui.bku.LocalBKUConnector;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.signer.pdfas.PdfAs4SigningState;
-
-/**
- * Logical state for performing the BKU Request to a local BKU
- */
-public class LocalBKUState extends State {
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(LocalBKUState.class);
-
- /**
- * HTTP Response server HEADER
- */
- public final static String BKU_RESPONSE_HEADER_SERVER = "server";
-
- /**
- * HTTP Response user-agent HEADER
- */
- public final static String BKU_RESPONSE_HEADER_USERAGENT = "user-agent";
-
- /**
- * HTTP Response SignatureLayout HEADER
- */
- public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout";
-
- Exception threadException = null;
-
- /** Whether to use Base64 or FileUpload Request */
- boolean useBase64Request = false;
-
- /**
- * Null-Operation SL-Request
- */
- 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
- * @param stateMachine the StateMachine
- */
- public LocalBKUState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
- /**
- *
- */
- private final class SignLocalBKUThread implements Runnable {
-
- private LocalBKUState state;
- private PdfAs4SigningState signingState;
-
-
- /**
- * @param localBKUState
- * @param signingState
- */
- public SignLocalBKUThread(LocalBKUState localBKUState, PdfAs4SigningState signingState) {
- this.state = localBKUState;
- this.signingState = signingState;
- }
-
- @Override
- public void run() {
- try {
-
- HttpClient client = (HttpClient) BKUHelper.getHttpClient();
-
- PostMethod method = new PostMethod(Constants.LOCAL_BKU_URL);
-
- String sl_request = NULL_OPERATION_REQUEST;
- method.addParameter("XMLRequest", sl_request);
- int returnCode = client.executeMethod(method);
-
- if (returnCode != HttpStatus.SC_OK) {
- this.state.threadException = new HttpException(
- method.getResponseBodyAsString());
- } else {
- String server = getResponseHeader(method, BKU_RESPONSE_HEADER_SERVER);
- if ((server != null) && (server.contains("trustDeskbasic") || server.contains("asignSecurityLayer")))
- LocalBKUState.this.useBase64Request = true;
-
- this.signingState.signatureResponse = method.getResponseBodyAsString();
- this.signingState.useBase64Request = LocalBKUState.this.useBase64Request;
- }
- } catch (Exception e) {
- log.error("SignLocalBKUThread: ", e);
-
- this.state.threadException = e;
- } finally {
- this.state.updateStateMachine();
- }
- }
-
- /**
- * Returns the value corresponding to the given header name
- * @param method the HTTP method
- * @param headerName the header name
- * @return the header value (or null if not found)
- */
- private String getResponseHeader(HttpMethod method, String headerName) {
- if (method.getResponseHeader(headerName) == null)
- return null;
- return method.getResponseHeader(headerName).getValue();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.workflow.WorkflowState#update(at.asit.pdfover.gui
- * .workflow.Workflow)
- */
- @Override
- public void run() {
- Status status = getStateMachine().status;
-
- PdfAs4SigningState signingState = status.signingState;
-
- if ((signingState.signatureResponse == null)
- && this.threadException == null) {
- Thread t = new Thread(new SignLocalBKUThread(this, signingState));
- t.start();
- return;
- }
- signingState.bkuConnector = new LocalBKUConnector();
-
- if (this.threadException != null) {
- ErrorDialog dialog = new ErrorDialog(
- getStateMachine().getMainShell(),
- Messages.getString("error.LocalBKU"),
- BUTTONS.RETRY_CANCEL);
- if (dialog.open() != SWT.RETRY) {
- //getStateMachine().exit();
- this.setNextState(new BKUSelectionState(getStateMachine()));
- return;
- }
- this.threadException = null;
- this.run();
- return;
- }
-
- // OK
- this.setNextState(new at.asit.pdfover.gui.workflow.states.SigningState(getStateMachine()));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- // No composite - no cleanup necessary
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.reset();
- behavior.setActive(Buttons.OPEN, true);
- behavior.setActive(Buttons.POSITION, true);
- behavior.setActive(Buttons.SIGN, true);
- }
-
- @Override
- public String toString() {
- return this.getClass().getName();
- }
-}
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
deleted file mode 100644
index d858c067..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
+++ /dev/null
@@ -1,668 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-import java.io.IOException;
-import java.net.ConnectException;
-import java.net.URI;
-import java.net.UnknownHostException;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-// Imports
-import at.asit.pdfover.signer.UserCancelledException;
-import at.asit.pdfover.signer.pdfas.PdfAs4SigningState;
-import at.asit.webauthn.PublicKeyCredential;
-import at.asit.webauthn.responsefields.AuthenticatorAssertionResponse;
-
-import org.apache.hc.client5.http.classic.methods.HttpGet;
-import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
-import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
-import org.apache.hc.client5.http.impl.classic.HttpClients;
-import org.apache.hc.core5.http.io.entity.EntityUtils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.bku.MobileBKUConnector;
-import at.asit.pdfover.gui.composites.WaitingComposite;
-import at.asit.pdfover.gui.composites.mobilebku.MobileBKUEnterNumberComposite;
-import at.asit.pdfover.gui.composites.mobilebku.MobileBKUEnterTANComposite;
-import at.asit.pdfover.gui.composites.mobilebku.MobileBKUFido2Composite;
-import at.asit.pdfover.gui.composites.mobilebku.MobileBKUFingerprintComposite;
-import at.asit.pdfover.gui.composites.mobilebku.MobileBKUQRComposite;
-import at.asit.pdfover.gui.composites.mobilebku.WaitingForAppComposite;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.Dialog.ICON;
-import at.asit.pdfover.gui.controls.Dialog;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.StateMachine;
-
-import static at.asit.pdfover.commons.Constants.ISNOTNULL;
-
-/**
- * Logical state for performing the BKU Request to the A-Trust Mobile BKU
- */
-public class MobileBKUState extends State {
- static final Logger log = LoggerFactory.getLogger(MobileBKUState.class);
-
- PdfAs4SigningState signingState;
-
- public Exception threadException = null;
-
- public MobileBKUState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
- MobileBKUEnterTANComposite mobileBKUEnterTANComposite = null;
-
- WaitingForAppComposite waitingForAppComposite = null;
- WaitingForAppComposite getWaitingForAppComposite() {
- if (this.waitingForAppComposite == null) {
- this.waitingForAppComposite = getStateMachine()
- .createComposite(WaitingForAppComposite.class, SWT.RESIZE, this);
- }
-
- return this.waitingForAppComposite;
- }
-
- WaitingComposite waitingComposite = null;
- WaitingComposite getWaitingComposite() {
- if (this.waitingComposite == null) {
- this.waitingComposite = getStateMachine()
- .createComposite(WaitingComposite.class, SWT.RESIZE, this);
- }
-
- return this.waitingComposite;
- }
-
- MobileBKUEnterTANComposite getMobileBKUEnterTANComposite() {
- if (this.mobileBKUEnterTANComposite == null) {
- this.mobileBKUEnterTANComposite = getStateMachine()
- .createComposite(MobileBKUEnterTANComposite.class, SWT.RESIZE, this);
- }
-
- return this.mobileBKUEnterTANComposite;
- }
-
- MobileBKUQRComposite mobileBKUQRComposite = null;
- MobileBKUQRComposite getMobileBKUQRComposite() {
- if (this.mobileBKUQRComposite == null) {
- this.mobileBKUQRComposite = getStateMachine()
- .createComposite(MobileBKUQRComposite.class, SWT.RESIZE, this);
- }
-
- return this.mobileBKUQRComposite;
- }
-
- MobileBKUEnterNumberComposite mobileBKUEnterNumberComposite = null;
- MobileBKUEnterNumberComposite getMobileBKUEnterNumberComposite() {
- if (this.mobileBKUEnterNumberComposite == null) {
- this.mobileBKUEnterNumberComposite = getStateMachine()
- .createComposite(MobileBKUEnterNumberComposite.class, SWT.RESIZE, this);
- }
-
- return this.mobileBKUEnterNumberComposite;
- }
-
- MobileBKUFingerprintComposite mobileBKUFingerprintComposite = null;
- MobileBKUFingerprintComposite getMobileBKUFingerprintComposite() {
- if (this.mobileBKUFingerprintComposite == null) {
- this.mobileBKUFingerprintComposite = getStateMachine()
- .createComposite(MobileBKUFingerprintComposite.class, SWT.RESIZE, this);
- }
-
- return this.mobileBKUFingerprintComposite;
- }
-
- MobileBKUFido2Composite mobileBKUFido2Composite = null;
- MobileBKUFido2Composite getMobileBKUFido2Composite() {
- if (this.mobileBKUFido2Composite == null) {
- this.mobileBKUFido2Composite = getStateMachine()
- .createComposite(MobileBKUFido2Composite.class, SWT.RESIZE, this);
- }
-
- return this.mobileBKUFido2Composite;
- }
-
- /**
- * @return the signingState
- */
- public PdfAs4SigningState getSigningState() {
- return this.signingState;
- }
-
- /**
- * Display an error message
- *
- * @param e
- * the exception
- */
- public void displayError(Exception e) {
- String message = null;
- if (e instanceof UnknownHostException)
- {
- log.error("Failed to resolve hostname", e);
- message = Messages.formatString("error.CouldNotResolveHostname", e.getMessage());
- } else if (e instanceof ConnectException) {
- log.error("Failed to connect", e);
- message = Messages.formatString("error.FailedToConnect", e.getMessage());
- } else {
- message = Messages.getString("error.Unexpected");
- log.error(message, e);
- String errormsg = e.getLocalizedMessage();
- if (errormsg != null && !errormsg.isEmpty())
- message += ": " + errormsg;
- }
- displayError(message);
- }
-
- /**
- * Display an error message
- *
- * @param message
- * the error message
- */
- public void displayError(final String message) {
- log.error(message);
- Display.getDefault().syncExec(() -> {
- ErrorDialog error = new ErrorDialog(getStateMachine().getMainShell(), message, BUTTONS.OK);
- error.open();
- });
- }
-
- public void showInformationMessage(final @Nonnull String message) throws UserCancelledException {
- Display.getDefault().syncCall(() -> {
- Dialog dialog = new Dialog(getStateMachine().getMainShell(), Messages.getString("common.info"), message, BUTTONS.OK, ICON.INFORMATION);
- int result = dialog.open();
- if (result == SWT.CANCEL)
- throw new UserCancelledException();
- return true; /* dummy return to keep java happy */
- });
- }
-
- /**
- * Show an error message to the user with "retry" or "cancel" as options
- * returns normally on "retry", throws UserCancelledException on "cancel"
- */
- public void showRecoverableError(final @Nonnull String errorMessage) throws UserCancelledException {
- Display.getDefault().syncCall(() -> {
- ErrorDialog error = new ErrorDialog(getStateMachine().getMainShell(), errorMessage, BUTTONS.RETRY_CANCEL);
- int result = error.open();
- if (result == SWT.CANCEL)
- throw new UserCancelledException();
- return true; /* dummy return */
- });
- }
-
- /**
- * Show an error message to the user with only an "ok" option;
- * throws UserCancelledException afterwards
- */
- public void showUnrecoverableError(final @Nonnull String errorMessage) throws UserCancelledException {
- Display.getDefault().syncCall(() -> {
- ErrorDialog error = new ErrorDialog(getStateMachine().getMainShell(), errorMessage, BUTTONS.OK);
- error.open();
- throw new UserCancelledException();
- });
- }
-
- public static class UsernameAndPassword {
- public @CheckForNull String username;
- public @CheckForNull String password;
- public UsernameAndPassword() {}
- public UsernameAndPassword(@Nullable String u, @Nullable String p) { this.username = u; this.password = p; }
- }
- public @Nonnull UsernameAndPassword getRememberedCredentials() {
- UsernameAndPassword r = new UsernameAndPassword();
- storeRememberedCredentialsTo(r);
- return r;
- }
- public void storeRememberedCredentialsTo(@Nonnull UsernameAndPassword output) {
- output.username = getStateMachine().configProvider.getDefaultMobileNumber();
- output.password = getStateMachine().configProvider.getDefaultMobilePassword();
- }
-
- public void rememberCredentialsIfNecessary(@Nullable String username, @Nullable String password) {
- if (getStateMachine().configProvider.getRememberMobilePassword())
- {
- getStateMachine().configProvider.setDefaultMobileNumberPersistent(username);
- getStateMachine().configProvider.setDefaultMobilePasswordOverlay(password);
- }
- }
- public void rememberCredentialsIfNecessary(@Nonnull UsernameAndPassword credentials) {
- rememberCredentialsIfNecessary(credentials.username, credentials.password);
- }
-
- public void clearRememberedPassword() {
- getStateMachine().configProvider.setDefaultMobilePasswordOverlay(null);
- }
-
- public @Nonnull UsernameAndPassword getCredentialsFromUser(@Nullable String currentUsername, @Nullable String errorMessage) throws UserCancelledException {
- UsernameAndPassword r = new UsernameAndPassword(currentUsername, null);
- getCredentialsFromUserTo(r, errorMessage);
- return r;
- }
-
- private void updateRememberPasswordSetting(boolean enabled, boolean allowEnabling) {
- final var config = getStateMachine().configProvider;
- if (enabled == config.getRememberMobilePassword()) /* nothing to do here */
- return;
- if (enabled && !allowEnabling) /* do not allow "cancel" to set the remember checkbox */
- return;
- config.setRememberMobilePasswordPersistent(enabled);
- if (!enabled) { /* clear remembered info */
- config.setDefaultMobileNumberPersistent(null);
- config.setDefaultMobilePasswordOverlay(null);
- }
- }
-
- public void getCredentialsFromUserTo(@Nonnull UsernameAndPassword credentials, @Nullable String errorMessage) throws UserCancelledException {
- Display.getDefault().syncCall(() -> {
- MobileBKUEnterNumberComposite ui = this.getMobileBKUEnterNumberComposite();
-
- if (!ui.userAck) { // We need number and password => show UI!
-
- if (errorMessage != null)
- ui.setErrorMessage(errorMessage);
- else
- ui.setErrorMessage(Messages.getString("mobileBKU.aTrustDisclaimer"));
-
- if ((ui.getMobileNumber() == null) || ui.getMobileNumber().isEmpty()) {
- // set possible phone number
- ui.setMobileNumber(credentials.username);
- }
-
- ui.setRememberPassword(getStateMachine().configProvider.getRememberMobilePassword());
-
- ui.enableButton();
- getStateMachine().display(ui);
-
- Display display = getStateMachine().getMainShell().getDisplay();
- while (!ui.userAck && !ui.userCancel) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- }
-
- updateRememberPasswordSetting(ui.isRememberPassword(), !ui.userCancel);
-
- if (ui.userCancel) {
- ui.userCancel = false;
- throw new UserCancelledException();
- }
-
- // user hit ok
- ui.userAck = false;
-
- // get number and password from UI
- credentials.username = ui.getMobileNumber();
- credentials.password = ui.getMobilePassword();
-
- // show waiting composite
- getStateMachine().display(this.getWaitingComposite());
-
- return true; /* dummy return for lambda type deduction */
- });
- }
-
- public static class SMSTanResult {
- public static enum ResultType { TO_FIDO2, SMSTAN };
- public final @Nonnull ResultType type;
- public final @CheckForNull String smsTan;
-
- private SMSTanResult(@Nullable String smsTan) { this.type = ResultType.SMSTAN; this.smsTan = smsTan; }
- private SMSTanResult(@Nonnull ResultType type) { this.type = type; this.smsTan = null; }
- }
-
- public @Nonnull SMSTanResult getSMSTanFromUser(final @Nonnull String referenceValue, final @Nullable URI signatureDataURI, final boolean showFido2, final @Nullable String errorMessage) throws UserCancelledException {
- return ISNOTNULL(Display.getDefault().syncCall(() -> {
- MobileBKUEnterTANComposite tan = getMobileBKUEnterTANComposite();
-
- tan.reset();
- tan.setRefVal(referenceValue);
- tan.setSignatureDataURI(signatureDataURI);
- tan.setErrorMessage(errorMessage);
- tan.setFIDO2Enabled(showFido2);
- getStateMachine().display(tan);
-
- Display display = getStateMachine().getMainShell().getDisplay();
- while (!tan.isDone()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- getStateMachine().display(getWaitingComposite());
-
- if (tan.isUserCancel())
- throw new UserCancelledException();
-
- if (tan.isUserFido2())
- return new SMSTanResult(SMSTanResult.ResultType.TO_FIDO2);
-
- return new SMSTanResult(tan.getTan());
- }));
- }
-
- /**
- * start showing the QR code at the indicated URI
- * this method will return immediately */
- public void showQRCode(final @Nonnull String referenceValue, @Nonnull URI qrCodeURI, @Nullable URI signatureDataURI, final boolean showSmsTan, final boolean showFido2, final @Nullable String errorMessage) {
- byte[] qrCode;
- try (final CloseableHttpClient httpClient = HttpClients.createDefault()) {
- try (final CloseableHttpResponse response = httpClient.execute(new HttpGet(qrCodeURI))) {
- qrCode = EntityUtils.toByteArray(response.getEntity());
- }
- } catch (IOException e) {
- log.warn("Failed to load QR code.");
- qrCode = null;
- }
-
- final byte[] qrCodeCopy = qrCode; /* because java is silly */
- Display.getDefault().syncExec(() -> {
- MobileBKUQRComposite qr = getMobileBKUQRComposite();
- qr.reset();
-
- qr.setRefVal(referenceValue);
- qr.setSignatureDataURI(signatureDataURI);
- qr.setErrorMessage(errorMessage);
- qr.setQR(qrCodeCopy);
- qr.setSMSEnabled(showSmsTan);
- qr.setFIDO2Enabled(showFido2);
- getStateMachine().display(qr);
- });
- }
-
- public enum QRResult {
- /* the user has pressed the FIDO2 button */
- TO_FIDO2,
- /* the user has pressed the SMS button */
- TO_SMS,
- /* signalQRScanned has been called; this indicates that we should refresh the page */
- UPDATE
- };
-
- public @Nonnull QRResult waitForQRCodeResult() throws UserCancelledException {
- return ISNOTNULL(Display.getDefault().syncCall(() -> {
- MobileBKUQRComposite qr = getMobileBKUQRComposite();
-
- Display display = getStateMachine().getMainShell().getDisplay();
- while (!qr.isDone()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
-
- getStateMachine().display(this.getWaitingComposite());
-
- if (qr.wasCancelClicked()) {
- clearRememberedPassword();
- throw new UserCancelledException();
- }
-
- if (qr.wasSMSClicked())
- return QRResult.TO_SMS;
-
- if (qr.wasFIDO2Clicked())
- return QRResult.TO_FIDO2;
-
- return QRResult.UPDATE;
- }));
- }
-
- /**
- * indicate that the long polling operation completed
- * (any ongoing waitForQRCodeResult call will then return)
- */
- public void signalQRScanned() {
- getMobileBKUQRComposite().signalPollingDone();
- }
-
- /**
- * start showing the "waiting for app" screen
- * this method will return immediately */
- public void showWaitingForAppOpen(final @Nonnull String referenceValue, @Nullable URI signatureDataURI, final boolean showSmsTan, final boolean showFido2) {
- Display.getDefault().syncExec(() -> {
- WaitingForAppComposite wfa = getWaitingForAppComposite();
- wfa.reset();
-
- // TODO composite does not currently support: refval, signature data
- wfa.setSMSEnabled(showSmsTan);
- wfa.setFIDO2Enabled(showFido2);
- getStateMachine().display(wfa);
- });
- }
-
- public enum AppOpenResult {
- /* the user has pressed the FIDO2 button */
- TO_FIDO2,
- /* the user has pressed the SMS button */
- TO_SMS,
- /* signalAppOpened has been called; this indicates that we should refresh the page */
- UPDATE
- };
-
- public @Nonnull AppOpenResult waitForAppOpen() throws UserCancelledException {
- return ISNOTNULL(Display.getDefault().syncCall(() -> {
- WaitingForAppComposite wfa = getWaitingForAppComposite();
-
- Display display = wfa.getDisplay();
- while (!wfa.isDone()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
-
- getStateMachine().display(this.getWaitingComposite());
-
- if (wfa.wasCancelClicked()) {
- clearRememberedPassword();
- throw new UserCancelledException();
- }
-
- if (wfa.wasSMSClicked())
- return AppOpenResult.TO_SMS;
-
- if (wfa.wasFIDO2Clicked())
- return AppOpenResult.TO_FIDO2;
-
- return AppOpenResult.UPDATE;
- }));
- }
-
- /**
- * indicate that the long polling operation completed
- * (any ongoing waitForAppOpen call will then return)
- */
- public void signalAppOpened() {
- getWaitingForAppComposite().signalPollingDone();
- }
-
- public void showWaitingForAppBiometry(final @Nonnull String referenceValue, @Nullable URI signatureDataURI, final boolean showSmsTan, final boolean showFido2) {
- Display.getDefault().syncExec(() -> {
- MobileBKUFingerprintComposite bio = getMobileBKUFingerprintComposite();
- bio.reset();
-
- bio.setRefVal(referenceValue);
- bio.signatureDataURI = signatureDataURI;
- bio.setErrorMessage(null); // TODO
- bio.setSMSEnabled(showSmsTan);
- bio.setFIDO2Enabled(showFido2);
- getStateMachine().display(bio);
- });
- }
-
- // TODO can we maybe deduplicate the various waiting screens' logic?
-
- public enum AppBiometryResult {
- /* the user has pressed the FIDO2 button */
- TO_FIDO2,
- /* the user has pressed the SMS button */
- TO_SMS,
- /* signalAppBiometryDone has been called; this indicates that we should refresh the page */
- UPDATE
- };
-
- public @Nonnull AppBiometryResult waitForAppBiometry() throws UserCancelledException {
- return ISNOTNULL(Display.getDefault().syncCall(() -> {
- MobileBKUFingerprintComposite bio = getMobileBKUFingerprintComposite();
-
- Display display = bio.getDisplay();
- while (!bio.isDone()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
-
- getStateMachine().display(this.getWaitingComposite());
-
- if (bio.wasCancelClicked()) {
- clearRememberedPassword();
- throw new UserCancelledException();
- }
-
- if (bio.wasSMSClicked())
- return AppBiometryResult.TO_SMS;
-
- if (bio.wasFIDO2Clicked())
- return AppBiometryResult.TO_FIDO2;
-
- return AppBiometryResult.UPDATE;
- }));
- }
-
- public void signalAppBiometryDone() {
- getMobileBKUFingerprintComposite().signalPollingDone();
- }
-
- public static class FIDO2Result {
- public static enum ResultType { TO_SMS, CREDENTIAL };
- public final @Nonnull ResultType type;
- public final @Nullable PublicKeyCredential<AuthenticatorAssertionResponse> credential;
-
- private FIDO2Result(@Nonnull ResultType type) { this.type = type; this.credential = null; }
- private FIDO2Result(@Nonnull PublicKeyCredential<AuthenticatorAssertionResponse> cred) { this.type = ResultType.CREDENTIAL; this.credential = cred; }
- }
-
- /**
- * prompts user for fido2 auth and blocks until result is available
- * @param fido2Options JSON data from A-Trust
- * @return
- * @throws UserCancelledException
- */
- public @Nonnull FIDO2Result promptUserForFIDO2Auth(final @Nonnull String fido2Options, @Nullable URI signatureDataURI, final boolean showSmsTan) throws UserCancelledException {
- return ISNOTNULL(Display.getDefault().syncCall(() -> {
- MobileBKUFido2Composite fido2 = getMobileBKUFido2Composite();
- fido2.initialize(fido2Options);
- fido2.setSMSEnabled(showSmsTan);
- fido2.setSignatureDataURI(signatureDataURI);
-
- getStateMachine().display(fido2);
-
- Display display = fido2.getDisplay();
- while (!fido2.isDone()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
-
- getStateMachine().display(this.getWaitingComposite());
-
- if (fido2.wasUserCancelClicked())
- throw new UserCancelledException();
-
- if (fido2.wasUserSMSClicked())
- return new FIDO2Result(FIDO2Result.ResultType.TO_SMS);
-
- return new FIDO2Result(ISNOTNULL(fido2.getResultingCredential()));
- }));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.asit.pdfover.gui.workflow.WorkflowState#update(at.asit.pdfover.gui
- * .workflow.Workflow)
- */
- @Override
- public void run() {
- this.signingState = getStateMachine().status.signingState;
-
- this.signingState.bkuConnector = new MobileBKUConnector(this);
- this.signingState.useBase64Request = false;
-
- if (this.threadException != null) {
- displayError(this.threadException);
- return;
- }
-
- getStateMachine().display(
- this.getWaitingComposite());
-
- this.setNextState(new SigningState(getStateMachine()));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- if (this.mobileBKUEnterNumberComposite != null)
- this.mobileBKUEnterNumberComposite.dispose();
- if (this.mobileBKUEnterTANComposite != null)
- this.mobileBKUEnterTANComposite.dispose();
- if (this.waitingComposite != null)
- this.waitingComposite.dispose();
- if (this.waitingForAppComposite != null)
- this.waitingForAppComposite.dispose();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.reset();
- behavior.setActive(Buttons.OPEN, true);
- behavior.setActive(Buttons.POSITION, true);
- behavior.setActive(Buttons.SIGN, true);
- behavior.setEnabled(Buttons.OPEN, true);
- behavior.setEnabled(Buttons.POSITION, true);
- //behavior.setEnabled(Buttons.SIGN, true);
- }
-
- @Override
- public String toString() {
- return this.getClass().getName();
- }
-
- /**
- * invoke state machine update in main thread
- */
- public void invokeUpdate() {
- getStateMachine().invokeUpdate();
- }
-}
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
deleted file mode 100644
index 12b16da7..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.List;
-
-import at.gv.egiz.pdfas.lib.impl.pdfbox2.placeholder.SignatureFieldsAndPlaceHolderExtractor;
-
-import org.apache.pdfbox.pdmodel.PDDocument;
-
-//Imports
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.MessageBox;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.bku.LocalBKUConnector;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.PlaceholderSelectionGui;
-import at.asit.pdfover.gui.composites.DataSourceSelectComposite;
-import at.asit.pdfover.gui.utils.SWTUtils;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.commons.Profile;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.signer.SignaturePosition;
-import at.gv.egiz.pdfas.lib.impl.placeholder.SignaturePlaceholderData;
-
-
-
-import org.apache.commons.configuration.PropertiesConfiguration;
-import org.apache.commons.configuration.PropertiesConfigurationLayout;
-
-
-/**
- * Selects the data source for the signature process.
- */
-public class OpenState extends State {
-
- /**
- * @param stateMachine
- */
- public OpenState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(OpenState.class);
- private static final String advancedConfig = Constants.CONFIG_DIRECTORY + File.separator + "/cfg/advancedconfig.properties";
-
- private DataSourceSelectComposite selectionComposite = null;
-
- private DataSourceSelectComposite getSelectionComposite() {
- if (this.selectionComposite == null) {
- this.selectionComposite =
- getStateMachine().createComposite(DataSourceSelectComposite.class, SWT.RESIZE, this);
- }
- return this.selectionComposite;
- }
-
- @Override
- public void run() {
- ConfigurationManager config = getStateMachine().configProvider;
- Status status = getStateMachine().status;
- if (!(status.getPreviousState() instanceof PrepareConfigurationState)
- && !(status.getPreviousState() instanceof OpenState)) {
- status.bku = config.getDefaultBKU();
- status.document = null;
- status.signaturePosition = ((config.getSignatureProfile() == Profile.INVISIBLE) || config.getAutoPositionSignature()) ? (new SignaturePosition()) : null;
-
- /* ensure that files get closed */
- status.getPreviousState().cleanUp();
- }
-
- /* force static initialization and start polling */
- LocalBKUConnector.IsAvailable();
-
- if (status.document == null) {
- DataSourceSelectComposite selection = this.getSelectionComposite();
-
- getStateMachine().display(selection);
- selection.layout();
-
- status.document = selection.getSelected();
-
- if (status.document == null) {
- // Not selected yet
- return;
- }
- }
- log.debug("Got Datasource: " + getStateMachine().status.document.getAbsolutePath());
-
- // scan for signature placeholders
- // - see if we want to scan for placeholders in the settings
- if (config.getEnablePlaceholderUsage()) {
- try (PDDocument pddocument = PDDocument.load(getStateMachine().status.document)) {
- // - scan for placeholders
- 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
- if (useSignatureFields) {
-
- List<String> fields = SignatureFieldsAndPlaceHolderExtractor.findEmptySignatureFields(pddocument);
-
- if (fields.size() > 0) {
- while (true)
- {
- // create a dialog with ok and cancel buttons and a question
- // icon
- MessageBox dialog = new MessageBox(getStateMachine().getMainShell(),
- SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CANCEL);
- SWTUtils.setLocalizedText(dialog, "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().getMainShell(), 65570, "text",
- "select the fields", fields);
- int res = gui.open();
- if (res != -1) {
- getStateMachine().status.searchForPlacehoderSignature = true;
- addPlaceholderSelectionToConfig(fields.get(res));
- this.setNextState(new BKUSelectionState(getStateMachine()));
- }
- else
- continue;
- }
-
- } else if (result == SWT.NO) {
- getStateMachine().status.searchForPlacehoderSignature = false;
- } else {
- status.document = null;
- return;
- }
- break;
- }
- }
- // second check if qr code placeholder search is enabled
- } else if (useMarker) {
-
- SignaturePlaceholderData signaturePlaceholderData = SignatureFieldsAndPlaceHolderExtractor.getNextUnusedSignaturePlaceHolder(pddocument);
-
- if (null != signaturePlaceholderData) {
-
- // create a dialog with ok and cancel buttons and a question icon
- MessageBox dialog = new MessageBox(getStateMachine().getMainShell(),
- SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CANCEL);
- SWTUtils.setLocalizedText(dialog, "dataSourceSelection.usePlaceholderTitle");
- dialog.setMessage(Messages.getString("dataSourceSelection.usePlaceholderText"));
-
- // open dialog and await user selection
- int result = dialog.open();
- if (result == SWT.YES) {
-
- // if the user chooses to use the signature placeholder
- // - fill the position information so that we skip to
- // the
- // next stages without breaking stuff
- status.signaturePosition = new SignaturePosition(
- signaturePlaceholderData.getTablePos().getPosX(),
- signaturePlaceholderData.getTablePos().getPosY(),
- signaturePlaceholderData.getTablePos().getPage());
-
- getStateMachine().status.searchForPlacehoderSignature = true;
-
- } else if (result == SWT.NO) {
- getStateMachine().status.searchForPlacehoderSignature = false;
- } else {
- status.document = null;
- return;
- }
- // TODO: why does this use a different logic (via PositioningState) than the signature placeholders?
- }
-
- } else {
- // Do nothing
- }
-
- } catch (IOException e) {
- // fail silently. In case we got here no dialog has been shown.
- // Just
- // proceed with the usual process.
- }
- }
-
- this.setNextState(new PositioningState(getStateMachine()));
- }
-
- /**
- * The selected placeholder is added to the configuration file
- * @param selection
- */
- private void addPlaceholderSelectionToConfig(String selection) {
- try {
- PropertiesConfiguration config = new PropertiesConfiguration();
- PropertiesConfigurationLayout layout = new PropertiesConfigurationLayout(config);
- layout.load(new InputStreamReader(new FileInputStream(advancedConfig)));
-
- config.setProperty(Constants.SIGNATURE_FIELD_NAME_CONF, selection);
- layout.save(new FileWriter(advancedConfig, false));
-
- } catch (Exception e) {
- log.error("Failed to add placeholder selection to config", e);
- }
-
- }
-
- /**
- * Open the input document selection dialog
- */
- public void openFileDialog() {
- if (this.selectionComposite != null)
- this.selectionComposite.openFileDialog();
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- if (this.selectionComposite != null)
- this.selectionComposite.dispose();
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.reset();
- behavior.setEnabled(Buttons.CONFIG, true);
- behavior.setEnabled(Buttons.OPEN, true);
- behavior.setActive(Buttons.OPEN, true);
- }
-
- @Override
- public String toString() {
- return this.getClass().getName();
- }
-}
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
deleted file mode 100644
index 308b7d5a..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-//Imports
-import java.io.File;
-
-import org.eclipse.swt.SWT;
-
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.composites.OutputComposite;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-
-/**
- * Produces the output of the signature process. (save file, open file)
- */
-public class OutputState extends State {
-
- private OutputComposite outputComposite = null;
-
- /**
- * @param stateMachine
- */
- public OutputState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
- private OutputComposite getOutputComposite() {
- if (this.outputComposite == null) {
- this.outputComposite = getStateMachine()
- .createComposite(OutputComposite.class, SWT.RESIZE, this);
-
- ConfigurationManager config = getStateMachine().configProvider;
- Status status = getStateMachine().status;
-
- File tmpDir = new File(Constants.CONFIG_DIRECTORY + File.separator + "tmp");
-
- if(!tmpDir.exists()) {
- tmpDir.mkdir();
- }
-
- this.outputComposite.setOutputDir(config.getDefaultOutputFolder());
- this.outputComposite.setSaveFilePostFix(config.getSaveFilePostFix());
- this.outputComposite.setTempDir(tmpDir.getAbsolutePath());
- this.outputComposite.setInputFile(status.document);
-
- this.outputComposite.setSignedDocument(status.signResult.getSignedDocument());
-
- // Save signed document
- this.outputComposite.saveDocument();
-
- if (config.getSkipFinish() && this.outputComposite.getSaveSuccessful()) {
- getStateMachine().exit();
- }
- }
-
- return this.outputComposite;
- }
-
- @Override
- public void run() {
- Status status = getStateMachine().status;
-
- if (status.signResult == null) {
- ErrorDialog error = new ErrorDialog(getStateMachine().getMainShell(),
- Messages.getString("error.Signatur"), BUTTONS.RETRY_CANCEL);
- if(error.open() == SWT.RETRY) {
- this.setNextState(new PrepareSigningState(getStateMachine()));
- } else {
- this.setNextState(new BKUSelectionState(getStateMachine()));
- }
- return;
- }
-
- OutputComposite outputComposite = this.getOutputComposite();
-
- // Display dialog
- getStateMachine().display(outputComposite);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
-
- getStateMachine().status.signResult = null;
-
- if (this.outputComposite != null)
- this.outputComposite.dispose();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.reset();
- behavior.setEnabled(Buttons.CONFIG, true);
- behavior.setEnabled(Buttons.OPEN, true);
- behavior.setEnabled(Buttons.POSITION, true);
- behavior.setEnabled(Buttons.SIGN, true);
- behavior.setActive(Buttons.OPEN, true);
- behavior.setActive(Buttons.POSITION, true);
- behavior.setActive(Buttons.SIGN, true);
- behavior.setActive(Buttons.FINAL, true);
- }
-
- @Override
- public String toString() {
- return this.getClass().getName();
- }
-}
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
deleted file mode 100644
index b56fb6d7..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-//Imports
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.pdfbox.pdmodel.PDDocument;
-import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException;
-import org.eclipse.swt.SWT;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.composites.PositioningComposite;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.signer.Emblem;
-import at.asit.pdfover.signer.SignaturePosition;
-import at.asit.pdfover.signer.pdfas.PdfAs4SignatureParameter;
-import at.asit.pdfover.signer.pdfas.PdfAs4SignaturePlaceholder;
-
-/**
- * Decides where to position the signature block
- */
-public class PositioningState extends State {
-
- /**
- * @param stateMachine
- */
- public PositioningState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(PositioningState.class);
-
- private PositioningComposite positionComposite = null;
-
- private SignaturePosition previousPosition = null;
-
-
- private File loadedDocumentPath = null;
- private PDDocument document = null;
-
- private void closePDFDocument() {
-
- if (this.document != null)
- {
- try { this.document.close(); } catch (IOException e) { log.warn("Failed to close PDF", e); }
- this.document = null;
- }
- this.loadedDocumentPath = null;
- }
-
- private void openPDFDocument() throws IOException {
- closePDFDocument();
- File documentPath = getStateMachine().status.document;
- PDDocument pdf = null;
- try
- {
- pdf = PDDocument.load(documentPath);
- if (pdf.getNumberOfPages() > 0)
- pdf.getPage(0);
- else
- throw new IOException();
- }
- catch (InvalidPasswordException e) {
- throw new IOException(Messages.getString("error.PDFPwdProtected"), e);
- }
- catch (IOException e) {
- throw new IOException(Messages.getString("error.MayNotBeAPDF"), e);
- }
- this.document = pdf;
- this.loadedDocumentPath = documentPath;
- }
-
- private PositioningComposite getPositioningComposite(PDDocument document) {
- StateMachine stateMachine = getStateMachine();
- if (this.positionComposite == null) {
- this.positionComposite =
- stateMachine.createComposite(PositioningComposite.class, SWT.RESIZE, this);
- log.debug("Displaying " + stateMachine.status.document);
- this.positionComposite.displayDocument(document);
- }
-
- ConfigurationManager config = stateMachine.configProvider;
-
- PdfAs4SignatureParameter param = new PdfAs4SignatureParameter();
- param.signatureProfile = config.getSignatureProfile();
-
- String emblemPath = config.getDefaultEmblemPath();
- if (emblemPath != null && !emblemPath.trim().isEmpty())
- param.emblem = new Emblem(emblemPath);
- if (config.getSignatureNote() != null && !config.getSignatureNote().isEmpty())
- param.signatureNote = config.getSignatureNote();
-
- param.signatureLanguage = config.getSignatureLocale().getLanguage();
- param.enablePDFACompat = config.getSignaturePdfACompat();
- param.targetLogoSize = Math.min(120.0, config.getLogoOnlyTargetSize()); // TODO WORKAROUND FOR #117
-
- PdfAs4SignaturePlaceholder.For(param, (p) -> {
- if (p.hasImage())
- this.positionComposite.setPlaceholder(p.getAWTImage());
- });
-
- if (this.previousPosition != null && !this.previousPosition.useAutoPositioning())
- {
- this.positionComposite.setPosition(
- this.previousPosition.getX(),
- this.previousPosition.getY(),
- this.previousPosition.getPage());
- }
-
- return this.positionComposite;
- }
-
- @Override
- public void run() {
- Status status = getStateMachine().status;
- if (!(status.getPreviousState() instanceof PositioningState) &&
- !(status.getPreviousState() instanceof OpenState))
- {
- this.previousPosition = status.signaturePosition;
- status.signaturePosition = null;
- }
-
- if ((this.document == null) ||
- (this.loadedDocumentPath != getStateMachine().status.document)) {
- log.debug("Checking PDF document for encryption");
- try {
- openPDFDocument();
- } catch (IOException e) {
- this.positionComposite = null;
- log.error("Failed to display PDF document", e);
- String message = e.getLocalizedMessage();
- if (message == null)
- message = Messages.getString("error.IOError");
- ErrorDialog dialog = new ErrorDialog(
- getStateMachine().getMainShell(),
- message, BUTTONS.RETRY_CANCEL);
- if(dialog.open() == SWT.RETRY) {
- run();
- } else {
- setNextState(new OpenState(getStateMachine()));
- }
- return;
- }
- }
-
- if (status.signaturePosition == null) {
- PositioningComposite position = null;
- try {
- position = this.getPositioningComposite(this.document);
- } catch(Exception ex) {
- log.error("Failed to create composite (probably a mac...)", ex);
- ErrorDialog dialog = new ErrorDialog(
- getStateMachine().getMainShell(),
- Messages.getString("error.PositioningNotPossible"), BUTTONS.OK);
- dialog.open();
- status.signaturePosition = new SignaturePosition();
- this.setNextState(new BKUSelectionState(getStateMachine()));
- return;
- }
-
- getStateMachine().display(position);
-
- status.signaturePosition = position.getPosition();
-
- if(status.signaturePosition != null) {
- this.setNextState(new BKUSelectionState(getStateMachine()));
- }
-
- this.positionComposite.requestFocus();
- } else {
- this.setNextState(new BKUSelectionState(getStateMachine()));
- }
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- if (this.positionComposite != null)
- this.positionComposite.dispose();
- closePDFDocument();
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.reset();
- behavior.setEnabled(Buttons.CONFIG, true);
- behavior.setEnabled(Buttons.OPEN, true);
- behavior.setActive(Buttons.OPEN, true);
- behavior.setActive(Buttons.POSITION, true);
- }
-
- @Override
- public String toString() {
- return this.getClass().getName();
- }
-}
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
deleted file mode 100644
index 87693c19..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-//Imports
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-
-import org.eclipse.swt.SWT;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.commons.Constants;
-import at.asit.pdfover.gui.cliarguments.*;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.exceptions.InitializationException;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.utils.UpdateCheckManager;
-import at.asit.pdfover.gui.utils.VersionComparator;
-import at.asit.pdfover.gui.utils.Zipper;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.signer.SignaturePosition;
-
-/**
- * Starting state of workflow proccess
- *
- * Reads configuration, command arguments and initializes configured variables
- */
-public class PrepareConfigurationState extends State {
-
- /** SLF4J Logger instance **/
- static final Logger log = LoggerFactory.getLogger(PrepareConfigurationState.class);
-
- private ArgumentHandler handler;
-
- private ArgumentHandler configFileHandler;
-
- /**
- * @param stateMachine
- */
- public PrepareConfigurationState(StateMachine stateMachine) {
- super(stateMachine);
- this.handler = new ArgumentHandler(getStateMachine());
- this.handler.addCLIArgument(HelpArgument.class);
- this.handler.addCLIArgument(InputDocumentArgument.class);
- this.handler.addCLIArgument(OutputFolderArgument.class);
- this.handler.addCLIArgument(BKUArgument.class);
- this.handler.addCLIArgument(PhoneNumberArgument.class);
- this.handler.addCLIArgument(PasswordArgument.class);
- this.handler.addCLIArgument(KeystoreFileArgument.class);
- this.handler.addCLIArgument(KeystoreTypeArgument.class);
- this.handler.addCLIArgument(KeystoreStorePassArgument.class);
- this.handler.addCLIArgument(KeystoreAliasArgument.class);
- this.handler.addCLIArgument(KeystoreKeyPassArgument.class);
- this.handler.addCLIArgument(ProxyHostArgument.class);
- this.handler.addCLIArgument(ProxyPortArgument.class);
- this.handler.addCLIArgument(ProxyUserArgument.class);
- this.handler.addCLIArgument(ProxyPassArgument.class);
- this.handler.addCLIArgument(EmblemArgument.class);
- this.handler.addCLIArgument(AutomaticPositioningArgument.class);
- this.handler.addCLIArgument(SkipFinishArgument.class);
- // adding config file argument to this handler so it appears in help
- this.handler.addCLIArgument(ConfigFileArgument.class);
- this.handler.addCLIArgument(InvisibleProfile.class);
-
- this.configFileHandler = new ArgumentHandler(getStateMachine());
- this.configFileHandler.addCLIArgument(ConfigFileArgument.class);
- }
-
- private void initializeFromConfigurationFile() throws InitializationException {
- try {
- getStateMachine().configProvider.loadFromDisk();
- } catch (IOException ex) {
- throw new InitializationException("Failed to read configuration from config file", ex);
- }
- }
-
- private void initializeFromArguments(String[] args, ArgumentHandler handler) throws InitializationException {
- handler.handleArguments(args);
-
- if (handler.doesRequireExit()) {
- getStateMachine().exit();
- }
- }
-
- private void ensurePdfOverConfigExists() throws InitializationException {
- try {
- File pdfOverConfig = new File(Constants.CONFIG_DIRECTORY + File.separator + Constants.DEFAULT_CONFIG_FILENAME);
- if (!pdfOverConfig.exists())
- pdfOverConfig.createNewFile();
- } catch (Exception e) {
- log.error("Failed to create PDF-Over config file", e);
- throw new InitializationException("Failed to create PDF-Over config file", e);
- }
- }
-
- private void unzipPdfAsConfig(File configDir) throws InitializationException {
- InputStream is = getClass().getResourceAsStream(Constants.RES_CFG_ZIP);
-
- try {
- Zipper.unzip(is, configDir.getAbsolutePath());
- } catch (IOException e) {
- log.error(
- "Failed to create local configuration directory!", e);
- throw new InitializationException(
- "Failed to create local configuration directory!",
- e);
- }
- }
-
- private static void updateVersionFile(File configDir) throws InitializationException {
- 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;
- versionWriter.write(version);
- versionWriter.close();
- } catch (IOException e) {
- log.error(
- "Failed to create configuration version file!", e);
- throw new InitializationException(
- "Failed to create configuration version file!",
- e);
- }
- }
-
- private void createConfiguration(File configDir) throws InitializationException {
- boolean allOK = false;
-
- log.info("Creating configuration directory");
- if (!configDir.exists()) {
- configDir.mkdir();
- }
-
- try {
- ensurePdfOverConfigExists();
- unzipPdfAsConfig(configDir);
- updateVersionFile(configDir);
-
- allOK = true;
- } finally {
- if (!allOK) {
- configDir.delete();
- }
- }
- }
-
- /**
- * @return The first valid (not empty, non comment) line of the version file
- * or null if version file cannot be read or does not contain
- * such a line.
- */
- private static String getVersion(File versionFile) {
- if (versionFile.exists() && versionFile.canRead()) {
- BufferedReader versionReader = null;
- try {
- versionReader = new BufferedReader(new FileReader(versionFile));
- String version;
- while ((version = versionReader.readLine()) != null) {
- version = version.trim();
- 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 "
- + versionFile, ex);
- } finally {
- try {
- if (versionReader != null)
- versionReader.close();
- } catch (IOException ex) {
- // ignore
- }
- }
- }
- log.debug("unknown configuration version");
- return null;
- }
-
- /**
- * Backup old configuration, create new
- * @param configDir
- * @throws InitializationException
- */
- private void backupAndCreatePdfAsConfiguration(File configDir) throws InitializationException {
- try {
- File backup = File.createTempFile(Constants.PDF_AS_CONFIG_BACKUP_FILENAME, ".zip");
- OutputStream os = new FileOutputStream(backup);
- Zipper.zip(configDir + File.separator + "cfg", os, true);
- os.close();
- unzipPdfAsConfig(configDir);
- 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");
- }
- backup.renameTo(b);
- updateVersionFile(configDir);
- } catch (FileNotFoundException e) {
- 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);
- throw new InitializationException("Error creating configuration backup", e);
- }
- }
-
- @Override
- public void run() {
- // Read config file
- try {
- StateMachine stateMachine = getStateMachine();
- ConfigurationManager config = stateMachine.configProvider;
- File configDir = new File(Constants.CONFIG_DIRECTORY);
- File configFile = new File(configDir, Constants.DEFAULT_CONFIG_FILENAME);
- if (!configDir.exists() || !configFile.exists()) {
- log.debug("Creating configuration file");
- createConfiguration(configDir);
- } else {
- log.debug("Configuration directory exists!");
- // Check PDF-AS config version
- File versionFile = new File(configDir, Constants.CONFIG_VERSION_FILENAME);
- String configVersion = getVersion(versionFile);
- if (configVersion == null || VersionComparator.before(configVersion, Constants.MIN_PDF_AS_CONFIG_VERSION))
- backupAndCreatePdfAsConfiguration(configDir);
- }
-
-
- // Read cli arguments for config file location first
- try {
- initializeFromArguments(stateMachine.cmdLineArgs, this.configFileHandler);
- } catch (InitializationException e) {
- log.error("Error in cmd line arguments: ", e);
- ErrorDialog error = new ErrorDialog(stateMachine.getMainShell(),
- Messages.getString("error.CmdLineArgs") + "\n" +
- e.getMessage(),
- BUTTONS.OK);
- error.open();
- stateMachine.exit();
- }
-
- // initialize from config file
- initializeFromConfigurationFile();
-
- // Read cli arguments
- try {
- initializeFromArguments(stateMachine.cmdLineArgs, this.handler);
- } catch (InitializationException e) {
- log.error("Error in cmd line arguments: ", e);
- ErrorDialog error;
-
- if (e.getCause() instanceof FileNotFoundException) {
- error = new ErrorDialog(stateMachine.getMainShell(),
- String.format(
- Messages.getString("error.FileNotExist"),
- e.getCause().getMessage()),
- BUTTONS.OK);
- } else {
- error = new ErrorDialog(stateMachine.getMainShell(),
- Messages.getString("error.CmdLineArgs") + "\n" +
- e.getMessage(),
- BUTTONS.OK);
- }
- error.open();
- stateMachine.exit();
- }
-
- // Check for updates
- if (config.getUpdateCheck())
- UpdateCheckManager.checkNow(stateMachine.getMainShell());
-
- // Create PDF Signer
- Status status = stateMachine.status;
- status.bku = getStateMachine().configProvider.getDefaultBKU();
- status.signaturePosition = getStateMachine().configProvider.getAutoPositionSignature() ? (new SignaturePosition()) : null;
-
- setNextState(new OpenState(stateMachine));
-
- } catch (Exception e) {
- log.error("Failed to initialize: ", e);
- ErrorDialog error = new ErrorDialog(
- getStateMachine().getMainShell(),
- Messages.getString("error.Initialization"),
- BUTTONS.YES_NO
- );
- // error.setException(e);
- // setNextState(error);
- int selection = error.open();
- if (selection == SWT.YES)
- ConfigurationManager.factoryResetPersistentConfig();
-
- getStateMachine().exit();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- // No composite - no cleanup necessary
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- // no behavior necessary yet
- }
-
- @Override
- public String toString() {
- return getClass().getName();
- }
-}
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
deleted file mode 100644
index 1669f2f8..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-//Imports
-import java.net.Authenticator;
-import java.net.PasswordAuthentication;
-
-import org.eclipse.swt.SWT;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.composites.WaitingComposite;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-import at.asit.pdfover.signer.Emblem;
-import at.asit.pdfover.signer.PDFFileDocumentSource;
-import at.asit.pdfover.signer.pdfas.PdfAs4SignatureParameter;
-import at.asit.pdfover.signer.pdfas.PdfAs4Signer;
-import at.asit.pdfover.signer.pdfas.PdfAs4SigningState;
-
-/**
- * User waiting state, wait for PDF Signator library to prepare document for
- * signing.
- */
-public class PrepareSigningState extends State {
-
- /**
- * @param stateMachine
- */
- public PrepareSigningState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
- private final class PrepareDocumentThread implements Runnable {
-
- private PrepareSigningState state;
-
- /**
- * Default constructor
- *
- * @param state
- */
- public PrepareDocumentThread(PrepareSigningState state) {
- this.state = state;
- }
-
- @Override
- public void run() {
- try {
-
- Status status = this.state.getStateMachine().status;
-
- ConfigurationManager configuration = this.state.getStateMachine().configProvider;
-
- // SET PROXY HOST and PORT settings
- final String proxyHost = configuration.getProxyHost();
- final int proxyPort = configuration.getProxyPort();
- final String proxyUser = configuration.getProxyUser();
- final String proxyPass = configuration.getProxyPass();
-
- if (proxyHost != null && !proxyHost.isEmpty()) {
- 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);
- System.setProperty("http.proxyPort", port);
- System.setProperty("https.proxyPort", port);
- }
-
- if (proxyUser != null && !proxyUser.isEmpty()) {
- 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");
- System.setProperty("http.proxyPassword", proxyPass);
- System.setProperty("https.proxyPassword", proxyPass);
- }
-
- if (proxyUser != null && !proxyUser.isEmpty() &&
- proxyPass != null && !proxyPass.isEmpty()) {
- log.debug("Enabling proxy authentication");
- Authenticator.setDefault(new Authenticator() {
- /* (non-Javadoc)
- * @see java.net.Authenticator#getPasswordAuthentication()
- */
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- if (getRequestorType() == RequestorType.PROXY) {
- if (getRequestingHost().equalsIgnoreCase(proxyHost) &&
- (getRequestingPort() == proxyPort)) {
- return new PasswordAuthentication(proxyUser,
- proxyPass.toCharArray());
- }
- }
- return super.getPasswordAuthentication();
- }
- });
- }
-
- if (this.state.signatureParameter == null) {
- this.state.signatureParameter = new PdfAs4SignatureParameter();
- }
-
- this.state.signatureParameter.inputDocument = new PDFFileDocumentSource(status.document);
- this.state.signatureParameter.signatureDevice = status.bku;
- if (status.signaturePosition != null) {
- this.state.signatureParameter.signaturePosition = status.signaturePosition;
- }
-
- if (configuration.getDefaultEmblemPath() != null && !configuration.getDefaultEmblemPath().isEmpty()) {
- this.state.signatureParameter.emblem = new Emblem(configuration.getDefaultEmblemPath());
- }
-
- if (configuration.getSignatureNote() != null && !configuration.getSignatureNote().isEmpty()) {
- this.state.signatureParameter.signatureNote = configuration.getSignatureNote();
- }
-
- this.state.signatureParameter.searchForPlaceholderSignatures = getStateMachine().status.searchForPlacehoderSignature;
- this.state.signatureParameter.signatureLanguage = configuration.getSignatureLocale().getLanguage();
- this.state.signatureParameter.enablePDFACompat = configuration.getSignaturePdfACompat();
- this.state.signatureParameter.signatureProfile = configuration.getSignatureProfile();
- this.state.signatureParameter.targetLogoSize = configuration.getLogoOnlyTargetSize();
-
- this.state.signingState = PdfAs4Signer.prepare(this.state.signatureParameter);
-
- } catch (Exception e) {
- log.error("PrepareDocumentThread: ", e);
- this.state.threadException = e;
- } finally {
- this.state.updateStateMachine();
- }
- }
- }
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(PrepareSigningState.class);
-
- PdfAs4SignatureParameter signatureParameter;
-
- private WaitingComposite waitingComposite = null;
-
- private WaitingComposite getSelectionComposite() {
- if (this.waitingComposite == null) {
- this.waitingComposite = getStateMachine()
- .createComposite(WaitingComposite.class, SWT.RESIZE, this);
- }
-
- return this.waitingComposite;
- }
-
- PdfAs4SigningState signingState = null;
-
- Exception threadException = null;
-
- @Override
- public void run() {
- WaitingComposite waiting = this.getSelectionComposite();
-
- getStateMachine().display(waiting);
-
- Status status = getStateMachine().status;
-
- if (this.signatureParameter == null) {
- this.signatureParameter = new PdfAs4SignatureParameter();
- }
-
- if (this.signingState == null && this.threadException == null) {
- Thread t = new Thread(new PrepareDocumentThread(this));
- t.start();
- return;
- }
-
- if (this.threadException != null) {
- ErrorDialog error = new ErrorDialog(getStateMachine()
- .getMainShell(),
- Messages.getString("error.PrepareDocument"),
- BUTTONS.RETRY_CANCEL);
- this.threadException = null;
- if (error.open() == SWT.RETRY) {
- run();
- } else {
- this.setNextState(new BKUSelectionState(getStateMachine()));
- }
- return;
- }
-
- // We got the Request set it into status and move on to next state ...
- status.signingState = this.signingState;
-
- switch (status.bku)
- {
- case LOCAL:
- this.setNextState(new LocalBKUState(getStateMachine()));
- break;
- case MOBILE:
- this.setNextState(new MobileBKUState(getStateMachine()));
- break;
- case KS:
- this.setNextState(new KSState(getStateMachine()));
- break;
- default:
- log.error("Invalid selected BKU Value \"{}\" in PrepareSigningState!", status.bku.name());
- this.setNextState(new BKUSelectionState(getStateMachine()));
- }
- }
-
- /*
- * (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- if (this.waitingComposite != null)
- this.waitingComposite.dispose();
- }
-
- /*
- * (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.reset();
- behavior.setActive(Buttons.OPEN, true);
- behavior.setActive(Buttons.POSITION, true);
- behavior.setActive(Buttons.SIGN, true);
- }
-
- @Override
- public String toString() {
- return this.getClass().getName();
- }
-}
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
deleted file mode 100644
index cf4d6d37..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-//Imports
-import java.net.ConnectException;
-
-import org.eclipse.swt.SWT;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.MainWindowBehavior;
-import at.asit.pdfover.gui.MainWindow.Buttons;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.Status;
-import at.asit.pdfover.signer.SignatureException;
-import at.asit.pdfover.signer.UserCancelledException;
-import at.asit.pdfover.signer.pdfas.PdfAs4Signer;
-
-/**
- * Logical state for signing process, usually show BKU Dialog during this state.
- */
-public class SigningState extends State {
-
- /**
- *
- */
- private final class FinishSignThread implements Runnable {
-
- private SigningState state;
-
- /**
- * @param signingState
- */
- public FinishSignThread(SigningState signingState) {
- this.state = signingState;
- }
-
- @Override
- public void run() {
- try {
- Status status = this.state.getStateMachine().status;
- status.signResult = PdfAs4Signer.sign(status.signingState);
- } catch(Exception e) {
- this.state.threadException = e;
- } finally {
- this.state.updateStateMachine();
- }
- }
- }
-
- /**
- * @param stateMachine
- */
- public SigningState(StateMachine stateMachine) {
- super(stateMachine);
- }
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(SigningState.class);
-
- Exception threadException = null;
-
- @Override
- public void run() {
- Status status = getStateMachine().status;
-
- if(status.signResult == null &&
- this.threadException == null) {
- Thread t = new Thread(new FinishSignThread(this));
- t.start();
- return;
- }
-
- if(this.threadException != null) {
- 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();
- if (cause instanceof IllegalStateException) {
- // TODO legacy hack
- this.threadException = new UserCancelledException();
- }
- }
- if (this.threadException instanceof UserCancelledException) {
- // don't display error, clear remembered password and go back to BKU Selection
- if (this.getConfig().getRememberMobilePassword())
- this.getConfig().setDefaultMobilePasswordOverlay(null);
- this.setNextState(new BKUSelectionState(getStateMachine()));
- return;
- }
-
- // if we have gotten to this point, this is an actual exception
- log.error("FinishSignThread: ", this.threadException);
-
- ErrorDialog error = new ErrorDialog(getStateMachine().getMainShell(),
- message, BUTTONS.RETRY_CANCEL);
- this.threadException = null;
- if(error.open() == SWT.RETRY) {
- this.setNextState(new PrepareSigningState(getStateMachine()));
- } else {
- this.setNextState(new BKUSelectionState(getStateMachine()));
- }
- return;
- }
-
- this.setNextState(new OutputState(getStateMachine()));
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#cleanUp()
- */
- @Override
- public void cleanUp() {
- // No composite - no cleanup necessary
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.State#setMainWindowBehavior()
- */
- @Override
- public void updateMainWindowBehavior() {
- MainWindowBehavior behavior = getStateMachine().status.behavior;
- behavior.reset();
- behavior.setActive(Buttons.OPEN, true);
- behavior.setActive(Buttons.POSITION, true);
- behavior.setActive(Buttons.SIGN, true);
- //behavior.setEnabled(Buttons.OPEN, true);
- //behavior.setEnabled(Buttons.POSITION, true);
- //behavior.setEnabled(Buttons.SIGN, true);
- }
-
- @Override
- public String toString() {
- return this.getClass().getName();
- }
-}
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
deleted file mode 100644
index c039f21a..00000000
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.workflow.states;
-
-//Imports
-import at.asit.pdfover.gui.workflow.StateMachine;
-import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
-
-/**
- * Base state class
- */
-public abstract class State {
-
- /**
- * The StateMachine
- */
- private StateMachine stateMachine;
-
- private State nextState = null;
-
- /**
- * Default Workflow State constructor
- * @param stateMachine the State Machine
- */
- public State(StateMachine stateMachine) {
- this.stateMachine = stateMachine;
- this.nextState = this;
- }
-
- public ConfigurationManager getConfig() { return this.stateMachine.configProvider; }
-
- /**
- * Gets the next logical state or null if this their is no state transition
- * @return the next state (or null)
- */
- public State nextState() {
- return this.nextState;
- }
-
- /**
- * Sets the next logical state
- * @param state
- */
- protected void setNextState(State state) {
- this.nextState = state;
- }
-
- /**
- * Perform main logic for this state
- */
- public abstract void run();
-
- /**
- * Perform status cleanup
- */
- public abstract void cleanUp();
-
- /**
- * Update the state machine
- */
- public void updateStateMachine()
- {
- this.stateMachine.invokeUpdate();
- }
-
- /**
- * Get the state machine
- * @return the StateMachine
- */
- protected StateMachine getStateMachine()
- {
- return this.stateMachine;
- }
-
- /**
- * Update the main window behavior of this state if necessary
- * Should update this.stateMachine.status.getBehavior()
- */
- public abstract void updateMainWindowBehavior();
-}
diff --git a/pdf-over-gui/src/main/jnlp/keystore.ks b/pdf-over-gui/src/main/jnlp/keystore.ks
deleted file mode 100644
index 322e8dfc..00000000
--- a/pdf-over-gui/src/main/jnlp/keystore.ks
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/jnlp/pdf-over.jnlp b/pdf-over-gui/src/main/jnlp/pdf-over.jnlp
deleted file mode 100644
index 4ec275dd..00000000
--- a/pdf-over-gui/src/main/jnlp/pdf-over.jnlp
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp spec="1.0+" codebase="##CODEBASE_URL##" context="##CONTEXT_URL##" href="pdf-over.jnlp">
-
- <information>
- <title>PDF-Over</title>
- <vendor>Secure Information Technology Center - Austria (A-SIT)</vendor>
- <homepage href="##HOMEPAGE_URL##"/>
- <description>PDF-Over - PDF Signaturtool</description>
- <description kind="short">PDF-Over</description>
- <icon kind="default" href="icons/icon16x16.png" width="16" height="16"/>
- <icon kind="default" href="icons/icon24x24.png" width="24" height="24"/>
- <icon kind="default" href="icons/icon32x32.png" width="32" height="32"/>
- <icon kind="default" href="icons/icon48x48.png" width="48" height="48"/>
- <icon kind="default" href="icons/icon.png" width="96" height="96"/>
- <offline-allowed/>
- </information>
-
- <security>
- <all-permissions/>
- </security>
-
- <update check="timeout" policy="prompt-update"/>
-
- <resources os="Linux">
- <java version="1.6+"/>
- <jar href="setup_pdf-over_linux.jar" main="true"/>
- </resources>
-
- <resources os="Windows">
- <java version="1.6+"/>
- <jar href="setup_pdf-over_windows.jar" main="true"/>
- </resources>
-
- <resources os="Mac OS X">
- <java version="1.6+"/>
- <jar href="setup_pdf-over_mac.jar" main="true"/>
- </resources>
-
- <application-desc main-class="com.izforge.izpack.installer.Installer"/>
-</jnlp>
diff --git a/pdf-over-gui/src/main/resources/ReadMe.txt b/pdf-over-gui/src/main/resources/ReadMe.txt
deleted file mode 100644
index d939e89a..00000000
--- a/pdf-over-gui/src/main/resources/ReadMe.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-PDF-Over ${project.version}
-------------
-
-Command line arguments:
--h, -?, --help:
- Shows this help message
--i:
- Sets the document to sign. Example: -i <input document>
--o:
- Sets the output folder or file to use. Example: -o <folder>
--b:
- Select the CCE to use. Possible values are: LOCAL, MOBILE, KS. Example: -b MOBILE
--n:
- Sets the telephone number to use for mobile CCE. Example: -n <number>
--p:
- Sets the password to use for mobile CCE. Example: -p <password>
--ks:
- Sets the keystore file. Example : -ks <keystore file>
--kstype:
- Sets the keystore type. Example : -kstype [PKCS12|JKS|JCEKS]
--kspass:
- Sets the keystore key password. Example : -kskeypass <password>
--ksalias:
- Sets the keystore key alias. Example : -ksalias <alias>
--kskeypass:
- Sets the keystore password. Example : -kspass <password>
--proxy:
- Sets the proxy host to use. Example: -proxy <hostname/IP>
--proxyport:
- Sets the proxy port to use. Example: -proxyport <port>
--proxyuser:
- Sets the proxy username to use. Example: -proxyuser <username>
--proxypass:
- Sets the proxy password to use. Example: -proxypass <password>
--e:
- Sets the signature logo file to use for the signature. Example: -e <emblem file>
--a:
- Enables automatic signature positioning
--s:
- Enables skipping of the "Finish" dialog (if successfully saved)
--c:
- Defines which configuration file to use. Example: -c <config file>
--v:
- Sets the visibility of a signature. Example: -v "true"
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
deleted file mode 100644
index c183648e..00000000
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
+++ /dev/null
@@ -1,278 +0,0 @@
-#Eclipse messages class
-#Thu Nov 19 14:06:37 CET 2020
-AdvancedConfigurationComposite.lblSaveFilePostFix.text=Save File Postfix\:
-BKU.KS=Keystore
-BKU.LOCAL=Local CCE
-BKU.MOBILE=Mobile CCE
-BKU.NONE=no default
-BKUSelectionComposite.btnMobile.text=MOBILE
-PlaceholderSelectionGui.lblNewLabel.text=New Label
-PlaceholderSelectionGui.shlInfo.text=Info
-TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure network connection
-WaitingForAppComposite.btnCancel.text=Cancel
-WaitingForAppComposite.btnCancel_1.text=Cancel
-WaitingForAppComposite.btnNewButton.text=New Button
-WaitingForAppComposite.btnRequestSms.text=Request SMS
-WaitingForAppComposite.lblNewLabel.text=New Label
-advanced_config.AutoPosition=Automatic positioning
-advanced_config.AutoPosition_ToolTip=Activate this option to automatically position the signature
-advanced_config.BKUSelection_Title=CC&E Selection
-advanced_config.BKUSelection_ToolTip=Select the default CCE to use during signature
-advanced_config.KeystoreEnabled=Enable keystore signing
-advanced_config.KeystoreEnabled_ToolTip=Enables the possibility to sign with a local keystore
-advanced_config.LocaleSelection_Title=Interface &language selection
-advanced_config.LocaleSelection_ToolTip=Select the interface language for PDF-Over
-advanced_config.OutputFolder=Default output folder\:
-advanced_config.OutputFolder.Dialog=Select a folder
-advanced_config.OutputFolder.Dialog_Title=Select Output folder
-advanced_config.OutputFolder_Title=&Output settings
-advanced_config.OutputFolder_ToolTip=Select the folder where the signed document will be saved automatically (clear this field to disable automatic saving, enter a single dot (".") to denote the input document directory)
-advanced_config.PdfACompat=PDF/A compatibility
-advanced_config.PdfACompat_ToolTip=Whether to make the signature PDF/A compatible (increases pdf size). This option requires a source document that is already in PDF/A format.
-advanced_config.Placeholder_Enabled=Enable placeholder search
-advanced_config.Placeholder_Title=Placeholder
-advanced_config.ProxyHost=Host\:
-advanced_config.ProxyHost_Template=Hostname or IP of the proxy server
-advanced_config.ProxyHost_ToolTip=To use a proxy server enter the hostname or the IP here
-advanced_config.ProxyPass=Password\:
-advanced_config.ProxyPass_Template=Password for proxy authentication
-advanced_config.ProxyPass_ToolTip=To use proxy authentication enter password here
-advanced_config.ProxyPort=Port\:
-advanced_config.ProxyPort_Template=Port of the proxy server [1-65535]
-advanced_config.ProxyPort_ToolTip=To use a proxy server enter the port number here
-advanced_config.ProxyUser=Username\:
-advanced_config.ProxyUser_Template=Username for proxy authentication
-advanced_config.ProxyUser_ToolTip=To use proxy authentication enter username here
-advanced_config.Proxy_Title=&Proxy
-advanced_config.SigPHTransparency=Signature placeholder transparency
-advanced_config.SigPHTransparencyMax=Opaque
-advanced_config.SigPHTransparencyMin=Invisible
-advanced_config.SigPHTransparencyTooltip=Set the transparency of the signature placeholder in the positioning step
-advanced_config.Signature_Title=Si&gnature
-advanced_config.UpdateCheck=Automatically check for updates
-advanced_config.UpdateCheck_Title=Updates
-advanced_config.UpdateCheck_ToolTip=Shows a notification when a new version is available
-advanced_config.UseMarker=Search for QR-Code signature markers
-advanced_config.UseMarker_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker.
-advanced_config.UseSignatureFields=Search for signature fields
-advanced_config.UseSignatureFields_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker.
-argument.error.output=is not a directory
-argument.help.autopos=Enables automatic signature positioning
-argument.help.bku=Select the CCE to use. Possible values are\: LOCAL, MOBILE, KS. Example\: -b MOBILE
-argument.help.config=Defines which configuration file to use. Example\: -c <config file>
-argument.help.emblem=Sets the signature logo file to use for the signature. Example\: -e <emblem file>
-argument.help.help=Shows this help message
-argument.help.input=Sets the document to sign. Example\: -i <input document>
-argument.help.keystorealias=Sets the keystore key alias. Example \: -ksalias <alias>
-argument.help.keystorefile=Sets the keystore file. Example \: -ks <keystore file>
-argument.help.keystorekeypass=Sets the keystore password. Example \: -kspass <password>
-argument.help.keystorestorepass=Sets the keystore key password. Example \: -kskeypass <password>
-argument.help.keystoretype=Sets the keystore type. Example \: -kstype [PKCS12|JKS|JCEKS]
-argument.help.number=Sets the telephone number to use for mobile CCE. Example\: -n <number>
-argument.help.output=Sets the output folder or file to use. Example\: -o <folder>
-argument.help.password=Sets the password to use for mobile CCE. Example\: -p <password>
-argument.help.proxyhost=Sets the proxy host to use. Example\: -proxy <hostname/IP>
-argument.help.proxypass=Sets the proxy password to use. Example\: -proxypass <password>
-argument.help.proxyport=Sets the proxy port to use. Example\: -proxyport <port>
-argument.help.proxyuser=Sets the proxy username to use. Example\: -proxyuser <username>
-argument.help.skipfinish=Enables skipping of the "Finish" dialog (if successfully saved)
-argument.help.vis=Sets the visibility of a signature. Example\: -v "true"
-argument.info.help=The following options are available\:
-argument.invalid.bku=CCE argument invalid\! Usage\:
-argument.invalid.config=Configuration file argument invalid\! Usage\:
-argument.invalid.emblem=Signature logo argument invalid\! Usage\:
-argument.invalid.input=Document to sign argument invalid\! Usage\:
-argument.invalid.keystorealias=Keystore alias invalid\! Usage\:
-argument.invalid.keystorefile=Keystore file invalid\! Usage\:
-argument.invalid.keystorekeypass=Keystore key password invalid\! Usage\:
-argument.invalid.keystorestorepass=Keystore password invalid\! Usage\:
-argument.invalid.keystoretype=Keystore type invalid\! Usage\:
-argument.invalid.number=Phone number argument invalid\! Usage\:
-argument.invalid.output=Output folder argument invalid\! Usage\:
-argument.invalid.password=Mobile CCE password invalid\! Usage\:
-argument.invalid.proxyhost=Proxy host argument invalid\! Usage\:
-argument.invalid.proxypass=Proxy password argument invalid\! Usage\:
-argument.invalid.proxyport=Proxy port argument invalid\! Usage\:
-argument.invalid.proxyuser=Proxy username argument invalid\! Usage\:
-argument.invalid.vis=Profile Visbility argument invalid\! Usage\:
-bku_selection.card=&Card
-bku_selection.ks=&Keystore
-bku_selection.mobile=&Mobile
-common.AllExtension_Description=All files
-common.Cancel=C&ancel
-common.GIFExtension_Description=GIF files
-common.ImageExtension_Description=All supported image files
-common.JPGExtension_Description=JPG files
-common.KSExtension_Description=Java keystore files
-common.KeystoreExtension_Description=Keystore files
-common.Ok=O&K
-common.PDFExtension_Description=PDF documents
-common.PKCS12Extension_Description=PKCS12 keystore files
-common.PNGExtension_Description=PNG files
-common.Save=&Save
-common.browse=&Browse
-common.info=Information
-common.open=Open
-common.warning=Warning
-common.working=Working...
-common.unavailable=Unavailable
-config.About=A&bout %s
-config.AboutText=This software is freely provided by A-SIT under the conditions of the EUPL.\nTerms and details at <a>https\://technology.a-sit.at/en/terms-of-a-license/</a>.\n\nNote that components may have different licenses, partly restricting their free use to EUPL-licensed software.
-config.LicenseURL=https://technology.a-sit.at/en/terms-of-a-license/
-config.DataProtection=Data Protection Statement
-config.DataProtectionStatement=The software PDF-Over processes the data required for the signature process locally on the installed device. The signature process with the citizen card is carried out locally. During the signature process with the Handy-Signatur, the PDF document to be signed is sent to the company A-Trust. The storage period and further data protection information on the mobile phone signature can be found in the data protection declaration of A-Trust at <a>https://www.a-trust.at/downloads/documents/datenschutzerklaerung.pdf</a>.
-config.DataProtectionURL=https://www.a-trust.at/downloads/documents/datenschutzerklaerung.pdf
-config.FIDO2=&FIDO2
-config.Advanced=Ad&vanced
-config.Keystore=&Keystore
-config.Simple=Basi&c
-config.ShowLogDirectory=Show Log Directory
-dataSourceSelection.DropLabel=Drag document here
-dataSourceSelection.DropLabel2=or...
-dataSourceSelection.browse=&Browse for PDF on your computer
-dataSourceSelection.usePlaceholderText=A marker has been found where the creator of the document wants you to put your signature. Do you want to use it?
-dataSourceSelection.usePlaceholderTitle=Info
-error.ATrustConnection=Connection to A-Trust could not be established
-error.CouldNotResolveHostname=Could not resolve hostname '%s'.\nAre you connected to the internet?
-error.CmdLineArgs=Error parsing the command-line arguments\:
-error.Details=Details
-error.EnteredReferenceValue=You entered the reference value\!
-error.FailedToConnect=Failed to connect to signature server:\n%s
-error.FailedToGetSignedDocument=Failed to get signed document.
-error.FailedToLoadEmblem=Failed to load the signature logo
-error.FailedToLoadQRCode=Failed to load the QR code
-error.FailedToOpenDocument=Failed to open signed document\: %s.
-error.FailedToSaveSettings=Failed to save configuration file\!
-error.FileNotExist=File %s does not exist\!
-error.IOError=Input/Output Error
-error.Initialization=PDF-Over failed to initialize.\nWe're very sorry for the inconvenience.\n\nIt may be possible to restore functionality by resetting PDF-Over's configuration to factory defaults.\nWould you like to try this now?
-error.ConfigInitialization=The options screen failed to initialize.\nWe're very sorry for the inconvenience.\n\nIt may be possible to restore functionality by resetting PDF-Over's configuration to factory defaults.\nWould you like to try this now?
-error.InvalidBKU=Invalid CCE selection. Please check.
-error.InvalidLocale=Locale not valid
-error.InvalidPhoneNumber=Given phone number is invalid\! Example\:+43664123456789
-error.InvalidSettings=Invalid settings are still present. Please check your input.
-error.KeyStore=Error loading they keystore. Wrong password?
-error.KeyStoreAliasExist=Key alias %s not found in keystore
-error.KeyStoreAliasNoKey=Alias %s is not a key
-error.KeyStoreFileNotExist=Keystore file %s does not exist\!
-error.KeyStoreStorePass=Keystore password invalid
-error.KeyStoreKeyPass=Key password invalid
-error.LocalBKU=Please check if a local CCE (citizen card environment) is running\n\nYou need a CCE to access your citizen card. Further information under www.buergerkarte.at
-error.MayNotBeAPDF=This may not be a PDF file
-error.NoTan=No TAN entered
-error.PDFProtected=This PDF file is encrypted and can therefore not be signed
-error.PDFPwdProtected=This PDF file is password protected and can therefore not be signed
-error.PositioningNotPossible=Manual positioning currently not possible due to a Java Bug. Using automatic positioning.
-error.PrepareDocument=Failed to prepare document for signature.
-error.Retry=Retry
-error.SWTLib=Error loading SWT library
-error.SaveOutputFolder=Failed to save signed document to configured output folder.
-error.Signatur=Signature error
-error.TanTooLong=Entered TAN too long
-error.Title=Error
-error.TitleFatal=Fatal Error
-error.Unexpected=Unexpected Error
-exception.InvalidEmblemFile=%s is an invalid signature logo file\!
-exception.InvalidPort=%s is invalid\: has to be a number between %d and %d
-exception.PasswordTooLong=Given password is too long\!
-exception.PasswordTooShort=Given password is too short\!
-exception.PathNotDirectory=Path %s does not denote a directory\!
-exception.PathNotExist=Path %s does not exist\!
-keystore.KeystoreKeyPassEntry=Please enter key password\:
-keystore.KeystoreStorePassEntry=Please enter keystore password\:
-keystore_config.KeystoreAlias=Key alias
-keystore_config.KeystoreFile=Keystore file
-keystore_config.KeystoreFile.Dialog=Choose the keystore
-keystore_config.KeystoreFile.Dialog_Title=Keystore selection
-keystore_config.KeystoreFile_ToolTip=Path to the keystore file
-keystore_config.SaveToWhere.Header=Save Keystore passwords?
-keystore_config.SaveToWhere.None=Do not save (require entry each time)
-keystore_config.SaveToWhere.Memory=Save temporarily (require entry on 1st signature)
-keystore_config.SaveToWhere.Disk=Save permanently (require entry once)
-keystore_config.KeystoreKeyPass=Key password
-keystore_config.KeystoreKeyPass_ToolTip=Warning\: The password is stored in plain text.
-keystore_config.KeystoreStorePass=Keystore password
-keystore_config.KeystoreStorePass_ToolTip=Warning\: The password is stored in plain text.
-keystore_config.KeystoreType=Keystore type
-keystore_config.KeystoreType_JKS=Java keystore
-keystore_config.KeystoreType_PKCS12=PKCS12
-keystore_config.Keystore_Title=Keystore
-keystore_config.Load=Load keystore
-keystore_config.Load_ToolTip=Load keystore to show available key aliases
-main.about=About %s
-main.configuration=Configuration
-main.done=Finish
-main.hide=Hide %s
-main.position=Positioning
-main.quit=Quit %s
-main.signature=Signing
-mobileBKU.aTrustDisclaimer=This service is provided by A-Trust
-mobileBKU.certExpiresSoon=Since the validity of your certificate expires in the next few days, a new activation is necessary (free of charge). Press "Yes" to visit https\://www.handy-signatur.at/ now, and then sign in to your account.
-mobileBKU.notice=Notice from server\:
-mobileBKU.number=Username/Phone Number\:
-mobileBKU.password=Password\:
-mobileBKU.show=<a>Show signature data</a>
-mobileBKU.show_tooltip=Shows the data to be signed
-mobileBKU.tan_tries_exceeded=TAN tries exceeded, request a new TAN?
-mobileBKU.wrong_tan=TAN not accepted
-mobileBKU.rememberPassword=Re&member
-mobileBKU.rememberPasswordNote=If you check this, you will not be prompted for your password again until you re-start PDF-Over
-mobileBKU.authorize=Begin authorization
-output.file_ask_overwrite=File %s already exists, do you want to overwrite it?
-output.link_open_message=You can open the signed file <a>here</a>.
-output.link_save_message=You can save the signed file
-output.save_failed=Saving file %s failed\: %s
-output.success_message=Signature was successful
-positioning.newPage=Create &new Page
-positioning.page=Page %d of %d
-positioning.placeholder=Please select a signature placeholder from the list below:
-positioning.removeNewPage=Undo &new Page
-positioning.sign=&Sign
-positioning.signature=Signature
-simple_config.ReplaceEmblem=Re&place emblem
-simple_config.ClearEmblem=&Reset emblem
-simple_config.Preview_Title=Signature preview
-simple_config.ExampleNumber=+43676123456789
-simple_config.ExampleNumber_ToolTip=To use a default mobile phone number or username, enter it here
-simple_config.MobileBKU_Title=ID Austria / &Mobile Phone Signature
-simple_config.Note=Text\:
-simple_config.Note_Default_Standard=This document is signed with a qualified electronic signature. According to Art. 25 para. 2 of the Regulation (EU) No 910/2014 of 23. July 2014 ("eIDAS-Regulation") it shall have the equivalent legal effect of a handwritten signature.
-simple_config.Note_Default_OfficialSignature=This document was signed/sealed with an official signature. According to § 20 Austrian E-Government-Act a printout of this document is assumed to be authentic.
-simple_config.Note_Default_Empty=
-simple_config.Note_SetDefault=Restore default
-simple_config.Note_Title=Signature &Note
-simple_config.Note_Tooltip=Add an optional note to display on your Signature
-simple_config.PhoneNumber=Username (or mobile no.)\:
-simple_config.SigBlockLang_Title=Signature block lan&guage\:
-simple_config.SigBlockLang_ToolTip=Select the language to be used in the signature block displayed on the signed document
-simple_config.SigProfile_Title=Signature Profile
-simple_config.LogoOnlyTargetSize_Title=Logo signature size
-simple_config.SIGNATURBLOCK_SMALL=Standard Signature Block
-simple_config.AMTSSIGNATURBLOCK=Official Signature
-simple_config.BASE_LOGO=Logo Only
-simple_config.INVISIBLE=Invisible Signature
-tanEnter.FP=Please open the Handy-Signature app\nand confirm the signature.
-tanEnter.QR=QR code\:
-tanEnter.ReferenceValue=Reference value\:
-tanEnter.SMS=Request &SMS
-tanEnter.FIDO2=&FIDO2
-tanEnter.TAN=TAN\:
-tanEnter.tries=%d tries left\!
-tanEnter.try=Only 1 try left\!
-version_check.UpdateText=Version %s is available.\nOpen download page now?
-version_check.UpdateTitle=New version available\!
-waiting.message=Signature creation in progress...
-waiting_for_app.message=Please open Signature-App\!
-config.UpdateStatus.NOT_CHECKED=Update check not done. <a>Check now</a>?
-config.UpdateStatus.CHECKING=Checking for updates...
-config.UpdateStatus.OUTDATED=New version available. <a>Update now</a>?
-config.UpdateStatus.UP_TO_DATE=PDF-Over is up to date. <a>Check again</a>?
-config.UpdateStatus.FAILED=Update check failed. <a>Retry</a>?
-config.fido2.AboutFIDO=ID Austria users can optionally substitute a suitable hardware security token for app authentication.\n\nThis does not replace username/password entry. However, instead of confirming the signature in the smartphone app, the user instead confirms it using their security token.\n\nFurther information regarding supported tokens is available at <a>oesterreich.gv.at</a>.
-config.fido2.UnsupportedTryLibFido2=You are currently missing a required dependency to utilize FIDO2 tokens:\n ● <a>LibFido2</a>\n\nPlease install the dependency via your package manager, then restart PDF-Over.
-config.fido2.UnsupportedPlatform=FIDO2 authentication is currently unsupported on your platform.
-config.fido2.InfoURL=https://www.oesterreich.gv.at/id-austria/haeufige-fragen/allgemeines-zu-id-austria#fido
-config.fido2.Group=FIDO2 settings
-config.fido2.ByDefault=Select FIDO2 authentication by default
-atrusterror.http_413=a-trust.at rejected request:\nProvided document exceeds size limit.
-atrusterror.http_generic=a-trust.at rejected request:\nHTTP %d %s
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
deleted file mode 100644
index a6326706..00000000
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
+++ /dev/null
@@ -1,270 +0,0 @@
-#Eclipse messages class
-#Fri Jun 26 18:01:09 CEST 2015
-BKU.KS=Keystore
-BKU.LOCAL=Lokale BKU
-BKU.MOBILE=Handy-BKU
-BKU.NONE=Keine Voreinstellung
-BKUSelectionComposite.btnMobile.text=Handy
-TrustedSocketFactory.FailedToCreateSecureConnection=Konnte keine sichere Verbindung erstellen
-AdvancedConfigurationComposite.lblSaveFilePostFix.text=Ausgabedatei Postfix\:
-advanced_config.AutoPosition=Automatische Positionierung
-advanced_config.AutoPosition_ToolTip=Aktivieren Sie diese Option, um die Signatur automatisch zu positionieren
-advanced_config.BKUSelection_Title=&BKU-Auswahl
-advanced_config.BKUSelection_ToolTip=Wählen Sie die BKU, mit der die Signatur durchgeführt werden soll
-advanced_config.KeystoreEnabled=Keystore-Signatur aktivieren
-advanced_config.KeystoreEnabled_ToolTip=Aktiviert die Möglichkeit, mit einem lokalen Keystore zu signieren
-advanced_config.LocaleSelection_Title=Interface-S&prache
-advanced_config.LocaleSelection_ToolTip=Wählen Sie die Sprache für das Benutzerinterface
-advanced_config.OutputFolder=Standard-Ausgabeordner\:
-advanced_config.OutputFolder.Dialog=Wählen Sie einen Ordner
-advanced_config.OutputFolder.Dialog_Title=Ausgabeordner wählen
-advanced_config.OutputFolder_Title=Ausgabe Einstellungen
-advanced_config.OutputFolder_ToolTip=Wählen Sie einen Ordner, in dem signierte Dokumente automatisch abgelegt werden (deaktivert, wenn das Feld leer ist; ein einzelner Punkt (".") wählt das Verzeichnis des Ursprungsdokuments)
-advanced_config.PdfACompat=PDF/A-Kompatibilität
-advanced_config.PdfACompat_ToolTip=Ob die Signatur PDF/A-kompatibel sein soll (erhöht PDF-Größe). Diese Option setzt voraus, dass das original Dokument bereits im PDF/A Format ist.
-advanced_config.ProxyHost=Host\:
-advanced_config.ProxyHost_Template=Hostname oder IP des Proxy-Servers
-advanced_config.ProxyHost_ToolTip=Um einen Proxy zu verwenden Hostname/IP hier eingeben
-advanced_config.ProxyPass=Passwort\:
-advanced_config.ProxyPass_Template=Passwort für den Proxy-Server
-advanced_config.ProxyPass_ToolTip=Für Proxy-Authentifizierung Passwort hier eingeben
-advanced_config.ProxyPort=Port\:
-advanced_config.ProxyPort_Template=Port des Proxy-Servers [1-65535]
-advanced_config.ProxyPort_ToolTip=Um einen Proxy zu verwenden Portnummer hier eingeben
-advanced_config.ProxyUser=Benutzer\:
-advanced_config.ProxyUser_Template=Benutzername für den Proxy-Server
-advanced_config.ProxyUser_ToolTip=Für Proxy-Authentifizierung Benutzername hier eingeben
-advanced_config.Proxy_Title=&Proxy
-advanced_config.SigPHTransparency=Signaturplatzhalter-Transparenz
-advanced_config.SigPHTransparencyMax=Undurchsichtig
-advanced_config.SigPHTransparencyMin=Unsichtbar
-advanced_config.SigPHTransparencyTooltip=Wählt die Transparenz des Signaturplatzhalters im Schritt "Positionierung"
-advanced_config.Signature_Title=Si&gnatur
-advanced_config.Placeholder_Title=Platzhalter
-advanced_config.Placeholder_Enabled=Platzhalter Suche aktivieren
-advanced_config.UpdateCheck=Automatisch auf Updates überprüfen
-advanced_config.UpdateCheck_Title=Updates
-advanced_config.UpdateCheck_ToolTip=Zeigt eine Benachrichtigung, wenn eine neue Version verfügbar ist
-advanced_config.UseMarker=Nach QR-Code Signaturplatzhaltern suchen
-advanced_config.UseMarker_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einfügen wollen.
-advanced_config.UseSignatureFields=Nach Signaturfelder-Platzhaltern suchen
-advanced_config.UseSignatureFields_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einfügen wollen.
-argument.error.output=ist kein Ordner
-argument.help.autopos=Aktiviert automatische Positionierung der Signatur
-argument.help.bku=Wählen Sie die BKU. Gültige Werte\: LOCAL, MOBILE, KS. Bsp.\: -b MOBILE
-argument.help.config=Auswahl der Konfigurationsdatei. Bsp.\: -c <Dateiname>
-argument.help.emblem=Wählt die Bildmarke für die Signatur. Bsp.\: -e <Dateiname>
-argument.help.help=Zeigt diese Hilfe an
-argument.help.input=Wählt das zu signierende Dokument. Bsp.\: -i <Dateiname>
-argument.help.keystorealias=Wählt das Keystore Key-Alias. Bsp.\: -ksalias <Alias>
-argument.help.keystorefile=Wählt die Keystore-Datei. Bsp.\: -ks <Dateiname>
-argument.help.keystorekeypass=Wählt das Keystore Key-Password. Bsp.\: -kskeypass <Passwort>
-argument.help.keystorestorepass=Wählt das Keystore-Password. Bsp.\: -kspass <Passwort>
-argument.help.keystoretype=Wählt den Keystore-Typ. Bsp.\: -kstype [PKCS12|JKS|JCEKS]
-argument.help.number=Wählt die Telefonnummer für die Handy-BKU. Bsp.\: -n <Nummer>
-argument.help.output=Wählt den Ausgabeordner oder die Ausgabedatei. Bsp.\: -o <Ordner>
-argument.help.password=Wählt das Passwort für die Handy-BKU. Bsp.\: -p <Passwort>
-argument.help.proxyhost=Wählt den Proxy-Server. Bsp.\: -proxy <Hostname/IP>
-argument.help.proxypass=Wählt das Proxy-Passwort. Bsp.\: -proxypass <Passwort>
-argument.help.proxyport=Wählt den Proxy-Server-Port. Bsp.\: -proxyport <Portnummer>
-argument.help.proxyuser=Wählt den Proxy-Benutznamen. Bsp.\: -proxyuser <Benutzername>
-argument.help.skipfinish=Aktiviert das Überspringen des "Fertig"-Dialogs (falls Speichern erfolgreich)
-argument.info.help=Die folgenden Optionen sind verfügbar\:
-argument.invalid.bku=BKU-Auswahl ungültig\! Verwendung\:
-argument.invalid.config=Konfigurationsdatei ungültig\! Verwendung\:
-argument.invalid.emblem=Bildmarke ungültig\! Verwendung\:
-argument.invalid.input=Dokument ungültig\! Verwendung\:
-argument.invalid.keystorealias=Keystore-Alias ungültig\! Verwendung\:
-argument.invalid.keystorefile=Keystore-Datei ungültig\! Verwendung\:
-argument.invalid.keystorekeypass=Keystore Key-Passwort ungültig\! Verwendung\:
-argument.invalid.keystorestorepass=Keystore-Passwort ungültig\! Verwendung\:
-argument.invalid.keystoretype=Keystore-Typ ungültig\! Verwendung\:
-argument.invalid.number=Telefonnummer ungültig\! Verwendung\:
-argument.invalid.output=Ausgabeordner ungültig\! Verwendung\:
-argument.invalid.password=Handy-BKU Passwort ungültig\! Verwendung\:
-argument.invalid.proxyhost=Proxy-Host ungültig\! Verwendung\:
-argument.invalid.proxypass=Proxy-Passwort ungültig\! Verwendung\:
-argument.invalid.proxyport=Proxy-Port ungültig\! Verwendung\:
-argument.invalid.proxyuser=Proxy-Benutzername ungültig\! Verwendung\:
-bku_selection.card=&Karte
-bku_selection.ks=Key&Store
-bku_selection.mobile=&Handy
-common.AllExtension_Description=Alle Dateien
-common.Cancel=&Abbrechen
-common.GIFExtension_Description=GIF-Bilder
-common.ImageExtension_Description=Alle unterstützen Bilder
-common.JPGExtension_Description=JPG-Bilder
-common.KeystoreExtension_Description=Keystores
-common.KSExtension_Description=Java Keystores
-common.Ok=O&K
-common.PDFExtension_Description=PDF-Dokumente
-common.PKCS12Extension_Description=PKCS12 Keystores
-common.PNGExtension_Description=PNG-Bilder
-common.Save=&Speichern
-common.browse=&Durchsuchen
-common.info=Information
-common.open=Öffnen
-common.warning=Warnung
-common.working=In Arbeit...
-common.unavailable=Nicht verfügbar
-config.About=Ü&ber %s
-config.AboutText=Diese Software wird von A-SIT unter den Bedingungen der EUPL frei zur Verfügung gestellt.\nLizenbedingungen unter <a>https://technology.a-sit.at/lizenzbedingungen/</a>.\n\nBeachten Sie, dass Komponenten unter eigenen Lizenzen zur Verfügung gestellt werden, die teilweise nur für EUPL-lizensierte Software zur freien Verwendung vorgesehen sind.
-config.LicenseURL=https://technology.a-sit.at/lizenzbedingungen/
-config.DataProtection=Datenschutzinformation
-config.DataProtectionStatement=Die Software PDF-Over verarbeitet für den Signaturvorgang benötigte Daten lokal auf dem installierten Gerät. Der Signaturvorgang mit der Bürgerkarte wird lokal durchgeführt. Beim Signaturvorgang mit der Handy-Signatur wird das zu signierende PDF Dokument an die Firma A-Trust gesendet. Die Speicherdauer sowie weitere Datenschutzinformationen zur Handy-Signatur entnehmen Sie bitte der Datenschutzerklärung der Firma A-Trust: <a>https://www.a-trust.at/downloads/documents/datenschutzerklaerung.pdf</a>.
-config.DataProtectionURL=https://www.a-trust.at/downloads/documents/datenschutzerklaerung.pdf
-config.FIDO2=&FIDO2
-config.Advanced=Er&weitert
-config.Keystore=&Keystore
-config.Simple=&Einfach
-config.ShowLogDirectory=Logs anzeigen
-config.fido2.AboutFIDO=Nutzer:innen mit ID Austria können einen Hardware-Sicherheitstoken als Ersatz zum Smartphone zur Auslösung von PDF-Signaturen verwenden.\n\nDie Eingabe von Benutzername und Passwort ist weiterhin notwendig, aber die Freigabe über die App wird durch die Freigabe über den Hardware-Token ersetzt.\n\nWeitere Informationen erhalten Sie auf <a>der Informationsseite der ID-Austria</a>.
-config.fido2.UnsupportedTryLibFido2=Für die Verwendung von FIDO2-Tokens wird benötigt:\n ● <a>LibFido2</a>\n\nBitte installieren Sie die o.a. Voraussetzungen und starten sie dann PDF-Over neu.
-config.fido2.UnsupportedPlatform=Ihr System unterstützt keine Authentifizierung mittels FIDO2-Token.
-config.fido2.InfoURL=https://www.oesterreich.gv.at/id-austria/haeufige-fragen/allgemeines-zu-id-austria#fido
-config.fido2.Group=FIDO2-Einstellungen
-config.fido2.ByDefault=FIDO2 standardmäßig auswählen
-dataSourceSelection.DropLabel=Dokument hierher ziehen
-dataSourceSelection.DropLabel2=oder...
-dataSourceSelection.browse=&Durchsuchen um ein Dokument zu wählen
-dataSourceSelection.usePlaceholderTitle=Info
-dataSourceSelection.usePlaceholderText=Im vorliegenden Dokument wurde ein Signaturplatzhalter gefunden. Soll dieser verwendet werden?
-error.CmdLineArgs=Fehler bei den Befehlszeilen-Parametern\:
-error.Details=Details
-error.EnteredReferenceValue=Sie haben den Vergleichswert eingegeben\!
-error.FailedToGetSignedDocument=Konnte signiertes Dokument nicht erhalten.
-error.FailedToLoadEmblem=Konnte Bildmarke nicht speichern
-error.FailedToLoadQRCode=Konnte den QR code nicht laden
-error.FailedToOpenDocument=Konnte signiertes Dokument nicht öffnen\: %s.
-error.FailedToSaveSettings=Konnte Konfigurationsdatei nicht speichern\!
-error.FileNotExist=Datei %s existiert nicht\!
-error.IOError=Ein-/Ausgabe-Fehler
-error.Initialization=Initialisierung fehlgeschlagen.\nWir bittem un Verzeihung für die Unannehmlichkeiten.\n\nEventuell lässt sich Ihr Problem beheben, indem Sie PDF-Over auf Werkseinstellungen zurücksetzen.\nMöchten Sie dies nun versuchen?
-error.Initialization=Der Einstellungsbildschirm konnte nicht geladen werden.\nWir bittem un Verzeihung für die Unannehmlichkeiten.\n\nEventuell lässt sich Ihr Problem beheben, indem Sie PDF-Over auf Werkseinstellungen zurücksetzen.\nMöchten Sie dies nun versuchen?
-error.InvalidBKU=Ungültige BKU-Auswahl. Bitte überprüfen.
-error.InvalidLocale=Ungültige Sprache
-error.InvalidPhoneNumber=Telefonnummer ungültig\! Beispiel\: +43664123456789
-error.InvalidSettings=Ungültige Einstellungen vorhanden. Bitte überprüfen.
-error.KeyStore=Fehler beim Laden des KeyStores. Falsches Passwort?
-error.KeyStoreAliasExist=Key-Alias %s nicht im Keystore gefunden
-error.KeyStoreAliasNoKey=Alias %s ist kein Schlüssel
-error.KeyStoreFileNotExist=Keystore-Datei %s existiert nicht\!
-error.KeyStoreStorePass=Keystore-Passwort nicht akzeptiert
-error.KeyStoreKeyPass=Schlüssel-Passwort nicht akzeptiert
-error.LocalBKU=Bitte prüfen sie, ob Ihre lokale BKU (Bürgerkartenumgebung) läuft\n\nSie benötigen eine BKU, um auf Ihre Bürgerkarte zuzugreifen. Weitere Informationen unter www.buergerkarte.at
-error.MayNotBeAPDF=Dies ist möglicherweise keine PDF-Datei
-error.NoTan=Keine TAN eingeben
-error.PDFProtected=Diese PDF-Datei ist verschlüsselt und kann daher nicht signiert werden
-error.PDFPwdProtected=Diese PDF-Datei ist Passwortgeschützt und kann daher nicht signiert werden
-error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verfügbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt.
-error.PrepareDocument=Konnte Dokument nicht zur Signatur vorbereiten.
-error.Retry=Wiederholen
-error.SWTLib=Fehler beim Laden der SWT-Bibliothek
-error.SaveOutputFolder=Konnte Dokument nicht in den konfigurierten Ausgabeordner speichern.
-error.Signatur=Signatur-Fehler
-error.TanTooLong=Eingegebene TAN zu lange
-error.Title=Fehler
-error.TitleFatal=Fataler Fehler
-error.Unexpected=Unerwarteter Fehler
-error.ATrustConnection=Verbindung zu A-Trust konnte nicht aufgebaut werden
-error.CouldNotResolveHostname=Server '%s' wurde nicht gefunden.\nÜberprüfen Sie Ihre Internetverbindung.
-error.FailedToConnect=Verbindung zum Signaturserver fehlgeschlagen:\n%s
-exception.InvalidEmblemFile=%s ist eine ungültige Bildmarken-Datei\!
-exception.InvalidPort=%s ist ungültig\: muss eine Nummer zwischen %d und %d sein.
-exception.PasswordTooLong=Eingegebenes Passwort ist zu lange\!
-exception.PasswordTooShort=Eingegebenes Passwort ist zu kurz\!
-exception.PathNotDirectory=Pfad %s ist kein gültiger Ordner\!
-exception.PathNotExist=Pfad %s existiert nicht\!
-keystore.KeystoreStorePassEntry=Keystore-Passwort eingeben:
-keystore.KeystoreKeyPassEntry=Schlüssel-Passwort eingeben:
-keystore_config.Keystore_Title=Keystore
-keystore_config.KeystoreAlias=Schlüssel-Alias
-keystore_config.KeystoreFile=Keystore-Datei
-keystore_config.KeystoreFile_ToolTip=Pfad zur Keystore-Datei
-keystore_config.KeystoreFile.Dialog=Wählen Sie den Keystore
-keystore_config.KeystoreFile.Dialog_Title=Keystore wählen
-keystore_config.SaveToWhere.Header=Keystore-Passwörter speichern?
-keystore_config.SaveToWhere.None=Nicht speichern (Eingabe bei jeder Signatur)
-keystore_config.SaveToWhere.Memory=Temporär speichern (Eingabe bei der ersten Signatur)
-keystore_config.SaveToWhere.Disk=Permanent speichern (einmalige Eingabe)
-keystore_config.KeystoreKeyPass=Schlüssel-Passwort
-keystore_config.KeystoreKeyPass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert.
-keystore_config.KeystoreStorePass=Keystore-Passwort
-keystore_config.KeystoreStorePass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert.
-keystore_config.KeystoreType=Keystore-Typ
-keystore_config.KeystoreType_JKS=Java-Keystore
-keystore_config.KeystoreType_PKCS12=PKCS12
-keystore_config.Load=Keystore laden
-keystore_config.Load_ToolTip=Keystore laden, um die verfügbaren Schlüssel-Aliases anzuzeigen
-main.about=Über %s
-main.configuration=Konfiguration
-main.done=Fertig
-main.hide=%s ausblenden
-main.position=Positionierung
-main.quit=%s beenden
-main.signature=Signatur
-mobileBKU.aTrustDisclaimer=Dieses Service wird von der Fa. A-Trust zu Verfügung gestellt
-mobileBKU.certExpiresSoon=Da die Gültigkeit Ihres Zertifikats in den nächsten Tagen endet, ist eine erneute Aktivierung erforderlich (gebührenfrei). Wählen Sie "Ja" um https\://www.handy-signatur.at/ zu öffnen, und loggen Sie sich dann in Ihr Konto ein.
-mobileBKU.notice=Nachricht vom Server\:
-mobileBKU.number=Benutzername/Telefonnummer\:
-mobileBKU.password=Passwort\:
-mobileBKU.show=<a>Signaturdaten anzeigen</a>
-mobileBKU.show_tooltip=Zeigt die zu signierenden Daten an
-mobileBKU.tan_tries_exceeded=Zu viele TAN-Versuche, neue TAN anfordern?
-mobileBKU.wrong_tan=TAN nicht akzeptiert
-mobileBKU.rememberPassword=Daten &merken
-mobileBKU.rememberPasswordNote=Wählen Sie diese Box aus, um bis zum nächsten Start von PDF-Over nicht erneut gefragt zu werden
-mobileBKU.authorize=Autorisierung starten
-output.file_ask_overwrite=Datei %s existiert bereits, wollen Sie sie überschreiben?
-output.link_open_message=Sie können das signierte Dokument <a>hier</a> öffnen.
-output.link_save_message=Sie können das signierte Dokument speichern
-output.save_failed=Datei %s konnte nicht gespeichert werden\: %s
-output.success_message=Signatur war erfolgreich
-positioning.newPage=&Neue Seite anlegen
-positioning.page=Seite %d von %d
-positioning.placeholder=Bitte wählen Sie den gewünschten Platzhalter aus der Liste aus:
-positioning.removeNewPage=&Neue Seite rückgängig
-positioning.sign=&Signieren
-positioning.signature=Signatur
-simple_config.ReplaceEmblem=L&ogo auswählen
-simple_config.ClearEmblem=Logo zu&rücksetzen
-simple_config.Preview_Title=Vorschau
-simple_config.ExampleNumber=+43676123456789
-simple_config.ExampleNumber_ToolTip=Um die Handynummer bzw. den Benutzernamen voreinzustellen hier eingeben
-simple_config.MobileBKU_Title=ID-Austria / &Handy-Signatur
-simple_config.Note=Text\:
-simple_config.Note_Default_Standard=Dieses mit einer qualifizierten elektronischen Signatur versehene Dokument hat gemäß Art. 25 Abs. 2 der Verordnung (EU) Nr. 910/2014 vom 23. Juli 2014 (\"eIDAS-VO\") die gleiche Rechtswirkung wie ein handschriftlich unterschriebenes Dokument.
-simple_config.Note_Default_OfficialSignature=Dieses Dokument wurde amtssigniert. Auch ein Ausdruck dieses Dokuments hat gemäß § 20 E-Government-Gesetz die Beweiskraft einer öffentlichen Urkunde.
-simple_config.Note_Default_Empty=
-simple_config.Note_SetDefault=Standard wiederherstellen
-simple_config.Note_Title=Signaturhi&nweis
-simple_config.Note_Tooltip=Ein optionaler Hinweis, der in Ihrer Signatur angezeigt wird
-simple_config.PhoneNumber=Benutzername/Handynummer\:
-simple_config.SigBlockLang_Title=Sp&rache des Signaturblocks\:
-simple_config.SigBlockLang_ToolTip=Wählen Sie eine Sprache für den Signaturblock, der am signierten Dokument erscheint
-simple_config.SigProfile_Title=Signatur-Profil
-simple_config.SIGNATURBLOCK_SMALL=Standard Signaturblock
-simple_config.AMTSSIGNATURBLOCK=Amtssignatur
-simple_config.BASE_LOGO=Nur Bildmarke
-simple_config.INVISIBLE=Unsichtbar
-simple_config.LogoOnlyTargetSize_Title=Größe der Bildmarke
-tanEnter.QR=QR Code\:
-tanEnter.FP=Bitte öffnen Sie die Handy-Signatur App\nund bestätigen Sie die Signatur.
-tanEnter.ReferenceValue=Vergleichswert\:
-tanEnter.SMS=&SMS anfordern
-tanEnter.FIDO2=&FIDO2
-tanEnter.TAN=TAN\:
-tanEnter.APPTAN=Bitte öffnen Sie die Handy-Signatur App\nTAN\:
-tanEnter.tries=%d Versuche übrig\!
-tanEnter.try=Nur noch 1 Versuch übrig\!
-version_check.UpdateText=Version %s ist verfügbar\nJetzt Download-Seite öffnen?
-version_check.UpdateTitle=Neue Version verfügbar\!
-waiting.message=Signaturerstellung läuft...
-waiting_for_app.message=Bitte öffnen Sie die Handy-Signatur App!
-config.UpdateStatus.NOT_CHECKED=Keine Versions-Infos. <a>Jetzt abfragen</a>?
-config.UpdateStatus.CHECKING=Versions-Infos werden abgefragt...
-config.UpdateStatus.OUTDATED=Neue Version verfügbar. <a>Herunterladen</a>?
-config.UpdateStatus.UP_TO_DATE=Ihre Version ist aktuell. <a>Nochmals prüfen</a>?
-config.UpdateStatus.FAILED=Versions-Check fehlgeschlagen. <a>Nochmal versuchen</a>?
-atrusterror.http_413=a-trust.at lehnt Anfrage ab:\nDateigröße des PDF-Dokuments überschreitet Grenzwert.
-atrusterror.http_generic=a-trust.at lehnt Anfrage ab:\nHTTP %d %s
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties
deleted file mode 120000
index 31a92d3b..00000000
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties
+++ /dev/null
@@ -1 +0,0 @@
-messages.properties \ No newline at end of file
diff --git a/pdf-over-gui/src/main/resources/certificates/A-Trust-Root-05.crt b/pdf-over-gui/src/main/resources/certificates/A-Trust-Root-05.crt
deleted file mode 100644
index b9a0e5a6..00000000
--- a/pdf-over-gui/src/main/resources/certificates/A-Trust-Root-05.crt
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/certificates/A-Trust-nQual-01a.crt b/pdf-over-gui/src/main/resources/certificates/A-Trust-nQual-01a.crt
deleted file mode 100644
index efa28178..00000000
--- a/pdf-over-gui/src/main/resources/certificates/A-Trust-nQual-01a.crt
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/certificates/A-Trust-nQual-03.crt b/pdf-over-gui/src/main/resources/certificates/A-Trust-nQual-03.crt
deleted file mode 100644
index 33e77636..00000000
--- a/pdf-over-gui/src/main/resources/certificates/A-Trust-nQual-03.crt
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/certificates/ComodoRSACA.crt b/pdf-over-gui/src/main/resources/certificates/ComodoRSACA.crt
deleted file mode 100644
index 1f6cf612..00000000
--- a/pdf-over-gui/src/main/resources/certificates/ComodoRSACA.crt
+++ /dev/null
@@ -1,34 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCB
-hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
-A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
-BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAwMTE5
-MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
-EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
-Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR
-6FSS0gpWsawNJN3Fz0RndJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8X
-pz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZFGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC
-9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+5eNu/Nio5JIk2kNrYrhV
-/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pGx8cgoLEf
-Zd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z
-+pUX2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7w
-qP/0uK3pN/u6uPQLOvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZah
-SL0896+1DSJMwBGB7FY79tOi4lu3sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVIC
-u9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+CGCe01a60y1Dma/RMhnEw6abf
-Fobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5WdYgGq/yapiq
-crxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E
-FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB
-/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvl
-wFTPoCWOAvn9sKIN9SCYPBMtrFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM
-4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+nq6PK7o9mfjYcwlYRm6mnPTXJ9OV
-2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSgtZx8jb8uk2Intzna
-FxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwWsRqZ
-CuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiK
-boHGhfKppC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmcke
-jkk9u+UJueBPSZI9FoJAzMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yL
-S0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHqZJx64SIDqZxubw5lT2yHh17zbqD5daWb
-QOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk527RH89elWsn2/x20Kk4yl
-0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7ILaZRfyHB
-NVOFBkpdn627G190
------END CERTIFICATE-----
diff --git a/pdf-over-gui/src/main/resources/certificates/certificates.xml b/pdf-over-gui/src/main/resources/certificates/certificates.xml
deleted file mode 100644
index 53e40a3c..00000000
--- a/pdf-over-gui/src/main/resources/certificates/certificates.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<certificates>
- <certificate>A-Trust-nQual-01a.crt</certificate>
- <certificate>A-Trust-nQual-03.crt</certificate>
- <certificate>A-Trust-Root-05.crt</certificate>
- <certificate>ComodoRSACA.crt</certificate>
- <certificate>iaik-tls-ca.cer</certificate>
-</certificates>
diff --git a/pdf-over-gui/src/main/resources/certificates/iaik-tls-ca.cer b/pdf-over-gui/src/main/resources/certificates/iaik-tls-ca.cer
deleted file mode 100644
index 0dc18601..00000000
--- a/pdf-over-gui/src/main/resources/certificates/iaik-tls-ca.cer
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip b/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip
deleted file mode 100644
index 06576ca9..00000000
--- a/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/icons/icon.icns b/pdf-over-gui/src/main/resources/icons/icon.icns
deleted file mode 100644
index c6b61452..00000000
--- a/pdf-over-gui/src/main/resources/icons/icon.icns
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/icons/icon.ico b/pdf-over-gui/src/main/resources/icons/icon.ico
deleted file mode 100644
index 338e759c..00000000
--- a/pdf-over-gui/src/main/resources/icons/icon.ico
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/icons/icon.png b/pdf-over-gui/src/main/resources/icons/icon.png
deleted file mode 100644
index fe1e3d30..00000000
--- a/pdf-over-gui/src/main/resources/icons/icon.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/icons/icon144x144.png b/pdf-over-gui/src/main/resources/icons/icon144x144.png
deleted file mode 100644
index fc783d64..00000000
--- a/pdf-over-gui/src/main/resources/icons/icon144x144.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/icons/icon16x16.png b/pdf-over-gui/src/main/resources/icons/icon16x16.png
deleted file mode 100644
index 571c7885..00000000
--- a/pdf-over-gui/src/main/resources/icons/icon16x16.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/icons/icon24x24.png b/pdf-over-gui/src/main/resources/icons/icon24x24.png
deleted file mode 100644
index 0c35a113..00000000
--- a/pdf-over-gui/src/main/resources/icons/icon24x24.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/icons/icon32x32.png b/pdf-over-gui/src/main/resources/icons/icon32x32.png
deleted file mode 100644
index 33615f88..00000000
--- a/pdf-over-gui/src/main/resources/icons/icon32x32.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/icons/icon48x48.png b/pdf-over-gui/src/main/resources/icons/icon48x48.png
deleted file mode 100644
index dc831d49..00000000
--- a/pdf-over-gui/src/main/resources/icons/icon48x48.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/icons/icon96x96.png b/pdf-over-gui/src/main/resources/icons/icon96x96.png
deleted file mode 100644
index eeabdca6..00000000
--- a/pdf-over-gui/src/main/resources/icons/icon96x96.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/config.png b/pdf-over-gui/src/main/resources/img/config.png
deleted file mode 100644
index cf88fe2b..00000000
--- a/pdf-over-gui/src/main/resources/img/config.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/config_disabled.png b/pdf-over-gui/src/main/resources/img/config_disabled.png
deleted file mode 100644
index 7d416c0d..00000000
--- a/pdf-over-gui/src/main/resources/img/config_disabled.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/config_p.png b/pdf-over-gui/src/main/resources/img/config_p.png
deleted file mode 100644
index 3939aaab..00000000
--- a/pdf-over-gui/src/main/resources/img/config_p.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/error.png b/pdf-over-gui/src/main/resources/img/error.png
deleted file mode 100644
index 7233d45d..00000000
--- a/pdf-over-gui/src/main/resources/img/error.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/fido_logo.png b/pdf-over-gui/src/main/resources/img/fido_logo.png
deleted file mode 100644
index 78ab7806..00000000
--- a/pdf-over-gui/src/main/resources/img/fido_logo.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/handy.png b/pdf-over-gui/src/main/resources/img/handy.png
deleted file mode 100644
index 03acd8e7..00000000
--- a/pdf-over-gui/src/main/resources/img/handy.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/icon.png b/pdf-over-gui/src/main/resources/img/icon.png
deleted file mode 100644
index 24f46564..00000000
--- a/pdf-over-gui/src/main/resources/img/icon.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/karte.png b/pdf-over-gui/src/main/resources/img/karte.png
deleted file mode 100644
index f0cea0a7..00000000
--- a/pdf-over-gui/src/main/resources/img/karte.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/pdf-over-icon-1.png b/pdf-over-gui/src/main/resources/img/pdf-over-icon-1.png
deleted file mode 100644
index a040b547..00000000
--- a/pdf-over-gui/src/main/resources/img/pdf-over-icon-1.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/pdf-over-icon.png b/pdf-over-gui/src/main/resources/img/pdf-over-icon.png
deleted file mode 100644
index d74070d4..00000000
--- a/pdf-over-gui/src/main/resources/img/pdf-over-icon.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/img/webauthn-logo.png b/pdf-over-gui/src/main/resources/img/webauthn-logo.png
deleted file mode 100644
index f9024864..00000000
--- a/pdf-over-gui/src/main/resources/img/webauthn-logo.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/installer-mac/background.png b/pdf-over-gui/src/main/resources/installer-mac/background.png
deleted file mode 100644
index 0d6edaf3..00000000
--- a/pdf-over-gui/src/main/resources/installer-mac/background.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/installer-mac/notarizeAppCommand.sh b/pdf-over-gui/src/main/resources/installer-mac/notarizeAppCommand.sh
deleted file mode 100644
index 6fdbfccc..00000000
--- a/pdf-over-gui/src/main/resources/installer-mac/notarizeAppCommand.sh
+++ /dev/null
@@ -1 +0,0 @@
-xcrun altool --notarize-app --primary-bundle-id "at.egiz.PDF-Over" --username "$ALTOOL_USERNAME" --password "$ALTOOL_PASSWORD" --file $1
diff --git a/pdf-over-gui/src/main/resources/installer-mac/notarizeCheckSingleCommand.sh b/pdf-over-gui/src/main/resources/installer-mac/notarizeCheckSingleCommand.sh
deleted file mode 100644
index 2230d806..00000000
--- a/pdf-over-gui/src/main/resources/installer-mac/notarizeCheckSingleCommand.sh
+++ /dev/null
@@ -1 +0,0 @@
-xcrun altool --notarization-info $1 --username "$ALTOOL_USERNAME" --password "$ALTOOL_PASSWORD"
diff --git a/pdf-over-gui/src/main/resources/installer-mac/notarizeHistoryCommand.sh b/pdf-over-gui/src/main/resources/installer-mac/notarizeHistoryCommand.sh
deleted file mode 100644
index d84ecd2c..00000000
--- a/pdf-over-gui/src/main/resources/installer-mac/notarizeHistoryCommand.sh
+++ /dev/null
@@ -1 +0,0 @@
-xcrun altool --notarization-history 0 --username "$ALTOOL_USERNAME" --password "$ALTOOL_PASSWORD"
diff --git a/pdf-over-gui/src/main/resources/installer-mac/signscript.sh b/pdf-over-gui/src/main/resources/installer-mac/signscript.sh
deleted file mode 100644
index f9ee49f6..00000000
--- a/pdf-over-gui/src/main/resources/installer-mac/signscript.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-
-# from: https://developer.apple.com/forums/thread/130855
-# Fail if any command fails.
-
-set -e
-
-# Check and unpack the arguments.
-
-if [ $# -ne 1 ]
-then
- echo "usage: package-archive.sh /path/to.xcarchive" > /dev/stderr
- exit 1
-fi
-ARCHIVE="$1"
-
-# Establish a work directory, create a disk image root directory within
-# that, and then copy the app there.
-#
-# Note we use `-R`, not `-r`, to preserve symlinks.
-
-WORKDIR="pdf-over-`date '+%Y-%m-%d_%H.%M.%S'`"
-DMGROOT="${WORKDIR}/PDF-Over"
-APP="${WORKDIR}/PDF-Over/PDF-Over.app"
-DMG="${WORKDIR}/pdf-over.dmg"
-
-mkdir -p "${DMGROOT}"
-cp -R "${ARCHIVE}/PDF-Over.app" "${DMGROOT}/"
-
-# When you use `-f` to replace a signature, `codesign` prints `replacing
-# existing signature`. There's no option to suppress that. The message
-# goes to `stderr` so you don't want to redirect it to `/dev/null` because
-# there might be other interesting stuff logged to `stderr`. One way to
-# prevent it is to remove the signature beforehand, as shown by the
-# following lines. It does slow things down a bunch though, so I've made
-# it easy to disable them.
-
-if true
-then
- codesign --remove-signature "${APP}/Contents/MacOS/PDF-Over"
- codesign --remove-signature "${APP}"
-fi
-
-
-
-codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f -vvvv --timestamp -o runtime "${APP}/Contents/MacOS/PDF-Over"
-#codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f --timestamp -o runtime "${APP}/Contents/Resources/bin/mocca.jar/BKULocal.war/WEB-INF/lib/smcc-1.4.2.jar/at/gv/egiz/smcc/osx-pcsc-jni/jre6.libosxj2pcsc.dylib"
-#codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f --timestamp -o runtime "${APP}/Contents/Resources/bin/mocca.jar/BKULocal.war/WEB-INF/lib/smcc-1.4.2.jar/at/gv/egiz/smcc/osx-pcsc-jni/jre8.libosxj2pcsc.dylib"
-#codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f --timestamp -o runtime "${APP}/Contents/Resources/bin/mocca.jar/BKULocal.war/WEB-INF/lib/smcc-1.4.2.jar/at/gv/egiz/smcc/osx-pcsc-jni/jre7.libosxj2pcsc.dylib"
-codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -f --timestamp -o runtime "${APP}"
-
-
-# Create a disk image from our disk image root directory.
-
-hdiutil create -srcFolder "${DMGROOT}" -quiet -o "${DMG}"
-
-# Sign that.
-
-codesign -s "Developer ID Application: SIT Zentrum fuer sichere Informationstechnologie-Austria (9CYHJNG644)" -vvvv --timestamp -i at.egiz.PDF-Over "${DMG}"
-
-echo "finished signing script!"
-echo "${DMG}"
diff --git a/pdf-over-gui/src/main/resources/installer-windows/PDF-Over.aip b/pdf-over-gui/src/main/resources/installer-windows/PDF-Over.aip
deleted file mode 100644
index b1cea354..00000000
--- a/pdf-over-gui/src/main/resources/installer-windows/PDF-Over.aip
+++ /dev/null
@@ -1,800 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<DOCUMENT Type="Advanced Installer" CreateVersion="9.5" version="11.5.1" Modules="professional" RootPath="." Language="en" Id="{5F3751A5-1A33-4D3E-B8FB-9F3FB48C9300}">
- <COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
- <ROW Name="HiddenItems" Value="UpdaterComponent;SerValComponent;MsiExtComponent;MsiAssemblyComponent;ActSyncAppComponent;MsiThemeComponent;BackgroundImagesComponent;CPLAppletComponent;MsiClassComponent;WebApplicationsComponent;MsiOdbcDataSrcComponent;MsiAppSearchComponent"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiValidationComponent">
- <ROW Table="File" Column="Sequence" MinValue="1" MaxValue="2147483647" Description="Sequence with respect to the media images; order must track cabinet order." Options="0" ColumnType="3" ColumnIndex="7" ColumnSize="4" MsiKey="File#Sequence"/>
- <ROW Table="Media" Column="LastSequence" MinValue="0" MaxValue="2147483647" Description="File sequence number for the last file for this media." Options="0" ColumnType="3" ColumnIndex="1" ColumnSize="4" MsiKey="Media#LastSequence"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
- <ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
- <ROW Property="AI_DESKTOP_SH" Value="1" Type="4" MsiKey="AI_DESKTOP_SH"/>
- <ROW Property="AI_SHORTCUTSREG" Value="0|0|0|0|"/>
- <ROW Property="ALLUSERS" Value="1" MultiBuildValue="DefaultBuild:2"/>
- <ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
- <ROW Property="ARPPRODUCTICON" Value="PDFOver.exe" Type="8"/>
- <ROW Property="Manufacturer" Value="A-SIT (Secure Information Technology Center - Austria)"/>
- <ROW Property="ProductCode" Value="1033:{98CE25B9-3FA4-41BE-8BD5-2C85F197FDE9} 1031:{DC910D3F-5B36-495E-8411-5820086FF59D} " Type="16"/>
- <ROW Property="ProductLanguage" Value="1033"/>
- <ROW Property="ProductName" Value="PDF-Over"/>
- <ROW Property="ProductVersion" Value="4.4.0" Type="32"/>
- <ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
- <ROW Property="UpgradeCode" Value="{4F146EA4-79F9-4873-9A4C-A66A525AF62F}"/>
- <ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
- <ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
- <ROW Property="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows 9x/ME/NT/2000/XP/Vista/Windows 7/Windows 8 x86/Windows 8.1 x86" ValueLocId="-"/>
- <ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
- <ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
- <ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:32 bit Operating Systems" ValueLocId="-"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
- <ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
- <ROW Directory="DesktopFolder" Directory_Parent="TARGETDIR" DefaultDir="DESKTO~1|DesktopFolder" IsPseudoRoot="1"/>
- <ROW Directory="ProgramMenuFolder" Directory_Parent="TARGETDIR" DefaultDir="Progra~1|ProgramMenuFolder" IsPseudoRoot="1"/>
- <ROW Directory="SHORTCUTDIR" Directory_Parent="TARGETDIR" DefaultDir="SHORTC~1|SHORTCUTDIR" IsPseudoRoot="1"/>
- <ROW Directory="SendToFolder" Directory_Parent="TARGETDIR" DefaultDir="SENDTO~1|SendToFolder" IsPseudoRoot="1"/>
- <ROW Directory="TARGETDIR" DefaultDir="SourceDir"/>
- <ROW Directory="bin_Dir" Directory_Parent="jre_Dir" DefaultDir="bin"/>
- <ROW Directory="conf_Dir" Directory_Parent="jre_Dir" DefaultDir="conf"/>
- <ROW Directory="java.base_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.BAS|java.base"/>
- <ROW Directory="java.compiler_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.COM|java.compiler"/>
- <ROW Directory="java.datatransfer_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.DAT|java.datatransfer"/>
- <ROW Directory="java.desktop_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.DES|java.desktop"/>
- <ROW Directory="java.instrument_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.INS|java.instrument"/>
- <ROW Directory="java.logging_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.LOG|java.logging"/>
- <ROW Directory="java.management.rmi_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVAMA~1.RMI|java.management.rmi"/>
- <ROW Directory="java.management_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.MAN|java.management"/>
- <ROW Directory="java.naming_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.NAM|java.naming"/>
- <ROW Directory="java.net.http_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVANE~1.HTT|java.net.http"/>
- <ROW Directory="java.prefs_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.PRE|java.prefs"/>
- <ROW Directory="java.rmi_Dir" Directory_Parent="legal_Dir" DefaultDir="java.rmi"/>
- <ROW Directory="java.scripting_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.SCR|java.scripting"/>
- <ROW Directory="java.se_Dir" Directory_Parent="legal_Dir" DefaultDir="java.se"/>
- <ROW Directory="java.security.jgss_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVASE~1.JGS|java.security.jgss"/>
- <ROW Directory="java.security.sasl_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVASE~1.SAS|java.security.sasl"/>
- <ROW Directory="java.smartcardio_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVA~1.SMA|java.smartcardio"/>
- <ROW Directory="java.sql.rowset_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVASQ~1.ROW|java.sql.rowset"/>
- <ROW Directory="java.sql_Dir" Directory_Parent="legal_Dir" DefaultDir="java.sql"/>
- <ROW Directory="java.transaction.xa_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVATR~1.XA|java.transaction.xa"/>
- <ROW Directory="java.xml.crypto_Dir" Directory_Parent="legal_Dir" DefaultDir="JAVAXM~1.CRY|java.xml.crypto"/>
- <ROW Directory="java.xml_Dir" Directory_Parent="legal_Dir" DefaultDir="java.xml"/>
- <ROW Directory="jdk.accessibility_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.ACC|jdk.accessibility"/>
- <ROW Directory="jdk.charsets_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.CHA|jdk.charsets"/>
- <ROW Directory="jdk.crypto.cryptoki_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKCRY~1.CRY|jdk.crypto.cryptoki"/>
- <ROW Directory="jdk.crypto.ec_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKCRY~1.EC|jdk.crypto.ec"/>
- <ROW Directory="jdk.crypto.mscapi_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKCRY~1.MSC|jdk.crypto.mscapi"/>
- <ROW Directory="jdk.dynalink_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.DYN|jdk.dynalink"/>
- <ROW Directory="jdk.httpserver_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.HTT|jdk.httpserver"/>
- <ROW Directory="jdk.incubator.foreign_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKINC~1.FOR|jdk.incubator.foreign"/>
- <ROW Directory="jdk.incubator.vector_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKINC~1.VEC|jdk.incubator.vector"/>
- <ROW Directory="jdk.internal.vm.ci_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKINT~1.CI|jdk.internal.vm.ci"/>
- <ROW Directory="jdk.internal.vm.compiler.management_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKINT~1.MAN|jdk.internal.vm.compiler.management"/>
- <ROW Directory="jdk.internal.vm.compiler_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKINT~1.COM|jdk.internal.vm.compiler"/>
- <ROW Directory="jdk.jdwp.agent_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKJDW~1.AGE|jdk.jdwp.agent"/>
- <ROW Directory="jdk.jfr_Dir" Directory_Parent="legal_Dir" DefaultDir="jdk.jfr"/>
- <ROW Directory="jdk.jsobject_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.JSO|jdk.jsobject"/>
- <ROW Directory="jdk.localedata_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.LOC|jdk.localedata"/>
- <ROW Directory="jdk.management.agent_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKMAN~1.AGE|jdk.management.agent"/>
- <ROW Directory="jdk.management.jfr_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKMAN~1.JFR|jdk.management.jfr"/>
- <ROW Directory="jdk.management_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.MAN|jdk.management"/>
- <ROW Directory="jdk.naming.dns_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKNAM~1.DNS|jdk.naming.dns"/>
- <ROW Directory="jdk.naming.rmi_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKNAM~1.RMI|jdk.naming.rmi"/>
- <ROW Directory="jdk.net_Dir" Directory_Parent="legal_Dir" DefaultDir="jdk.net"/>
- <ROW Directory="jdk.nio.mapmode_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKNIO~1.MAP|jdk.nio.mapmode"/>
- <ROW Directory="jdk.sctp_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.SCT|jdk.sctp"/>
- <ROW Directory="jdk.security.auth_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKSEC~1.AUT|jdk.security.auth"/>
- <ROW Directory="jdk.security.jgss_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKSEC~1.JGS|jdk.security.jgss"/>
- <ROW Directory="jdk.unsupported_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.UNS|jdk.unsupported"/>
- <ROW Directory="jdk.xml.dom_Dir" Directory_Parent="legal_Dir" DefaultDir="JDKXML~1.DOM|jdk.xml.dom"/>
- <ROW Directory="jdk.zipfs_Dir" Directory_Parent="legal_Dir" DefaultDir="JDK~1.ZIP|jdk.zipfs"/>
- <ROW Directory="jfr_Dir" Directory_Parent="lib_2_Dir" DefaultDir="jfr"/>
- <ROW Directory="jre_Dir" Directory_Parent="APPDIR" DefaultDir="jre"/>
- <ROW Directory="legal_Dir" Directory_Parent="jre_Dir" DefaultDir="legal"/>
- <ROW Directory="lib_2_Dir" Directory_Parent="jre_Dir" DefaultDir="lib"/>
- <ROW Directory="lib_Dir" Directory_Parent="APPDIR" DefaultDir="lib"/>
- <ROW Directory="limited_Dir" Directory_Parent="policy_Dir" DefaultDir="limited"/>
- <ROW Directory="management_Dir" Directory_Parent="conf_Dir" DefaultDir="MANAGE~1|management"/>
- <ROW Directory="policy_Dir" Directory_Parent="security_Dir" DefaultDir="policy"/>
- <ROW Directory="security_2_Dir" Directory_Parent="lib_2_Dir" DefaultDir="security"/>
- <ROW Directory="security_Dir" Directory_Parent="conf_Dir" DefaultDir="security"/>
- <ROW Directory="server_Dir" Directory_Parent="bin_Dir" DefaultDir="server"/>
- <ROW Directory="unlimited_Dir" Directory_Parent="policy_Dir" DefaultDir="UNLIMI~1|unlimited"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
- <ROW Component="ADDITIONAL_LICENSE_INFO" ComponentId="{22D29AAB-833A-42B5-B93D-5E3701CC6BDD}" Directory_="java.base_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_100" ComponentId="{4768E756-F08B-40E1-A87A-8D3F4B3FB397}" Directory_="jdk.zipfs_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_100" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_51" ComponentId="{689F164D-BA7D-4AF7-8147-A8692B3D18CB}" Directory_="java.compiler_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_51" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_52" ComponentId="{5EACDBDE-2E1E-4AA4-BC82-199DC16CC947}" Directory_="java.datatransfer_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_52" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_53" ComponentId="{4821E3A8-63AD-481C-B66B-96E9D3A6B495}" Directory_="java.desktop_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_53" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_54" ComponentId="{726DCE1D-20CB-4901-B316-D4B909D7C081}" Directory_="java.instrument_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_54" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_55" ComponentId="{B98AADFC-CEEA-442B-B438-E2AD24C75C2D}" Directory_="java.logging_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_55" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_56" ComponentId="{57E181AF-A58D-4BB1-83FB-664B4F447F7B}" Directory_="java.management_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_56" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_57" ComponentId="{392C5ED0-C5C6-4091-B796-46E2998CE5E4}" Directory_="java.management.rmi_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_57" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_58" ComponentId="{C47B86E8-E241-42AC-A526-A6632DD85D19}" Directory_="java.naming_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_58" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_59" ComponentId="{C8CD75B0-90CB-42EB-8377-D3F1FA072045}" Directory_="java.net.http_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_59" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_60" ComponentId="{D0A92882-0E9E-46B4-A43F-B36C7CB6CFF5}" Directory_="java.prefs_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_60" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_61" ComponentId="{18E210B7-3E06-4622-98C6-B1357EC76EAE}" Directory_="java.rmi_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_61" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_62" ComponentId="{75A29018-DD2F-45C9-B1EE-954DB9A18946}" Directory_="java.scripting_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_62" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_63" ComponentId="{C99A9261-BDFF-4A30-B6E8-95C9F3635074}" Directory_="java.se_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_63" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_64" ComponentId="{7F3ECD7D-C2FE-469F-912F-0B4C6D5A9147}" Directory_="java.security.jgss_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_64" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_65" ComponentId="{FF01DC4C-B2F0-403C-A2B9-69FC0E18D25A}" Directory_="java.security.sasl_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_65" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_66" ComponentId="{8204879C-941A-4EA6-A101-76A43F6A7EC8}" Directory_="java.smartcardio_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_66" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_67" ComponentId="{7CCF2B50-33DA-4C49-8377-EA026B8431BD}" Directory_="java.sql_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_67" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_68" ComponentId="{D6D0BF08-1DF7-4727-92A2-AFE85E0E665D}" Directory_="java.sql.rowset_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_68" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_69" ComponentId="{F28BFF16-0D56-4DCF-B164-FE7D0C0D4D06}" Directory_="java.transaction.xa_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_69" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_70" ComponentId="{F91FFD3A-D157-4A6C-A1D0-DFC13AC97D1A}" Directory_="java.xml_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_70" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_71" ComponentId="{1E1EF769-69C4-40BB-B6EE-785CB8FD9BEB}" Directory_="java.xml.crypto_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_71" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_72" ComponentId="{07F66C6A-A212-4535-BFEB-89C9517E95D8}" Directory_="jdk.accessibility_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_72" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_73" ComponentId="{D57C3AED-410B-4B0E-877A-F5F255D69CB4}" Directory_="jdk.charsets_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_73" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_74" ComponentId="{5E391343-B853-4206-A92B-57B1E3FC34B6}" Directory_="jdk.crypto.cryptoki_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_74" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_75" ComponentId="{0B614EA9-22D5-46E8-BD22-DB89BA7BAEA1}" Directory_="jdk.crypto.ec_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_75" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_76" ComponentId="{6DA07676-6AE5-4E9A-AFCB-8686D06589BF}" Directory_="jdk.crypto.mscapi_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_76" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_77" ComponentId="{EE28A887-5B4B-47D9-A535-0AE46664F6A3}" Directory_="jdk.dynalink_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_77" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_78" ComponentId="{2ACA77DC-1622-481F-BDC9-CEFD1D6E1C32}" Directory_="jdk.httpserver_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_78" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_79" ComponentId="{8AEB4E62-1B7D-4599-9189-8AC3856DB547}" Directory_="jdk.incubator.foreign_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_79" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_80" ComponentId="{24E75C49-E51F-4D90-94E8-BFF4386E858A}" Directory_="jdk.incubator.vector_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_80" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_81" ComponentId="{6B1CB2D5-AD73-448F-9139-7836E0E2AACA}" Directory_="jdk.internal.vm.ci_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_81" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_82" ComponentId="{427FE8B1-D48A-4FF0-960C-F050C87C94FC}" Directory_="jdk.internal.vm.compiler_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_82" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_83" ComponentId="{02652A8F-EB5F-4DF6-9DFC-700EC561F25A}" Directory_="jdk.internal.vm.compiler.management_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_83" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_84" ComponentId="{B5A20832-E251-44C9-9626-1DC7BB23DFA1}" Directory_="jdk.jdwp.agent_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_84" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_85" ComponentId="{765A12DA-3C1F-4513-9D17-72A5ABEFF95A}" Directory_="jdk.jfr_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_85" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_86" ComponentId="{AD57C57B-A2F3-4751-AB45-A1979177609E}" Directory_="jdk.jsobject_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_86" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_87" ComponentId="{C79970AC-7D46-4B1F-B025-7DE5A46D2396}" Directory_="jdk.localedata_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_87" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_88" ComponentId="{EB9FA220-7664-4ED6-A94F-FACF89DFD7B0}" Directory_="jdk.management_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_88" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_89" ComponentId="{F67D7B4B-80E7-4FBB-82CE-A63F668CCB05}" Directory_="jdk.management.agent_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_89" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_90" ComponentId="{CBEA4201-2271-481B-8D14-8758D5110719}" Directory_="jdk.management.jfr_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_90" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_91" ComponentId="{204F63D9-062A-4727-8BD6-A55BE1433DDC}" Directory_="jdk.naming.dns_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_91" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_92" ComponentId="{43D01A7D-D05A-4136-821D-808A5022CA8B}" Directory_="jdk.naming.rmi_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_92" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_93" ComponentId="{503248D3-B6F9-42BE-B456-A94900E61C5A}" Directory_="jdk.net_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_93" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_94" ComponentId="{C1B5144D-44DD-4F85-9B16-F81116E599CD}" Directory_="jdk.nio.mapmode_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_94" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_95" ComponentId="{0970FD96-50BC-4710-A98A-8F1DD9F649E7}" Directory_="jdk.sctp_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_95" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_96" ComponentId="{7331A6B7-747C-48FF-927F-80CD9FB237CE}" Directory_="jdk.security.auth_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_96" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_97" ComponentId="{C209937B-360E-4E49-ADF5-E3EE7D73BA34}" Directory_="jdk.security.jgss_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_97" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_98" ComponentId="{85A189EA-7EC4-4CD8-BDC5-A0F3C48B0F06}" Directory_="jdk.unsupported_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_98" Type="0"/>
- <ROW Component="ADDITIONAL_LICENSE_INFO_99" ComponentId="{B820A8D3-1A62-4272-972D-27E503D84992}" Directory_="jdk.xml.dom_Dir" Attributes="0" KeyPath="ADDITIONAL_LICENSE_INFO_99" Type="0"/>
- <ROW Component="AIShRegAnswer" ComponentId="{19C5B0EB-63C2-4BE4-B2C8-B5EFC6393279}" Directory_="APPDIR" Attributes="4" KeyPath="AIShRegAnswer"/>
- <ROW Component="FriendlyAppName" ComponentId="{A9C7B569-7EF9-4379-84F6-04C71804B02B}" Directory_="APPDIR" Attributes="4" KeyPath="FriendlyAppName"/>
- <ROW Component="NOTICE" ComponentId="{0DFA400D-CF42-4F77-9A9E-44B810F72999}" Directory_="jre_Dir" Attributes="0" KeyPath="NOTICE" Type="0"/>
- <ROW Component="PDFOver.exe" ComponentId="{BF78DEAC-CA96-47D0-95B9-7E9D887E7D5A}" Directory_="APPDIR" Attributes="4" KeyPath="PDFOver.exe_1"/>
- <ROW Component="PDFOver.exe_1" ComponentId="{1520C3A2-F1E8-4528-81C5-19857BF2C5F0}" Directory_="APPDIR" Attributes="0" KeyPath="PDFOver.exe_1"/>
- <ROW Component="PDFOvercli.exe" ComponentId="{5563CCDA-9035-4272-B933-E0A58EA2524A}" Directory_="APPDIR" Attributes="0" KeyPath="PDFOvercli.exe"/>
- <ROW Component="ProductInformation" ComponentId="{8126D538-2928-475F-8DBB-9BFB1EB29D9F}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
- <ROW Component="README.txt" ComponentId="{7595FAB3-498E-4E8A-A656-0ACE06257B72}" Directory_="policy_Dir" Attributes="0" KeyPath="README.txt_2" Type="0"/>
- <ROW Component="ReadMe.txt" ComponentId="{D3BF628F-997B-4122-844D-DD0848160527}" Directory_="APPDIR" Attributes="0" KeyPath="ReadMe.txt" Type="0"/>
- <ROW Component="SHORTCUTDIR" ComponentId="{E162254F-9CB5-4FE2-8CC5-7EE2580EB565}" Directory_="SHORTCUTDIR" Attributes="0"/>
- <ROW Component="WinFallbackLookup.dll" ComponentId="{A64F581C-8FF6-427A-A42F-2F6C1A7C9BFD}" Directory_="bin_Dir" Attributes="256" KeyPath="WinFallbackLookup.dll"/>
- <ROW Component="_" ComponentId="{FBBD4841-857B-4140-BB9D-2E262363C856}" Directory_="APPDIR" Attributes="4" KeyPath="_"/>
- <ROW Component="__1" ComponentId="{811A61C7-B48B-4B30-8036-479BEDDBDAB4}" Directory_="APPDIR" Attributes="4" KeyPath="__1"/>
- <ROW Component="__2" ComponentId="{F8F9AA44-ED6A-488A-B3BC-756F1932296B}" Directory_="APPDIR" Attributes="4" KeyPath="__2"/>
- <ROW Component="__3" ComponentId="{DE58CDCF-6595-4C01-BDDC-EC80016DAEE9}" Directory_="APPDIR" Attributes="4" KeyPath="__3"/>
- <ROW Component="__4" ComponentId="{55E1A1DA-F48C-4965-91C0-BFE53D5501CD}" Directory_="APPDIR" Attributes="4" KeyPath="__4"/>
- <ROW Component="activation1.1.1.jar" ComponentId="{4858FCDC-0F58-4696-B917-2BBE668DC9DD}" Directory_="lib_Dir" Attributes="0" KeyPath="activation1.1.1.jar" Type="0"/>
- <ROW Component="apimswincoreconsolel110.dll" ComponentId="{298636E7-CEE7-4859-9A95-29452FE39B0A}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoreconsolel110.dll"/>
- <ROW Component="apimswincoredatetimel110.dll" ComponentId="{D0BD02FE-218E-4227-9312-3992DB365564}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoredatetimel110.dll"/>
- <ROW Component="apimswincoredebugl110.dll" ComponentId="{C21C1DA4-107F-4575-942B-1B538EF63738}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoredebugl110.dll"/>
- <ROW Component="apimswincoreerrorhandlingl110.dll" ComponentId="{309FF0F9-3CCE-4D63-BE14-019B27854C07}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoreerrorhandlingl110.dll"/>
- <ROW Component="apimswincorefilel110.dll" ComponentId="{E9EBDAEE-DBFF-4FE4-A4C8-FAFEC99CE0D4}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorefilel110.dll"/>
- <ROW Component="apimswincorefilel120.dll" ComponentId="{8F415AB4-A3EA-4C47-A19C-C53E6EE89D51}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorefilel120.dll"/>
- <ROW Component="apimswincorefilel210.dll" ComponentId="{8CFFD42D-220F-4F98-8780-C0C8FB80F595}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorefilel210.dll"/>
- <ROW Component="apimswincorehandlel110.dll" ComponentId="{77840849-4CD9-43D1-9B77-C6167DB735C4}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorehandlel110.dll"/>
- <ROW Component="apimswincoreheapl110.dll" ComponentId="{3B02CCD1-FE98-4EAD-8A26-9CE329F13109}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoreheapl110.dll"/>
- <ROW Component="apimswincoreinterlockedl110.dll" ComponentId="{6741BF46-FE51-4FC3-BD7E-62BE6266CDB5}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoreinterlockedl110.dll"/>
- <ROW Component="apimswincorelibraryloaderl110.dll" ComponentId="{AB95B1AC-489E-4CF3-9AB0-B73A83B03840}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorelibraryloaderl110.dll"/>
- <ROW Component="apimswincorelocalizationl120.dll" ComponentId="{4427DC97-E649-4FF0-B988-EFC98BDAE179}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorelocalizationl120.dll"/>
- <ROW Component="apimswincorememoryl110.dll" ComponentId="{C946AEDC-C94E-4F98-9CBF-CA366E4A4733}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorememoryl110.dll"/>
- <ROW Component="apimswincorenamedpipel110.dll" ComponentId="{AD8AF208-5A13-4889-BC1F-D766079A45C3}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorenamedpipel110.dll"/>
- <ROW Component="apimswincoreprocessenvironmentl110.dll" ComponentId="{FAC32617-5FC1-4DC0-A57F-DB83335BE4D6}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoreprocessenvironmentl110.dll"/>
- <ROW Component="apimswincoreprocessthreadsl110.dll" ComponentId="{175455D5-0D45-4966-A870-BC9402FDE16F}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoreprocessthreadsl110.dll"/>
- <ROW Component="apimswincoreprocessthreadsl111.dll" ComponentId="{5AEA532F-09F1-474F-9183-6C6E095D0533}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoreprocessthreadsl111.dll"/>
- <ROW Component="apimswincoreprofilel110.dll" ComponentId="{0210A103-949F-4519-8B01-027C35F608A5}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoreprofilel110.dll"/>
- <ROW Component="apimswincorertlsupportl110.dll" ComponentId="{2E7CCD04-033D-4706-AE78-67E62DC76D6F}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorertlsupportl110.dll"/>
- <ROW Component="apimswincorestringl110.dll" ComponentId="{1B334A39-F648-4B11-B333-BA88F971C7F7}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincorestringl110.dll"/>
- <ROW Component="apimswincoresynchl110.dll" ComponentId="{DD266539-2637-4167-8F2F-EF26D0A9D15D}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoresynchl110.dll"/>
- <ROW Component="apimswincoresynchl120.dll" ComponentId="{4B4EF08C-6B3D-4BCE-8845-696903873EA4}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoresynchl120.dll"/>
- <ROW Component="apimswincoresysinfol110.dll" ComponentId="{630FEB1D-8829-400A-8DEE-DC017EB71A55}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoresysinfol110.dll"/>
- <ROW Component="apimswincoretimezonel110.dll" ComponentId="{7B8B7603-5623-490C-8BA7-D4018161A88A}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoretimezonel110.dll"/>
- <ROW Component="apimswincoreutill110.dll" ComponentId="{FBF760FD-F6F0-483A-A446-B522F55ADF7F}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincoreutill110.dll"/>
- <ROW Component="apimswincrtconiol110.dll" ComponentId="{3DF4EC62-BDAF-4DBD-AECB-1FC02849A82C}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtconiol110.dll"/>
- <ROW Component="apimswincrtconvertl110.dll" ComponentId="{2E7D851C-E554-4B0E-BD25-E3FBA8671EC0}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtconvertl110.dll"/>
- <ROW Component="apimswincrtenvironmentl110.dll" ComponentId="{72A8E301-6D20-466E-A70E-4F420ABE9624}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtenvironmentl110.dll"/>
- <ROW Component="apimswincrtfilesysteml110.dll" ComponentId="{14734910-D5B2-4161-A1EE-4D92D6FFCDC7}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtfilesysteml110.dll"/>
- <ROW Component="apimswincrtheapl110.dll" ComponentId="{E83A8B15-B317-43AD-80D1-7C6886A60E4D}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtheapl110.dll"/>
- <ROW Component="apimswincrtlocalel110.dll" ComponentId="{17E5E3D6-2813-4BDE-85E6-661ECFE0D55C}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtlocalel110.dll"/>
- <ROW Component="apimswincrtmathl110.dll" ComponentId="{E9B45BE5-BF98-4A77-9DBA-31848D9D9926}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtmathl110.dll"/>
- <ROW Component="apimswincrtmultibytel110.dll" ComponentId="{33E01965-A536-4E2F-9E30-9961666CCD45}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtmultibytel110.dll"/>
- <ROW Component="apimswincrtprivatel110.dll" ComponentId="{9E90889A-C1E2-4F2A-859D-C2D3EA2E69FE}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtprivatel110.dll"/>
- <ROW Component="apimswincrtprocessl110.dll" ComponentId="{708E003D-AA11-499B-864D-1946B9ECDCBF}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtprocessl110.dll"/>
- <ROW Component="apimswincrtruntimel110.dll" ComponentId="{108808AA-11CE-46FB-A65D-2F60571A1A57}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtruntimel110.dll"/>
- <ROW Component="apimswincrtstdiol110.dll" ComponentId="{B951FE97-1F3E-475C-A6E1-DF76048E3614}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtstdiol110.dll"/>
- <ROW Component="apimswincrtstringl110.dll" ComponentId="{C700407D-BD90-4550-AF02-6B70F58E9DF4}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtstringl110.dll"/>
- <ROW Component="apimswincrttimel110.dll" ComponentId="{BD4FE3AE-3C79-4565-A1EA-68CDFBBBD05D}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrttimel110.dll"/>
- <ROW Component="apimswincrtutilityl110.dll" ComponentId="{E66D61DA-5773-4154-9AF3-90125A9BA36F}" Directory_="bin_Dir" Attributes="256" KeyPath="apimswincrtutilityl110.dll"/>
- <ROW Component="awt.dll" ComponentId="{B9B000AE-F896-473C-848C-73293BE2246D}" Directory_="bin_Dir" Attributes="256" KeyPath="awt.dll"/>
- <ROW Component="blocked.certs" ComponentId="{88ED1C4E-5280-4F3B-A8D8-8F1F9A02C474}" Directory_="security_2_Dir" Attributes="0" KeyPath="blocked.certs" Type="0"/>
- <ROW Component="classes.jsa" ComponentId="{1CC912C2-BA1C-48E1-93B1-7BC9E4CB7229}" Directory_="server_Dir" Attributes="0" KeyPath="classes.jsa" Type="0"/>
- <ROW Component="classlist" ComponentId="{EC5A08DB-49FE-4D30-BD40-C1420E8370A7}" Directory_="lib_2_Dir" Attributes="0" KeyPath="classlist" Type="0"/>
- <ROW Component="default.jfc" ComponentId="{5048A792-0105-446A-976E-542CFFCAA8F2}" Directory_="jfr_Dir" Attributes="0" KeyPath="default.jfc" Type="0"/>
- <ROW Component="default_local.policy" ComponentId="{CE47A1B8-F552-43CA-80AD-72D4DA158158}" Directory_="limited_Dir" Attributes="0" KeyPath="default_local.policy" Type="0"/>
- <ROW Component="default_local.policy_2" ComponentId="{9252B48B-0404-40EA-AC27-32359BE8C628}" Directory_="unlimited_Dir" Attributes="0" KeyPath="default_local.policy_2" Type="0"/>
- <ROW Component="dt_socket.dll" ComponentId="{6F5AC328-AE96-4799-94C0-1B8E0E1573A9}" Directory_="bin_Dir" Attributes="256" KeyPath="dt_socket.dll"/>
- <ROW Component="fontmanager.dll" ComponentId="{7EFDD5C2-024F-4CC0-B89D-1D6B736DFA23}" Directory_="bin_Dir" Attributes="256" KeyPath="fontmanager.dll"/>
- <ROW Component="freetype.dll" ComponentId="{5EF45D72-297B-4267-8F30-E621E99580A5}" Directory_="bin_Dir" Attributes="256" KeyPath="freetype.dll"/>
- <ROW Component="instrument.dll" ComponentId="{3967DBF6-2D0A-4462-9185-30B8EED2D4BF}" Directory_="bin_Dir" Attributes="256" KeyPath="instrument.dll"/>
- <ROW Component="j2gss.dll" ComponentId="{BB26C4B9-47D6-4323-9BFE-073AFB425B86}" Directory_="bin_Dir" Attributes="256" KeyPath="j2gss.dll"/>
- <ROW Component="j2pcsc.dll" ComponentId="{83AAF76D-1C79-4807-8977-24BA3110D9B7}" Directory_="bin_Dir" Attributes="256" KeyPath="j2pcsc.dll"/>
- <ROW Component="j2pkcs11.dll" ComponentId="{A7BA1C37-9B61-455F-BB62-3D9FF120D450}" Directory_="bin_Dir" Attributes="256" KeyPath="j2pkcs11.dll"/>
- <ROW Component="jaas.dll" ComponentId="{3E55C3E6-9227-451C-87BF-7E885F899A7D}" Directory_="bin_Dir" Attributes="256" KeyPath="jaas.dll"/>
- <ROW Component="jabswitch.exe" ComponentId="{124F9B60-21EE-4467-A706-EAB2B964C1A5}" Directory_="bin_Dir" Attributes="256" KeyPath="jabswitch.exe"/>
- <ROW Component="jaccessinspector.exe" ComponentId="{6822467C-CFC7-491A-B46A-3AB077341445}" Directory_="bin_Dir" Attributes="256" KeyPath="jaccessinspector.exe"/>
- <ROW Component="jaccesswalker.exe" ComponentId="{A2369FBE-B8B8-4FC1-8B09-5AD3FABEC69C}" Directory_="bin_Dir" Attributes="256" KeyPath="jaccesswalker.exe"/>
- <ROW Component="java.dll" ComponentId="{3C56497A-9822-451E-9E76-306B63F3CBD6}" Directory_="bin_Dir" Attributes="256" KeyPath="java.dll"/>
- <ROW Component="java.exe" ComponentId="{F129F64C-4821-48C9-8CF6-20E009477155}" Directory_="bin_Dir" Attributes="256" KeyPath="java.exe"/>
- <ROW Component="java.policy" ComponentId="{FF4C28A8-BB81-47BB-B726-E4E191B8D4EA}" Directory_="security_Dir" Attributes="0" KeyPath="java.policy" Type="0"/>
- <ROW Component="javaaccessbridge.dll" ComponentId="{D58DC4DE-3203-478A-BBD9-162A3591399A}" Directory_="bin_Dir" Attributes="256" KeyPath="javaaccessbridge.dll"/>
- <ROW Component="javajpeg.dll" ComponentId="{70315856-6281-40EE-AF8D-A3E5F65A89F8}" Directory_="bin_Dir" Attributes="256" KeyPath="javajpeg.dll"/>
- <ROW Component="javaw.exe" ComponentId="{1F3339C4-80B7-4F0D-B23A-8E0E823C2B48}" Directory_="bin_Dir" Attributes="256" KeyPath="javaw.exe"/>
- <ROW Component="jawt.dll" ComponentId="{3D51E263-6680-4888-9CC4-4189839D54EC}" Directory_="bin_Dir" Attributes="256" KeyPath="jawt.dll"/>
- <ROW Component="jdwp.dll" ComponentId="{76F640E1-6954-4170-A8A9-B547176C3EE5}" Directory_="bin_Dir" Attributes="256" KeyPath="jdwp.dll"/>
- <ROW Component="jfr.exe" ComponentId="{6F9639D1-BAF1-453A-9850-5F5E5DA08EE5}" Directory_="bin_Dir" Attributes="256" KeyPath="jfr.exe"/>
- <ROW Component="jimage.dll" ComponentId="{EFB31D2F-C71A-44FC-B525-1E7B72DB143C}" Directory_="bin_Dir" Attributes="256" KeyPath="jimage.dll"/>
- <ROW Component="jli.dll" ComponentId="{BA4F3DAC-E79D-44AB-9A27-A846AB4BB048}" Directory_="bin_Dir" Attributes="256" KeyPath="jli.dll"/>
- <ROW Component="jmxremote.access" ComponentId="{E91FD421-EB90-4051-B94F-6DF2EDE72DC7}" Directory_="management_Dir" Attributes="0" KeyPath="jmxremote.access" Type="0"/>
- <ROW Component="jrunscript.exe" ComponentId="{3BFE4A0F-F070-486B-B071-2E14C117292D}" Directory_="bin_Dir" Attributes="256" KeyPath="jrunscript.exe"/>
- <ROW Component="jsound.dll" ComponentId="{164963EB-001E-4298-BBED-023F530DD1A9}" Directory_="bin_Dir" Attributes="256" KeyPath="jsound.dll"/>
- <ROW Component="jsvml.dll" ComponentId="{B818A696-D332-4ACA-95A8-24D87F3C78FA}" Directory_="bin_Dir" Attributes="256" KeyPath="jsvml.dll"/>
- <ROW Component="jvm.dll" ComponentId="{5C7DE433-D447-49D8-AD8F-30E90EA57D58}" Directory_="server_Dir" Attributes="256" KeyPath="jvm.dll"/>
- <ROW Component="keytool.exe" ComponentId="{DCDD402A-566E-494F-8F55-853992E04634}" Directory_="bin_Dir" Attributes="256" KeyPath="keytool.exe"/>
- <ROW Component="kinit.exe" ComponentId="{7838488F-C883-4B8A-A172-724F0DA40EC2}" Directory_="bin_Dir" Attributes="256" KeyPath="kinit.exe"/>
- <ROW Component="klist.exe" ComponentId="{DEDAC7FD-E96D-4ED6-9B5E-83C364662C21}" Directory_="bin_Dir" Attributes="256" KeyPath="klist.exe"/>
- <ROW Component="ktab.exe" ComponentId="{0E3A170B-7D63-4DAD-9225-64F4A30D3431}" Directory_="bin_Dir" Attributes="256" KeyPath="ktab.exe"/>
- <ROW Component="lcms.dll" ComponentId="{B30B9A59-E8B9-4CB0-B9E6-9558B84F34F5}" Directory_="bin_Dir" Attributes="256" KeyPath="lcms.dll"/>
- <ROW Component="logging.properties" ComponentId="{502104CC-1539-4BD8-A708-BFFFEB0DFB94}" Directory_="conf_Dir" Attributes="0" KeyPath="logging.properties" Type="0"/>
- <ROW Component="management.dll" ComponentId="{C38A264A-3E0A-4CB6-846A-C82025824700}" Directory_="bin_Dir" Attributes="256" KeyPath="management.dll"/>
- <ROW Component="management_agent.dll" ComponentId="{1B97F0F8-CAD5-490D-B74B-703C365E075E}" Directory_="bin_Dir" Attributes="256" KeyPath="management_agent.dll"/>
- <ROW Component="management_ext.dll" ComponentId="{0AE23F3A-D460-4F78-BBA7-4FDEC9C86672}" Directory_="bin_Dir" Attributes="256" KeyPath="management_ext.dll"/>
- <ROW Component="mlib_image.dll" ComponentId="{B7CF9981-38F7-441C-9EB2-C19857057ED2}" Directory_="bin_Dir" Attributes="256" KeyPath="mlib_image.dll"/>
- <ROW Component="msvcp140.dll" ComponentId="{50C50E30-C60C-413A-8EA7-57C6E523079F}" Directory_="bin_Dir" Attributes="256" KeyPath="msvcp140.dll"/>
- <ROW Component="net.dll" ComponentId="{1237C67B-41A6-4B9A-95C9-DEE109EAEF45}" Directory_="bin_Dir" Attributes="256" KeyPath="net.dll"/>
- <ROW Component="nio.dll" ComponentId="{6B450EEF-56FC-4CC3-820D-688E3C7E93F3}" Directory_="bin_Dir" Attributes="256" KeyPath="nio.dll"/>
- <ROW Component="pdf" ComponentId="{F08BB32D-E880-439C-BB63-6ECC9303D952}" Directory_="APPDIR" Attributes="4" KeyPath="pdf_1"/>
- <ROW Component="prefs.dll" ComponentId="{662E1B3D-2639-4360-9525-358E3B4164AC}" Directory_="bin_Dir" Attributes="256" KeyPath="prefs.dll"/>
- <ROW Component="rmi.dll" ComponentId="{7D69202C-9283-4C73-9559-6E4541EA0145}" Directory_="bin_Dir" Attributes="256" KeyPath="rmi.dll"/>
- <ROW Component="rmiregistry.exe" ComponentId="{A0D625C5-DECA-4DD8-A0E2-386BC0A229D8}" Directory_="bin_Dir" Attributes="256" KeyPath="rmiregistry.exe"/>
- <ROW Component="splashscreen.dll" ComponentId="{88335F4B-20A3-44FE-9BEE-7BE0C5BCCCB3}" Directory_="bin_Dir" Attributes="256" KeyPath="splashscreen.dll"/>
- <ROW Component="sspi_bridge.dll" ComponentId="{BEE72574-51B3-48C4-B61A-D379215118B5}" Directory_="bin_Dir" Attributes="256" KeyPath="sspi_bridge.dll"/>
- <ROW Component="sunmscapi.dll" ComponentId="{474AB3B6-0258-4E0C-9C5A-E40F4D30A2EF}" Directory_="bin_Dir" Attributes="256" KeyPath="sunmscapi.dll"/>
- <ROW Component="ucrtbase.dll" ComponentId="{2D6EB0C4-5D7F-4780-9286-454299F41B17}" Directory_="bin_Dir" Attributes="256" KeyPath="ucrtbase.dll"/>
- <ROW Component="vcruntime140.dll" ComponentId="{8388662D-1E8F-42A4-B656-6F417A43C155}" Directory_="bin_Dir" Attributes="256" KeyPath="vcruntime140.dll"/>
- <ROW Component="vcruntime140_1.dll" ComponentId="{8DA61D8D-CADB-4160-B406-E781DA4BF46E}" Directory_="bin_Dir" Attributes="256" KeyPath="vcruntime140_1.dll"/>
- <ROW Component="verify.dll" ComponentId="{63C71109-119C-4D08-B3EC-D4BFA75AFC18}" Directory_="bin_Dir" Attributes="256" KeyPath="verify.dll"/>
- <ROW Component="w2k_lsa_auth.dll" ComponentId="{AFCA4A6D-C76C-444A-A663-FC437522C98D}" Directory_="bin_Dir" Attributes="256" KeyPath="w2k_lsa_auth.dll"/>
- <ROW Component="windowsaccessbridge64.dll" ComponentId="{A61488DC-E3CA-447D-B687-2704F9AF7B87}" Directory_="bin_Dir" Attributes="256" KeyPath="windowsaccessbridge64.dll"/>
- <ROW Component="zip.dll" ComponentId="{D9B97C56-E2F6-430E-95CE-77F6FBCFD29D}" Directory_="bin_Dir" Attributes="256" KeyPath="zip.dll"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
- <ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="ADDITIONAL_LICENSE_INFO ADDITIONAL_LICENSE_INFO_100 ADDITIONAL_LICENSE_INFO_51 ADDITIONAL_LICENSE_INFO_52 ADDITIONAL_LICENSE_INFO_53 ADDITIONAL_LICENSE_INFO_54 ADDITIONAL_LICENSE_INFO_55 ADDITIONAL_LICENSE_INFO_56 ADDITIONAL_LICENSE_INFO_57 ADDITIONAL_LICENSE_INFO_58 ADDITIONAL_LICENSE_INFO_59 ADDITIONAL_LICENSE_INFO_60 ADDITIONAL_LICENSE_INFO_61 ADDITIONAL_LICENSE_INFO_62 ADDITIONAL_LICENSE_INFO_63 ADDITIONAL_LICENSE_INFO_64 ADDITIONAL_LICENSE_INFO_65 ADDITIONAL_LICENSE_INFO_66 ADDITIONAL_LICENSE_INFO_67 ADDITIONAL_LICENSE_INFO_68 ADDITIONAL_LICENSE_INFO_69 ADDITIONAL_LICENSE_INFO_70 ADDITIONAL_LICENSE_INFO_71 ADDITIONAL_LICENSE_INFO_72 ADDITIONAL_LICENSE_INFO_73 ADDITIONAL_LICENSE_INFO_74 ADDITIONAL_LICENSE_INFO_75 ADDITIONAL_LICENSE_INFO_76 ADDITIONAL_LICENSE_INFO_77 ADDITIONAL_LICENSE_INFO_78 ADDITIONAL_LICENSE_INFO_79 ADDITIONAL_LICENSE_INFO_80 ADDITIONAL_LICENSE_INFO_81 ADDITIONAL_LICENSE_INFO_82 ADDITIONAL_LICENSE_INFO_83 ADDITIONAL_LICENSE_INFO_84 ADDITIONAL_LICENSE_INFO_85 ADDITIONAL_LICENSE_INFO_86 ADDITIONAL_LICENSE_INFO_87 ADDITIONAL_LICENSE_INFO_88 ADDITIONAL_LICENSE_INFO_89 ADDITIONAL_LICENSE_INFO_90 ADDITIONAL_LICENSE_INFO_91 ADDITIONAL_LICENSE_INFO_92 ADDITIONAL_LICENSE_INFO_93 ADDITIONAL_LICENSE_INFO_94 ADDITIONAL_LICENSE_INFO_95 ADDITIONAL_LICENSE_INFO_96 ADDITIONAL_LICENSE_INFO_97 ADDITIONAL_LICENSE_INFO_98 ADDITIONAL_LICENSE_INFO_99 AIShRegAnswer FriendlyAppName NOTICE PDFOver.exe PDFOver.exe_1 PDFOvercli.exe ProductInformation README.txt ReadMe.txt SHORTCUTDIR WinFallbackLookup.dll _ __1 __2 __3 __4 activation1.1.1.jar apimswincoreconsolel110.dll apimswincoredatetimel110.dll apimswincoredebugl110.dll apimswincoreerrorhandlingl110.dll apimswincorefilel110.dll apimswincorefilel120.dll apimswincorefilel210.dll apimswincorehandlel110.dll apimswincoreheapl110.dll apimswincoreinterlockedl110.dll apimswincorelibraryloaderl110.dll apimswincorelocalizationl120.dll apimswincorememoryl110.dll apimswincorenamedpipel110.dll apimswincoreprocessenvironmentl110.dll apimswincoreprocessthreadsl110.dll apimswincoreprocessthreadsl111.dll apimswincoreprofilel110.dll apimswincorertlsupportl110.dll apimswincorestringl110.dll apimswincoresynchl110.dll apimswincoresynchl120.dll apimswincoresysinfol110.dll apimswincoretimezonel110.dll apimswincoreutill110.dll apimswincrtconiol110.dll apimswincrtconvertl110.dll apimswincrtenvironmentl110.dll apimswincrtfilesysteml110.dll apimswincrtheapl110.dll apimswincrtlocalel110.dll apimswincrtmathl110.dll apimswincrtmultibytel110.dll apimswincrtprivatel110.dll apimswincrtprocessl110.dll apimswincrtruntimel110.dll apimswincrtstdiol110.dll apimswincrtstringl110.dll apimswincrttimel110.dll apimswincrtutilityl110.dll awt.dll blocked.certs classes.jsa classlist default.jfc default_local.policy default_local.policy_2 dt_socket.dll fontmanager.dll freetype.dll instrument.dll j2gss.dll j2pcsc.dll j2pkcs11.dll jaas.dll jabswitch.exe jaccessinspector.exe jaccesswalker.exe java.dll java.exe java.policy javaaccessbridge.dll javajpeg.dll javaw.exe jawt.dll jdwp.dll jfr.exe jimage.dll jli.dll jmxremote.access jrunscript.exe jsound.dll jsvml.dll jvm.dll keytool.exe kinit.exe klist.exe ktab.exe lcms.dll logging.properties management.dll management_agent.dll management_ext.dll mlib_image.dll msvcp140.dll net.dll nio.dll pdf prefs.dll rmi.dll rmiregistry.exe splashscreen.dll sspi_bridge.dll sunmscapi.dll ucrtbase.dll vcruntime140.dll vcruntime140_1.dll verify.dll w2k_lsa_auth.dll windowsaccessbridge64.dll zip.dll"/>
- <ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
- <ROW File="ADDITIONAL_LICENSE_INFO" Component_="ADDITIONAL_LICENSE_INFO" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.base\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="aes.md"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_100" Component_="ADDITIONAL_LICENSE_INFO_100" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.zipfs\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_100"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_51" Component_="ADDITIONAL_LICENSE_INFO_51" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.compiler\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_51"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_52" Component_="ADDITIONAL_LICENSE_INFO_52" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.datatransfer\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_52"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_53" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.desktop\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_53"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_54" Component_="ADDITIONAL_LICENSE_INFO_54" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.instrument\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_54"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_55" Component_="ADDITIONAL_LICENSE_INFO_55" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.logging\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_55"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_56" Component_="ADDITIONAL_LICENSE_INFO_56" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.management\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_56"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_57" Component_="ADDITIONAL_LICENSE_INFO_57" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.management.rmi\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_57"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_58" Component_="ADDITIONAL_LICENSE_INFO_58" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.naming\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_58"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_59" Component_="ADDITIONAL_LICENSE_INFO_59" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.net.http\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_59"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_60" Component_="ADDITIONAL_LICENSE_INFO_60" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.prefs\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_60"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_61" Component_="ADDITIONAL_LICENSE_INFO_61" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.rmi\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_61"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_62" Component_="ADDITIONAL_LICENSE_INFO_62" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.scripting\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_62"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_63" Component_="ADDITIONAL_LICENSE_INFO_63" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.se\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_63"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_64" Component_="ADDITIONAL_LICENSE_INFO_64" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.security.jgss\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_64"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_65" Component_="ADDITIONAL_LICENSE_INFO_65" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.security.sasl\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_65"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_66" Component_="ADDITIONAL_LICENSE_INFO_66" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.smartcardio\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_66"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_67" Component_="ADDITIONAL_LICENSE_INFO_67" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.sql\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_67"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_68" Component_="ADDITIONAL_LICENSE_INFO_68" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.sql.rowset\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_68"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_69" Component_="ADDITIONAL_LICENSE_INFO_69" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.transaction.xa\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_69"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_70" Component_="ADDITIONAL_LICENSE_INFO_70" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.xml\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_70"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_71" Component_="ADDITIONAL_LICENSE_INFO_71" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\java.xml.crypto\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_71"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_72" Component_="ADDITIONAL_LICENSE_INFO_72" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.accessibility\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_72"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_73" Component_="ADDITIONAL_LICENSE_INFO_73" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.charsets\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_73"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_74" Component_="ADDITIONAL_LICENSE_INFO_74" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.crypto.cryptoki\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_74"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_75" Component_="ADDITIONAL_LICENSE_INFO_75" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.crypto.ec\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_75"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_76" Component_="ADDITIONAL_LICENSE_INFO_76" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.crypto.mscapi\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_76"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_77" Component_="ADDITIONAL_LICENSE_INFO_77" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.dynalink\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_77"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_78" Component_="ADDITIONAL_LICENSE_INFO_78" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.httpserver\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_78"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_79" Component_="ADDITIONAL_LICENSE_INFO_79" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.incubator.foreign\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_79"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_80" Component_="ADDITIONAL_LICENSE_INFO_80" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.incubator.vector\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_80"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_81" Component_="ADDITIONAL_LICENSE_INFO_81" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.internal.vm.ci\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_81"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_82" Component_="ADDITIONAL_LICENSE_INFO_82" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.internal.vm.compiler\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_82"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_83" Component_="ADDITIONAL_LICENSE_INFO_83" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.internal.vm.compiler.management\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_83"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_84" Component_="ADDITIONAL_LICENSE_INFO_84" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.jdwp.agent\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_84"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_85" Component_="ADDITIONAL_LICENSE_INFO_85" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.jfr\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_85"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_86" Component_="ADDITIONAL_LICENSE_INFO_86" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.jsobject\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_86"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_87" Component_="ADDITIONAL_LICENSE_INFO_87" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.localedata\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_87"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_88" Component_="ADDITIONAL_LICENSE_INFO_88" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.management\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_88"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_89" Component_="ADDITIONAL_LICENSE_INFO_89" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.management.agent\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_89"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_90" Component_="ADDITIONAL_LICENSE_INFO_90" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.management.jfr\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_90"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_91" Component_="ADDITIONAL_LICENSE_INFO_91" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.naming.dns\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_91"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_92" Component_="ADDITIONAL_LICENSE_INFO_92" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.naming.rmi\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_92"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_93" Component_="ADDITIONAL_LICENSE_INFO_93" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.net\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_93"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_94" Component_="ADDITIONAL_LICENSE_INFO_94" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.nio.mapmode\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_94"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_95" Component_="ADDITIONAL_LICENSE_INFO_95" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.sctp\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_95"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_96" Component_="ADDITIONAL_LICENSE_INFO_96" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.security.auth\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_96"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_97" Component_="ADDITIONAL_LICENSE_INFO_97" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.security.jgss\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_97"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_98" Component_="ADDITIONAL_LICENSE_INFO_98" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.unsupported\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_98"/>
- <ROW File="ADDITIONAL_LICENSE_INFO_99" Component_="ADDITIONAL_LICENSE_INFO_99" FileName="ADDITI~1|ADDITIONAL_LICENSE_INFO" Attributes="0" SourcePath="jre\legal\jdk.xml.dom\ADDITIONAL_LICENSE_INFO" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION_99"/>
- <ROW File="ASSEMBLY_EXCEPTION" Component_="ADDITIONAL_LICENSE_INFO" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.base\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="clibutl.md"/>
- <ROW File="ASSEMBLY_EXCEPTION_100" Component_="ADDITIONAL_LICENSE_INFO_100" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.zipfs\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_100"/>
- <ROW File="ASSEMBLY_EXCEPTION_51" Component_="ADDITIONAL_LICENSE_INFO_51" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.compiler\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_51"/>
- <ROW File="ASSEMBLY_EXCEPTION_52" Component_="ADDITIONAL_LICENSE_INFO_52" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.datatransfer\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_52"/>
- <ROW File="ASSEMBLY_EXCEPTION_53" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.desktop\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="colorimaging.md"/>
- <ROW File="ASSEMBLY_EXCEPTION_54" Component_="ADDITIONAL_LICENSE_INFO_54" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.instrument\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_54"/>
- <ROW File="ASSEMBLY_EXCEPTION_55" Component_="ADDITIONAL_LICENSE_INFO_55" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.logging\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_55"/>
- <ROW File="ASSEMBLY_EXCEPTION_56" Component_="ADDITIONAL_LICENSE_INFO_56" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.management\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_56"/>
- <ROW File="ASSEMBLY_EXCEPTION_57" Component_="ADDITIONAL_LICENSE_INFO_57" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.management.rmi\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_57"/>
- <ROW File="ASSEMBLY_EXCEPTION_58" Component_="ADDITIONAL_LICENSE_INFO_58" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.naming\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_58"/>
- <ROW File="ASSEMBLY_EXCEPTION_59" Component_="ADDITIONAL_LICENSE_INFO_59" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.net.http\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_59"/>
- <ROW File="ASSEMBLY_EXCEPTION_60" Component_="ADDITIONAL_LICENSE_INFO_60" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.prefs\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_60"/>
- <ROW File="ASSEMBLY_EXCEPTION_61" Component_="ADDITIONAL_LICENSE_INFO_61" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.rmi\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_61"/>
- <ROW File="ASSEMBLY_EXCEPTION_62" Component_="ADDITIONAL_LICENSE_INFO_62" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.scripting\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_62"/>
- <ROW File="ASSEMBLY_EXCEPTION_63" Component_="ADDITIONAL_LICENSE_INFO_63" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.se\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_63"/>
- <ROW File="ASSEMBLY_EXCEPTION_64" Component_="ADDITIONAL_LICENSE_INFO_64" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.security.jgss\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_64"/>
- <ROW File="ASSEMBLY_EXCEPTION_65" Component_="ADDITIONAL_LICENSE_INFO_65" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.security.sasl\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_65"/>
- <ROW File="ASSEMBLY_EXCEPTION_66" Component_="ADDITIONAL_LICENSE_INFO_66" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.smartcardio\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_66"/>
- <ROW File="ASSEMBLY_EXCEPTION_67" Component_="ADDITIONAL_LICENSE_INFO_67" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.sql\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_67"/>
- <ROW File="ASSEMBLY_EXCEPTION_68" Component_="ADDITIONAL_LICENSE_INFO_68" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.sql.rowset\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_68"/>
- <ROW File="ASSEMBLY_EXCEPTION_69" Component_="ADDITIONAL_LICENSE_INFO_69" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.transaction.xa\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_69"/>
- <ROW File="ASSEMBLY_EXCEPTION_70" Component_="ADDITIONAL_LICENSE_INFO_70" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.xml\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="bcel.md"/>
- <ROW File="ASSEMBLY_EXCEPTION_71" Component_="ADDITIONAL_LICENSE_INFO_71" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\java.xml.crypto\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_71"/>
- <ROW File="ASSEMBLY_EXCEPTION_72" Component_="ADDITIONAL_LICENSE_INFO_72" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.accessibility\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_72"/>
- <ROW File="ASSEMBLY_EXCEPTION_73" Component_="ADDITIONAL_LICENSE_INFO_73" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.charsets\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_73"/>
- <ROW File="ASSEMBLY_EXCEPTION_74" Component_="ADDITIONAL_LICENSE_INFO_74" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.crypto.cryptoki\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_74"/>
- <ROW File="ASSEMBLY_EXCEPTION_75" Component_="ADDITIONAL_LICENSE_INFO_75" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.crypto.ec\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_75"/>
- <ROW File="ASSEMBLY_EXCEPTION_76" Component_="ADDITIONAL_LICENSE_INFO_76" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.crypto.mscapi\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_76"/>
- <ROW File="ASSEMBLY_EXCEPTION_77" Component_="ADDITIONAL_LICENSE_INFO_77" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.dynalink\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="dynalink.md"/>
- <ROW File="ASSEMBLY_EXCEPTION_78" Component_="ADDITIONAL_LICENSE_INFO_78" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.httpserver\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_78"/>
- <ROW File="ASSEMBLY_EXCEPTION_79" Component_="ADDITIONAL_LICENSE_INFO_79" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.incubator.foreign\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_79"/>
- <ROW File="ASSEMBLY_EXCEPTION_80" Component_="ADDITIONAL_LICENSE_INFO_80" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.incubator.vector\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_80"/>
- <ROW File="ASSEMBLY_EXCEPTION_81" Component_="ADDITIONAL_LICENSE_INFO_81" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.internal.vm.ci\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_81"/>
- <ROW File="ASSEMBLY_EXCEPTION_82" Component_="ADDITIONAL_LICENSE_INFO_82" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.internal.vm.compiler\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_82"/>
- <ROW File="ASSEMBLY_EXCEPTION_83" Component_="ADDITIONAL_LICENSE_INFO_83" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.internal.vm.compiler.management\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_83"/>
- <ROW File="ASSEMBLY_EXCEPTION_84" Component_="ADDITIONAL_LICENSE_INFO_84" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.jdwp.agent\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_84"/>
- <ROW File="ASSEMBLY_EXCEPTION_85" Component_="ADDITIONAL_LICENSE_INFO_85" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.jfr\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_85"/>
- <ROW File="ASSEMBLY_EXCEPTION_86" Component_="ADDITIONAL_LICENSE_INFO_86" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.jsobject\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_86"/>
- <ROW File="ASSEMBLY_EXCEPTION_87" Component_="ADDITIONAL_LICENSE_INFO_87" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.localedata\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="cldr.md_2"/>
- <ROW File="ASSEMBLY_EXCEPTION_88" Component_="ADDITIONAL_LICENSE_INFO_88" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.management\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_88"/>
- <ROW File="ASSEMBLY_EXCEPTION_89" Component_="ADDITIONAL_LICENSE_INFO_89" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.management.agent\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_89"/>
- <ROW File="ASSEMBLY_EXCEPTION_90" Component_="ADDITIONAL_LICENSE_INFO_90" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.management.jfr\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_90"/>
- <ROW File="ASSEMBLY_EXCEPTION_91" Component_="ADDITIONAL_LICENSE_INFO_91" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.naming.dns\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_91"/>
- <ROW File="ASSEMBLY_EXCEPTION_92" Component_="ADDITIONAL_LICENSE_INFO_92" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.naming.rmi\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_92"/>
- <ROW File="ASSEMBLY_EXCEPTION_93" Component_="ADDITIONAL_LICENSE_INFO_93" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.net\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_93"/>
- <ROW File="ASSEMBLY_EXCEPTION_94" Component_="ADDITIONAL_LICENSE_INFO_94" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.nio.mapmode\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_94"/>
- <ROW File="ASSEMBLY_EXCEPTION_95" Component_="ADDITIONAL_LICENSE_INFO_95" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.sctp\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_95"/>
- <ROW File="ASSEMBLY_EXCEPTION_96" Component_="ADDITIONAL_LICENSE_INFO_96" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.security.auth\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_96"/>
- <ROW File="ASSEMBLY_EXCEPTION_97" Component_="ADDITIONAL_LICENSE_INFO_97" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.security.jgss\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_97"/>
- <ROW File="ASSEMBLY_EXCEPTION_98" Component_="ADDITIONAL_LICENSE_INFO_98" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.unsupported\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_98"/>
- <ROW File="ASSEMBLY_EXCEPTION_99" Component_="ADDITIONAL_LICENSE_INFO_99" FileName="ASSEMB~1|ASSEMBLY_EXCEPTION" Attributes="0" SourcePath="jre\legal\jdk.xml.dom\ASSEMBLY_EXCEPTION" SelfReg="false" NextFile="LICENSE_99"/>
- <ROW File="FastInfoset1.2.15.jar" Component_="activation1.1.1.jar" FileName="FASTIN~1.JAR|FastInfoset-1.2.15.jar" Attributes="0" SourcePath="lib\FastInfoset-1.2.15.jar" SelfReg="false" NextFile="fontbox2.0.24.jar"/>
- <ROW File="LICENSE" Component_="ADDITIONAL_LICENSE_INFO" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.base\LICENSE" SelfReg="false" NextFile="public_suffix.md"/>
- <ROW File="LICENSE_100" Component_="ADDITIONAL_LICENSE_INFO_100" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.zipfs\LICENSE" SelfReg="false" NextFile="classlist"/>
- <ROW File="LICENSE_51" Component_="ADDITIONAL_LICENSE_INFO_51" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.compiler\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_52"/>
- <ROW File="LICENSE_52" Component_="ADDITIONAL_LICENSE_INFO_52" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.datatransfer\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_53"/>
- <ROW File="LICENSE_53" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.desktop\LICENSE" SelfReg="false" NextFile="mesa3d.md"/>
- <ROW File="LICENSE_54" Component_="ADDITIONAL_LICENSE_INFO_54" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.instrument\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_55"/>
- <ROW File="LICENSE_55" Component_="ADDITIONAL_LICENSE_INFO_55" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.logging\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_56"/>
- <ROW File="LICENSE_56" Component_="ADDITIONAL_LICENSE_INFO_56" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.management\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_57"/>
- <ROW File="LICENSE_57" Component_="ADDITIONAL_LICENSE_INFO_57" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.management.rmi\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_58"/>
- <ROW File="LICENSE_58" Component_="ADDITIONAL_LICENSE_INFO_58" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.naming\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_59"/>
- <ROW File="LICENSE_59" Component_="ADDITIONAL_LICENSE_INFO_59" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.net.http\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_60"/>
- <ROW File="LICENSE_60" Component_="ADDITIONAL_LICENSE_INFO_60" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.prefs\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_61"/>
- <ROW File="LICENSE_61" Component_="ADDITIONAL_LICENSE_INFO_61" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.rmi\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_62"/>
- <ROW File="LICENSE_62" Component_="ADDITIONAL_LICENSE_INFO_62" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.scripting\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_63"/>
- <ROW File="LICENSE_63" Component_="ADDITIONAL_LICENSE_INFO_63" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.se\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_64"/>
- <ROW File="LICENSE_64" Component_="ADDITIONAL_LICENSE_INFO_64" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.security.jgss\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_65"/>
- <ROW File="LICENSE_65" Component_="ADDITIONAL_LICENSE_INFO_65" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.security.sasl\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_66"/>
- <ROW File="LICENSE_66" Component_="ADDITIONAL_LICENSE_INFO_66" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.smartcardio\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_67"/>
- <ROW File="LICENSE_67" Component_="ADDITIONAL_LICENSE_INFO_67" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.sql\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_68"/>
- <ROW File="LICENSE_68" Component_="ADDITIONAL_LICENSE_INFO_68" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.sql.rowset\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_69"/>
- <ROW File="LICENSE_69" Component_="ADDITIONAL_LICENSE_INFO_69" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.transaction.xa\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_70"/>
- <ROW File="LICENSE_70" Component_="ADDITIONAL_LICENSE_INFO_70" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.xml\LICENSE" SelfReg="false" NextFile="xalan.md"/>
- <ROW File="LICENSE_71" Component_="ADDITIONAL_LICENSE_INFO_71" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\java.xml.crypto\LICENSE" SelfReg="false" NextFile="santuario.md"/>
- <ROW File="LICENSE_72" Component_="ADDITIONAL_LICENSE_INFO_72" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.accessibility\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_73"/>
- <ROW File="LICENSE_73" Component_="ADDITIONAL_LICENSE_INFO_73" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.charsets\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_74"/>
- <ROW File="LICENSE_74" Component_="ADDITIONAL_LICENSE_INFO_74" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.crypto.cryptoki\LICENSE" SelfReg="false" NextFile="pkcs11cryptotoken.md"/>
- <ROW File="LICENSE_75" Component_="ADDITIONAL_LICENSE_INFO_75" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.crypto.ec\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_76"/>
- <ROW File="LICENSE_76" Component_="ADDITIONAL_LICENSE_INFO_76" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.crypto.mscapi\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_77"/>
- <ROW File="LICENSE_77" Component_="ADDITIONAL_LICENSE_INFO_77" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.dynalink\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_78"/>
- <ROW File="LICENSE_78" Component_="ADDITIONAL_LICENSE_INFO_78" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.httpserver\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_79"/>
- <ROW File="LICENSE_79" Component_="ADDITIONAL_LICENSE_INFO_79" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.incubator.foreign\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_80"/>
- <ROW File="LICENSE_80" Component_="ADDITIONAL_LICENSE_INFO_80" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.incubator.vector\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_81"/>
- <ROW File="LICENSE_81" Component_="ADDITIONAL_LICENSE_INFO_81" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.internal.vm.ci\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_82"/>
- <ROW File="LICENSE_82" Component_="ADDITIONAL_LICENSE_INFO_82" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.internal.vm.compiler\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_83"/>
- <ROW File="LICENSE_83" Component_="ADDITIONAL_LICENSE_INFO_83" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.internal.vm.compiler.management\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_84"/>
- <ROW File="LICENSE_84" Component_="ADDITIONAL_LICENSE_INFO_84" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.jdwp.agent\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_85"/>
- <ROW File="LICENSE_85" Component_="ADDITIONAL_LICENSE_INFO_85" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.jfr\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_86"/>
- <ROW File="LICENSE_86" Component_="ADDITIONAL_LICENSE_INFO_86" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.jsobject\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_87"/>
- <ROW File="LICENSE_87" Component_="ADDITIONAL_LICENSE_INFO_87" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.localedata\LICENSE" SelfReg="false" NextFile="thaidict.md"/>
- <ROW File="LICENSE_88" Component_="ADDITIONAL_LICENSE_INFO_88" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.management\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_89"/>
- <ROW File="LICENSE_89" Component_="ADDITIONAL_LICENSE_INFO_89" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.management.agent\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_90"/>
- <ROW File="LICENSE_90" Component_="ADDITIONAL_LICENSE_INFO_90" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.management.jfr\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_91"/>
- <ROW File="LICENSE_91" Component_="ADDITIONAL_LICENSE_INFO_91" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.naming.dns\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_92"/>
- <ROW File="LICENSE_92" Component_="ADDITIONAL_LICENSE_INFO_92" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.naming.rmi\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_93"/>
- <ROW File="LICENSE_93" Component_="ADDITIONAL_LICENSE_INFO_93" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.net\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_94"/>
- <ROW File="LICENSE_94" Component_="ADDITIONAL_LICENSE_INFO_94" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.nio.mapmode\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_95"/>
- <ROW File="LICENSE_95" Component_="ADDITIONAL_LICENSE_INFO_95" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.sctp\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_96"/>
- <ROW File="LICENSE_96" Component_="ADDITIONAL_LICENSE_INFO_96" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.security.auth\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_97"/>
- <ROW File="LICENSE_97" Component_="ADDITIONAL_LICENSE_INFO_97" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.security.jgss\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_98"/>
- <ROW File="LICENSE_98" Component_="ADDITIONAL_LICENSE_INFO_98" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.unsupported\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_99"/>
- <ROW File="LICENSE_99" Component_="ADDITIONAL_LICENSE_INFO_99" FileName="LICENSE" Attributes="0" SourcePath="jre\legal\jdk.xml.dom\LICENSE" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_100"/>
- <ROW File="NOTICE" Component_="NOTICE" FileName="NOTICE" Attributes="0" SourcePath="jre\NOTICE" SelfReg="false" NextFile="release"/>
- <ROW File="PDFOver.exe_1" Component_="PDFOver.exe_1" FileName="PDF-Over.exe" Attributes="0" SourcePath="PDF-Over.exe" SelfReg="false" NextFile="PDFOvercli.exe" DigSign="true"/>
- <ROW File="PDFOvercli.exe" Component_="PDFOvercli.exe" FileName="PDF-OV~1.EXE|PDF-Over-cli.exe" Attributes="0" SourcePath="PDF-Over-cli.exe" SelfReg="false" NextFile="ReadMe.txt" DigSign="true"/>
- <ROW File="README.txt_2" Component_="README.txt" FileName="README.txt" Attributes="0" SourcePath="jre\conf\security\policy\README.txt" SelfReg="false" NextFile="default_local.policy_2"/>
- <ROW File="ReadMe.txt" Component_="ReadMe.txt" FileName="ReadMe.txt" Attributes="0" SourcePath="ReadMe.txt" SelfReg="false" NextFile="apimswincoreconsolel110.dll"/>
- <ROW File="WinFallbackLookup.dll" Component_="WinFallbackLookup.dll" FileName="WINFAL~1.DLL|WinFallbackLookup.dll" Attributes="0" SourcePath="jre\bin\WinFallbackLookup.dll" SelfReg="false" NextFile="zip.dll"/>
- <ROW File="activation1.1.1.jar" Component_="activation1.1.1.jar" FileName="ACTIVA~1.JAR|activation-1.1.1.jar" Attributes="0" SourcePath="lib\activation-1.1.1.jar" SelfReg="false" NextFile="bcprovjdk15on1.68.jar"/>
- <ROW File="aes.md" Component_="ADDITIONAL_LICENSE_INFO" FileName="aes.md" Attributes="0" SourcePath="jre\legal\java.base\aes.md" SelfReg="false" NextFile="asm.md"/>
- <ROW File="apimswincoreconsolel110.dll" Component_="apimswincoreconsolel110.dll" FileName="API-MS~1.DLL|api-ms-win-core-console-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-console-l1-1-0.dll" SelfReg="false" NextFile="apimswincoredatetimel110.dll"/>
- <ROW File="apimswincoredatetimel110.dll" Component_="apimswincoredatetimel110.dll" FileName="API-MS~2.DLL|api-ms-win-core-datetime-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-datetime-l1-1-0.dll" SelfReg="false" NextFile="apimswincoredebugl110.dll"/>
- <ROW File="apimswincoredebugl110.dll" Component_="apimswincoredebugl110.dll" FileName="API-MS~3.DLL|api-ms-win-core-debug-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-debug-l1-1-0.dll" SelfReg="false" NextFile="apimswincoreerrorhandlingl110.dll"/>
- <ROW File="apimswincoreerrorhandlingl110.dll" Component_="apimswincoreerrorhandlingl110.dll" FileName="API-MS~4.DLL|api-ms-win-core-errorhandling-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-errorhandling-l1-1-0.dll" SelfReg="false" NextFile="apimswincorefilel110.dll"/>
- <ROW File="apimswincorefilel110.dll" Component_="apimswincorefilel110.dll" FileName="API-MS~5.DLL|api-ms-win-core-file-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-file-l1-1-0.dll" SelfReg="false" NextFile="apimswincorefilel120.dll"/>
- <ROW File="apimswincorefilel120.dll" Component_="apimswincorefilel120.dll" FileName="API-MS~6.DLL|api-ms-win-core-file-l1-2-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-file-l1-2-0.dll" SelfReg="false" NextFile="apimswincorefilel210.dll"/>
- <ROW File="apimswincorefilel210.dll" Component_="apimswincorefilel210.dll" FileName="API-MS~7.DLL|api-ms-win-core-file-l2-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-file-l2-1-0.dll" SelfReg="false" NextFile="apimswincorehandlel110.dll"/>
- <ROW File="apimswincorehandlel110.dll" Component_="apimswincorehandlel110.dll" FileName="API-MS~8.DLL|api-ms-win-core-handle-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-handle-l1-1-0.dll" SelfReg="false" NextFile="apimswincoreheapl110.dll"/>
- <ROW File="apimswincoreheapl110.dll" Component_="apimswincoreheapl110.dll" FileName="API-MS~9.DLL|api-ms-win-core-heap-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-heap-l1-1-0.dll" SelfReg="false" NextFile="apimswincoreinterlockedl110.dll"/>
- <ROW File="apimswincoreinterlockedl110.dll" Component_="apimswincoreinterlockedl110.dll" FileName="API-M~10.DLL|api-ms-win-core-interlocked-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-interlocked-l1-1-0.dll" SelfReg="false" NextFile="apimswincorelibraryloaderl110.dll"/>
- <ROW File="apimswincorelibraryloaderl110.dll" Component_="apimswincorelibraryloaderl110.dll" FileName="API-M~11.DLL|api-ms-win-core-libraryloader-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-libraryloader-l1-1-0.dll" SelfReg="false" NextFile="apimswincorelocalizationl120.dll"/>
- <ROW File="apimswincorelocalizationl120.dll" Component_="apimswincorelocalizationl120.dll" FileName="API-M~12.DLL|api-ms-win-core-localization-l1-2-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-localization-l1-2-0.dll" SelfReg="false" NextFile="apimswincorememoryl110.dll"/>
- <ROW File="apimswincorememoryl110.dll" Component_="apimswincorememoryl110.dll" FileName="API-M~13.DLL|api-ms-win-core-memory-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-memory-l1-1-0.dll" SelfReg="false" NextFile="apimswincorenamedpipel110.dll"/>
- <ROW File="apimswincorenamedpipel110.dll" Component_="apimswincorenamedpipel110.dll" FileName="API-M~14.DLL|api-ms-win-core-namedpipe-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-namedpipe-l1-1-0.dll" SelfReg="false" NextFile="apimswincoreprocessenvironmentl110.dll"/>
- <ROW File="apimswincoreprocessenvironmentl110.dll" Component_="apimswincoreprocessenvironmentl110.dll" FileName="API-M~15.DLL|api-ms-win-core-processenvironment-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-processenvironment-l1-1-0.dll" SelfReg="false" NextFile="apimswincoreprocessthreadsl110.dll"/>
- <ROW File="apimswincoreprocessthreadsl110.dll" Component_="apimswincoreprocessthreadsl110.dll" FileName="API-M~16.DLL|api-ms-win-core-processthreads-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-processthreads-l1-1-0.dll" SelfReg="false" NextFile="apimswincoreprocessthreadsl111.dll"/>
- <ROW File="apimswincoreprocessthreadsl111.dll" Component_="apimswincoreprocessthreadsl111.dll" FileName="API-M~17.DLL|api-ms-win-core-processthreads-l1-1-1.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-processthreads-l1-1-1.dll" SelfReg="false" NextFile="apimswincoreprofilel110.dll"/>
- <ROW File="apimswincoreprofilel110.dll" Component_="apimswincoreprofilel110.dll" FileName="API-M~18.DLL|api-ms-win-core-profile-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-profile-l1-1-0.dll" SelfReg="false" NextFile="apimswincorertlsupportl110.dll"/>
- <ROW File="apimswincorertlsupportl110.dll" Component_="apimswincorertlsupportl110.dll" FileName="API-M~19.DLL|api-ms-win-core-rtlsupport-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-rtlsupport-l1-1-0.dll" SelfReg="false" NextFile="apimswincorestringl110.dll"/>
- <ROW File="apimswincorestringl110.dll" Component_="apimswincorestringl110.dll" FileName="API-M~20.DLL|api-ms-win-core-string-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-string-l1-1-0.dll" SelfReg="false" NextFile="apimswincoresynchl110.dll"/>
- <ROW File="apimswincoresynchl110.dll" Component_="apimswincoresynchl110.dll" FileName="API-M~21.DLL|api-ms-win-core-synch-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-synch-l1-1-0.dll" SelfReg="false" NextFile="apimswincoresynchl120.dll"/>
- <ROW File="apimswincoresynchl120.dll" Component_="apimswincoresynchl120.dll" FileName="API-M~22.DLL|api-ms-win-core-synch-l1-2-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-synch-l1-2-0.dll" SelfReg="false" NextFile="apimswincoresysinfol110.dll"/>
- <ROW File="apimswincoresysinfol110.dll" Component_="apimswincoresysinfol110.dll" FileName="API-M~23.DLL|api-ms-win-core-sysinfo-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-sysinfo-l1-1-0.dll" SelfReg="false" NextFile="apimswincoretimezonel110.dll"/>
- <ROW File="apimswincoretimezonel110.dll" Component_="apimswincoretimezonel110.dll" FileName="API-M~24.DLL|api-ms-win-core-timezone-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-timezone-l1-1-0.dll" SelfReg="false" NextFile="apimswincoreutill110.dll"/>
- <ROW File="apimswincoreutill110.dll" Component_="apimswincoreutill110.dll" FileName="API-M~25.DLL|api-ms-win-core-util-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-core-util-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtconiol110.dll"/>
- <ROW File="apimswincrtconiol110.dll" Component_="apimswincrtconiol110.dll" FileName="API-M~26.DLL|api-ms-win-crt-conio-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-conio-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtconvertl110.dll"/>
- <ROW File="apimswincrtconvertl110.dll" Component_="apimswincrtconvertl110.dll" FileName="API-M~27.DLL|api-ms-win-crt-convert-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-convert-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtenvironmentl110.dll"/>
- <ROW File="apimswincrtenvironmentl110.dll" Component_="apimswincrtenvironmentl110.dll" FileName="API-M~28.DLL|api-ms-win-crt-environment-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-environment-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtfilesysteml110.dll"/>
- <ROW File="apimswincrtfilesysteml110.dll" Component_="apimswincrtfilesysteml110.dll" FileName="API-M~29.DLL|api-ms-win-crt-filesystem-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-filesystem-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtheapl110.dll"/>
- <ROW File="apimswincrtheapl110.dll" Component_="apimswincrtheapl110.dll" FileName="API-M~30.DLL|api-ms-win-crt-heap-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-heap-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtlocalel110.dll"/>
- <ROW File="apimswincrtlocalel110.dll" Component_="apimswincrtlocalel110.dll" FileName="API-M~31.DLL|api-ms-win-crt-locale-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-locale-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtmathl110.dll"/>
- <ROW File="apimswincrtmathl110.dll" Component_="apimswincrtmathl110.dll" FileName="API-M~32.DLL|api-ms-win-crt-math-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-math-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtmultibytel110.dll"/>
- <ROW File="apimswincrtmultibytel110.dll" Component_="apimswincrtmultibytel110.dll" FileName="API-M~33.DLL|api-ms-win-crt-multibyte-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-multibyte-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtprivatel110.dll"/>
- <ROW File="apimswincrtprivatel110.dll" Component_="apimswincrtprivatel110.dll" FileName="API-M~34.DLL|api-ms-win-crt-private-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-private-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtprocessl110.dll"/>
- <ROW File="apimswincrtprocessl110.dll" Component_="apimswincrtprocessl110.dll" FileName="API-M~35.DLL|api-ms-win-crt-process-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-process-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtruntimel110.dll"/>
- <ROW File="apimswincrtruntimel110.dll" Component_="apimswincrtruntimel110.dll" FileName="API-M~36.DLL|api-ms-win-crt-runtime-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-runtime-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtstdiol110.dll"/>
- <ROW File="apimswincrtstdiol110.dll" Component_="apimswincrtstdiol110.dll" FileName="API-M~37.DLL|api-ms-win-crt-stdio-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-stdio-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtstringl110.dll"/>
- <ROW File="apimswincrtstringl110.dll" Component_="apimswincrtstringl110.dll" FileName="API-M~38.DLL|api-ms-win-crt-string-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-string-l1-1-0.dll" SelfReg="false" NextFile="apimswincrttimel110.dll"/>
- <ROW File="apimswincrttimel110.dll" Component_="apimswincrttimel110.dll" FileName="API-M~39.DLL|api-ms-win-crt-time-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-time-l1-1-0.dll" SelfReg="false" NextFile="apimswincrtutilityl110.dll"/>
- <ROW File="apimswincrtutilityl110.dll" Component_="apimswincrtutilityl110.dll" FileName="API-M~40.DLL|api-ms-win-crt-utility-l1-1-0.dll" Attributes="0" SourcePath="jre\bin\api-ms-win-crt-utility-l1-1-0.dll" SelfReg="false" NextFile="awt.dll"/>
- <ROW File="asm.md" Component_="ADDITIONAL_LICENSE_INFO" FileName="asm.md" Attributes="0" SourcePath="jre\legal\java.base\asm.md" SelfReg="false" NextFile="ASSEMBLY_EXCEPTION"/>
- <ROW File="awt.dll" Component_="awt.dll" FileName="awt.dll" Attributes="0" SourcePath="jre\bin\awt.dll" SelfReg="false" NextFile="dt_socket.dll"/>
- <ROW File="bcel.md" Component_="ADDITIONAL_LICENSE_INFO_70" FileName="bcel.md" Attributes="0" SourcePath="jre\legal\java.xml\bcel.md" SelfReg="false" NextFile="dom.md"/>
- <ROW File="bcprovjdk15on1.68.jar" Component_="activation1.1.1.jar" FileName="BCPROV~1.JAR|bcprov-jdk15on-1.68.jar" Attributes="0" SourcePath="lib\bcprov-jdk15on-1.68.jar" SelfReg="false" NextFile="commonscodec1.15.jar"/>
- <ROW File="blocked.certs" Component_="blocked.certs" FileName="BLOCKE~1.CER|blocked.certs" Attributes="0" SourcePath="jre\lib\security\blocked.certs" SelfReg="false" NextFile="cacerts"/>
- <ROW File="cacerts" Component_="blocked.certs" FileName="cacerts" Attributes="0" SourcePath="jre\lib\security\cacerts" SelfReg="false" NextFile="default.policy"/>
- <ROW File="classes.jsa" Component_="classes.jsa" FileName="classes.jsa" Attributes="0" SourcePath="jre\bin\server\classes.jsa" SelfReg="false" NextFile="classes_nocoops.jsa"/>
- <ROW File="classes_nocoops.jsa" Component_="classes.jsa" FileName="CLASSE~1.JSA|classes_nocoops.jsa" Attributes="0" SourcePath="jre\bin\server\classes_nocoops.jsa" SelfReg="false" NextFile="jvm.dll"/>
- <ROW File="classlist" Component_="classlist" FileName="CLASSL~1|classlist" Attributes="0" SourcePath="jre\lib\classlist" SelfReg="false" NextFile="fontconfig.bfc"/>
- <ROW File="cldr.md" Component_="ADDITIONAL_LICENSE_INFO" FileName="cldr.md" Attributes="0" SourcePath="jre\legal\java.base\cldr.md" SelfReg="false" NextFile="icu.md"/>
- <ROW File="cldr.md_2" Component_="ADDITIONAL_LICENSE_INFO_87" FileName="cldr.md" Attributes="0" SourcePath="jre\legal\jdk.localedata\cldr.md" SelfReg="false" NextFile="LICENSE_87"/>
- <ROW File="clibutl.md" Component_="ADDITIONAL_LICENSE_INFO" FileName="c-libutl.md" Attributes="0" SourcePath="jre\legal\java.base\c-libutl.md" SelfReg="false" NextFile="cldr.md"/>
- <ROW File="colorimaging.md" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="COLORI~1.MD|colorimaging.md" Attributes="0" SourcePath="jre\legal\java.desktop\colorimaging.md" SelfReg="false" NextFile="freetype.md"/>
- <ROW File="commonscodec1.15.jar" Component_="activation1.1.1.jar" FileName="COMMON~1.JAR|commons-codec-1.15.jar" Attributes="0" SourcePath="lib\commons-codec-1.15.jar" SelfReg="false" NextFile="commonscollections3.2.2.jar"/>
- <ROW File="commonscollections3.2.2.jar" Component_="activation1.1.1.jar" FileName="COMMON~2.JAR|commons-collections-3.2.2.jar" Attributes="0" SourcePath="lib\commons-collections-3.2.2.jar" SelfReg="false" NextFile="commonscollections44.1.jar"/>
- <ROW File="commonscollections44.1.jar" Component_="activation1.1.1.jar" FileName="COMMON~3.JAR|commons-collections4-4.1.jar" Attributes="0" SourcePath="lib\commons-collections4-4.1.jar" SelfReg="false" NextFile="commonsconfiguration1.10.jar"/>
- <ROW File="commonsconfiguration1.10.jar" Component_="activation1.1.1.jar" FileName="COMMON~4.JAR|commons-configuration-1.10.jar" Attributes="0" SourcePath="lib\commons-configuration-1.10.jar" SelfReg="false" NextFile="commonshttpclient3.1.jar"/>
- <ROW File="commonshttpclient3.1.jar" Component_="activation1.1.1.jar" FileName="COMMON~5.JAR|commons-httpclient-3.1.jar" Attributes="0" SourcePath="lib\commons-httpclient-3.1.jar" SelfReg="false" NextFile="commonsio2.11.0.jar"/>
- <ROW File="commonsio2.11.0.jar" Component_="activation1.1.1.jar" FileName="COMMON~6.JAR|commons-io-2.11.0.jar" Attributes="0" SourcePath="lib\commons-io-2.11.0.jar" SelfReg="false" NextFile="commonslang2.6.jar"/>
- <ROW File="commonslang2.6.jar" Component_="activation1.1.1.jar" FileName="COMMON~7.JAR|commons-lang-2.6.jar" Attributes="0" SourcePath="lib\commons-lang-2.6.jar" SelfReg="false" NextFile="commonslang33.12.0.jar"/>
- <ROW File="commonslang33.12.0.jar" Component_="activation1.1.1.jar" FileName="COMMON~8.JAR|commons-lang3-3.12.0.jar" Attributes="0" SourcePath="lib\commons-lang3-3.12.0.jar" SelfReg="false" NextFile="commonslogging1.0.4.jar"/>
- <ROW File="commonslogging1.0.4.jar" Component_="activation1.1.1.jar" FileName="COMMON~9.JAR|commons-logging-1.0.4.jar" Attributes="0" SourcePath="lib\commons-logging-1.0.4.jar" SelfReg="false" NextFile="core3.4.1.jar"/>
- <ROW File="core3.4.1.jar" Component_="activation1.1.1.jar" FileName="CORE-3~1.JAR|core-3.4.1.jar" Attributes="0" SourcePath="lib\core-3.4.1.jar" SelfReg="false" NextFile="FastInfoset1.2.15.jar"/>
- <ROW File="default.jfc" Component_="default.jfc" FileName="default.jfc" Attributes="0" SourcePath="jre\lib\jfr\default.jfc" SelfReg="false" NextFile="profile.jfc"/>
- <ROW File="default.policy" Component_="blocked.certs" FileName="DEFAUL~1.POL|default.policy" Attributes="0" SourcePath="jre\lib\security\default.policy" SelfReg="false" NextFile="public_suffix_list.dat"/>
- <ROW File="default_US_export.policy" Component_="default_local.policy" FileName="DEFAUL~2.POL|default_US_export.policy" Attributes="0" SourcePath="jre\conf\security\policy\limited\default_US_export.policy" SelfReg="false" NextFile="exempt_local.policy"/>
- <ROW File="default_US_export.policy_2" Component_="default_local.policy_2" FileName="DEFAUL~2.POL|default_US_export.policy" Attributes="0" SourcePath="jre\conf\security\policy\unlimited\default_US_export.policy" SelfReg="false" NextFile="sound.properties"/>
- <ROW File="default_local.policy" Component_="default_local.policy" FileName="DEFAUL~1.POL|default_local.policy" Attributes="0" SourcePath="jre\conf\security\policy\limited\default_local.policy" SelfReg="false" NextFile="default_US_export.policy"/>
- <ROW File="default_local.policy_2" Component_="default_local.policy_2" FileName="DEFAUL~1.POL|default_local.policy" Attributes="0" SourcePath="jre\conf\security\policy\unlimited\default_local.policy" SelfReg="false" NextFile="default_US_export.policy_2"/>
- <ROW File="dom.md" Component_="ADDITIONAL_LICENSE_INFO_70" FileName="dom.md" Attributes="0" SourcePath="jre\legal\java.xml\dom.md" SelfReg="false" NextFile="jcup.md"/>
- <ROW File="dt_socket.dll" Component_="dt_socket.dll" FileName="DT_SOC~1.DLL|dt_socket.dll" Attributes="0" SourcePath="jre\bin\dt_socket.dll" SelfReg="false" NextFile="fontmanager.dll"/>
- <ROW File="dynalink.md" Component_="ADDITIONAL_LICENSE_INFO_77" FileName="dynalink.md" Attributes="0" SourcePath="jre\legal\jdk.dynalink\dynalink.md" SelfReg="false" NextFile="LICENSE_77"/>
- <ROW File="exempt_local.policy" Component_="default_local.policy" FileName="EXEMPT~1.POL|exempt_local.policy" Attributes="0" SourcePath="jre\conf\security\policy\limited\exempt_local.policy" SelfReg="false" NextFile="README.txt_2"/>
- <ROW File="fontbox2.0.24.jar" Component_="activation1.1.1.jar" FileName="FONTBO~1.JAR|fontbox-2.0.24.jar" Attributes="0" SourcePath="lib\fontbox-2.0.24.jar" SelfReg="false" NextFile="gson2.9.0.jar"/>
- <ROW File="fontconfig.bfc" Component_="classlist" FileName="FONTCO~1.BFC|fontconfig.bfc" Attributes="0" SourcePath="jre\lib\fontconfig.bfc" SelfReg="false" NextFile="fontconfig.properties.src"/>
- <ROW File="fontconfig.properties.src" Component_="classlist" FileName="FONTCO~1.SRC|fontconfig.properties.src" Attributes="0" SourcePath="jre\lib\fontconfig.properties.src" SelfReg="false" NextFile="jawt.lib"/>
- <ROW File="fontmanager.dll" Component_="fontmanager.dll" FileName="FONTMA~1.DLL|fontmanager.dll" Attributes="0" SourcePath="jre\bin\fontmanager.dll" SelfReg="false" NextFile="freetype.dll"/>
- <ROW File="freetype.dll" Component_="freetype.dll" FileName="freetype.dll" Attributes="0" SourcePath="jre\bin\freetype.dll" SelfReg="false" NextFile="instrument.dll"/>
- <ROW File="freetype.md" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="freetype.md" Attributes="0" SourcePath="jre\legal\java.desktop\freetype.md" SelfReg="false" NextFile="giflib.md"/>
- <ROW File="giflib.md" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="giflib.md" Attributes="0" SourcePath="jre\legal\java.desktop\giflib.md" SelfReg="false" NextFile="harfbuzz.md"/>
- <ROW File="gson2.9.0.jar" Component_="activation1.1.1.jar" FileName="GSON-2~1.JAR|gson-2.9.0.jar" Attributes="0" SourcePath="lib\gson-2.9.0.jar" SelfReg="false" NextFile="httpclient4.5.13.jar"/>
- <ROW File="harfbuzz.md" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="harfbuzz.md" Attributes="0" SourcePath="jre\legal\java.desktop\harfbuzz.md" SelfReg="false" NextFile="jpeg.md"/>
- <ROW File="httpclient4.5.13.jar" Component_="activation1.1.1.jar" FileName="HTTPCL~1.JAR|httpclient-4.5.13.jar" Attributes="0" SourcePath="lib\httpclient-4.5.13.jar" SelfReg="false" NextFile="httpcore4.4.13.jar"/>
- <ROW File="httpcore4.4.13.jar" Component_="activation1.1.1.jar" FileName="HTTPCO~1.JAR|httpcore-4.4.13.jar" Attributes="0" SourcePath="lib\httpcore-4.4.13.jar" SelfReg="false" NextFile="httpmime4.5.13.jar"/>
- <ROW File="httpmime4.5.13.jar" Component_="activation1.1.1.jar" FileName="HTTPMI~1.JAR|httpmime-4.5.13.jar" Attributes="0" SourcePath="lib\httpmime-4.5.13.jar" SelfReg="false" NextFile="iaik_cms2.15.jar"/>
- <ROW File="iaik_cms2.15.jar" Component_="activation1.1.1.jar" FileName="IAIK_C~1.JAR|iaik_cms-2.15.jar" Attributes="0" SourcePath="lib\iaik_cms-2.15.jar" SelfReg="false" NextFile="iaik_eccelerate3.01.jar"/>
- <ROW File="iaik_eccelerate3.01.jar" Component_="activation1.1.1.jar" FileName="IAIK_E~1.JAR|iaik_eccelerate-3.01.jar" Attributes="0" SourcePath="lib\iaik_eccelerate-3.01.jar" SelfReg="false" NextFile="iaik_eccelerate_cms3.01.jar"/>
- <ROW File="iaik_eccelerate_cms3.01.jar" Component_="activation1.1.1.jar" FileName="IAIK_E~2.JAR|iaik_eccelerate_cms-3.01.jar" Attributes="0" SourcePath="lib\iaik_eccelerate_cms-3.01.jar" SelfReg="false" NextFile="iaik_jce_full_signed5.5.jar"/>
- <ROW File="iaik_jce_full_signed5.5.jar" Component_="activation1.1.1.jar" FileName="IAIK_J~1.JAR|iaik_jce_full_signed-5.5.jar" Attributes="0" SourcePath="lib\iaik_jce_full_signed-5.5.jar" SelfReg="false" NextFile="istackcommonsruntime3.0.7.jar"/>
- <ROW File="icu.md" Component_="ADDITIONAL_LICENSE_INFO" FileName="icu.md" Attributes="0" SourcePath="jre\legal\java.base\icu.md" SelfReg="false" NextFile="LICENSE"/>
- <ROW File="instrument.dll" Component_="instrument.dll" FileName="INSTRU~1.DLL|instrument.dll" Attributes="0" SourcePath="jre\bin\instrument.dll" SelfReg="false" NextFile="j2gss.dll"/>
- <ROW File="istackcommonsruntime3.0.7.jar" Component_="activation1.1.1.jar" FileName="ISTACK~1.JAR|istack-commons-runtime-3.0.7.jar" Attributes="0" SourcePath="lib\istack-commons-runtime-3.0.7.jar" SelfReg="false" NextFile="jaiimageiocore1.4.0.jar"/>
- <ROW File="j2gss.dll" Component_="j2gss.dll" FileName="j2gss.dll" Attributes="0" SourcePath="jre\bin\j2gss.dll" SelfReg="false" NextFile="j2pcsc.dll"/>
- <ROW File="j2pcsc.dll" Component_="j2pcsc.dll" FileName="j2pcsc.dll" Attributes="0" SourcePath="jre\bin\j2pcsc.dll" SelfReg="false" NextFile="j2pkcs11.dll"/>
- <ROW File="j2pkcs11.dll" Component_="j2pkcs11.dll" FileName="j2pkcs11.dll" Attributes="0" SourcePath="jre\bin\j2pkcs11.dll" SelfReg="false" NextFile="jaas.dll"/>
- <ROW File="jaas.dll" Component_="jaas.dll" FileName="jaas.dll" Attributes="0" SourcePath="jre\bin\jaas.dll" SelfReg="false" NextFile="jabswitch.exe"/>
- <ROW File="jabswitch.exe" Component_="jabswitch.exe" FileName="JABSWI~1.EXE|jabswitch.exe" Attributes="0" SourcePath="jre\bin\jabswitch.exe" SelfReg="false" NextFile="jaccessinspector.exe"/>
- <ROW File="jaccessinspector.exe" Component_="jaccessinspector.exe" FileName="JACCES~1.EXE|jaccessinspector.exe" Attributes="0" SourcePath="jre\bin\jaccessinspector.exe" SelfReg="false" NextFile="jaccesswalker.exe"/>
- <ROW File="jaccesswalker.exe" Component_="jaccesswalker.exe" FileName="JACCES~2.EXE|jaccesswalker.exe" Attributes="0" SourcePath="jre\bin\jaccesswalker.exe" SelfReg="false" NextFile="java.dll"/>
- <ROW File="jaiimageiocore1.4.0.jar" Component_="activation1.1.1.jar" FileName="JAI-IM~1.JAR|jai-imageio-core-1.4.0.jar" Attributes="0" SourcePath="lib\jai-imageio-core-1.4.0.jar" SelfReg="false" NextFile="jaiimageiojpeg20001.4.0.jar"/>
- <ROW File="jaiimageiojpeg20001.4.0.jar" Component_="activation1.1.1.jar" FileName="JAI-IM~2.JAR|jai-imageio-jpeg2000-1.4.0.jar" Attributes="0" SourcePath="lib\jai-imageio-jpeg2000-1.4.0.jar" SelfReg="false" NextFile="javase3.4.1.jar"/>
- <ROW File="java.dll" Component_="java.dll" FileName="java.dll" Attributes="0" SourcePath="jre\bin\java.dll" SelfReg="false" NextFile="java.exe"/>
- <ROW File="java.exe" Component_="java.exe" FileName="java.exe" Attributes="0" SourcePath="jre\bin\java.exe" SelfReg="false" NextFile="javaaccessbridge.dll"/>
- <ROW File="java.policy" Component_="java.policy" FileName="JAVA~1.POL|java.policy" Attributes="0" SourcePath="jre\conf\security\java.policy" SelfReg="false" NextFile="java.security"/>
- <ROW File="java.security" Component_="java.policy" FileName="JAVA~1.SEC|java.security" Attributes="0" SourcePath="jre\conf\security\java.security" SelfReg="false" NextFile="default_local.policy"/>
- <ROW File="javaaccessbridge.dll" Component_="javaaccessbridge.dll" FileName="JAVAAC~1.DLL|javaaccessbridge.dll" Attributes="0" SourcePath="jre\bin\javaaccessbridge.dll" SelfReg="false" NextFile="javajpeg.dll"/>
- <ROW File="javajpeg.dll" Component_="javajpeg.dll" FileName="javajpeg.dll" Attributes="0" SourcePath="jre\bin\javajpeg.dll" SelfReg="false" NextFile="javaw.exe"/>
- <ROW File="javase3.4.1.jar" Component_="activation1.1.1.jar" FileName="JAVASE~1.JAR|javase-3.4.1.jar" Attributes="0" SourcePath="lib\javase-3.4.1.jar" SelfReg="false" NextFile="javassist3.24.1GA.jar"/>
- <ROW File="javassist3.24.1GA.jar" Component_="activation1.1.1.jar" FileName="JAVASS~1.JAR|javassist-3.24.1-GA.jar" Attributes="0" SourcePath="lib\javassist-3.24.1-GA.jar" SelfReg="false" NextFile="javax.activationapi1.2.0.jar"/>
- <ROW File="javaw.exe" Component_="javaw.exe" FileName="javaw.exe" Attributes="0" SourcePath="jre\bin\javaw.exe" SelfReg="false" NextFile="jawt.dll"/>
- <ROW File="javax.activationapi1.2.0.jar" Component_="activation1.1.1.jar" FileName="JAVAXA~1.JAR|javax.activation-api-1.2.0.jar" Attributes="0" SourcePath="lib\javax.activation-api-1.2.0.jar" SelfReg="false" NextFile="javax.jwsapi1.1.jar"/>
- <ROW File="javax.jwsapi1.1.jar" Component_="activation1.1.1.jar" FileName="JAVAXJ~1.JAR|javax.jws-api-1.1.jar" Attributes="0" SourcePath="lib\javax.jws-api-1.1.jar" SelfReg="false" NextFile="jaxbapi2.4.0b180830.0359.jar"/>
- <ROW File="jawt.dll" Component_="jawt.dll" FileName="jawt.dll" Attributes="0" SourcePath="jre\bin\jawt.dll" SelfReg="false" NextFile="jdwp.dll"/>
- <ROW File="jawt.lib" Component_="classlist" FileName="jawt.lib" Attributes="0" SourcePath="jre\lib\jawt.lib" SelfReg="false" NextFile="default.jfc"/>
- <ROW File="jaxbapi2.4.0b180830.0359.jar" Component_="activation1.1.1.jar" FileName="JAXB-A~1.JAR|jaxb-api-2.4.0-b180830.0359.jar" Attributes="0" SourcePath="lib\jaxb-api-2.4.0-b180830.0359.jar" SelfReg="false" NextFile="jaxbruntime2.4.0b180830.0438.jar"/>
- <ROW File="jaxbruntime2.4.0b180830.0438.jar" Component_="activation1.1.1.jar" FileName="JAXB-R~1.JAR|jaxb-runtime-2.4.0-b180830.0438.jar" Attributes="0" SourcePath="lib\jaxb-runtime-2.4.0-b180830.0438.jar" SelfReg="false" NextFile="jbig21.0.jar"/>
- <ROW File="jbig21.0.jar" Component_="activation1.1.1.jar" FileName="JBIG2-~1.JAR|jbig2-1.0.jar" Attributes="0" SourcePath="lib\jbig2-1.0.jar" SelfReg="false" NextFile="jcloverslf4j1.7.32.jar"/>
- <ROW File="jcloverslf4j1.7.32.jar" Component_="activation1.1.1.jar" FileName="JCL-OV~1.JAR|jcl-over-slf4j-1.7.32.jar" Attributes="0" SourcePath="lib\jcl-over-slf4j-1.7.32.jar" SelfReg="false" NextFile="jcommander1.78.jar"/>
- <ROW File="jcommander1.78.jar" Component_="activation1.1.1.jar" FileName="JCOMMA~1.JAR|jcommander-1.78.jar" Attributes="0" SourcePath="lib\jcommander-1.78.jar" SelfReg="false" NextFile="jose4j0.7.6.jar"/>
- <ROW File="jcup.md" Component_="ADDITIONAL_LICENSE_INFO_70" FileName="jcup.md" Attributes="0" SourcePath="jre\legal\java.xml\jcup.md" SelfReg="false" NextFile="LICENSE_70"/>
- <ROW File="jdwp.dll" Component_="jdwp.dll" FileName="jdwp.dll" Attributes="0" SourcePath="jre\bin\jdwp.dll" SelfReg="false" NextFile="jfr.exe"/>
- <ROW File="jfr.exe" Component_="jfr.exe" FileName="jfr.exe" Attributes="0" SourcePath="jre\bin\jfr.exe" SelfReg="false" NextFile="jimage.dll"/>
- <ROW File="jimage.dll" Component_="jimage.dll" FileName="jimage.dll" Attributes="0" SourcePath="jre\bin\jimage.dll" SelfReg="false" NextFile="jli.dll"/>
- <ROW File="jli.dll" Component_="jli.dll" FileName="jli.dll" Attributes="0" SourcePath="jre\bin\jli.dll" SelfReg="false" NextFile="jrunscript.exe"/>
- <ROW File="jmxremote.access" Component_="jmxremote.access" FileName="JMXREM~1.ACC|jmxremote.access" Attributes="0" SourcePath="jre\conf\management\jmxremote.access" SelfReg="false" NextFile="jmxremote.password.template"/>
- <ROW File="jmxremote.password.template" Component_="jmxremote.access" FileName="JMXREM~1.TEM|jmxremote.password.template" Attributes="0" SourcePath="jre\conf\management\jmxremote.password.template" SelfReg="false" NextFile="management.properties"/>
- <ROW File="jose4j0.7.6.jar" Component_="activation1.1.1.jar" FileName="JOSE4J~1.JAR|jose4j-0.7.6.jar" Attributes="0" SourcePath="lib\jose4j-0.7.6.jar" SelfReg="false" NextFile="jsoup1.14.3.jar"/>
- <ROW File="jpeg.md" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="jpeg.md" Attributes="0" SourcePath="jre\legal\java.desktop\jpeg.md" SelfReg="false" NextFile="lcms.md"/>
- <ROW File="jrtfs.jar" Component_="classlist" FileName="jrt-fs.jar" Attributes="0" SourcePath="jre\lib\jrt-fs.jar" SelfReg="false" NextFile="jvm.cfg"/>
- <ROW File="jrunscript.exe" Component_="jrunscript.exe" FileName="JRUNSC~1.EXE|jrunscript.exe" Attributes="0" SourcePath="jre\bin\jrunscript.exe" SelfReg="false" NextFile="jsound.dll"/>
- <ROW File="jsound.dll" Component_="jsound.dll" FileName="jsound.dll" Attributes="0" SourcePath="jre\bin\jsound.dll" SelfReg="false" NextFile="jsvml.dll"/>
- <ROW File="jsoup1.14.3.jar" Component_="activation1.1.1.jar" FileName="JSOUP-~1.JAR|jsoup-1.14.3.jar" Attributes="0" SourcePath="lib\jsoup-1.14.3.jar" SelfReg="false" NextFile="levigojbig2imageio2.0.jar"/>
- <ROW File="jsvml.dll" Component_="jsvml.dll" FileName="jsvml.dll" Attributes="0" SourcePath="jre\bin\jsvml.dll" SelfReg="false" NextFile="keytool.exe"/>
- <ROW File="jvm.cfg" Component_="classlist" FileName="jvm.cfg" Attributes="0" SourcePath="jre\lib\jvm.cfg" SelfReg="false" NextFile="jvm.lib"/>
- <ROW File="jvm.dll" Component_="jvm.dll" FileName="jvm.dll" Attributes="0" SourcePath="jre\bin\server\jvm.dll" SelfReg="false" NextFile="splashscreen.dll"/>
- <ROW File="jvm.lib" Component_="classlist" FileName="jvm.lib" Attributes="0" SourcePath="jre\lib\jvm.lib" SelfReg="false" NextFile="modules"/>
- <ROW File="keytool.exe" Component_="keytool.exe" FileName="keytool.exe" Attributes="0" SourcePath="jre\bin\keytool.exe" SelfReg="false" NextFile="kinit.exe"/>
- <ROW File="kinit.exe" Component_="kinit.exe" FileName="kinit.exe" Attributes="0" SourcePath="jre\bin\kinit.exe" SelfReg="false" NextFile="klist.exe"/>
- <ROW File="klist.exe" Component_="klist.exe" FileName="klist.exe" Attributes="0" SourcePath="jre\bin\klist.exe" SelfReg="false" NextFile="ktab.exe"/>
- <ROW File="ktab.exe" Component_="ktab.exe" FileName="ktab.exe" Attributes="0" SourcePath="jre\bin\ktab.exe" SelfReg="false" NextFile="lcms.dll"/>
- <ROW File="lcms.dll" Component_="lcms.dll" FileName="lcms.dll" Attributes="0" SourcePath="jre\bin\lcms.dll" SelfReg="false" NextFile="management.dll"/>
- <ROW File="lcms.md" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="lcms.md" Attributes="0" SourcePath="jre\legal\java.desktop\lcms.md" SelfReg="false" NextFile="libpng.md"/>
- <ROW File="levigojbig2imageio2.0.jar" Component_="activation1.1.1.jar" FileName="LEVIGO~1.JAR|levigo-jbig2-imageio-2.0.jar" Attributes="0" SourcePath="lib\levigo-jbig2-imageio-2.0.jar" SelfReg="false" NextFile="logbackclassic1.2.10.jar"/>
- <ROW File="libpng.md" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="libpng.md" Attributes="0" SourcePath="jre\legal\java.desktop\libpng.md" SelfReg="false" NextFile="LICENSE_53"/>
- <ROW File="logbackclassic1.2.10.jar" Component_="activation1.1.1.jar" FileName="LOGBAC~1.JAR|logback-classic-1.2.10.jar" Attributes="0" SourcePath="lib\logback-classic-1.2.10.jar" SelfReg="false" NextFile="logbackcore1.2.10.jar"/>
- <ROW File="logbackcore1.2.10.jar" Component_="activation1.1.1.jar" FileName="LOGBAC~2.JAR|logback-core-1.2.10.jar" Attributes="0" SourcePath="lib\logback-core-1.2.10.jar" SelfReg="false" NextFile="metadataextractor2.9.1.jar"/>
- <ROW File="logging.properties" Component_="logging.properties" FileName="LOGGIN~1.PRO|logging.properties" Attributes="0" SourcePath="jre\conf\logging.properties" SelfReg="false" NextFile="jmxremote.access"/>
- <ROW File="management.dll" Component_="management.dll" FileName="MANAGE~1.DLL|management.dll" Attributes="0" SourcePath="jre\bin\management.dll" SelfReg="false" NextFile="management_agent.dll"/>
- <ROW File="management.properties" Component_="jmxremote.access" FileName="MANAGE~1.PRO|management.properties" Attributes="0" SourcePath="jre\conf\management\management.properties" SelfReg="false" NextFile="net.properties"/>
- <ROW File="management_agent.dll" Component_="management_agent.dll" FileName="MANAGE~2.DLL|management_agent.dll" Attributes="0" SourcePath="jre\bin\management_agent.dll" SelfReg="false" NextFile="management_ext.dll"/>
- <ROW File="management_ext.dll" Component_="management_ext.dll" FileName="MANAGE~3.DLL|management_ext.dll" Attributes="0" SourcePath="jre\bin\management_ext.dll" SelfReg="false" NextFile="mlib_image.dll"/>
- <ROW File="mesa3d.md" Component_="ADDITIONAL_LICENSE_INFO_53" FileName="mesa3d.md" Attributes="0" SourcePath="jre\legal\java.desktop\mesa3d.md" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_54"/>
- <ROW File="metadataextractor2.9.1.jar" Component_="activation1.1.1.jar" FileName="METADA~1.JAR|metadata-extractor-2.9.1.jar" Attributes="0" SourcePath="lib\metadata-extractor-2.9.1.jar" SelfReg="false" NextFile="ognl3.2.19.jar"/>
- <ROW File="mlib_image.dll" Component_="mlib_image.dll" FileName="MLIB_I~1.DLL|mlib_image.dll" Attributes="0" SourcePath="jre\bin\mlib_image.dll" SelfReg="false" NextFile="msvcp140.dll"/>
- <ROW File="modules" Component_="classlist" FileName="modules" Attributes="0" SourcePath="jre\lib\modules" SelfReg="false" NextFile="psfont.properties.ja"/>
- <ROW File="msvcp140.dll" Component_="msvcp140.dll" FileName="msvcp140.dll" Attributes="0" SourcePath="jre\bin\msvcp140.dll" SelfReg="false" NextFile="net.dll"/>
- <ROW File="net.dll" Component_="net.dll" FileName="net.dll" Attributes="0" SourcePath="jre\bin\net.dll" SelfReg="false" NextFile="nio.dll"/>
- <ROW File="net.properties" Component_="logging.properties" FileName="NET~1.PRO|net.properties" Attributes="0" SourcePath="jre\conf\net.properties" SelfReg="false" NextFile="java.policy"/>
- <ROW File="nio.dll" Component_="nio.dll" FileName="nio.dll" Attributes="0" SourcePath="jre\bin\nio.dll" SelfReg="false" NextFile="prefs.dll"/>
- <ROW File="ognl3.2.19.jar" Component_="activation1.1.1.jar" FileName="OGNL-3~1.JAR|ognl-3.2.19.jar" Attributes="0" SourcePath="lib\ognl-3.2.19.jar" SelfReg="false" NextFile="pdfascommon4.2.1SNAPSHOT.jar"/>
- <ROW File="pdfascommon4.2.1SNAPSHOT.jar" Component_="activation1.1.1.jar" FileName="PDF-AS~1.JAR|pdf-as-common-4.2.1-SNAPSHOT.jar" Attributes="0" SourcePath="lib\pdf-as-common-4.2.1-SNAPSHOT.jar" SelfReg="false" NextFile="pdfaslib4.2.1SNAPSHOT.jar"/>
- <ROW File="pdfaslib4.2.1SNAPSHOT.jar" Component_="activation1.1.1.jar" FileName="PDF-AS~2.JAR|pdf-as-lib-4.2.1-SNAPSHOT.jar" Attributes="0" SourcePath="lib\pdf-as-lib-4.2.1-SNAPSHOT.jar" SelfReg="false" NextFile="pdfaspdfbox24.2.1SNAPSHOT.jar"/>
- <ROW File="pdfaspdfbox24.2.1SNAPSHOT.jar" Component_="activation1.1.1.jar" FileName="PDF-AS~3.JAR|pdf-as-pdfbox-2-4.2.1-SNAPSHOT.jar" Attributes="0" SourcePath="lib\pdf-as-pdfbox-2-4.2.1-SNAPSHOT.jar" SelfReg="false" NextFile="pdfovercommons4.4.0.jar"/>
- <ROW File="pdfbox2.0.24.jar" Component_="activation1.1.1.jar" FileName="PDFBOX~1.JAR|pdfbox-2.0.24.jar" Attributes="0" SourcePath="lib\pdfbox-2.0.24.jar" SelfReg="false" NextFile="pdfboxdebugger2.0.25.jar"/>
- <ROW File="pdfboxdebugger2.0.25.jar" Component_="activation1.1.1.jar" FileName="PDFBOX~2.JAR|pdfbox-debugger-2.0.25.jar" Attributes="0" SourcePath="lib\pdfbox-debugger-2.0.25.jar" SelfReg="false" NextFile="pdfboxtools2.0.25.jar"/>
- <ROW File="pdfboxtools2.0.25.jar" Component_="activation1.1.1.jar" FileName="PDFBOX~3.JAR|pdfbox-tools-2.0.25.jar" Attributes="0" SourcePath="lib\pdfbox-tools-2.0.25.jar" SelfReg="false" NextFile="pdfview1.0.5.1katjas.jar"/>
- <ROW File="pdfovercommons4.4.0.jar" Component_="activation1.1.1.jar" FileName="PDF-OV~1.JAR|pdf-over-commons-4.4.0.jar" Attributes="0" SourcePath="lib\pdf-over-commons-4.4.0.jar" SelfReg="false" NextFile="pdfovergui4.4.0.jar"/>
- <ROW File="pdfovergui4.4.0.jar" Component_="activation1.1.1.jar" FileName="PDF-OV~2.JAR|pdf-over-gui-4.4.0.jar" Attributes="0" SourcePath="lib\pdf-over-gui-4.4.0.jar" SelfReg="false" NextFile="pdfoversignator4.4.0.jar"/>
- <ROW File="pdfoversigpdfas44.4.0.jar" Component_="activation1.1.1.jar" FileName="PDF-OV~4.JAR|pdf-over-sigpdfas4-4.4.0.jar" Attributes="0" SourcePath="lib\pdf-over-sigpdfas4-4.4.0.jar" SelfReg="false" NextFile="pdfbox2.0.24.jar"/>
- <ROW File="pdfview1.0.5.1katjas.jar" Component_="activation1.1.1.jar" FileName="PDFVIE~1.JAR|pdfview-1.0.5.1-katjas.jar" Attributes="0" SourcePath="lib\pdfview-1.0.5.1-katjas.jar" SelfReg="false" NextFile="preflight2.0.25.jar"/>
- <ROW File="pkcs11cryptotoken.md" Component_="ADDITIONAL_LICENSE_INFO_74" FileName="PKCS11~1.MD|pkcs11cryptotoken.md" Attributes="0" SourcePath="jre\legal\jdk.crypto.cryptoki\pkcs11cryptotoken.md" SelfReg="false" NextFile="pkcs11wrapper.md"/>
- <ROW File="pkcs11wrapper.md" Component_="ADDITIONAL_LICENSE_INFO_74" FileName="PKCS11~2.MD|pkcs11wrapper.md" Attributes="0" SourcePath="jre\legal\jdk.crypto.cryptoki\pkcs11wrapper.md" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_75"/>
- <ROW File="preflight2.0.25.jar" Component_="activation1.1.1.jar" FileName="PREFLI~1.JAR|preflight-2.0.25.jar" Attributes="0" SourcePath="lib\preflight-2.0.25.jar" SelfReg="false" NextFile="sigspades4.2.1SNAPSHOT.jar"/>
- <ROW File="prefs.dll" Component_="prefs.dll" FileName="prefs.dll" Attributes="0" SourcePath="jre\bin\prefs.dll" SelfReg="false" NextFile="rmi.dll"/>
- <ROW File="profile.jfc" Component_="default.jfc" FileName="profile.jfc" Attributes="0" SourcePath="jre\lib\jfr\profile.jfc" SelfReg="false" NextFile="jrtfs.jar"/>
- <ROW File="psfont.properties.ja" Component_="classlist" FileName="PSFONT~1.JA|psfont.properties.ja" Attributes="0" SourcePath="jre\lib\psfont.properties.ja" SelfReg="false" NextFile="psfontj2d.properties"/>
- <ROW File="psfontj2d.properties" Component_="classlist" FileName="PSFONT~1.PRO|psfontj2d.properties" Attributes="0" SourcePath="jre\lib\psfontj2d.properties" SelfReg="false" NextFile="blocked.certs"/>
- <ROW File="public_suffix.md" Component_="ADDITIONAL_LICENSE_INFO" FileName="PUBLIC~1.MD|public_suffix.md" Attributes="0" SourcePath="jre\legal\java.base\public_suffix.md" SelfReg="false" NextFile="unicode.md"/>
- <ROW File="public_suffix_list.dat" Component_="blocked.certs" FileName="PUBLIC~1.DAT|public_suffix_list.dat" Attributes="0" SourcePath="jre\lib\security\public_suffix_list.dat" SelfReg="false" NextFile="tzdb.dat"/>
- <ROW File="release" Component_="NOTICE" FileName="release" Attributes="0" SourcePath="jre\release" SelfReg="false" NextFile="activation1.1.1.jar"/>
- <ROW File="rmi.dll" Component_="rmi.dll" FileName="rmi.dll" Attributes="0" SourcePath="jre\bin\rmi.dll" SelfReg="false" NextFile="rmiregistry.exe"/>
- <ROW File="rmiregistry.exe" Component_="rmiregistry.exe" FileName="RMIREG~1.EXE|rmiregistry.exe" Attributes="0" SourcePath="jre\bin\rmiregistry.exe" SelfReg="false" NextFile="classes.jsa"/>
- <ROW File="santuario.md" Component_="ADDITIONAL_LICENSE_INFO_71" FileName="SANTUA~1.MD|santuario.md" Attributes="0" SourcePath="jre\legal\java.xml.crypto\santuario.md" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_72"/>
- <ROW File="sigspades4.2.1SNAPSHOT.jar" Component_="activation1.1.1.jar" FileName="SIGS-P~1.JAR|sigs-pades-4.2.1-SNAPSHOT.jar" Attributes="0" SourcePath="lib\sigs-pades-4.2.1-SNAPSHOT.jar" SelfReg="false" NextFile="slf4japi1.7.32.jar"/>
- <ROW File="slf4japi1.7.32.jar" Component_="activation1.1.1.jar" FileName="SLF4J-~1.JAR|slf4j-api-1.7.32.jar" Attributes="0" SourcePath="lib\slf4j-api-1.7.32.jar" SelfReg="false" NextFile="staxex1.8.jar"/>
- <ROW File="sound.properties" Component_="logging.properties" FileName="SOUND~1.PRO|sound.properties" Attributes="0" SourcePath="jre\conf\sound.properties" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO"/>
- <ROW File="splashscreen.dll" Component_="splashscreen.dll" FileName="SPLASH~1.DLL|splashscreen.dll" Attributes="0" SourcePath="jre\bin\splashscreen.dll" SelfReg="false" NextFile="sspi_bridge.dll"/>
- <ROW File="sspi_bridge.dll" Component_="sspi_bridge.dll" FileName="SSPI_B~1.DLL|sspi_bridge.dll" Attributes="0" SourcePath="jre\bin\sspi_bridge.dll" SelfReg="false" NextFile="sunmscapi.dll"/>
- <ROW File="staxex1.8.jar" Component_="activation1.1.1.jar" FileName="STAX-E~1.JAR|stax-ex-1.8.jar" Attributes="0" SourcePath="lib\stax-ex-1.8.jar" SelfReg="false" NextFile="swt.jar"/>
- <ROW File="sunmscapi.dll" Component_="sunmscapi.dll" FileName="SUNMSC~1.DLL|sunmscapi.dll" Attributes="0" SourcePath="jre\bin\sunmscapi.dll" SelfReg="false" NextFile="ucrtbase.dll"/>
- <ROW File="swt.jar" Component_="activation1.1.1.jar" FileName="swt.jar" Attributes="0" SourcePath="lib\swt.jar" SelfReg="false" NextFile="txw22.4.0b180830.0438.jar"/>
- <ROW File="thaidict.md" Component_="ADDITIONAL_LICENSE_INFO_87" FileName="thaidict.md" Attributes="0" SourcePath="jre\legal\jdk.localedata\thaidict.md" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_88"/>
- <ROW File="txw22.4.0b180830.0438.jar" Component_="activation1.1.1.jar" FileName="TXW2-2~1.JAR|txw2-2.4.0-b180830.0438.jar" Attributes="0" SourcePath="lib\txw2-2.4.0-b180830.0438.jar" SelfReg="false" NextFile="xmpbox2.0.25.jar"/>
- <ROW File="tzdb.dat" Component_="classlist" FileName="tzdb.dat" Attributes="0" SourcePath="jre\lib\tzdb.dat" SelfReg="false" NextFile="tzmappings"/>
- <ROW File="tzmappings" Component_="classlist" FileName="TZMAPP~1|tzmappings" Attributes="0" SourcePath="jre\lib\tzmappings" SelfReg="false" NextFile="NOTICE"/>
- <ROW File="ucrtbase.dll" Component_="ucrtbase.dll" FileName="ucrtbase.dll" Attributes="0" SourcePath="jre\bin\ucrtbase.dll" SelfReg="false" NextFile="vcruntime140.dll"/>
- <ROW File="unicode.md" Component_="ADDITIONAL_LICENSE_INFO" FileName="unicode.md" Attributes="0" SourcePath="jre\legal\java.base\unicode.md" SelfReg="false" NextFile="wepoll.md"/>
- <ROW File="vcruntime140.dll" Component_="vcruntime140.dll" FileName="VCRUNT~1.DLL|vcruntime140.dll" Attributes="0" SourcePath="jre\bin\vcruntime140.dll" SelfReg="false" NextFile="vcruntime140_1.dll"/>
- <ROW File="vcruntime140_1.dll" Component_="vcruntime140_1.dll" FileName="VCRUNT~2.DLL|vcruntime140_1.dll" Attributes="0" SourcePath="jre\bin\vcruntime140_1.dll" SelfReg="false" NextFile="verify.dll"/>
- <ROW File="verify.dll" Component_="verify.dll" FileName="verify.dll" Attributes="0" SourcePath="jre\bin\verify.dll" SelfReg="false" NextFile="w2k_lsa_auth.dll"/>
- <ROW File="w2k_lsa_auth.dll" Component_="w2k_lsa_auth.dll" FileName="W2K_LS~1.DLL|w2k_lsa_auth.dll" Attributes="0" SourcePath="jre\bin\w2k_lsa_auth.dll" SelfReg="false" NextFile="windowsaccessbridge64.dll"/>
- <ROW File="wepoll.md" Component_="ADDITIONAL_LICENSE_INFO" FileName="wepoll.md" Attributes="0" SourcePath="jre\legal\java.base\wepoll.md" SelfReg="false" NextFile="zlib.md"/>
- <ROW File="windowsaccessbridge64.dll" Component_="windowsaccessbridge64.dll" FileName="WINDOW~1.DLL|windowsaccessbridge-64.dll" Attributes="0" SourcePath="jre\bin\windowsaccessbridge-64.dll" SelfReg="false" NextFile="WinFallbackLookup.dll"/>
- <ROW File="xalan.md" Component_="ADDITIONAL_LICENSE_INFO_70" FileName="xalan.md" Attributes="0" SourcePath="jre\legal\java.xml\xalan.md" SelfReg="false" NextFile="xerces.md"/>
- <ROW File="xerces.md" Component_="ADDITIONAL_LICENSE_INFO_70" FileName="xerces.md" Attributes="0" SourcePath="jre\legal\java.xml\xerces.md" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_71"/>
- <ROW File="xmpbox2.0.25.jar" Component_="activation1.1.1.jar" FileName="XMPBOX~1.JAR|xmpbox-2.0.25.jar" Attributes="0" SourcePath="lib\xmpbox-2.0.25.jar" SelfReg="false" NextFile="xmpcore5.1.2.jar"/>
- <ROW File="xmpcore5.1.2.jar" Component_="activation1.1.1.jar" FileName="XMPCOR~1.JAR|xmpcore-5.1.2.jar" Attributes="0" SourcePath="lib\xmpcore-5.1.2.jar" SelfReg="false"/>
- <ROW File="zip.dll" Component_="zip.dll" FileName="zip.dll" Attributes="0" SourcePath="jre\bin\zip.dll" SelfReg="false" NextFile="logging.properties"/>
- <ROW File="zlib.md" Component_="ADDITIONAL_LICENSE_INFO" FileName="zlib.md" Attributes="0" SourcePath="jre\legal\java.base\zlib.md" SelfReg="false" NextFile="ADDITIONAL_LICENSE_INFO_51"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
- <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" Languages="en;de" LangOpt="1" InstallationType="4" UseLargeSchema="true" MsiPackageType="x64" UACExecutionLevel="2"/>
- <ATTRIBUTE name="CurrentBuild" value="DefaultBuild"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
- <ROW Path="&lt;AI_DICTS&gt;ui.ail"/>
- <ROW Path="&lt;AI_DICTS&gt;ui_en.ail"/>
- <ROW Path="&lt;AI_DICTS&gt;ui_de.ail"/>
- <ATTRIBUTE name="TranslateSegments" value="8116002816"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
- <ROW TimeStampUrl="http://timestamp.digicert.com" SignOptions="7" SignTool="0" UseSha256="1" Thumbprint="432d08d8878979a449168eb4347f1e85430b0f31 Subject: Zentrum für sichere Informationstechnologie - Austria (A-SIT)&#10;Issuer: DigiCert SHA2 Assured ID Code Signing CA&#10;Valid from 01/14/2021 to 01/19/2024"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
- <ROW Fragment="CommonUI.aip" Path="&lt;AI_FRAGS&gt;CommonUI.aip"/>
- <ROW Fragment="FolderDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\FolderDlg.aip"/>
- <ROW Fragment="MaintenanceTypeDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\MaintenanceTypeDlg.aip"/>
- <ROW Fragment="MaintenanceWelcomeDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\MaintenanceWelcomeDlg.aip"/>
- <ROW Fragment="SequenceDialogs.aip" Path="&lt;AI_THEMES&gt;classic\fragments\SequenceDialogs.aip"/>
- <ROW Fragment="Sequences.aip" Path="&lt;AI_FRAGS&gt;Sequences.aip"/>
- <ROW Fragment="ShortcutsDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\ShortcutsDlg.aip"/>
- <ROW Fragment="StaticUIStrings.aip" Path="&lt;AI_FRAGS&gt;StaticUIStrings.aip"/>
- <ROW Fragment="UI.aip" Path="&lt;AI_THEMES&gt;classic\fragments\UI.aip"/>
- <ROW Fragment="Validation.aip" Path="&lt;AI_FRAGS&gt;Validation.aip"/>
- <ROW Fragment="VerifyRemoveDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\VerifyRemoveDlg.aip"/>
- <ROW Fragment="VerifyRepairDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\VerifyRepairDlg.aip"/>
- <ROW Fragment="WelcomeDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\WelcomeDlg.aip"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiAppSearchComponent">
- <ROW Property="AI_SHORTCUTSREG" Signature_="AI_ShRegOptionMachine"/>
- <ROW Property="AI_SHORTCUTSREG" Signature_="AI_ShRegOptionUser"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
- <ROW Name="aicustact.dll" SourcePath="&lt;AI_CUSTACTS&gt;aicustact.dll"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiControlConditionComponent">
- <ROW Dialog_="ShortcutsDlg" Control_="DesktopShortcutsCheckBox" Action="Show" Condition="(Not Installed)"/>
- <ROW Dialog_="ShortcutsDlg" Control_="StartmenuShortcutsCheckBox" Action="Show" Condition="(Not Installed)"/>
- <ROW Dialog_="ShortcutsDlg" Control_="QuickLaunchShorcutsCheckBox" Action="Show" Condition="(Not Installed) AND (VersionNT&lt;&quot;601&quot;)"/>
- <ROW Dialog_="ShortcutsDlg" Control_="StartupShorcutsCheckBox" Action="Hide" Condition="(Not Installed)"/>
- <ATTRIBUTE name="DeletedRows" value="ShortcutsDlg#StartmenuShortcutsCheckBox#Show#(Not Installed)@ShortcutsDlg#StartupShorcutsCheckBox#Show#(Not Installed)@ShortcutsDlg#DesktopShortcutsCheckBox#Show#(Not Installed)@ShortcutsDlg#QuickLaunchShorcutsCheckBox#Show#(Not Installed) AND (VersionNT&lt;&quot;601&quot;)"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiControlEventComponent">
- <ROW Dialog_="WelcomeDlg" Control_="Next" Event="NewDialog" Argument="ShortcutsDlg" Condition="AI_INSTALL" Ordering="1"/>
- <ROW Dialog_="FolderDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_INSTALL" Ordering="201"/>
- <ROW Dialog_="FolderDlg" Control_="Back" Event="NewDialog" Argument="ShortcutsDlg" Condition="AI_INSTALL" Ordering="1"/>
- <ROW Dialog_="MaintenanceWelcomeDlg" Control_="Next" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="99"/>
- <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_MAINT" Ordering="198"/>
- <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="202"/>
- <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="197"/>
- <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="201"/>
- <ROW Dialog_="CustomizeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_MAINT" Ordering="101"/>
- <ROW Dialog_="CustomizeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="1"/>
- <ROW Dialog_="MaintenanceTypeDlg" Control_="ChangeButton" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="501"/>
- <ROW Dialog_="MaintenanceTypeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceWelcomeDlg" Condition="AI_MAINT" Ordering="1"/>
- <ROW Dialog_="MaintenanceTypeDlg" Control_="RemoveButton" Event="NewDialog" Argument="VerifyRemoveDlg" Condition="AI_MAINT AND InstallMode=&quot;Remove&quot;" Ordering="601"/>
- <ROW Dialog_="VerifyRemoveDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode=&quot;Remove&quot;" Ordering="1"/>
- <ROW Dialog_="MaintenanceTypeDlg" Control_="RepairButton" Event="NewDialog" Argument="VerifyRepairDlg" Condition="AI_MAINT AND InstallMode=&quot;Repair&quot;" Ordering="601"/>
- <ROW Dialog_="VerifyRepairDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode=&quot;Repair&quot;" Ordering="1"/>
- <ROW Dialog_="VerifyRepairDlg" Control_="Repair" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode=&quot;Repair&quot;" Ordering="399" Options="1"/>
- <ROW Dialog_="VerifyRemoveDlg" Control_="Remove" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode=&quot;Remove&quot;" Ordering="299" Options="1"/>
- <ROW Dialog_="PatchWelcomeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_PATCH" Ordering="201"/>
- <ROW Dialog_="ResumeDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_RESUME" Ordering="299"/>
- <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
- <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
- <ROW Dialog_="ShortcutsDlg" Control_="Next" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="1"/>
- <ROW Dialog_="ShortcutsDlg" Control_="Back" Event="NewDialog" Argument="WelcomeDlg" Condition="AI_INSTALL" Ordering="1"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
- <ROW Directory_="SHORTCUTDIR" Component_="SHORTCUTDIR" ManualDelete="false"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
- <ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
- <ROW Action="AI_DATA_SETTER" Type="51" Source="AI_DEL_EMPTY_SHORTCUTDIR" Target="[SHORTCUTDIR]"/>
- <ROW Action="AI_DELETE_SHORTCUTS" Type="1" Source="aicustact.dll" Target="DeleteShortcuts"/>
- <ROW Action="AI_DEL_EMPTY_SHORTCUTDIR" Type="3073" Source="aicustact.dll" Target="DeleteEmptyDirectory" AdditionalSeq="AI_DATA_SETTER"/>
- <ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
- <ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
- <ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/>
- <ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
- <ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH" Target="[AI_SETUPEXEPATH_ORIGINAL]"/>
- <ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/>
- <ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/>
- <ROW Action="AI_SETMIXINSTLOCATION" Type="1" Source="aicustact.dll" Target="MixedAllUsersInstallLocation"/>
- <ROW Action="AI_SHOW_LOG" Type="65" Source="aicustact.dll" Target="LaunchLogFile" WithoutSeq="true"/>
- <ROW Action="AI_STORE_LOCATION" Type="51" Source="ARPINSTALLLOCATION" Target="[APPDIR]"/>
- <ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[ProgramFiles64Folder][ProductName]"/>
- <ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
- <ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
- <ROW Name="PDFOver.exe" SourcePath="PDF-Over.exe" Index="0"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
- <ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel &lt;&gt; 5)" Sequence="210"/>
- <ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=&quot;&quot;" Sequence="749"/>
- <ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
- <ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE=&quot;No&quot; AND (Not Installed)" Sequence="1399"/>
- <ROW Action="AI_ResolveKnownFolders" Sequence="51"/>
- <ROW Action="AI_SETMIXINSTLOCATION" Sequence="748"/>
- <ROW Action="AI_DELETE_SHORTCUTS" Condition="NOT (REMOVE=&quot;ALL&quot;)" Sequence="1401"/>
- <ROW Action="AI_DEL_EMPTY_SHORTCUTDIR" Condition="NOT (REMOVE=&quot;ALL&quot;)" Sequence="6402"/>
- <ROW Action="AI_DATA_SETTER" Condition="NOT (REMOVE=&quot;ALL&quot;)" Sequence="6401"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
- <ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=&quot;&quot;" Sequence="749"/>
- <ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
- <ROW Action="AI_SETMIXINSTLOCATION" Sequence="748"/>
- <ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Sequence="99"/>
- <ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="101"/>
- <ROW Action="AI_DpiContentScale" Sequence="51"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
- <ROW Condition="( Version9X OR VersionNT64 )" Description="[ProductName] cannot be installed on [WindowsTypeNTDisplay]" DescriptionLocId="AI.LaunchCondition.NoNT" IsPredefined="true" Builds="DefaultBuild"/>
- <ROW Condition="(VersionNT &lt;&gt; 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
- <ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]" DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiRegLocatorComponent">
- <ROW Signature_="AI_ShRegOptionMachine" Root="2" Key="Software\Caphyon\Advanced Installer\Installs\[ProductCode]" Name="AIShRegAnswer" Type="2"/>
- <ROW Signature_="AI_ShRegOptionUser" Root="1" Key="Software\Caphyon\Advanced Installer\Installs\[ProductCode]" Name="AIShRegAnswer" Type="2"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiRegsComponent">
- <ROW Registry="AIShRegAnswer" Root="-1" Key="Software\Caphyon\Advanced Installer\Installs\[ProductCode]" Name="AIShRegAnswer" Value="[AI_SHORTCUTSREG]" Component_="AIShRegAnswer"/>
- <ROW Registry="FriendlyAppName" Root="0" Key="Applications\PDF-Over.exe" Name="FriendlyAppName" Value="PDF-Over" Component_="FriendlyAppName"/>
- <ROW Registry="PDFOver.exe_1" Root="0" Key=".pdf\OpenWithProgids" Name="PDF-Over.pdf" Component_="PDFOver.exe"/>
- <ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
- <ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
- <ROW Registry="_" Root="0" Key="PDF-Over.pdf" Value="PDF-Over" Component_="_"/>
- <ROW Registry="__1" Root="0" Key="PDF-Over.pdf\DefaultIcon" Value="&quot;[#PDFOver.exe_1]&quot;,0" Component_="__1"/>
- <ROW Registry="__2" Root="0" Key="PDF-Over.pdf\shell\open\command" Value="&quot;[#PDFOver.exe_1]&quot; &quot;%1&quot;" Component_="__2"/>
- <ROW Registry="__3" Root="0" Key="Applications\PDF-Over.exe\DefaultIcon" Value="&quot;[#PDFOver.exe_1]&quot;,0" Component_="__3"/>
- <ROW Registry="__4" Root="0" Key="Applications\PDF-Over.exe\shell\open\command" Value="&quot;[#PDFOver.exe_1]&quot; &quot;%1&quot;" Component_="__4"/>
- <ROW Registry="pdf_1" Root="0" Key="Applications\PDF-Over.exe\SupportedTypes" Name=".pdf" Component_="pdf"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiShortsComponent">
- <ROW Shortcut="PDFOver" Directory_="DesktopFolder" Name="PDF-Over" Component_="PDFOver.exe_1" Target="[#PDFOver.exe_1]" Hotkey="0" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
- <ROW Shortcut="PDFOver_1" Directory_="SendToFolder" Name="PDF-Over" Component_="PDFOver.exe_1" Target="[#PDFOver.exe_1]" Hotkey="0" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
- <ROW Shortcut="PDFOver_2" Directory_="ProgramMenuFolder" Name="PDF-Over" Component_="PDFOver.exe_1" Target="[#PDFOver.exe_1]" Hotkey="0" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
- <ROW Shortcut="PDFOver_3" Directory_="SHORTCUTDIR" Name="PDF-Over" Component_="PDFOver.exe_1" Target="[#PDFOver.exe_1]" Hotkey="0" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
- <ROW Shortcut="UninstallPDFOver_1" Directory_="SHORTCUTDIR" Name="Uninst~2|Uninstall PDF-Over" Component_="AIShRegAnswer" Target="[SystemFolder]msiexec.exe" Arguments="/x [ProductCode]" Hotkey="0" Icon_="icon.exe" IconIndex="0" ShowCmd="1"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiThemeComponent">
- <ATTRIBUTE name="UsedTheme" value="classic"/>
- </COMPONENT>
- <COMPONENT cid="caphyon.advinst.msicomp.MsiUpgradeComponent">
- <ROW UpgradeCode="[|UpgradeCode]" VersionMax="[|ProductVersion]" Attributes="1025" ActionProperty="OLDPRODUCTS"/>
- <ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/>
- </COMPONENT>
-</DOCUMENT>
diff --git a/pdf-over-gui/src/main/resources/izpack-linux/ManifestEntries.mf b/pdf-over-gui/src/main/resources/izpack-linux/ManifestEntries.mf
deleted file mode 100644
index 37a0cdce..00000000
--- a/pdf-over-gui/src/main/resources/izpack-linux/ManifestEntries.mf
+++ /dev/null
@@ -1,2 +0,0 @@
-Permissions: all-permissions
-Codebase: *
diff --git a/pdf-over-gui/src/main/resources/izpack-linux/a-sit-icon.png b/pdf-over-gui/src/main/resources/izpack-linux/a-sit-icon.png
deleted file mode 100644
index 69754c1e..00000000
--- a/pdf-over-gui/src/main/resources/izpack-linux/a-sit-icon.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/izpack-linux/customicons.xml b/pdf-over-gui/src/main/resources/izpack-linux/customicons.xml
deleted file mode 100644
index 5f5668fc..00000000
--- a/pdf-over-gui/src/main/resources/izpack-linux/customicons.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<izpack:icons version="5.0"
- xmlns:izpack="http://izpack.org/schema/icons"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://izpack.org/schema/icons http://izpack.org/schema/5.0/izpack-icons-5.0.xsd">
-
- <icon res="/resources/JFrameIcon.png" id="JFrameIcon"/>
-
-</izpack:icons>
diff --git a/pdf-over-gui/src/main/resources/izpack-linux/icon16x16.png b/pdf-over-gui/src/main/resources/izpack-linux/icon16x16.png
deleted file mode 100644
index 571c7885..00000000
--- a/pdf-over-gui/src/main/resources/izpack-linux/icon16x16.png
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/izpack-linux/install.xml b/pdf-over-gui/src/main/resources/izpack-linux/install.xml
deleted file mode 100644
index 47e14853..00000000
--- a/pdf-over-gui/src/main/resources/izpack-linux/install.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<izpack:installation version="5.0"
- xmlns:izpack="http://izpack.org/schema/installation"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://izpack.org/schema/installation http://izpack.org/schema/5.0/izpack-installation-5.0.xsd">
-
- <info>
- <appname>PDF-Over</appname>
- <appversion>${project.version}</appversion>
- <javaversion>1.8</javaversion>
- <authors>
- <author name="A-SIT (Secure Information Technology Center - Austria)" email="" />
- </authors>
- <url>http://www.a-sit.at/</url>
- <pack-compression-format>gz</pack-compression-format>
- </info>
-
- <guiprefs resizable="yes" width="700" height="360">
- <modifier key="useFlags" value="yes" />
- <modifier key="langDisplayType" value="native" />
- </guiprefs>
-
- <locale>
- <langpack iso3="eng" />
- <langpack iso3="deu" />
- </locale>
-
- <resources>
- <res id="shortcutSpec.xml" src="./unix_shortcutSpec.xml" />
- <res id="JFrameIcon.png" src="icon16x16.png" />
- <res id="customicons.xml" src="./customicons.xml" />
- <res id="Installer.image" src="a-sit-icon.png" />
- <res id="Installer.image.0" src="a-sit-icon.png" />
- </resources>
-
- <variables>
- <variable name="DesktopShortcutCheckboxEnabled" value="true" />
- </variables>
-
- <panels>
- <panel classname="HelloPanel" />
- <panel classname="TargetPanel" />
- <panel classname="InstallPanel" />
- <panel classname="ShortcutPanel" allowClose="true" />
- <panel classname="SimpleFinishPanel" />
- </panels>
-
- <natives> <!-- required to run installer on windows for debug -->
- <native type="izpack" name="ShellLink.dll"/>
- <native type="izpack" name="ShellLink_x64.dll"/>
- </natives>
-
- <packs>
- <pack name="main" required="yes">
- <description>Main Installation</description>
- <updatecheck>
- <include name="lib/**" />
- </updatecheck>
- <fileset dir="lib" targetdir="$INSTALL_PATH/lib" />
- <fileset dir="icons" targetdir="$INSTALL_PATH/icons" />
- <file src="${pdfover-build.bundled-jre.archive-filename}" targetdir="$INSTALL_PATH/jre" unpack="true">
- <archivefileset dir="${pdfover-build.bundled-jre.folder-in-archive}" />
- </file>
- <file src="pdf-over_linux.sh" targetdir="$INSTALL_PATH" />
- <file src="uninstall_linux.sh" targetdir="$INSTALL_PATH" />
- <file src="ReadMe.txt" targetdir="$INSTALL_PATH" />
-
- <!-- set executable bit, do not actually execute -->
- <executable targetfile="$INSTALL_PATH/pdf-over_linux.sh" stage="never" />
- <executable targetfile="$INSTALL_PATH/uninstall_linux.sh" stage="never" />
- <executable targetfile="$INSTALL_PATH/jre/bin/java" stage="never" />
- </pack>
- </packs>
-
-
-
-</izpack:installation>
diff --git a/pdf-over-gui/src/main/resources/izpack-linux/logo.gif b/pdf-over-gui/src/main/resources/izpack-linux/logo.gif
deleted file mode 100644
index 338a18ec..00000000
--- a/pdf-over-gui/src/main/resources/izpack-linux/logo.gif
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/izpack-linux/unix_shortcutSpec.xml b/pdf-over-gui/src/main/resources/izpack-linux/unix_shortcutSpec.xml
deleted file mode 100644
index 9824626a..00000000
--- a/pdf-over-gui/src/main/resources/izpack-linux/unix_shortcutSpec.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-
-<izpack:shortcuts version="5.0"
- xmlns:izpack="http://izpack.org/schema/shortcuts"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://izpack.org/schema/shortcuts http://izpack.org/schema/5.0/izpack-shortcuts-5.0.xsd">
- <!-- <skipIfNotSupported/> -->
- <programGroup defaultName="PDF-Over"
- location="applications"/>
-
- <shortcut
- name="PDF-Over"
- programGroup="yes"
- desktop="yes"
- applications="no"
- startMenu="no"
- startup="no"
- target="$INSTALL_PATH/pdf-over_linux.sh"
- commandLine=""
- workingDirectory="$INSTALL_PATH"
- description="PDF-Over ${project.version}"
- iconFile="$INSTALL_PATH/icons/icon.png"
- iconIndex="0"
- type="Application"
- encoding="UTF-8"
- terminal="false"
- KdeSubstUID="false"
- initialState="normal">
- <createForPack name="main"/>
- </shortcut>
-
-</izpack:shortcuts>
diff --git a/pdf-over-gui/src/main/resources/keystore.jks b/pdf-over-gui/src/main/resources/keystore.jks
deleted file mode 100644
index 44a856b4..00000000
--- a/pdf-over-gui/src/main/resources/keystore.jks
+++ /dev/null
Binary files differ
diff --git a/pdf-over-gui/src/main/resources/logback.xml b/pdf-over-gui/src/main/resources/logback.xml
deleted file mode 100644
index 866a82f7..00000000
--- a/pdf-over-gui/src/main/resources/logback.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<configuration>
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <charset>UTF-8</charset>
- <pattern>%-5p | %t @ %c{40} | %m%n</pattern>
- </encoder>
- </appender>
- <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${user.home}/.pdf-over/logs/pdf-over.log</file>
- <encoder>
- <charset>UTF-8</charset>
- <pattern>%-5p | %d | %t @ %c | %m%n</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <maxIndex>10</maxIndex>
- <FileNamePattern>${user.home}/.pdf-over/logs/pdf-over.log.%i</FileNamePattern>
- </rollingPolicy>
- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <MaxFileSize>100KB</MaxFileSize>
- </triggeringPolicy>
- </appender>
- <logger name="at.asit.pdfover" level="INFO"/>
- <root level="WARN">
- <appender-ref ref="STDOUT"/>
- <appender-ref ref="LOGFILE"/>
- </root>
- <include file="${user.home}/.pdf-over-logging.xml" optional="true" />
-</configuration>
diff --git a/pdf-over-gui/src/main/resources/scripts/pdf-over_linux.sh b/pdf-over-gui/src/main/resources/scripts/pdf-over_linux.sh
deleted file mode 100644
index 9f8f2776..00000000
--- a/pdf-over-gui/src/main/resources/scripts/pdf-over_linux.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-BASEDIR=`dirname $0`
-GDK_BACKEND=x11,wayland exec $BASEDIR/jre/bin/java -cp "$BASEDIR/lib/*" at.asit.pdfover.gui.Main "$@"
diff --git a/pdf-over-gui/src/main/resources/scripts/pdf-over_mac.sh b/pdf-over-gui/src/main/resources/scripts/pdf-over_mac.sh
deleted file mode 100644
index cd4701a6..00000000
--- a/pdf-over-gui/src/main/resources/scripts/pdf-over_mac.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-BASEDIR=$(cd "$(dirname "$0")"; pwd)
-export LC_CTYPE="UTF-8"
-exec $BASEDIR/jre/bin/java -XstartOnFirstThread -cp "$BASEDIR/lib/*" at.asit.pdfover.gui.Main "$@" &
diff --git a/pdf-over-gui/src/main/resources/scripts/uninstall_linux.sh b/pdf-over-gui/src/main/resources/scripts/uninstall_linux.sh
deleted file mode 100644
index 342c308a..00000000
--- a/pdf-over-gui/src/main/resources/scripts/uninstall_linux.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-BASEDIR=`dirname $0`
-(cd "$BASEDIR" && exec java -jar Uninstaller/uninstaller.jar)