summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-08-07 14:52:01 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-08-07 14:52:01 +0000
commitdb574d4297913a9acae96330c1a0269c2bc92bff (patch)
tree06fabdc3b6ffbc88837df831d68883dae0778461
parent94bf81d31e74a209d60f2fd4f1f20448770bf1a0 (diff)
downloadpdf-over-db574d4297913a9acae96330c1a0269c2bc92bff.tar.gz
pdf-over-db574d4297913a9acae96330c1a0269c2bc92bff.tar.bz2
pdf-over-db574d4297913a9acae96330c1a0269c2bc92bff.zip
Added class templates
Old class files edited to match templates Fixed missing comments git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12277 3a0b52a2-8410-0410-bc02-ff6273a87459
-rw-r--r--trunk/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs16
-rw-r--r--trunk/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--trunk/pdf-over-gui/pom.xml4
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java29
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java28
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Workflow.java56
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/WorkflowState.java26
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java28
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/DataSourceSelectionState.java28
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java28
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java28
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java30
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java28
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java28
-rw-r--r--trunk/pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/ByteArrayDocumentSource.java25
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/DocumentSource.java15
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Emblem.java15
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java15
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLResponse.java24
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java15
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResultImpl.java24
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java23
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureDimension.java24
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureException.java24
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java24
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignaturePosition.java24
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signer.java15
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java15
-rw-r--r--trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java15
-rw-r--r--trunk/pdf-over-signer/pdf-over-sigpdfas/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/ByteArrayPDFASDataSource.java34
-rw-r--r--trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASHelper.java24
-rw-r--r--trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSLRequest.java33
-rw-r--r--trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSignerFactory.java26
-rw-r--r--trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigningState.java63
-rw-r--r--trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java34
37 files changed, 847 insertions, 30 deletions
diff --git a/trunk/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs b/trunk/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs
index 3e73d18e..482b5e85 100644
--- a/trunk/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs
+++ b/trunk/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs
@@ -1,5 +1,9 @@
-#Fri Aug 03 18:09:51 CEST 2012
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -19,6 +23,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
@@ -37,7 +42,9 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
@@ -54,13 +61,19 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignor
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
@@ -72,6 +85,7 @@ org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
diff --git a/trunk/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs b/trunk/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000..4a2bd43a
--- /dev/null
+++ b/trunk/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\n * Copyright 2012 by A-SIT, Secure Information Technology Center Austria\n *\n * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by\n * the European Commission - subsequent versions of the EUPL (the "Licence");\n * You may not use this work except in compliance with the Licence.\n * You may obtain a copy of the Licence at\:\n * http\://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the Licence for the specific language governing permissions and\n * limitations under the Licence.\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * \n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n// Imports\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="false" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n/**\n * SFL4J Logger instance\n**/\nprivate static final Logger log \= LoggerFactory.getLogger(${type_name}.class);\n\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/trunk/pdf-over-gui/pom.xml b/trunk/pdf-over-gui/pom.xml
index e8d8f53a..06d1428b 100644
--- a/trunk/pdf-over-gui/pom.xml
+++ b/trunk/pdf-over-gui/pom.xml
@@ -16,6 +16,10 @@
<artifactId>${swt.artifactId}</artifactId>
<version>3.8</version>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
</dependencies>
<profiles>
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java
index c68a3f90..7b883d0a 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java
@@ -1,17 +1,44 @@
+/*
+ * 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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.workflow.Workflow;
+/**
+ * Main entry point for developers
+ */
public class DeveloperMain {
/**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(DeveloperMain.class);
+
+ /**
* Developer Main Entry point...
* @param args
*/
public static void main(String[] args) {
Workflow flow = new Workflow(args);
- flow.Start();
+ flow.start();
}
}
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
index 2eb27630..1637da75 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
@@ -1,8 +1,36 @@
+/*
+ * 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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Main entry point for production
+ */
public class Main {
/**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(Main.class);
+
+ /**
* @param args
*/
public static void main(String[] args) {
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Workflow.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Workflow.java
index bc0e290c..9688a747 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Workflow.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Workflow.java
@@ -1,5 +1,23 @@
+/*
+ * 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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.Properties;
import org.eclipse.swt.SWT;
@@ -9,7 +27,21 @@ import org.eclipse.swt.widgets.Shell;
import at.asit.pdfover.gui.workflow.states.PrepareConfigurationState;
+/**
+ * Workflow holds logical state of signing process and updates the current logical state
+ */
public class Workflow {
+
+ /**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(Workflow.class);
+
+ /**
+ * Default constructor
+ * @param cmdLineArgs
+ */
public Workflow(String[] cmdLineArgs) {
setCmdLineAargs(cmdLineArgs);
}
@@ -47,7 +79,7 @@ public class Workflow {
*
* @return the command line arguments
*/
- public String[] GetCmdArgs() {
+ public String[] cetCmdArgs() {
return this.cmdLineArgs;
}
@@ -58,14 +90,14 @@ public class Workflow {
*
* @return the persistent state
*/
- public Properties GetPersistentState() {
+ public Properties getPersistentState() {
return this.persistentState;
}
/**
* Update Workflow logic and let state machine do its job...
*/
- public void Update() {
+ public void update() {
WorkflowState next = null;
do {
this.state.update(this);
@@ -79,7 +111,7 @@ public class Workflow {
private Composite container = null;
- private void CreateMainWindow() {
+ private void createMainWindow() {
//TODO: Instantiate Main Window Class
this.display = Display.getDefault();
this.shell = new Shell();
@@ -98,13 +130,13 @@ public class Workflow {
*
* @return Composite
*/
- public Composite GetComposite() {
+ public Composite getComposite() {
// TODO: implement
// Main window will be build on first call
// returns SWT Composite container for states to draw their GUI
if(this.container == null) {
- this.CreateMainWindow();
+ this.createMainWindow();
}
if(this.container == null) {
@@ -119,7 +151,7 @@ public class Workflow {
*
* @return
*/
- private Shell NonCreatingGetShell() {
+ private Shell nonCreatingGetShell() {
return this.shell;
}
@@ -128,20 +160,20 @@ public class Workflow {
*
* @return
*/
- private Display NonCreatingGetDisplay() {
+ private Display nonCreatingGetDisplay() {
return this.display;
}
/**
* Workflow main entrance point
*/
- public void Start() {
+ public void start() {
// Call update to start processing ...
- this.Update();
+ this.update();
// if a user interaction is required we have a shell ...
- Shell shell = this.NonCreatingGetShell();
- Display display = this.NonCreatingGetDisplay();
+ Shell shell = this.nonCreatingGetShell();
+ Display display = this.nonCreatingGetDisplay();
if (shell != null && display != null) {
while (!shell.isDisposed()) {
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/WorkflowState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/WorkflowState.java
index f9d10d08..b5bb9e23 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/WorkflowState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/WorkflowState.java
@@ -1,11 +1,35 @@
+/*
+ * 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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* Base state class
- * @author afitzek
*/
public abstract class WorkflowState {
+ /**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(WorkflowState.class);
+
private WorkflowState _next = null;
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java
index 657de4be..e92128ac 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java
@@ -1,11 +1,37 @@
+/*
+ * 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.workflow.Workflow;
import at.asit.pdfover.gui.workflow.WorkflowState;
-
+/**
+ * Decides which BKU to use (preconfigured or let user choose)
+ */
public class BKUSelectionState extends WorkflowState {
+ /**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(BKUSelectionState.class);
+
@Override
public void update(Workflow workflow) {
// TODO Auto-generated method stub
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/DataSourceSelectionState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/DataSourceSelectionState.java
index 11b8c4ae..1458958f 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/DataSourceSelectionState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/DataSourceSelectionState.java
@@ -1,11 +1,37 @@
+/*
+ * 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.workflow.Workflow;
import at.asit.pdfover.gui.workflow.WorkflowState;
-
+/**
+ * Selects the data source for the signature process.
+ */
public class DataSourceSelectionState extends WorkflowState {
+ /**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(DataSourceSelectionState.class);
+
@Override
public void update(Workflow workflow) {
// TODO Auto-generated method stub
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
index a11364f2..162fb051 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
@@ -1,11 +1,37 @@
+/*
+ * 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.workflow.Workflow;
import at.asit.pdfover.gui.workflow.WorkflowState;
-
+/**
+ * Procduces the output of the signature process. (save file, open file)
+ */
public class OutputState extends WorkflowState {
+ /**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(OutputState.class);
+
@Override
public void update(Workflow workflow) {
// TODO Auto-generated method stub
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
index c2b31247..1d21aeca 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
@@ -1,11 +1,37 @@
+/*
+ * 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.workflow.Workflow;
import at.asit.pdfover.gui.workflow.WorkflowState;
-
+/**
+ * Decides where to position the signature block
+ */
public class PositioningState extends WorkflowState {
+ /**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(PositioningState.class);
+
@Override
public void update(Workflow workflow) {
// TODO Auto-generated method stub
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
index 31d8a604..3cde0e19 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
@@ -1,11 +1,39 @@
+/*
+ * 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.workflow.Workflow;
import at.asit.pdfover.gui.workflow.WorkflowState;
-
+/**
+ * Starting state of workflow proccess
+ *
+ * Reads configuration, command arguments and initializes configured variables
+ */
public class PrepareConfigurationState extends WorkflowState {
+ /**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(PrepareConfigurationState.class);
+
@Override
public void update(Workflow workflow) {
// TODO Auto-generated method stub
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
index ba6e7dc4..8f627dbf 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
@@ -1,11 +1,37 @@
+/*
+ * 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.workflow.Workflow;
import at.asit.pdfover.gui.workflow.WorkflowState;
-
+/**
+ * User waiting state, wait for PDF Signator library to prepare document for signing.
+ */
public class PrepareSigningState extends WorkflowState {
+ /**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(PrepareSigningState.class);
+
@Override
public void update(Workflow workflow) {
// TODO Auto-generated method stub
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
index ed54d82f..2e052552 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
@@ -1,11 +1,37 @@
+/*
+ * 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.workflow.Workflow;
import at.asit.pdfover.gui.workflow.WorkflowState;
-
+/**
+ * Logical state for signing process, usually show BKU Dialog during this state.
+ */
public class SigningState extends WorkflowState {
+ /**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(SigningState.class);
+
@Override
public void update(Workflow workflow) {
// TODO Auto-generated method stub
diff --git a/trunk/pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs b/trunk/pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000..5eb12533
--- /dev/null
+++ b/trunk/pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\n * Copyright 2012 by A-SIT, Secure Information Technology Center Austria\n *\n * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by\n * the European Commission - subsequent versions of the EUPL (the "Licence");\n * You may not use this work except in compliance with the Licence.\n * You may obtain a copy of the Licence at\:\n * http\://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the Licence for the specific language governing permissions and\n * limitations under the Licence.\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n// Imports\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="false" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n/**\n * SFL4J Logger instance\n**/\nprivate static final Logger log \= LoggerFactory.getLogger(${type_name}.class);\n\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/ByteArrayDocumentSource.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/ByteArrayDocumentSource.java
index 812ddc88..15ba76f2 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/ByteArrayDocumentSource.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/ByteArrayDocumentSource.java
@@ -1,5 +1,24 @@
+/*
+ * 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.signator;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.io.ByteArrayInputStream;
import java.io.InputStream;
@@ -9,6 +28,12 @@ import java.io.InputStream;
public class ByteArrayDocumentSource implements DocumentSource {
/**
+ * SFL4J Logger instance
+ **/
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(ByteArrayDocumentSource.class);
+
+ /**
* Document content
*/
protected byte[] data;
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/DocumentSource.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/DocumentSource.java
index 8b444020..931fab41 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/DocumentSource.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/DocumentSource.java
@@ -1,3 +1,18 @@
+/*
+ * 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.signator;
import java.io.InputStream;
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Emblem.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Emblem.java
index e86b7100..71f764d3 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Emblem.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Emblem.java
@@ -1,3 +1,18 @@
+/*
+ * 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.signator;
/**
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java
index 9b393e46..508c42c9 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java
@@ -1,3 +1,18 @@
+/*
+ * 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.signator;
/**
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLResponse.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLResponse.java
index 88adc117..98328c07 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLResponse.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLResponse.java
@@ -1,10 +1,34 @@
+/*
+ * 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.signator;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* Security Layer response
*/
public class SLResponse {
+ /**
+ * SFL4J Logger instance
+ **/
+ private static Logger log = LoggerFactory.getLogger(Signator.class);
+
private String response;
/**
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java
index 7a8d4d0d..1c0c5818 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java
@@ -1,3 +1,18 @@
+/*
+ * 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.signator;
import java.security.cert.X509Certificate;
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResultImpl.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResultImpl.java
index dc0986cf..a8f8b63a 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResultImpl.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResultImpl.java
@@ -1,12 +1,36 @@
+/*
+ * 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.signator;
import java.security.cert.X509Certificate;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* The result of a signature operation
*/
public class SignResultImpl implements SignResult {
+ /**
+ * SFL4J Logger instance
+ **/
+ private static Logger log = LoggerFactory.getLogger(Signator.class);
+
private SignaturePosition position;
private DocumentSource source;
private X509Certificate certificate;
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java
index 4ba0b981..05492d5e 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java
@@ -1,15 +1,34 @@
+/*
+ * 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.signator;
-import java.util.EnumMap;
-import java.util.Map;
+//Imports
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.EnumMap;
+import java.util.Map;
/**
* PDF Signator Interface
*/
public class Signator {
+ /**
+ * SFL4J Logger instance
+ **/
private static Logger log = LoggerFactory.getLogger(Signator.class);
/**
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureDimension.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureDimension.java
index 8d47cb19..c67af2c6 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureDimension.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureDimension.java
@@ -1,11 +1,35 @@
+/*
+ * 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.signator;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* The dimensions of the visible signature block
*/
public class SignatureDimension {
/**
+ * SFL4J Logger instance
+ **/
+ private static Logger log = LoggerFactory.getLogger(SignatureDimension.class);
+
+ /**
* The visible Signature block width
*/
protected int width;
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureException.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureException.java
index d41ba24d..80a8ed5c 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureException.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureException.java
@@ -1,11 +1,35 @@
+/*
+ * 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.signator;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* Base class for signature exceptions
*/
public class SignatureException extends Exception {
/**
+ * SFL4J Logger instance
+ **/
+ private static Logger log = LoggerFactory.getLogger(SignatureException.class);
+
+ /**
*
*/
private static final long serialVersionUID = 711578398780816710L;
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java
index 3fa9c7ce..1edb997b 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java
@@ -1,11 +1,35 @@
+/*
+ * 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.signator;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* The Signature Parameter
*/
public abstract class SignatureParameter {
/**
+ * SFL4J Logger instance
+ **/
+ private static Logger log = LoggerFactory.getLogger(SignatureParameter.class);
+
+ /**
* The Signature Position
* @uml.property name="signaturePosition"
* @uml.associationEnd
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignaturePosition.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignaturePosition.java
index 59fa4864..16aae296 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignaturePosition.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignaturePosition.java
@@ -1,10 +1,34 @@
+/*
+ * 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.signator;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Represents the position of a visible signature block
*/
public class SignaturePosition {
+
+ /**
+ * SFL4J Logger instance
+ **/
+ private static Logger log = LoggerFactory.getLogger(SignaturePosition.class);
+
/**
* The x value of the position
*/
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signer.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signer.java
index fd7bee09..3c04da53 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signer.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signer.java
@@ -1,3 +1,18 @@
+/*
+ * 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.signator;
/**
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java
index 6c0b6487..24b86300 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java
@@ -1,3 +1,18 @@
+/*
+ * 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.signator;
import at.asit.pdfover.signator.Signer;
diff --git a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java
index c1e82da3..02543d7a 100644
--- a/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java
+++ b/trunk/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java
@@ -1,3 +1,18 @@
+/*
+ * 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.signator;
/**
diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/.settings/org.eclipse.jdt.ui.prefs b/trunk/pdf-over-signer/pdf-over-sigpdfas/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000..4a2bd43a
--- /dev/null
+++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\n * Copyright 2012 by A-SIT, Secure Information Technology Center Austria\n *\n * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by\n * the European Commission - subsequent versions of the EUPL (the "Licence");\n * You may not use this work except in compliance with the Licence.\n * You may obtain a copy of the Licence at\:\n * http\://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the Licence for the specific language governing permissions and\n * limitations under the Licence.\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * \n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n// Imports\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="false" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n/**\n * SFL4J Logger instance\n**/\nprivate static final Logger log \= LoggerFactory.getLogger(${type_name}.class);\n\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/ByteArrayPDFASDataSource.java b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/ByteArrayPDFASDataSource.java
index 0fa23192..31e522db 100644
--- a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/ByteArrayPDFASDataSource.java
+++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/ByteArrayPDFASDataSource.java
@@ -1,14 +1,48 @@
+/*
+ * 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.signer.pdfas;
+//Imports
import java.io.ByteArrayInputStream;
import java.io.InputStream;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import at.gv.egiz.pdfas.api.io.DataSource;
+/**
+ * PDF - AS Specific Data Source with byte array representation
+ */
public class ByteArrayPDFASDataSource implements DataSource {
+ /**
+ * SFL4J Logger instance
+ **/
+ private static final Logger log = LoggerFactory.getLogger(ByteArrayPDFASDataSource.class);
+
+ /**
+ * Internal data byte array
+ */
private byte[] data;
+ /**
+ * Default constructor
+ * @param data The byte[] to be used
+ */
public ByteArrayPDFASDataSource(byte[] data) {
this.data = data;
}
diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASHelper.java b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASHelper.java
index 756478d3..00528762 100644
--- a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASHelper.java
+++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASHelper.java
@@ -1,5 +1,23 @@
+/*
+ * 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.signer.pdfas;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.signator.SignatureException;
import at.gv.egiz.pdfas.api.PdfAs;
import at.gv.egiz.pdfas.api.exceptions.PdfAsException;
@@ -7,11 +25,15 @@ import at.gv.egiz.pdfas.api.internal.PdfAsInternal;
/**
* Encapsulates PDF AS API Object to need just one initialization
- * @author afitzek
*/
public class PDFASHelper {
/**
+ * SFL4J Logger instance
+ **/
+ private static final Logger log = LoggerFactory.getLogger(PDFASHelper.class);
+
+ /**
* PDF AS Object
*/
private static PdfAs pdfAs = null;
diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSLRequest.java b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSLRequest.java
index 7130f53a..3c03a018 100644
--- a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSLRequest.java
+++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSLRequest.java
@@ -1,12 +1,43 @@
+/*
+ * 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.signer.pdfas;
+// Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import at.asit.pdfover.signator.DocumentSource;
import at.asit.pdfover.signator.SLRequest;
+/**
+ * PDF - AS Security Layer Request implementation
+ */
public class PDFASSLRequest implements SLRequest {
+ /**
+ * SFL4J Logger instance
+ **/
+ private static final Logger log = LoggerFactory.getLogger(PDFASSLRequest.class);
+
+ /**
+ * Default constructor
+ * @param slRequest
+ */
public PDFASSLRequest(String slRequest) {
- /// Analyze Request ...
+ //TODO: Analyze Request ...
}
@Override
diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSignerFactory.java b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSignerFactory.java
index eaf9637f..94c13412 100644
--- a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSignerFactory.java
+++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSignerFactory.java
@@ -1,10 +1,36 @@
+/*
+ * 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.signer.pdfas;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.signator.Signer;
import at.asit.pdfover.signator.SignerFactory;
+/**
+ * Factory class for PDF-AS Signer
+ */
public class PDFASSignerFactory extends SignerFactory {
+ /**
+ * SFL4J Logger instance
+ **/
+ private static final Logger log = LoggerFactory.getLogger(PDFASSignerFactory.class);
+
@Override
public Signer createSigner() {
return new PDFASSigner();
diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigningState.java b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigningState.java
index 8b8216c6..1d52a27f 100644
--- a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigningState.java
+++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigningState.java
@@ -1,5 +1,23 @@
+/*
+ * 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.signer.pdfas;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.signator.SLRequest;
import at.asit.pdfover.signator.SLResponse;
import at.asit.pdfover.signator.SigningState;
@@ -7,11 +25,15 @@ import at.gv.egiz.pdfas.api.sign.SignatureDetailInformation;
/**
* Signing State for PDFAS Wrapper
- * @author afitzek
*/
public class PDFASSigningState implements SigningState {
/**
+ * SFL4J Logger instance
+ **/
+ private static final Logger log = LoggerFactory.getLogger(PDFASSigningState.class);
+
+ /**
* The Signature Layer request
*/
protected SLRequest slrequest;
@@ -52,34 +74,67 @@ public class PDFASSigningState implements SigningState {
// PDF AS Specific stuff
// ----------------------------------------
+ /**
+ * signature detail information
+ */
protected SignatureDetailInformation signatureDetailInformation;
+ /**
+ * PDF - AS sign parameters
+ */
protected at.gv.egiz.pdfas.api.sign.SignParameters signParameters;
+ /**
+ * Signature parameters
+ */
protected PdfAsSignatureParameter pdfAsSignatureParameter;
+ /**
+ * Gets PDF - AS Signature Parameters
+ * @return PdfAsSignatureParameter
+ */
public PdfAsSignatureParameter getPdfAsSignatureParameter() {
- return pdfAsSignatureParameter;
+ return this.pdfAsSignatureParameter;
}
+ /**
+ * Sets PDF - AS Signature Parameters
+ * @param pdfAsSignatureParameter
+ */
public void setPdfAsSignatureParameter(
PdfAsSignatureParameter pdfAsSignatureParameter) {
this.pdfAsSignatureParameter = pdfAsSignatureParameter;
}
+ /**
+ * Get Sign Parameters
+ * @return SignParameters
+ */
public at.gv.egiz.pdfas.api.sign.SignParameters getSignParameters() {
- return signParameters;
+ return this.signParameters;
}
+ /**
+ * Sets sign Parameter
+ * @param signParameters
+ */
public void setSignParameters(
at.gv.egiz.pdfas.api.sign.SignParameters signParameters) {
this.signParameters = signParameters;
}
+ /**
+ * Gets the signature detail information
+ * @return SignatureDetailInformation
+ */
public SignatureDetailInformation getSignatureDetailInformation() {
- return signatureDetailInformation;
+ return this.signatureDetailInformation;
}
+ /**
+ * Sets the SignatureDetailInformation
+ * @param signatureDetailInformation
+ */
public void setSignatureDetailInformation(
SignatureDetailInformation signatureDetailInformation) {
this.signatureDetailInformation = signatureDetailInformation;
diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java
index 7332a13e..bd324e9f 100644
--- a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java
+++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java
@@ -1,23 +1,57 @@
+/*
+ * 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.signer.pdfas;
+//Imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.asit.pdfover.signator.SignatureDimension;
import at.asit.pdfover.signator.SignatureParameter;
import at.gv.egiz.pdfas.api.sign.pos.SignaturePositioning;
import at.gv.egiz.pdfas.api.io.DataSource;
+/**
+ * Implementation of SignatureParameter specific for PDF - AS Library
+ */
public class PdfAsSignatureParameter extends SignatureParameter {
+ /**
+ * SFL4J Logger instance
+ **/
+ private static final Logger log = LoggerFactory.getLogger(PdfAsSignatureParameter.class);
+
@Override
public SignatureDimension getPlaceholderDimension() {
// TODO Auto-generated method stub
return null;
}
+ /**
+ * Gets the PDFAS Positioning
+ * @return SignaturePositioning
+ */
public SignaturePositioning getPDFASPositioning() {
// TODO: implement Signature creation
return new SignaturePositioning();
}
+ /**
+ * Gets PDF - AS specific data source
+ * @return ByteArrayPDFASDataSource
+ */
public DataSource getPDFASDataSource() {
// TODO: implement Signature creation
return new ByteArrayPDFASDataSource(null);