From 0236a88fb454682608c28f7c21716d9288b56bec Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Mon, 3 Mar 2014 09:38:27 +0100 Subject: added tweaked stork2-commons source --- .../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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java (limited to 'id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions') diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base b/id/server/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..d83068beb --- /dev/null +++ b/id/server/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java new file mode 100644 index 000000000..d83068beb --- /dev/null +++ b/id/server/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 From 0b3249e37b26e029c576127654dca31bff4a5a63 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Mon, 17 Mar 2014 18:23:52 +0100 Subject: removing old samlengine and storkcommons --- .../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 deletions(-) delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java (limited to 'id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions') diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops deleted file mode 100644 index 14f05b17c..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops +++ /dev/null @@ -1,53 +0,0 @@ -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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries deleted file mode 100644 index 06755237e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries +++ /dev/null @@ -1,300 +0,0 @@ -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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base deleted file mode 100644 index e9a96d7c2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base +++ /dev/null @@ -1,173 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base deleted file mode 100644 index 69cb20fdd..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base deleted file mode 100644 index 67514d4fe..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base deleted file mode 100644 index 12c83b589..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base deleted file mode 100644 index 800525eee..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base deleted file mode 100644 index fc27371d2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base deleted file mode 100644 index a2da61a02..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base deleted file mode 100644 index d83068beb..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Package for the PEPS’ Exceptions handling. - * - * @since 1.0 - */ -package eu.stork.peps.auth.commons.exceptions; - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java deleted file mode 100644 index e9a96d7c2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java deleted file mode 100644 index 69cb20fdd..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java deleted file mode 100644 index 67514d4fe..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java deleted file mode 100644 index 12c83b589..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java deleted file mode 100644 index 800525eee..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java deleted file mode 100644 index fc27371d2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java deleted file mode 100644 index a2da61a02..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java deleted file mode 100644 index d83068beb..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Package for the PEPS’ Exceptions handling. - * - * @since 1.0 - */ -package eu.stork.peps.auth.commons.exceptions; - -- cgit v1.2.3 From e6144cfe09bb148638911660eeb492fee7ab8079 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 20 Mar 2014 11:43:22 +0100 Subject: fixed serializable issues in stork2-commons --- .../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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java create mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java (limited to 'id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions') diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/all-wcprops b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries new file mode 100644 index 000000000..8ca1e325f --- /dev/null +++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/entries @@ -0,0 +1,300 @@ +10 + +dir +776 +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 + +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 + +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 + diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/AbstractPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/CPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InternalErrorPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidParameterPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/InvalidSessionPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/SecurityPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/StorkPEPSException.java.svn-base b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/.svn/text-base/package-info.java.svn-base b/id/server/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..d83068beb --- /dev/null +++ b/id/server/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java b/id/server/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/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/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java new file mode 100644 index 000000000..d83068beb --- /dev/null +++ b/id/server/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