From a9fab8fc750f9f31f1354e6d212eed7305f666b1 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Mon, 17 Mar 2014 18:25:09 +0100 Subject: adding removed modules - backup purpose only - remove it after successful integration --- .../peps/auth/commons/exceptions/.svn/all-wcprops | 53 ++++ .../peps/auth/commons/exceptions/.svn/entries | 300 +++++++++++++++++++++ .../text-base/AbstractPEPSException.java.svn-base | 173 ++++++++++++ .../.svn/text-base/CPEPSException.java.svn-base | 143 ++++++++++ .../InternalErrorPEPSException.java.svn-base | 74 +++++ .../InvalidParameterPEPSException.java.svn-base | 54 ++++ .../InvalidSessionPEPSException.java.svn-base | 46 ++++ .../text-base/SecurityPEPSException.java.svn-base | 67 +++++ .../text-base/StorkPEPSException.java.svn-base | 53 ++++ .../.svn/text-base/package-info.java.svn-base | 7 + .../commons/exceptions/AbstractPEPSException.java | 173 ++++++++++++ .../auth/commons/exceptions/CPEPSException.java | 143 ++++++++++ .../exceptions/InternalErrorPEPSException.java | 74 +++++ .../exceptions/InvalidParameterPEPSException.java | 54 ++++ .../exceptions/InvalidSessionPEPSException.java | 46 ++++ .../commons/exceptions/SecurityPEPSException.java | 67 +++++ .../commons/exceptions/StorkPEPSException.java | 53 ++++ .../peps/auth/commons/exceptions/package-info.java | 7 + 18 files changed, 1587 insertions(+) create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java create mode 100644 id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java (limited to 'id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions') diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops new file mode 100644 index 000000000..14f05b17c --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 96 +/CITnet/svn/STORK2/!svn/ver/19/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions +END +InvalidParameterPEPSException.java +K 25 +svn:wc:ra_dav:version-url +V 131 +/CITnet/svn/STORK2/!svn/ver/19/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java +END +SecurityPEPSException.java +K 25 +svn:wc:ra_dav:version-url +V 123 +/CITnet/svn/STORK2/!svn/ver/19/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java +END +InvalidSessionPEPSException.java +K 25 +svn:wc:ra_dav:version-url +V 129 +/CITnet/svn/STORK2/!svn/ver/19/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java +END +package-info.java +K 25 +svn:wc:ra_dav:version-url +V 114 +/CITnet/svn/STORK2/!svn/ver/19/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java +END +CPEPSException.java +K 25 +svn:wc:ra_dav:version-url +V 116 +/CITnet/svn/STORK2/!svn/ver/19/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java +END +StorkPEPSException.java +K 25 +svn:wc:ra_dav:version-url +V 120 +/CITnet/svn/STORK2/!svn/ver/19/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java +END +AbstractPEPSException.java +K 25 +svn:wc:ra_dav:version-url +V 123 +/CITnet/svn/STORK2/!svn/ver/19/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java +END +InternalErrorPEPSException.java +K 25 +svn:wc:ra_dav:version-url +V 128 +/CITnet/svn/STORK2/!svn/ver/19/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java +END diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries new file mode 100644 index 000000000..06755237e --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries @@ -0,0 +1,300 @@ +10 + +dir +665 +https://webgate.ec.europa.eu/CITnet/svn/STORK2/trunk/Commons/src/main/java/eu/stork/peps/auth/commons/exceptions +https://webgate.ec.europa.eu/CITnet/svn/STORK2 + + + +2013-07-25T08:54:09.995385Z +7 +emsomavmi + + + + + + + + + + + + + + +aa842e49-f825-43fc-93ba-11ee9fd5a035 + +InternalErrorPEPSException.java +file + + + + +2013-12-20T12:27:56.626475Z +36d8f6310e84c550f65bef78d5dc4238 +2013-07-25T08:54:09.995385Z +7 +emsomavmi + + + + + + + + + + + + + + + + + + + + + +2471 + +InvalidParameterPEPSException.java +file + + + + +2013-12-20T12:27:56.626475Z +c6ad53378b03a346ca0fc48a381ed771 +2013-07-25T08:54:09.995385Z +7 +emsomavmi + + + + + + + + + + + + + + + + + + + + + +1800 + +SecurityPEPSException.java +file + + + + +2013-12-20T12:27:56.626475Z +78d50b78a69cb0c630e4e14420e3b7be +2013-07-25T08:54:09.995385Z +7 +emsomavmi + + + + + + + + + + + + + + + + + + + + + +2199 + +InvalidSessionPEPSException.java +file + + + + +2013-12-20T12:27:56.626475Z +5fd7f04ad6f6cc121084e682b2a4e678 +2013-07-25T08:54:09.995385Z +7 +emsomavmi + + + + + + + + + + + + + + + + + + + + + +1555 + +package-info.java +file + + + + +2013-12-20T12:27:56.626475Z +7055c01b74382c525c7fcf110646d8fc +2013-07-25T08:54:09.995385Z +7 +emsomavmi + + + + + + + + + + + + + + + + + + + + + +129 + +CPEPSException.java +file + + + + +2013-12-20T12:27:56.626475Z +5d3cb4a7303baeaf2104aaa7da301b21 +2013-07-25T08:54:09.995385Z +7 +emsomavmi + + + + + + + + + + + + + + + + + + + + + +3570 + +StorkPEPSException.java +file + + + + +2013-12-20T12:27:56.626475Z +fea01f750728ea5f15b449acb517f4b2 +2013-07-25T08:54:09.995385Z +7 +emsomavmi + + + + + + + + + + + + + + + + + + + + + +1690 + +AbstractPEPSException.java +file + + + + +2013-12-20T12:27:56.626475Z +c9aedb030e6dbc9f002c7cd3d52cf03f +2013-07-25T08:54:09.995385Z +7 +emsomavmi + + + + + + + + + + + + + + + + + + + + + +4422 + diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base new file mode 100644 index 000000000..e9a96d7c2 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base @@ -0,0 +1,173 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +import java.io.Serializable; + +/** + * Abstract class to represent the various PEPS exceptions. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ + */ +public abstract class AbstractPEPSException extends RuntimeException implements + Serializable { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = -1884417567740138022L; + + /** + * Error code. + */ + private String errorCode; + + /** + * Error message. + */ + private String errorMessage; + + /** + * SAML token. + */ + private String samlTokenFail; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param code The error code value. + * @param message The error message value. + */ + public AbstractPEPSException(final String code, final String message) { + + super(message); + this.errorCode = code; + this.errorMessage = message; + } + + /** + * Exception Constructor with the errorMessage as parameters and the Throwable + * cause. + * + * @param message The error message value. + * @param cause The throwable object. + */ + public AbstractPEPSException(final String message, final Throwable cause) { + + super(message, cause); + this.errorMessage = message; + } + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters and the Throwable cause. + * + * @param code The error code value. + * @param message The error message value. + * @param cause The throwable object. + */ + public AbstractPEPSException(final String code, final String message, + final Throwable cause) { + + super(message, cause); + this.errorCode = code; + this.errorMessage = message; + } + + /** + * Exception Constructor with three Strings representing the errorCode, + * errorMessage and encoded samlToken as parameters. + * + * @param code The error code value. + * @param message The error message value. + * @param samlToken The error SAML Token. + */ + public AbstractPEPSException(final String code, final String message, + final String samlToken) { + + super(message); + this.errorCode = code; + this.errorMessage = message; + this.samlTokenFail = samlToken; + } + + /** + * Constructor with SAML Token as argument. Error message and error code are + * embedded in the SAML. + * + * @param samlToken The error SAML Token. + */ + public AbstractPEPSException(final String samlToken) { + super(); + this.samlTokenFail = samlToken; + } + + /** + * Getter for errorCode. + * + * @return The errorCode value. + */ + public final String getErrorCode() { + return errorCode; + } + + /** + * Setter for errorCode. + * + * @param code The error code value. + */ + public final void setErrorCode(final String code) { + this.errorCode = code; + } + + /** + * Getter for errorMessage. + * + * @return The error Message value. + */ + public final String getErrorMessage() { + return errorMessage; + } + + /** + * Setter for errorMessage. + * + * @param message The error message value. + */ + public final void setErrorMessage(final String message) { + this.errorMessage = message; + } + + /** + * Getter for SAMLTokenFail. + * + * @return The error SAML Token. + */ + public final String getSamlTokenFail() { + return samlTokenFail; + } + + /** + * Setter for SAMLTokenFail. + * + * @param samlToken The error SAML token. + */ + public final void setSamlTokenFail(final String samlToken) { + this.samlTokenFail = samlToken; + } +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base new file mode 100644 index 000000000..69cb20fdd --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base @@ -0,0 +1,143 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * This exception is thrown by the C-PEPS service and holds the relative + * information to present to the citizen. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.9 $, $Date: 2010-11-17 05:15:28 $ + */ +public final class CPEPSException extends RuntimeException { + + /** + * Serial id. + */ + private static final long serialVersionUID = -4012295047127999362L; + + /** + * Error code. + */ + private String errorCode; + + /** + * Error message. + */ + private String errorMessage; + + /** + * SAML token. + */ + private String samlTokenFail; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param samlToken The SAML Token. + * @param code The error code value. + * @param message The error message value. + */ + public CPEPSException(final String samlToken, final String code, + final String message) { + + super(message); + this.setErrorCode(code); + this.setErrorMessage(message); + this.setSamlTokenFail(samlToken); + } + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param samlToken The SAML Token. + * @param code The error code value. + * @param message The error message value. + * @param cause The original exception; + */ + public CPEPSException(final String samlToken, final String code, + final String message, final Throwable cause) { + + super(message, cause); + this.setErrorCode(code); + this.setErrorMessage(message); + this.setSamlTokenFail(samlToken); + } + + /** + * {@inheritDoc} + */ + public String getMessage() { + return this.getErrorMessage() + " (" + this.getErrorCode() + ")"; + } + + /** + * Getter for the error code. + * + * @return The errorCode value. + */ + public String getErrorCode() { + return errorCode; + } + + /** + * Setter for the error code. + * + * @param code The error code. + */ + public void setErrorCode(final String code) { + this.errorCode = code; + } + + /** + * Getter for the error message. + * + * @return The errorMessage value. + */ + public String getErrorMessage() { + return errorMessage; + } + + /** + * Setter for the error message. + * + * @param message The error message. + */ + public void setErrorMessage(final String message) { + this.errorMessage = message; + } + + /** + * Getter for the samlTokenFail. + * + * @return The samlTokenFail value. + */ + public String getSamlTokenFail() { + return samlTokenFail; + } + + /** + * Setter for the samlTokenFail. + * + * @param samlToken The error Saml Token. + */ + public void setSamlTokenFail(final String samlToken) { + this.samlTokenFail = samlToken; + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base new file mode 100644 index 000000000..67514d4fe --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base @@ -0,0 +1,74 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Internal Error Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ + * + * @see AbstractPEPSException + */ +public final class InternalErrorPEPSException extends AbstractPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 1193001455410319795L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters and the Throwable cause. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + * @param cause The throwable object. + */ + public InternalErrorPEPSException(final String errorCode, + final String errorMessage, final Throwable cause) { + + super(errorCode, errorMessage, cause); + } + + /** + * Exception Constructor with three strings representing the errorCode, + * errorMessage and encoded samlToken as parameters. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + * @param samlTokenFail The error SAML Token. + */ + public InternalErrorPEPSException(final String errorCode, + final String errorMessage, final String samlTokenFail) { + + super(errorCode, errorMessage, samlTokenFail); + } + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + */ + public InternalErrorPEPSException(final String errorCode, + final String errorMessage) { + + super(errorCode, errorMessage); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base new file mode 100644 index 000000000..12c83b589 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base @@ -0,0 +1,54 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Invalid Parameter Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.11 $, $Date: 2010-11-17 05:15:28 $ + * + * @see InvalidParameterPEPSException + */ +public class InvalidParameterPEPSException extends AbstractPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 2046282148740524875L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMessage The error code message value. + */ + public InvalidParameterPEPSException(final String errorCode, + final String errorMessage) { + super(errorCode, errorMessage); + } + + /** + * Exception Constructor with one String representing the encoded samlToken. + * + * @param samlTokenFail The error SAML Token. + */ + public InvalidParameterPEPSException(final String samlTokenFail) { + super(samlTokenFail); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base new file mode 100644 index 000000000..800525eee --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base @@ -0,0 +1,46 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Invalid session Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.14 $, $Date: 2010-11-17 05:15:28 $ + * + * @see InvalidParameterPEPSException + */ +public class InvalidSessionPEPSException extends InvalidParameterPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 7147090160978319016L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + */ + public InvalidSessionPEPSException(final String errorCode, + final String errorMessage) { + + super(errorCode, errorMessage); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base new file mode 100644 index 000000000..fc27371d2 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base @@ -0,0 +1,67 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Security PEPS Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.18 $, $Date: 2010-11-17 05:15:28 $ + * + * @see AbstractPEPSException + */ +public final class SecurityPEPSException extends AbstractPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 5605743302478554967L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMsg The error message value. + */ + public SecurityPEPSException(final String errorCode, final String errorMsg) { + super(errorCode, errorMsg); + } + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters and the Throwable cause. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + * @param cause The throwable object. + */ + public SecurityPEPSException(final String errorCode, + final String errorMessage, final Throwable cause) { + + super(errorCode, errorMessage, cause); + } + + /** + * Exception Constructor with one String representing the encoded samlToken. + * + * @param samlTokenFail The error SAML Token. + */ + public SecurityPEPSException(final String samlTokenFail) { + super(samlTokenFail); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base new file mode 100644 index 000000000..a2da61a02 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base @@ -0,0 +1,53 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Security PEPS Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.15 $, $Date: 2010-11-17 05:15:28 $ + * + * @see AbstractPEPSException + */ +public final class StorkPEPSException extends AbstractPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 8048033129798427574L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMsg The error message value. + */ + public StorkPEPSException(final String errorCode, final String errorMsg) { + super(errorCode, errorMsg); + } + + /** + * {@inheritDoc} + */ + public String getMessage() { + + return "Security Error (" + this.getErrorCode() + ") processing request : " + + this.getErrorMessage(); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base new file mode 100644 index 000000000..1a3c57329 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base @@ -0,0 +1,7 @@ +/** + * Package for the PEPS’ Exceptions handling. + * + * @since 1.0 + */ +package eu.stork.peps.auth.commons.exceptions; + diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java new file mode 100644 index 000000000..e9a96d7c2 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java @@ -0,0 +1,173 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +import java.io.Serializable; + +/** + * Abstract class to represent the various PEPS exceptions. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ + */ +public abstract class AbstractPEPSException extends RuntimeException implements + Serializable { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = -1884417567740138022L; + + /** + * Error code. + */ + private String errorCode; + + /** + * Error message. + */ + private String errorMessage; + + /** + * SAML token. + */ + private String samlTokenFail; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param code The error code value. + * @param message The error message value. + */ + public AbstractPEPSException(final String code, final String message) { + + super(message); + this.errorCode = code; + this.errorMessage = message; + } + + /** + * Exception Constructor with the errorMessage as parameters and the Throwable + * cause. + * + * @param message The error message value. + * @param cause The throwable object. + */ + public AbstractPEPSException(final String message, final Throwable cause) { + + super(message, cause); + this.errorMessage = message; + } + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters and the Throwable cause. + * + * @param code The error code value. + * @param message The error message value. + * @param cause The throwable object. + */ + public AbstractPEPSException(final String code, final String message, + final Throwable cause) { + + super(message, cause); + this.errorCode = code; + this.errorMessage = message; + } + + /** + * Exception Constructor with three Strings representing the errorCode, + * errorMessage and encoded samlToken as parameters. + * + * @param code The error code value. + * @param message The error message value. + * @param samlToken The error SAML Token. + */ + public AbstractPEPSException(final String code, final String message, + final String samlToken) { + + super(message); + this.errorCode = code; + this.errorMessage = message; + this.samlTokenFail = samlToken; + } + + /** + * Constructor with SAML Token as argument. Error message and error code are + * embedded in the SAML. + * + * @param samlToken The error SAML Token. + */ + public AbstractPEPSException(final String samlToken) { + super(); + this.samlTokenFail = samlToken; + } + + /** + * Getter for errorCode. + * + * @return The errorCode value. + */ + public final String getErrorCode() { + return errorCode; + } + + /** + * Setter for errorCode. + * + * @param code The error code value. + */ + public final void setErrorCode(final String code) { + this.errorCode = code; + } + + /** + * Getter for errorMessage. + * + * @return The error Message value. + */ + public final String getErrorMessage() { + return errorMessage; + } + + /** + * Setter for errorMessage. + * + * @param message The error message value. + */ + public final void setErrorMessage(final String message) { + this.errorMessage = message; + } + + /** + * Getter for SAMLTokenFail. + * + * @return The error SAML Token. + */ + public final String getSamlTokenFail() { + return samlTokenFail; + } + + /** + * Setter for SAMLTokenFail. + * + * @param samlToken The error SAML token. + */ + public final void setSamlTokenFail(final String samlToken) { + this.samlTokenFail = samlToken; + } +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java new file mode 100644 index 000000000..69cb20fdd --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java @@ -0,0 +1,143 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * This exception is thrown by the C-PEPS service and holds the relative + * information to present to the citizen. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.9 $, $Date: 2010-11-17 05:15:28 $ + */ +public final class CPEPSException extends RuntimeException { + + /** + * Serial id. + */ + private static final long serialVersionUID = -4012295047127999362L; + + /** + * Error code. + */ + private String errorCode; + + /** + * Error message. + */ + private String errorMessage; + + /** + * SAML token. + */ + private String samlTokenFail; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param samlToken The SAML Token. + * @param code The error code value. + * @param message The error message value. + */ + public CPEPSException(final String samlToken, final String code, + final String message) { + + super(message); + this.setErrorCode(code); + this.setErrorMessage(message); + this.setSamlTokenFail(samlToken); + } + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param samlToken The SAML Token. + * @param code The error code value. + * @param message The error message value. + * @param cause The original exception; + */ + public CPEPSException(final String samlToken, final String code, + final String message, final Throwable cause) { + + super(message, cause); + this.setErrorCode(code); + this.setErrorMessage(message); + this.setSamlTokenFail(samlToken); + } + + /** + * {@inheritDoc} + */ + public String getMessage() { + return this.getErrorMessage() + " (" + this.getErrorCode() + ")"; + } + + /** + * Getter for the error code. + * + * @return The errorCode value. + */ + public String getErrorCode() { + return errorCode; + } + + /** + * Setter for the error code. + * + * @param code The error code. + */ + public void setErrorCode(final String code) { + this.errorCode = code; + } + + /** + * Getter for the error message. + * + * @return The errorMessage value. + */ + public String getErrorMessage() { + return errorMessage; + } + + /** + * Setter for the error message. + * + * @param message The error message. + */ + public void setErrorMessage(final String message) { + this.errorMessage = message; + } + + /** + * Getter for the samlTokenFail. + * + * @return The samlTokenFail value. + */ + public String getSamlTokenFail() { + return samlTokenFail; + } + + /** + * Setter for the samlTokenFail. + * + * @param samlToken The error Saml Token. + */ + public void setSamlTokenFail(final String samlToken) { + this.samlTokenFail = samlToken; + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java new file mode 100644 index 000000000..67514d4fe --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java @@ -0,0 +1,74 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Internal Error Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ + * + * @see AbstractPEPSException + */ +public final class InternalErrorPEPSException extends AbstractPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 1193001455410319795L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters and the Throwable cause. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + * @param cause The throwable object. + */ + public InternalErrorPEPSException(final String errorCode, + final String errorMessage, final Throwable cause) { + + super(errorCode, errorMessage, cause); + } + + /** + * Exception Constructor with three strings representing the errorCode, + * errorMessage and encoded samlToken as parameters. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + * @param samlTokenFail The error SAML Token. + */ + public InternalErrorPEPSException(final String errorCode, + final String errorMessage, final String samlTokenFail) { + + super(errorCode, errorMessage, samlTokenFail); + } + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + */ + public InternalErrorPEPSException(final String errorCode, + final String errorMessage) { + + super(errorCode, errorMessage); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java new file mode 100644 index 000000000..12c83b589 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java @@ -0,0 +1,54 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Invalid Parameter Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.11 $, $Date: 2010-11-17 05:15:28 $ + * + * @see InvalidParameterPEPSException + */ +public class InvalidParameterPEPSException extends AbstractPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 2046282148740524875L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMessage The error code message value. + */ + public InvalidParameterPEPSException(final String errorCode, + final String errorMessage) { + super(errorCode, errorMessage); + } + + /** + * Exception Constructor with one String representing the encoded samlToken. + * + * @param samlTokenFail The error SAML Token. + */ + public InvalidParameterPEPSException(final String samlTokenFail) { + super(samlTokenFail); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java new file mode 100644 index 000000000..800525eee --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java @@ -0,0 +1,46 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Invalid session Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.14 $, $Date: 2010-11-17 05:15:28 $ + * + * @see InvalidParameterPEPSException + */ +public class InvalidSessionPEPSException extends InvalidParameterPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 7147090160978319016L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + */ + public InvalidSessionPEPSException(final String errorCode, + final String errorMessage) { + + super(errorCode, errorMessage); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java new file mode 100644 index 000000000..fc27371d2 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java @@ -0,0 +1,67 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Security PEPS Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.18 $, $Date: 2010-11-17 05:15:28 $ + * + * @see AbstractPEPSException + */ +public final class SecurityPEPSException extends AbstractPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 5605743302478554967L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMsg The error message value. + */ + public SecurityPEPSException(final String errorCode, final String errorMsg) { + super(errorCode, errorMsg); + } + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters and the Throwable cause. + * + * @param errorCode The error code value. + * @param errorMessage The error message value. + * @param cause The throwable object. + */ + public SecurityPEPSException(final String errorCode, + final String errorMessage, final Throwable cause) { + + super(errorCode, errorMessage, cause); + } + + /** + * Exception Constructor with one String representing the encoded samlToken. + * + * @param samlTokenFail The error SAML Token. + */ + public SecurityPEPSException(final String samlTokenFail) { + super(samlTokenFail); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java new file mode 100644 index 000000000..a2da61a02 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java @@ -0,0 +1,53 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons.exceptions; + +/** + * Security PEPS Exception class. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.15 $, $Date: 2010-11-17 05:15:28 $ + * + * @see AbstractPEPSException + */ +public final class StorkPEPSException extends AbstractPEPSException { + + /** + * Unique identifier. + */ + private static final long serialVersionUID = 8048033129798427574L; + + /** + * Exception Constructor with two Strings representing the errorCode and + * errorMessage as parameters. + * + * @param errorCode The error code value. + * @param errorMsg The error message value. + */ + public StorkPEPSException(final String errorCode, final String errorMsg) { + super(errorCode, errorMsg); + } + + /** + * {@inheritDoc} + */ + public String getMessage() { + + return "Security Error (" + this.getErrorCode() + ") processing request : " + + this.getErrorMessage(); + } + +} diff --git a/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java new file mode 100644 index 000000000..1a3c57329 --- /dev/null +++ b/id/server/legacy-backup/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java @@ -0,0 +1,7 @@ +/** + * Package for the PEPS’ Exceptions handling. + * + * @since 1.0 + */ +package eu.stork.peps.auth.commons.exceptions; + -- cgit v1.2.3