aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions')
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ConnectorException.java72
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ConnectorFactoryException.java74
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ErrorCodeException.java318
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/InvalidIDException.java55
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/NormalizeException.java62
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/OutOfMemoryException.java42
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PDFDocumentException.java70
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PlaceholderException.java66
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PresentableException.java68
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingNotFoundException.java77
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingsException.java74
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatorFactoryException.java47
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatureException.java79
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatureTypesException.java75
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/WebException.java72
15 files changed, 1251 insertions, 0 deletions
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ConnectorException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ConnectorException.java
new file mode 100644
index 0000000..9969056
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ConnectorException.java
@@ -0,0 +1,72 @@
+/**
+ * <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.knowcenter.wag.egov.egiz.exceptions;
+
+/**
+ * This exception is thrown when a Connector encounters an exception during sign
+ * or verify.
+ *
+ * @author wprinz
+ */
+public class ConnectorException extends PresentableException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = 4321130695505581234L;
+
+ /**
+ * @param error_code
+ * @param message
+ * @param cause
+ */
+ public ConnectorException(int error_code, String message, Throwable cause)
+ {
+ super(error_code, message, cause);
+ }
+
+ /**
+ * @param error_code
+ * @param message
+ */
+ public ConnectorException(int error_code, String message)
+ {
+ super(error_code, message);
+ }
+
+ /**
+ * @param error_code
+ * @param cause
+ */
+ public ConnectorException(int error_code, Throwable cause)
+ {
+ super(error_code, cause);
+ }
+
+ public ConnectorException(PresentableException cause)
+ {
+ super(cause.getErrorCode(), cause);
+ }
+}
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ConnectorFactoryException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ConnectorFactoryException.java
new file mode 100644
index 0000000..eb90c5e
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ConnectorFactoryException.java
@@ -0,0 +1,74 @@
+/**
+ * <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.
+ *
+ * $Id: ConnectorFactoryException.java,v 1.2 2006/08/25 17:10:34 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+
+/**
+ * This exception is thrown when the connector factory encounters an error
+ * during providing a connector.
+ *
+ * <p>
+ * The most likely case for this exception is that a wrong connector identifier
+ * was provided.
+ * </p>
+ *
+ * @author wprinz
+ */
+public class ConnectorFactoryException extends PresentableException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -1398538795243257880L;
+
+ /**
+ * @param message
+ */
+ public ConnectorFactoryException(String message)
+ {
+ super(ErrorCode.SETTINGS_EXCEPTION, message);
+ }
+
+// /**
+// * @param message
+// * @param cause
+// */
+// public ConnectorFactoryException(String message, Throwable cause)
+// {
+// super(message, cause);
+// }
+
+ /**
+ * @param cause
+ */
+ public ConnectorFactoryException(Throwable cause)
+ {
+ super(ErrorCode.SETTINGS_EXCEPTION, cause);
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ErrorCodeException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ErrorCodeException.java
new file mode 100644
index 0000000..dc35582
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/ErrorCodeException.java
@@ -0,0 +1,318 @@
+/**
+ * <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.
+ *
+ * $Id: ErrorCodeException.java,v 1.1 2006/08/03 07:47:02 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import org.apache.log4j.Logger;
+
+import at.knowcenter.wag.egov.egiz.cfg.ConfigLogger;
+import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
+
+/**
+ * This exception should be inherit, if an exception should be shown as a
+ * feedback message in user interfaces.
+ *
+ * <p>
+ * The error code is an integer number. The error codes are defined in an
+ * separate configuration file, readed be the SettingsReader. If the
+ * SettingsReader can not initialized, a corresponding error message can not
+ * read!
+ * </p>
+ * <p>
+ * The error code can be seen a a replacement of the exception message. For all
+ * intents and purposes, the error code should be used to provide exceptional
+ * feedback to the user. Nevertheless, if possible, a debug message String (the
+ * message parameter) should still be provided giving in depth developer
+ * descriptions of the problem. These message strings will then show up in the
+ * log files accordingly.
+ * </p>
+ *
+ * @author wlackner
+ * @author wprinz (enforced error code)
+ *
+ * @deprecated
+ *
+ * @see at.knowcenter.wag.egov.egiz.cfg.SettingsReader
+ */
+public class ErrorCodeException extends PresentableException
+{
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = 2071967845179686593L;
+
+ /**
+ * Template key getting error messages
+ */
+ private static final String ERROR_CODE_KEY = "error.code.";
+
+ /**
+ * The default error message
+ */
+ private static final String DEFAULT_ERROR_MESSAGE = "Fehler Code:";
+
+ /**
+ * The logger definition.
+ */
+ private static final Logger logger_ = ConfigLogger.getLogger(ErrorCodeException.class);
+
+ /**
+ * The SettingsReader instance
+ */
+ private SettingsReader settings_ = null;
+
+ /**
+ * The default error code
+ */
+ private int error_code_ = -1;
+
+ /**
+ * If an external application is called
+ */
+ private String externalErrorCode_ = null;
+
+ /**
+ * If an external application is called
+ */
+ private String externalErrorMessage_ = null;
+
+ /**
+ * Constructor that sets the error code.
+ *
+ * @param error_code
+ * The error code.
+ */
+ public ErrorCodeException(final int error_code)
+ {
+ super(error_code, "just an error code");
+ this.error_code_ = error_code;
+ loadSettings();
+ }
+
+ /**
+ * Inherit Constructor from Exception,
+ *
+ * @param error_code
+ * The error code.
+ * @param message
+ * The in depth developer provided error message.
+ * @see Exception
+ */
+ public ErrorCodeException(final int error_code, String message)
+ {
+ super(error_code, message);
+ this.error_code_ = error_code;
+ loadSettings();
+ }
+
+ /**
+ * Inherit Constructor from Exception,
+ *
+ * @param error_code
+ * The error code.
+ * @param message
+ * The in depth developer provided error message.
+ * @param cause
+ * The cause of this exception.
+ * @see Exception
+ */
+ public ErrorCodeException(final int error_code, String message, Throwable cause)
+ {
+ super(error_code, message, cause);
+ this.error_code_ = error_code;
+ loadSettings();
+ }
+
+ /**
+ * Inherit Constructor from Exception,
+ *
+ * @param error_code
+ * The error code.
+ * @param cause
+ * The cause of this exception.
+ * @see Exception
+ */
+ public ErrorCodeException(final int error_code, Throwable cause)
+ {
+ super(error_code, cause);
+ this.error_code_ = error_code;
+ loadSettings();
+ }
+
+ /**
+ * Load the settings file. Call the SettingsReader instance.
+ */
+ private void loadSettings()
+ {
+ if (settings_ == null)
+ {
+ try
+ {
+ settings_ = SettingsReader.getInstance();
+ }
+ catch (SettingsException e)
+ {
+ String log_message = "Can not load pdf signature settings. Cause:\n" + e.getMessage();
+ logger_.error(log_message, e);
+ }
+ }
+ }
+
+ /**
+ * Return the manually stored error code. The error code is only a key for a
+ * configurable error message. The error code and its corresponding message
+ * have to be declared in an separate property file, loaded by the
+ * SettingsReader
+ *
+ * @see at.knowcenter.wag.egov.egiz.cfg.SettingsReader
+ * @return Returns the errorCode.
+ */
+ public int getErrorCode()
+ {
+ return this.error_code_;
+ }
+
+ /**
+ * Set a special error code in case of commuicating this error in an user
+ * interface. The error code is only a key for a configurable error message.
+ * The error code and its corresponding message have to be declared in an
+ * separate property file, loaded by the SettingsReader
+ *
+ * @see at.knowcenter.wag.egov.egiz.cfg.SettingsReader
+ * @param error_code
+ * The error code to be set.
+ */
+ public void setErrorCode(final int error_code)
+ {
+ this.error_code_ = error_code;
+ }
+
+ /**
+ * Set a special error code in case of commuicating this error in an user
+ * interface. The error code is a key for an external application error
+ * message. The error code and its corresponding message have to be declared
+ * by the external tool that used.
+ *
+ * @param errorCode
+ * The errorCode to set.
+ */
+ public void setExternalErrorCode(String errorCode)
+ {
+ externalErrorCode_ = errorCode;
+ }
+
+ /**
+ * Returns an external error code that is set manually
+ *
+ * @return the external error code if set, <code>null</code> otherwise
+ */
+ public String getExternalErrorCode()
+ {
+ return externalErrorCode_;
+ }
+
+ /**
+ * Set a special error message in case of commuicating this error in an user
+ * interface. The error message and its corresponding error code have to be
+ * declared by the external tool that used.
+ *
+ * @param errorMessage
+ */
+ public void setExternalErrorMessage(String errorMessage)
+ {
+ externalErrorMessage_ = errorMessage;
+ }
+
+ /**
+ * Returns an external error message that is set manually
+ *
+ * @return the external error message if set, <code>null</code> otherwise
+ */
+ public String getExternalErrorMessage()
+ {
+ return externalErrorMessage_;
+ }
+
+ /**
+ * Checks if an external error message is set.
+ *
+ * @return returns <code>true</code> if a message is set, <code>false</code>
+ * otherwise
+ */
+ public boolean hasExternalErrorMessage()
+ {
+ return (externalErrorMessage_ != null);
+ }
+
+ /**
+ * Get the configured error message that corresponds to the error code. If the
+ * config file can't be read, or an error code is not declared in the config
+ * file, the default error message would be returned.
+ *
+ * @return an error message that can be used for ui communication
+ */
+ public String getErrorCodeMessage()
+ {
+ String err_msg = null;
+ if (settings_ != null)
+ {
+ err_msg = settings_.getSetting(ERROR_CODE_KEY + error_code_, DEFAULT_ERROR_MESSAGE + error_code_);
+ }
+ return err_msg;
+ }
+
+ /**
+ * Get the configured error message that corresponds to the given error code.
+ * If the config file can't be read, or an error code is not declared in the
+ * config file, the default error message would be returned.
+ *
+ * @return an error message that can be used for ui communication
+ */
+ public static String getErrorCodeMessage(int errorCode)
+ {
+ SettingsReader settings = null;
+ String err_msg = DEFAULT_ERROR_MESSAGE + errorCode;
+ try
+ {
+ settings = SettingsReader.getInstance();
+ err_msg = settings.getSetting(ERROR_CODE_KEY + errorCode, DEFAULT_ERROR_MESSAGE + errorCode);
+ }
+ catch (SettingsException e)
+ {
+ logger_.error(e.getMessage(), e);
+ }
+ return err_msg;
+ }
+
+ /**
+ * Checks if the exception has an ErrorCode state.
+ *
+ * @return true if an ErrorCode does exist false otherwise
+ */
+ public boolean hasErrorCode()
+ {
+ return error_code_ != 0;
+ }
+} \ No newline at end of file
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/InvalidIDException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/InvalidIDException.java
new file mode 100644
index 0000000..ae3a2f8
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/InvalidIDException.java
@@ -0,0 +1,55 @@
+/**
+ * <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.
+ *
+ * $Id: InvalidIDException.java,v 1.1 2006/08/25 17:10:34 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+/**
+ * Thrown when parsing an ID ("Kennzeichnung") fails.
+ * @author wprinz
+ */
+public class InvalidIDException extends SignatureException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -7945398356854048254L;
+
+ public InvalidIDException(int error_code, String message, Throwable cause)
+ {
+ super(error_code, message, cause);
+ }
+
+ public InvalidIDException(int error_code, String message)
+ {
+ super(error_code, message);
+ }
+
+ public InvalidIDException(int error_code, Throwable cause)
+ {
+ super(error_code, cause);
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/NormalizeException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/NormalizeException.java
new file mode 100644
index 0000000..0f8f145
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/NormalizeException.java
@@ -0,0 +1,62 @@
+/**
+ * <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.
+ *
+ * $Id: NormalizeException.java,v 1.1 2006/08/03 07:47:02 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+
+
+/**
+ * This exception is thrown by the processing a normalizer.
+ *
+ * @author wlackner
+ */
+public class NormalizeException extends PresentableException {
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -4080682145462891501L;
+
+ /**
+ * @param error_code
+ * @param message
+ * @param cause
+ */
+ public NormalizeException(String message, Throwable cause)
+ {
+ super(ErrorCode.NORMALIZER_EXCEPTION, message, cause);
+ }
+
+ /**
+ * @param error_code
+ * @param message
+ */
+ public NormalizeException(String message)
+ {
+ super(ErrorCode.NORMALIZER_EXCEPTION, message);
+ }
+
+} \ No newline at end of file
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/OutOfMemoryException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/OutOfMemoryException.java
new file mode 100644
index 0000000..ec2ccb3
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/OutOfMemoryException.java
@@ -0,0 +1,42 @@
+/**
+ * <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.knowcenter.wag.egov.egiz.exceptions;
+
+public class OutOfMemoryException extends PresentableException {
+
+ private static final long serialVersionUID = 1L;
+
+ public OutOfMemoryException(int errorCode, String message, Throwable cause) {
+ super(errorCode, message, cause);
+ }
+
+ public OutOfMemoryException(int errorCode, String message) {
+ super(errorCode, message);
+ }
+
+ public OutOfMemoryException(int errorCode, Throwable cause) {
+ super(errorCode, cause);
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PDFDocumentException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PDFDocumentException.java
new file mode 100644
index 0000000..7fb4c8d
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PDFDocumentException.java
@@ -0,0 +1,70 @@
+/**
+ * <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.
+ *
+ * $Id: PDFDocumentException.java,v 1.1 2006/08/03 07:47:02 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+/**
+ * This exception is thrown in case of problems using pdf librarys.
+ *
+ * @author wlackner
+ */
+public class PDFDocumentException extends PresentableException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -4595955288382226408L;
+
+ /**
+ * @param error_code
+ * @param message
+ * @param cause
+ */
+ public PDFDocumentException(int error_code, String message, Throwable cause)
+ {
+ super(error_code, message, cause);
+ }
+
+ /**
+ * @param error_code
+ * @param message
+ */
+ public PDFDocumentException(int error_code, String message)
+ {
+ super(error_code, message);
+ }
+
+ /**
+ * @param error_code
+ * @param cause
+ */
+ public PDFDocumentException(int error_code, Throwable cause)
+ {
+ super(error_code, cause);
+ }
+
+
+} \ No newline at end of file
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PlaceholderException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PlaceholderException.java
new file mode 100644
index 0000000..5697edc
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PlaceholderException.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.
+ *
+ * $Id: PlaceholderException.java,v 1.1 2006/08/25 17:10:34 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+
+/**
+ * @author wprinz
+ */
+public class PlaceholderException extends PDFDocumentException
+{
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -9149805408421810170L;
+
+
+ protected String field = null;
+ protected int missing = -1;
+
+ public PlaceholderException(String field, int missing)
+ {
+ super(ErrorCode.PLACEHOLDER_EXCEPTION, field + ":" + missing);
+
+ this.field = field;
+ this.missing = missing;
+ }
+
+ public void setField (String field)
+ {
+ this.field = field;
+ }
+
+ public String getField()
+ {
+ return this.field;
+ }
+
+ public int getMissing()
+ {
+ return this.missing;
+ }
+}
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PresentableException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PresentableException.java
new file mode 100644
index 0000000..40d7181
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/PresentableException.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.
+ *
+ * $Id: PresentableException.java,v 1.2 2006/08/25 17:10:34 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import at.gv.egiz.pdfas.api.exceptions.PdfAsException;
+
+/**
+ * This exception should be the base for all exceptions that are to be presented
+ * to the user.
+ *
+ * <p>
+ * For example, exceptions that signal that a pdf file is corrupt should be
+ * represented as presentable exceptions so that the user interface frontends
+ * can present according texts.
+ * </p>
+ *
+ * @see PdfAsException
+ *
+ * @author wprinz
+ */
+public class PresentableException extends PdfAsException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -102406558526000792L;
+
+ public PresentableException(int errorCode, String message, Throwable cause)
+ {
+ super(errorCode, message, cause);
+ }
+
+ public PresentableException(int errorCode, String message)
+ {
+ super(errorCode, message);
+ }
+
+ public PresentableException(int errorCode, Throwable cause)
+ {
+ super(errorCode, cause);
+ }
+
+
+}
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingNotFoundException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingNotFoundException.java
new file mode 100644
index 0000000..6c140eb
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingNotFoundException.java
@@ -0,0 +1,77 @@
+/**
+ * <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.
+ *
+ * $Id: SettingNotFoundException.java,v 1.1 2006/08/03 07:47:03 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+
+/**
+ * This exception is thrown by the SettingsReader if a property key is not
+ * found.
+ *
+ * @author wlackner
+ */
+public class SettingNotFoundException extends PresentableException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -7502191288775676006L;
+
+ /**
+ * @param error_code
+ * @param message
+ * @param cause
+ */
+ public SettingNotFoundException(String message, Throwable cause)
+ {
+ super(ErrorCode.SETTING_NOT_FOUND, message, cause);
+ }
+
+ /**
+ * @param error_code
+ * @param message
+ */
+ public SettingNotFoundException(String message)
+ {
+ super(ErrorCode.SETTING_NOT_FOUND, message);
+ }
+
+ /**
+ * @param error_code
+ * @param cause
+ */
+ public SettingNotFoundException(Throwable cause)
+ {
+ super(ErrorCode.SETTING_NOT_FOUND, cause);
+ }
+
+ protected SettingNotFoundException(int errorCode, String message)
+ {
+ super(errorCode, message);
+ }
+
+} \ No newline at end of file
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingsException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingsException.java
new file mode 100644
index 0000000..a43de6a
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingsException.java
@@ -0,0 +1,74 @@
+/**
+ * <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.
+ *
+ * $Id: SettingsException.java,v 1.2 2006/08/25 17:10:34 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+
+/**
+ * Thrown when the settings couldn't be loaded.
+ *
+ * <p>
+ * This is most likely the case when the config file isn't found or when the
+ * settings are corrupt.
+ * </p>
+ *
+ * @author wprinz
+ */
+public class SettingsException extends PresentableException {
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -99979541706943372L;
+
+ /**
+ * @param message
+ */
+ public SettingsException(String message) {
+ super(ErrorCode.SETTINGS_EXCEPTION, message);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public SettingsException(String message, Throwable cause) {
+ super(ErrorCode.SETTINGS_EXCEPTION, message, cause);
+ }
+
+ public SettingsException(int errorCode, String message, Throwable cause) {
+ super(errorCode, message, cause);
+ }
+
+ public SettingsException(int errorCode, String message) {
+ super(errorCode, message);
+ }
+
+ public SettingsException(int errorCode, Throwable cause) {
+ super(errorCode, cause);
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatorFactoryException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatorFactoryException.java
new file mode 100644
index 0000000..e9e6af0
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatorFactoryException.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.
+ *
+ * $Id: SignatorFactoryException.java,v 1.1 2006/08/25 17:10:34 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+
+/**
+ * Exception coming out of the SignatorFactory.
+ * @author wprinz
+ */
+public class SignatorFactoryException extends PresentableException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -4051644056058970435L;
+
+ public SignatorFactoryException(String message)
+ {
+ super(ErrorCode.SETTINGS_EXCEPTION, message);
+ }
+
+}
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatureException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatureException.java
new file mode 100644
index 0000000..5b0d458
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatureException.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.
+ *
+ * $Id: SignatureException.java,v 1.1 2006/08/03 07:47:03 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+
+/**
+ * This exception is thrown by the processing a signature.
+ *
+ * @author wlackner
+ */
+public class SignatureException extends PresentableException {
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = 6387300820234118374L;
+
+ /**
+ * @param error_code
+ * @param message
+ * @param cause
+ */
+ public SignatureException(int error_code, String message, Throwable cause)
+ {
+ super(error_code, message, cause);
+ }
+
+ /**
+ * @param error_code
+ * @param message
+ */
+ public SignatureException(int error_code, String message)
+ {
+ super(error_code, message);
+ }
+
+ /**
+ * @param error_code
+ * @param cause
+ */
+ public SignatureException(int error_code, Throwable cause)
+ {
+ super(error_code, cause);
+ }
+
+ /**
+ * @param error_code
+ * @param cause
+ */
+ public SignatureException(PresentableException cause)
+ {
+ super(cause.getErrorCode(), cause);
+ }
+
+
+} \ No newline at end of file
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatureTypesException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatureTypesException.java
new file mode 100644
index 0000000..279d46f
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SignatureTypesException.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.
+ *
+ * $Id: SignatureTypesException.java,v 1.2 2006/08/25 17:10:34 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+
+/**
+ * Exception for Signature Type problems.
+ *
+ * @author wprinz
+ */
+public class SignatureTypesException extends PresentableException
+{
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -7899273202684297943L;
+
+ /**
+ * @param message
+ */
+ public SignatureTypesException(String message)
+ {
+ super(ErrorCode.SIGNATURE_TYPES_EXCEPTION, message);
+ }
+
+// /**
+// * @param message
+// * @param cause
+// */
+// public SignatureTypesException(String message, Throwable cause)
+// {
+// super(ErrorCode.SIGNATURE_TYPES_EXCEPTION, message, cause);
+// }
+
+ // /**
+ // * @param cause
+ // */
+ // public SignatureTypesException(Throwable cause)
+ // {
+ // super(ErrorCode.SIGNATURE_TYPES_EXCEPTION, cause);
+ // }
+
+ /**
+ * @param cause
+ */
+ public SignatureTypesException(PresentableException cause)
+ {
+ super(cause.getErrorCode(), cause);
+ }
+}
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/WebException.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/WebException.java
new file mode 100644
index 0000000..8fbdda7
--- /dev/null
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/WebException.java
@@ -0,0 +1,72 @@
+/**
+ * <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.
+ *
+ * $Id: WebException.java,v 1.2 2006/08/25 17:10:34 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.exceptions;
+
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
+
+
+/**
+ * Exception for web problems.
+ * @author wlackner
+ */
+public class WebException extends PresentableException {
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = 4329890155872840492L;
+
+// /**
+// * @param error_code
+// * @param message
+// * @param cause
+// */
+// public WebException(int error_code, String message, Throwable cause)
+// {
+// super(error_code, message, cause);
+// }
+//
+// /**
+// * @param error_code
+// * @param message
+// */
+// public WebException(int error_code, String message)
+// {
+// super(error_code, message);
+// }
+//
+
+ /**
+ * @param error_code
+ * @param cause
+ */
+ public WebException(Throwable cause)
+ {
+ super(ErrorCode.WEB_EXCEPTION, cause);
+ }
+
+
+}