From f34d3f0dc4bd88a8a54f5707a4f4fa3b845637a5 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 18:51:43 +0000 Subject: Added class templates Old class files edited to match templates Fixed missing comments git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@12 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../.settings/org.eclipse.jdt.ui.prefs | 3 +++ .../pdfover/signator/ByteArrayDocumentSource.java | 25 ++++++++++++++++++++++ .../at/asit/pdfover/signator/DocumentSource.java | 15 +++++++++++++ .../main/java/at/asit/pdfover/signator/Emblem.java | 15 +++++++++++++ .../java/at/asit/pdfover/signator/SLRequest.java | 15 +++++++++++++ .../java/at/asit/pdfover/signator/SLResponse.java | 24 +++++++++++++++++++++ .../java/at/asit/pdfover/signator/SignResult.java | 15 +++++++++++++ .../at/asit/pdfover/signator/SignResultImpl.java | 24 +++++++++++++++++++++ .../java/at/asit/pdfover/signator/Signator.java | 23 ++++++++++++++++++-- .../asit/pdfover/signator/SignatureDimension.java | 24 +++++++++++++++++++++ .../asit/pdfover/signator/SignatureException.java | 24 +++++++++++++++++++++ .../asit/pdfover/signator/SignatureParameter.java | 24 +++++++++++++++++++++ .../asit/pdfover/signator/SignaturePosition.java | 24 +++++++++++++++++++++ .../main/java/at/asit/pdfover/signator/Signer.java | 15 +++++++++++++ .../at/asit/pdfover/signator/SignerFactory.java | 15 +++++++++++++ .../at/asit/pdfover/signator/SigningState.java | 15 +++++++++++++ 16 files changed, 298 insertions(+), 2 deletions(-) create mode 100644 pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs (limited to 'pdf-over-signator') diff --git a/pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs b/pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..5eb12533 --- /dev/null +++ b/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= diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/ByteArrayDocumentSource.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/ByteArrayDocumentSource.java index 812ddc88..15ba76f2 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/ByteArrayDocumentSource.java +++ b/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; @@ -8,6 +27,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 */ diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/DocumentSource.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/DocumentSource.java index 8b444020..931fab41 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/DocumentSource.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Emblem.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Emblem.java index e86b7100..71f764d3 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Emblem.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java index 9b393e46..508c42c9 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLResponse.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLResponse.java index 88adc117..98328c07 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLResponse.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java index 7a8d4d0d..1c0c5818 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResultImpl.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResultImpl.java index dc0986cf..a8f8b63a 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResultImpl.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java index 4ba0b981..05492d5e 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureDimension.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureDimension.java index 8d47cb19..c67af2c6 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureDimension.java +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureDimension.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; + /** * 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 */ diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureException.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureException.java index d41ba24d..80a8ed5c 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureException.java +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureException.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; + /** * Base class for signature exceptions */ public class SignatureException extends Exception { + /** + * SFL4J Logger instance + **/ + private static Logger log = LoggerFactory.getLogger(SignatureException.class); + /** * */ diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java index 3fa9c7ce..1edb997b 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.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; + /** * 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" diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignaturePosition.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignaturePosition.java index 59fa4864..16aae296 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignaturePosition.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signer.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signer.java index fd7bee09..3c04da53 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signer.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java index 6c0b6487..24b86300 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java +++ b/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/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java index c1e82da3..02543d7a 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java +++ b/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; /** -- cgit v1.2.3