aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2013-01-09 15:41:29 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2013-01-09 15:41:29 +0000
commit535a04fa05f739ec16dd81666e3b0f82dfbd442d (patch)
tree0804f301c1a9ceb303a8441b7b29244fc8eb7ff0 /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions
parent1efaf6fd5619dfa95c9d7e8c71eda4c2ffba4998 (diff)
downloadpdf-as-3-535a04fa05f739ec16dd81666e3b0f82dfbd442d.tar.gz
pdf-as-3-535a04fa05f739ec16dd81666e3b0f82dfbd442d.tar.bz2
pdf-as-3-535a04fa05f739ec16dd81666e3b0f82dfbd442d.zip
pdf-as-lib maven project files moved to pdf-as-lib
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/pdf-as/trunk@926 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java101
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCodeHelper.java119
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/external/ExternalErrorException.java66
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/CorrectorException.java56
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/PlaceholderExtractionException.java79
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/SignatorException.java60
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/VerificationFilterException.java60
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/VerificatorFactoryException.java69
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/pdf/CaptionNotFoundException.java75
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/pdf/KZSettingNotFoundException.java47
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/web/SessionExpiredException.java68
11 files changed, 800 insertions, 0 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java
new file mode 100644
index 0000000..df321df
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java
@@ -0,0 +1,101 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions;
+
+/**
+ * Contains constants for the error codes.
+ *
+ * <p>
+ * In Java 1.5 this would be an enum.
+ * </p>
+ *
+ * @author wprinz
+ */
+public final class ErrorCode
+{
+ public static final int EXTERNAL_ERROR = 0;
+ public static final int UNKNOWN_ERROR = 6;
+ public static final int OUT_OF_MEMORY_ERROR = 7;
+
+ public static final int SETTING_NOT_FOUND = 100;
+ public static final int SETTINGS_EXCEPTION = 101;
+ public static final int KZ_SETTING_NOT_FOUND = 102;
+ public static final int NO_EMBEDABLE_TTF_CONFIGURED_FOR_PDFA = 103;
+ public static final int INVALID_SIGNATURE_LAYOUT_IMPL_CONFIGURED = 104;
+ public static final int MISSING_HEADER_SERVER_USER_AGENT = 105;
+
+ public static final int DOCUMENT_CANNOT_BE_READ = 201;
+ public static final int TEXT_EXTRACTION_EXCEPTION = 202;
+ public static final int CANNOT_WRITE_PDF = 205;
+ public static final int DOCUMENT_NOT_SIGNED = 206;
+ public static final int SIGNATURE_TYPES_EXCEPTION = 223;
+ public static final int FONT_NOT_FOUND = 230;
+ public static final int DOCUMENT_IS_PROTECTED = 231;
+ public static final int INVALID_SIGNATURE_DICTIONARY = 232;
+//23.11.2010 changed by exthex - added error code for failed extraction
+ public static final int SIGNATURE_PLACEHOLDER_EXTRACTION_FAILED = 233;
+
+ public static final int INVALID_SIGNATURE_POSITION = 224;
+
+ public static final int SIGNATURE_COULDNT_BE_CREATED = 300;
+ public static final int SIGNED_TEXT_EMPTY = 301;
+ public static final int PROFILE_NOT_DEFINED = 302;
+ public static final int SERIAL_NUMBER_INVALID = 303;
+ public static final int SIG_CERTIFICATE_CANNOT_BE_READ = 304;
+ public static final int PROFILE_NOT_USABLE_FOR_TEXT = 305;
+
+ public static final int COULDNT_VERIFY = 310;
+
+ public static final int CERTIFICATE_NOT_FOUND = 313;
+ public static final int NOT_SEMANTICALLY_EQUAL = 314;
+
+ public static final int MODIFIED_AFTER_SIGNATION = 316;
+ public static final int NON_BINARY_SIGNATURES_PRESENT = 317;
+
+ public static final int UNSUPPORTED_REPLACES_NAME = 318;
+ public static final int UNSUPPORTED_SIGNATURE = 319;
+
+ public static final int DETACHED_SIGNATURE_NOT_SUPPORTED = 370;
+
+ public static final int SIGNATURE_VERIFICATION_NOT_SUPPORTED = 371;
+ public static final int INVALID_SIGNING_TIME = 372;
+
+ public static final int BKU_NOT_SUPPORTED = 373;
+
+ public static final int WEB_EXCEPTION = 330;
+ public static final int UNABLE_TO_RECEIVE_SUITABLE_RESPONSE = 340;
+
+
+ public static final int NORMALIZER_EXCEPTION = 400;
+
+ public static final int SESSION_EXPIRED = 600;
+
+ public static final int PLACEHOLDER_EXCEPTION = 700;
+ public static final int CAPTION_NOT_FOUND_EXCEPTION = 701;
+
+ public static final int UNABLE_TO_PARSE_ID = 800;
+ public static final int CORRECTOR_EXCEPTION = 801;
+ public static final int EXTERNAL_CORRECTOR_TIMEOUT_REACHED = 802;
+
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCodeHelper.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCodeHelper.java
new file mode 100644
index 0000000..25644cd
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCodeHelper.java
@@ -0,0 +1,119 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import at.gv.egiz.pdfas.api.exceptions.PdfAsException;
+import at.gv.egiz.pdfas.exceptions.external.ExternalErrorException;
+import at.gv.egiz.pdfas.exceptions.pdf.CaptionNotFoundException;
+import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
+import at.knowcenter.wag.egov.egiz.exceptions.PlaceholderException;
+import at.knowcenter.wag.egov.egiz.exceptions.SettingNotFoundException;
+import at.knowcenter.wag.egov.egiz.exceptions.SettingsException;
+
+/**
+ * @author wprinz
+ *
+ */
+public class ErrorCodeHelper
+{
+ /**
+ * The log.
+ */
+ private static final Log log = LogFactory.getLog(ErrorCodeHelper.class);
+
+ public static String getMessageForErrorCode(int errorCode)
+ {
+ try
+ {
+ SettingsReader settings = SettingsReader.getInstance();
+ String message = settings.getSetting("error.code." + errorCode);
+ return message;
+ }
+ catch (SettingsException e)
+ {
+ log.warn(e.getMessage(), e);
+ }
+ catch (SettingNotFoundException e)
+ {
+ log.warn(e.getMessage(), e);
+ }
+ return null;
+ }
+
+ /**
+ * Forms a speaking textual error message for the given PdfAsException.
+ *
+ * @param e
+ * The PdfAsException to be formed into a speaking text.
+ * @return Returns the speaking error message explaining the PdfAsException.
+ */
+ public static String formErrorMessage(PdfAsException e)
+ {
+ String message = "Fehler " + e.getErrorCode() + ":";
+
+ if (e.getErrorCode() == ErrorCode.PLACEHOLDER_EXCEPTION)
+ {
+ PlaceholderException phe = null;
+ if (e instanceof PlaceholderException)
+ {
+ phe = (PlaceholderException) e;
+ }
+ else
+ {
+ phe = (PlaceholderException) e.getCause();
+ }
+
+ message += " Der Platzhalter des Feldes " + phe.getField() + " ist um " + phe.getMissing() + " Bytes zu kurz.";
+ }
+
+ if (e.getErrorCode() == ErrorCode.CAPTION_NOT_FOUND_EXCEPTION)
+ {
+ CaptionNotFoundException cnfe = null;
+ if (e instanceof CaptionNotFoundException)
+ {
+ cnfe = (CaptionNotFoundException)e;
+ }
+ else
+ {
+ cnfe = (CaptionNotFoundException)e.getCause();
+ }
+
+ message += " Die Überschrift (Caption/Label) \"" + cnfe.getCaption() + "\" wurde nicht wiedergefunden.";
+ }
+
+ message += " " + ErrorCodeHelper.getMessageForErrorCode(e.getErrorCode());
+
+ if (e instanceof ExternalErrorException)
+ {
+ ExternalErrorException eee = (ExternalErrorException) e;
+ message += " Externer Fehlergrund: " + eee.getExternalErrorCode() + ": " + eee.getExternalErrorMessage();
+ }
+
+ return message;
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/external/ExternalErrorException.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/external/ExternalErrorException.java
new file mode 100644
index 0000000..56ae6b8
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/external/ExternalErrorException.java
@@ -0,0 +1,66 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions.external;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
+
+public class ExternalErrorException extends ConnectorException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = 2108427722915583885L;
+
+ protected String externalErrorCode;
+
+ protected String externalErrorMessage;
+
+ public ExternalErrorException(String externalErrorCode, String externalErrorMessage)
+ {
+ super(ErrorCode.EXTERNAL_ERROR, "External Error " + externalErrorCode + ": " + externalErrorMessage);
+
+ this.externalErrorCode = externalErrorCode;
+ this.externalErrorMessage = externalErrorMessage;
+ }
+
+ /**
+ * @return the externalErrorCode
+ */
+ public String getExternalErrorCode()
+ {
+ return externalErrorCode;
+ }
+
+ /**
+ * @return the externalErrorMessage
+ */
+ public String getExternalErrorMessage()
+ {
+ return externalErrorMessage;
+ }
+
+
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/CorrectorException.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/CorrectorException.java
new file mode 100644
index 0000000..ed2329f
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/CorrectorException.java
@@ -0,0 +1,56 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions.framework;
+
+import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
+
+/**
+ * Exceptions thrown by Correctors.
+ *
+ * @author wprinz
+ *
+ */
+public class CorrectorException extends PresentableException
+{
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -8646964226476111797L;
+
+ public CorrectorException(int errorCode, String message, Throwable cause)
+ {
+ super(errorCode, message, cause);
+ }
+
+ public CorrectorException(int errorCode, String message)
+ {
+ super(errorCode, message);
+ }
+
+ public CorrectorException(int errorCode, Throwable cause)
+ {
+ super(errorCode, cause);
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/PlaceholderExtractionException.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/PlaceholderExtractionException.java
new file mode 100644
index 0000000..62792c8
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/PlaceholderExtractionException.java
@@ -0,0 +1,79 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions.framework;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
+
+/**
+ * Exceptions thrown if STRICT matching mode for placeholder extraction is set and no placeholder could be found.
+ *
+ * @author exthex
+ *
+ */
+public class PlaceholderExtractionException extends PresentableException
+{
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Constructor.
+ *
+ * @param errorCode the error code
+ * @param message the additional message
+ * @param cause the causing exception
+ *
+ * @see ErrorCode#SIGNATURE_PLACEHOLDER_EXTRACTION_FAILED
+ */
+ public PlaceholderExtractionException(int errorCode, String message, Throwable cause)
+ {
+ super(errorCode, message, cause);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param errorCode the error code
+ * @param message the additional message
+ *
+ * @see ErrorCode#SIGNATURE_PLACEHOLDER_EXTRACTION_FAILED
+ */
+ public PlaceholderExtractionException(int errorCode, String message)
+ {
+ super(errorCode, message);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param errorCode the error code
+ * @param cause the causing exception
+ *
+ * @see ErrorCode#SIGNATURE_PLACEHOLDER_EXTRACTION_FAILED
+ */
+ public PlaceholderExtractionException(int errorCode, Throwable cause)
+ {
+ super(errorCode, cause);
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/SignatorException.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/SignatorException.java
new file mode 100644
index 0000000..0e819eb
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/SignatorException.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions.framework;
+
+import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
+
+
+/**
+ * Exception thrown by the Signators.
+ * @author wprinz
+ */
+public class SignatorException extends PresentableException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = 5051232904560832089L;
+
+ public SignatorException(int error_code, String message, Throwable cause)
+ {
+ super(error_code, message, cause);
+ }
+
+ public SignatorException(int error_code, String message)
+ {
+ super(error_code, message);
+ }
+
+ public SignatorException(int error_code, Throwable cause)
+ {
+ super(error_code, cause);
+ }
+
+ public SignatorException(PresentableException pe)
+ {
+ super(pe.getErrorCode(), pe);
+ }
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/VerificationFilterException.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/VerificationFilterException.java
new file mode 100644
index 0000000..92ef04d
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/VerificationFilterException.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions.framework;
+
+import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
+
+/**
+ * Wrapper exception for the VerificationFilter.
+ *
+ * @author wprinz
+ */
+public class VerificationFilterException extends PresentableException
+{
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -3863253910537746742L;
+
+ public VerificationFilterException(int errorCode, String message, Throwable cause)
+ {
+ super(errorCode, message, cause);
+ }
+
+ public VerificationFilterException(int errorCode, String message)
+ {
+ super(errorCode, message);
+ }
+
+ public VerificationFilterException(int errorCode, Throwable cause)
+ {
+ super(errorCode, cause);
+ }
+
+ public VerificationFilterException(PresentableException cause)
+ {
+ super(cause.getErrorCode(), cause);
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/VerificatorFactoryException.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/VerificatorFactoryException.java
new file mode 100644
index 0000000..93d26cc
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/framework/VerificatorFactoryException.java
@@ -0,0 +1,69 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions.framework;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
+
+/**
+ * @author wprinz
+ *
+ */
+public class VerificatorFactoryException extends PresentableException
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8765156531863056335L;
+
+ /**
+ * @param errorCode
+ * @param message
+ */
+ public VerificatorFactoryException(String message)
+ {
+ super(ErrorCode.COULDNT_VERIFY, message);
+ }
+
+ /**
+ * @param errorCode
+ * @param message
+ * @param cause
+ */
+ public VerificatorFactoryException(String message, Throwable cause)
+ {
+ super(ErrorCode.COULDNT_VERIFY, message, cause);
+ }
+
+ /**
+ * @param errorCode
+ * @param cause
+ */
+ public VerificatorFactoryException(Throwable cause)
+ {
+ super(ErrorCode.COULDNT_VERIFY, cause);
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/pdf/CaptionNotFoundException.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/pdf/CaptionNotFoundException.java
new file mode 100644
index 0000000..9a89269
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/pdf/CaptionNotFoundException.java
@@ -0,0 +1,75 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions.pdf;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+import at.knowcenter.wag.egov.egiz.exceptions.PDFDocumentException;
+
+/**
+ * Exception thrown when a caption ("label") is not found in the content stream
+ * when determining the placeholders.
+ *
+ * <p>
+ * This usually happens when the space for a caption is too small. Then the
+ * caption is wrapped into two lines and usually the separating whitespace is
+ * lost thus the BinarySignature is unable to find the caption String.
+ * </p>
+ *
+ * @author wprinz
+ */
+public class CaptionNotFoundException extends PDFDocumentException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -8959043531007857665L;
+
+ /**
+ * The problematic caption.
+ */
+ protected String caption = null;
+
+ /**
+ * Constructor.
+ *
+ * @param caption
+ * The problematic caption.
+ */
+ public CaptionNotFoundException(String caption)
+ {
+ super(ErrorCode.CAPTION_NOT_FOUND_EXCEPTION, "Caption not found in content stream. caption = " + caption);
+ this.caption = caption;
+ }
+
+ /**
+ * Returns the problematic caption.
+ *
+ * @return Returns the problematic caption.
+ */
+ public String getCaption()
+ {
+ return this.caption;
+ }
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/pdf/KZSettingNotFoundException.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/pdf/KZSettingNotFoundException.java
new file mode 100644
index 0000000..81e52be
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/pdf/KZSettingNotFoundException.java
@@ -0,0 +1,47 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions.pdf;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+import at.knowcenter.wag.egov.egiz.exceptions.SettingNotFoundException;
+
+/**
+ * @author wprinz
+ *
+ */
+public class KZSettingNotFoundException extends SettingNotFoundException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = 2516636821733440462L;
+
+ public KZSettingNotFoundException(String message)
+ {
+ super(ErrorCode.KZ_SETTING_NOT_FOUND, message);
+ }
+
+
+}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/web/SessionExpiredException.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/web/SessionExpiredException.java
new file mode 100644
index 0000000..d19ae8a
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/exceptions/web/SessionExpiredException.java
@@ -0,0 +1,68 @@
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * 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://www.osor.eu/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.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.exceptions.web;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
+
+/**
+ * @author wprinz
+ *
+ */
+public class SessionExpiredException extends PresentableException
+{
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -1877790545371341233L;
+
+ /**
+ * @param errorCode
+ * @param message
+ */
+ public SessionExpiredException(String message)
+ {
+ super(ErrorCode.SESSION_EXPIRED, message);
+ }
+
+ /**
+ * @param errorCode
+ * @param message
+ * @param cause
+ */
+ public SessionExpiredException(String message, Throwable cause)
+ {
+ super(ErrorCode.SESSION_EXPIRED, message, cause);
+ }
+
+ /**
+ * @param errorCode
+ * @param cause
+ */
+ public SessionExpiredException(Throwable cause)
+ {
+ super(ErrorCode.SESSION_EXPIRED, cause);
+ }
+
+}