diff options
Diffstat (limited to 'eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions')
41 files changed, 988 insertions, 1110 deletions
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributeBuilderException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributeBuilderException.java index f02b3bf6..2a96490b 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributeBuilderException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributeBuilderException.java @@ -1,37 +1,30 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; -public class AttributeBuilderException extends EAAFIDPException { +public class AttributeBuilderException extends EaafIdpException { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public AttributeBuilderException(String attrName) { - super("builder.12", new Object[] {attrName}); - } + public AttributeBuilderException(final String attrName) { + super("builder.12", new Object[] {attrName}); + } } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributePolicyException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributePolicyException.java index 4a0e2fc1..abbe56aa 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributePolicyException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributePolicyException.java @@ -1,44 +1,38 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + + package at.gv.egiz.eaaf.core.exceptions; public class AttributePolicyException extends AttributeBuilderException { - - private static final long serialVersionUID = 1L; - - private String attributeName; - - public AttributePolicyException(String attributeName) { - super("Attribute " + attributeName + " is restricted by IDP policy."); - this.attributeName = attributeName; - } - - public String getAttributeName() { - return attributeName; - } - + + private static final long serialVersionUID = 1L; + + private final String attributeName; + + public AttributePolicyException(final String attributeName) { + super("Attribute " + attributeName + " is restricted by IDP policy."); + this.attributeName = attributeName; + } + + public String getAttributeName() { + return attributeName; + } + } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java index 30db0b09..32ad97b7 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java @@ -1,84 +1,98 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; import at.gv.egiz.eaaf.core.api.IRequest; /** + * Authentication request validation error. + * * @author tlenz * */ -public class AuthnRequestValidatorException extends EAAFProtocolException { - - private IRequest errorRequest = null; - protected String statusCodeValue; - - /** - * - */ - private static final long serialVersionUID = 4939651000658508576L; - - /** - * @param messageId - * @param parameters - */ - public AuthnRequestValidatorException(String internalMsgId, Object[] params) { - super(internalMsgId, params); - - } - - public AuthnRequestValidatorException(String internalMsgId, Object[] params, Throwable e) { - super(internalMsgId, params,e); - - } - - public AuthnRequestValidatorException(String internalMsgId, Object[] params, IRequest errorRequest) { - super(internalMsgId, params); - this.errorRequest = errorRequest; - - } - - public AuthnRequestValidatorException(String internalMsgId, Object[] params, IRequest errorRequest, Throwable e) { - super(internalMsgId, params, e); - this.errorRequest = errorRequest; - - } - - /** - * @return the errorRequest - */ - public IRequest getErrorRequest() { - return errorRequest; - } - - public String getStatusCodeValue() { - return statusCodeValue; - } - - +public class AuthnRequestValidatorException extends EaafProtocolException { + + private IRequest errorRequest = null; + protected String statusCodeValue; + + private static final long serialVersionUID = 4939651000658508576L; + + public AuthnRequestValidatorException(final String internalMsgId, final Object[] params) { + super(internalMsgId, params); + + } + + public AuthnRequestValidatorException(final String internalMsgId, final Object[] params, + final Throwable e) { + super(internalMsgId, params, e); + + } + + /** + * Protocol validation error. + * + * @param internalMsgId Internal error-code + * @param params Message parameters + * @param errorRequest Pending-Request that generates the error + */ + public AuthnRequestValidatorException(final String internalMsgId, final Object[] params, + final IRequest errorRequest) { + super(internalMsgId, params); + this.errorRequest = errorRequest; + + } + + /** + * Protocol validation error. + * + * @param internalMsgId Internal error-code + * @param params Message parameters + * @param errorRequest Pending-Request that generates the error + * @param e error + */ + public AuthnRequestValidatorException(final String internalMsgId, final Object[] params, + final IRequest errorRequest, final Throwable e) { + super(internalMsgId, params, e); + this.errorRequest = errorRequest; + + } + + /** + * PendingRequest object that generates the error. + * + * @return the errorRequest + */ + public IRequest getErrorRequest() { + return errorRequest; + } + + public String getStatusCodeValue() { + return statusCodeValue; + } + + public void setStatusCodeValue(String statusCodeValue) { + this.statusCodeValue = statusCodeValue; + } + + + + } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFAuthenticationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFAuthenticationException.java deleted file mode 100644 index e6bdb804..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFAuthenticationException.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -public class EAAFAuthenticationException extends EAAFException { - - - - private static final long serialVersionUID = -4793625336456467005L; - - public EAAFAuthenticationException(String internalMsgId, Object[] params) { - super(internalMsgId, params); - - } - - public EAAFAuthenticationException(String internalMsgId, Object[] params, Throwable e) { - super(internalMsgId, params, e); - - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFBuilderException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFBuilderException.java deleted file mode 100644 index dc2b61f7..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFBuilderException.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -public class EAAFBuilderException extends EAAFException { - - /** - * - */ - private static final long serialVersionUID = 1L; - - public EAAFBuilderException(String errorId, Object[] params, String msg) { - super(errorId, params); - } - - public EAAFBuilderException(String errorId, Object[] objects, String message, Throwable ex) { - super(errorId, objects, ex); - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFConfigurationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFConfigurationException.java deleted file mode 100644 index 71f46cb5..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFConfigurationException.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -public class EAAFConfigurationException extends EAAFException { - - /** - * - */ - private static final long serialVersionUID = 1L; - - public EAAFConfigurationException(String msg, Object[] params) { - super(msg, params); - } - - public EAAFConfigurationException(String msg, Object[] params, Throwable e) { - super(msg, params, e); - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFException.java deleted file mode 100644 index affd1dab..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFException.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -import at.gv.egiz.eaaf.core.impl.logging.LogMessageProviderFactory; - -public class EAAFException extends Exception { - - private static final long serialVersionUID = 1L; - - private String errorId = null; - private Object[] params = null; - - public EAAFException(String errorId) { - super(LogMessageProviderFactory.getMessager().getMessage(errorId, null)); - this.errorId = errorId; - } - - public EAAFException(String errorId, Object[] params) { - super(LogMessageProviderFactory.getMessager().getMessage(errorId, params)); - this.errorId = errorId; - this.params = params; - - } - - public EAAFException(String errorId, Object[] params, Throwable e) { - super(LogMessageProviderFactory.getMessager().getMessage(errorId, params), e); - this.errorId = errorId; - this.params = params; - - } - - public String getErrorId() { - return this.errorId; - - } - - public Object[] getParams() { - return this.params; - - } -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFIDPException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFIDPException.java deleted file mode 100644 index 7f504a5a..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFIDPException.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -public class EAAFIDPException extends EAAFException { - - /** - * - */ - private static final long serialVersionUID = 1L; - - public EAAFIDPException(String msg) { - super(msg, null); - - } - - public EAAFIDPException(String msg, Object[] params) { - super(msg, params); - - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFIllegalStateException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFIllegalStateException.java deleted file mode 100644 index 95688260..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFIllegalStateException.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -import at.gv.egiz.eaaf.core.api.IStatusMessenger; - -public class EAAFIllegalStateException extends EAAFException { - private static final long serialVersionUID = 261484121729891927L; - - public EAAFIllegalStateException(Object[] params) { - super(IStatusMessenger.CODES_INTERNAL_ILLEGAL_STATE, params); - - } - - public EAAFIllegalStateException(Object[] params, Throwable e) { - super(IStatusMessenger.CODES_INTERNAL_ILLEGAL_STATE, params, e); - - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFJsonMapperException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFJsonMapperException.java deleted file mode 100644 index 41431d02..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFJsonMapperException.java +++ /dev/null @@ -1,16 +0,0 @@ -package at.gv.egiz.eaaf.core.exceptions; - -public class EAAFJsonMapperException extends EAAFParserException { - - - private static final long serialVersionUID = 2278865064672630267L; - - public EAAFJsonMapperException(String reason) { - super("parser.03", new Object[] {reason}); - } - - public EAAFJsonMapperException(String reason, Throwable ex) { - super("parser.03", new Object[] {reason}, ex); - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFParserException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFParserException.java deleted file mode 100644 index 07987f92..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFParserException.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -public class EAAFParserException extends EAAFException { - - /** - * - */ - private static final long serialVersionUID = 1L; - - public EAAFParserException(String errorId, Object[] params) { - super(errorId, params); - } - - public EAAFParserException(String errorId, Object[] objects, Throwable ex) { - super(errorId, objects, ex); - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFProtocolException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFProtocolException.java deleted file mode 100644 index da529c29..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFProtocolException.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -public class EAAFProtocolException extends EAAFException { - - private static final long serialVersionUID = 7982298114399440473L; - - public EAAFProtocolException(String errorId, Object[] params) { - super(errorId, params); - - } - - public EAAFProtocolException(String errorId, Object[] params, Throwable e) { - super(errorId, params, e); - } -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFSSOException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFSSOException.java deleted file mode 100644 index 27afcd4a..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFSSOException.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -public class EAAFSSOException extends EAAFException { - - /** - * - */ - private static final long serialVersionUID = -5942886204347860148L; - - public EAAFSSOException(String errorId, Object[] params, Throwable e) { - super(errorId, params, e); - - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFServiceException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFServiceException.java deleted file mode 100644 index 7094c270..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFServiceException.java +++ /dev/null @@ -1,30 +0,0 @@ -package at.gv.egiz.eaaf.core.exceptions; - -import javax.annotation.Nonnull; - -public abstract class EAAFServiceException extends EAAFException { - - private static final long serialVersionUID = -867758153828290337L; - - public EAAFServiceException(String errorId, Object[] params) { - super(errorId, params); - - } - - public EAAFServiceException(String errorId, Object[] params, Throwable e) { - super(errorId, params, e); - - } - - /** - * Get a textual identifier of the service that throws this exception - * - * @return - */ - @Nonnull - protected abstract String getServiceIdentifier(); - - - - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFStorageException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFStorageException.java deleted file mode 100644 index b99472c3..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFStorageException.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -public class EAAFStorageException extends EAAFException { - - private static final long serialVersionUID = 1L; - - public EAAFStorageException(String msg) { - super("internal.02", new Object[] {msg}); - } - - public EAAFStorageException(String msg, Throwable e) { - super("internal.02", new Object[] {msg}, e); - } - - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java new file mode 100644 index 00000000..7dbf0a5d --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java @@ -0,0 +1,38 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +public class EaafAuthenticationException extends EaafException { + + + + private static final long serialVersionUID = -4793625336456467005L; + + public EaafAuthenticationException(final String internalMsgId, final Object[] params) { + super(internalMsgId, params); + + } + + public EaafAuthenticationException(final String internalMsgId, final Object[] params, final Throwable e) { + super(internalMsgId, params, e); + + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafBuilderException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafBuilderException.java new file mode 100644 index 00000000..008d24a7 --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafBuilderException.java @@ -0,0 +1,34 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +public class EaafBuilderException extends EaafException { + + private static final long serialVersionUID = 1L; + + public EaafBuilderException(final String errorId, final Object[] params, final String msg) { + super(errorId, params); + } + + public EaafBuilderException(final String errorId, final Object[] objects, final String message, final Throwable ex) { + super(errorId, objects, ex); + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafConfigurationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafConfigurationException.java new file mode 100644 index 00000000..c40dc2a4 --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafConfigurationException.java @@ -0,0 +1,35 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +public class EaafConfigurationException extends EaafException { + + + private static final long serialVersionUID = 1L; + + public EaafConfigurationException(final String msg, final Object[] params) { + super(msg, params); + } + + public EaafConfigurationException(final String msg, final Object[] params, final Throwable e) { + super(msg, params, e); + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java new file mode 100644 index 00000000..89011a87 --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java @@ -0,0 +1,89 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +import java.util.Arrays; +import javax.annotation.Nullable; +import at.gv.egiz.eaaf.core.impl.logging.LogMessageProviderFactory; + +public class EaafException extends Exception { + + private static final long serialVersionUID = 1L; + + private String errorId = null; + private Object[] params = null; + + public EaafException(final String errorId) { + super(LogMessageProviderFactory.getMessager().getMessage(errorId, null)); + this.errorId = errorId; + } + + /** + * Generic processing-error in EAAF framework. + * + * @param errorId Internal error-code that is also used to generate i18n messages + * @param params Message parameters + */ + public EaafException(final String errorId, final Object[] params) { + super(LogMessageProviderFactory.getMessager().getMessage(errorId, params)); + this.errorId = errorId; + this.params = makeCopyIfNotNull(params); + + } + + + /** + * Generic processing-error in EAAF framework. + * + * @param errorId Internal error-code that is also used to generate i18n messages + * @param params Message parameters + * @param e Exception + */ + public EaafException(final String errorId, final Object[] params, final Throwable e) { + super(LogMessageProviderFactory.getMessager().getMessage(errorId, params), e); + this.errorId = errorId; + this.params = makeCopyIfNotNull(params); + + } + + public String getErrorId() { + return this.errorId; + + } + + /** + * Get a copy of message parameters. + * + * @return + */ + @Nullable + public Object[] getParams() { + return makeCopyIfNotNull(this.params); + + } + + private Object[] makeCopyIfNotNull(Object[] params) { + if (params != null) { + return Arrays.copyOf(params, params.length); + } else { + return null; + } + } +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIdpException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIdpException.java new file mode 100644 index 00000000..234a6971 --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIdpException.java @@ -0,0 +1,36 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +public class EaafIdpException extends EaafException { + + private static final long serialVersionUID = 1L; + + public EaafIdpException(final String msg) { + super(msg, null); + + } + + public EaafIdpException(final String msg, final Object[] params) { + super(msg, params); + + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIllegalStateException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIllegalStateException.java new file mode 100644 index 00000000..09414cab --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIllegalStateException.java @@ -0,0 +1,37 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +import at.gv.egiz.eaaf.core.api.IStatusMessenger; + +public class EaafIllegalStateException extends EaafException { + private static final long serialVersionUID = 261484121729891927L; + + public EaafIllegalStateException(final Object[] params) { + super(IStatusMessenger.CODES_INTERNAL_ILLEGAL_STATE, params); + + } + + public EaafIllegalStateException(final Object[] params, final Throwable e) { + super(IStatusMessenger.CODES_INTERNAL_ILLEGAL_STATE, params, e); + + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafJsonMapperException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafJsonMapperException.java new file mode 100644 index 00000000..0d24cb3a --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafJsonMapperException.java @@ -0,0 +1,16 @@ +package at.gv.egiz.eaaf.core.exceptions; + +public class EaafJsonMapperException extends EaafParserException { + + + private static final long serialVersionUID = 2278865064672630267L; + + public EaafJsonMapperException(final String reason) { + super("parser.03", new Object[] {reason}); + } + + public EaafJsonMapperException(final String reason, final Throwable ex) { + super("parser.03", new Object[] {reason}, ex); + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafParserException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafParserException.java new file mode 100644 index 00000000..51909d74 --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafParserException.java @@ -0,0 +1,34 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +public class EaafParserException extends EaafException { + + private static final long serialVersionUID = 1L; + + public EaafParserException(final String errorId, final Object[] params) { + super(errorId, params); + } + + public EaafParserException(final String errorId, final Object[] objects, final Throwable ex) { + super(errorId, objects, ex); + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafProtocolException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafProtocolException.java new file mode 100644 index 00000000..1aab2e55 --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafProtocolException.java @@ -0,0 +1,34 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +public class EaafProtocolException extends EaafException { + + private static final long serialVersionUID = 7982298114399440473L; + + public EaafProtocolException(final String errorId, final Object[] params) { + super(errorId, params); + + } + + public EaafProtocolException(final String errorId, final Object[] params, final Throwable e) { + super(errorId, params, e); + } +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafServiceException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafServiceException.java new file mode 100644 index 00000000..2d26a8bf --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafServiceException.java @@ -0,0 +1,29 @@ +package at.gv.egiz.eaaf.core.exceptions; + +import javax.annotation.Nonnull; + +public abstract class EaafServiceException extends EaafException { + + private static final long serialVersionUID = -867758153828290337L; + + public EaafServiceException(final String errorId, final Object[] params) { + super(errorId, params); + + } + + public EaafServiceException(final String errorId, final Object[] params, final Throwable e) { + super(errorId, params, e); + + } + + /** + * Get a textual identifier of the service that throws this exception. + * + * @return + */ + @Nonnull + protected abstract String getServiceIdentifier(); + + + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafSsoException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafSsoException.java new file mode 100644 index 00000000..fc740e6a --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafSsoException.java @@ -0,0 +1,31 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +public class EaafSsoException extends EaafException { + + private static final long serialVersionUID = -5942886204347860148L; + + public EaafSsoException(final String errorId, final Object[] params, final Throwable e) { + super(errorId, params, e); + + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafStorageException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafStorageException.java new file mode 100644 index 00000000..1df2e5dc --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafStorageException.java @@ -0,0 +1,35 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +public class EaafStorageException extends EaafException { + + private static final long serialVersionUID = 1L; + + public EaafStorageException(final String msg) { + super("internal.02", new Object[] {msg}); + } + + public EaafStorageException(final String msg, final Throwable e) { + super("internal.02", new Object[] {msg}, e); + } + + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/GUIBuildException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/GUIBuildException.java deleted file mode 100644 index 011488f7..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/GUIBuildException.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -/** - * @author tlenz - * - */ -public class GUIBuildException extends Exception { - - private static final long serialVersionUID = -278663750102498205L; - - /** - * @param string - */ - public GUIBuildException(String msg) { - super(msg); - - } - - public GUIBuildException(String msg, Throwable e) { - super(msg, e); - - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/GuiBuildException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/GuiBuildException.java new file mode 100644 index 00000000..9e9c08a7 --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/GuiBuildException.java @@ -0,0 +1,47 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +/** + * GUI generation error. + * + * @author tlenz + * + */ +public class GuiBuildException extends Exception { + + private static final long serialVersionUID = -278663750102498205L; + + /** + * GUI generation error. + * + * @param msg error message + */ + public GuiBuildException(final String msg) { + super(msg); + + } + + public GuiBuildException(final String msg, final Throwable e) { + super(msg, e); + + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidDateFormatAttributeException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidDateFormatAttributeException.java index 5d35ac84..9ae02e07 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidDateFormatAttributeException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidDateFormatAttributeException.java @@ -1,39 +1,32 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; public class InvalidDateFormatAttributeException extends AttributeBuilderException { - private static final long serialVersionUID = 1L; - - public InvalidDateFormatAttributeException() { - super("Date format is invalid."); - } + private static final long serialVersionUID = 1L; + + public InvalidDateFormatAttributeException() { + super("Date format is invalid."); + } + + - - } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidProtocolRequestException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidProtocolRequestException.java index 8ed09525..2d1847af 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidProtocolRequestException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidProtocolRequestException.java @@ -1,47 +1,34 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; -/** - * @author tlenz - * - */ -public class InvalidProtocolRequestException extends EAAFProtocolException { - /** - * - */ - private static final long serialVersionUID = -7866198705324084601L; +public class InvalidProtocolRequestException extends EaafProtocolException { + + private static final long serialVersionUID = -7866198705324084601L; - public InvalidProtocolRequestException(String internalMsgId, Object[] params) { - super(internalMsgId, params); - } + public InvalidProtocolRequestException(final String internalMsgId, final Object[] params) { + super(internalMsgId, params); + } - public InvalidProtocolRequestException(String internalMsgId, Object[] params, Throwable e) { - super(internalMsgId, params, e); - } + public InvalidProtocolRequestException(final String internalMsgId, final Object[] params, final Throwable e) { + super(internalMsgId, params, e); + } } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/NoPassivAuthenticationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/NoPassivAuthenticationException.java index 495d61bc..bf7a15c6 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/NoPassivAuthenticationException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/NoPassivAuthenticationException.java @@ -1,42 +1,32 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; import at.gv.egiz.eaaf.core.api.IStatusMessenger; -public class NoPassivAuthenticationException extends EAAFAuthenticationException { +public class NoPassivAuthenticationException extends EaafAuthenticationException { - public NoPassivAuthenticationException() { - super(IStatusMessenger.CODES_INTERNAL_ERROR_AUTH_REQUEST_INVALID, null); - } + public NoPassivAuthenticationException() { + super(IStatusMessenger.CODES_INTERNAL_ERROR_AUTH_REQUEST_INVALID, null); + } - /** - * - */ - private static final long serialVersionUID = 596920452166197688L; + private static final long serialVersionUID = 596920452166197688L; } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/PendingReqIdValidationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/PendingReqIdValidationException.java index e558c3cb..124881c2 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/PendingReqIdValidationException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/PendingReqIdValidationException.java @@ -2,59 +2,65 @@ package at.gv.egiz.eaaf.core.exceptions; import javax.annotation.Nonnull; - import at.gv.egiz.eaaf.core.api.IRequest; -public class PendingReqIdValidationException extends EAAFException { - - /** - * - */ - private static final long serialVersionUID = -6886402432880791308L; - - private final String invalidInternalPendingReqId; - private IRequest invalidPendingReq; - - /** - * - * @param pendingReqId - * @param reason - */ - public PendingReqIdValidationException(String internalPendingReqId, @Nonnull String reason) { - super("process.99", new Object[] {internalPendingReqId, reason}); - this.invalidInternalPendingReqId = internalPendingReqId; - - } - - public PendingReqIdValidationException(String internalPendingReqId, @Nonnull String reason, Throwable e) { - super("process.99", new Object[] {internalPendingReqId, reason}, e ); - this.invalidInternalPendingReqId = internalPendingReqId; - } - - /** - * Get the invalid pending-request - * - * @return - */ - public IRequest getInvalidPendingReq() { - return invalidPendingReq; - } - - - /** - * Get the internal invalid pending-request id - * - * @return - */ - public String getInvalidInternalPendingReqId() { - return invalidInternalPendingReqId; - } - - public void setInvalidPendingReq(IRequest invalidPendingReq) { - this.invalidPendingReq = invalidPendingReq; - - } - - +public class PendingReqIdValidationException extends EaafException { + + private static final long serialVersionUID = -6886402432880791308L; + + private final String invalidInternalPendingReqId; + private IRequest invalidPendingReq; + + /** + * Pending-Request Id validation error. + * + * @param internalPendingReqId Internal Pending-Request Id + * @param reason error-message + */ + public PendingReqIdValidationException(final String internalPendingReqId, + @Nonnull final String reason) { + super("process.99", new Object[] {internalPendingReqId, reason}); + this.invalidInternalPendingReqId = internalPendingReqId; + + } + + /** + * Pending-Request Id validation error. + * + * @param internalPendingReqId Internal Pending-Request Id + * @param reason error-message + * @param e error + */ + public PendingReqIdValidationException(final String internalPendingReqId, + @Nonnull final String reason, final Throwable e) { + super("process.99", new Object[] {internalPendingReqId, reason}, e); + this.invalidInternalPendingReqId = internalPendingReqId; + } + + /** + * Get the invalid pending-request. + * + * @return + */ + public IRequest getInvalidPendingReq() { + return invalidPendingReq; + } + + + /** + * Get the internal invalid pending-request id. + * + * @return + */ + public String getInvalidInternalPendingReqId() { + return invalidInternalPendingReqId; + } + + public void setInvalidPendingReq(final IRequest invalidPendingReq) { + this.invalidPendingReq = invalidPendingReq; + + } + + } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProcessExecutionException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProcessExecutionException.java index b72237b2..d24a438d 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProcessExecutionException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProcessExecutionException.java @@ -1,62 +1,52 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; /** * Indicates a problem when executing a process. - * + * * @author tknall - * + * */ public class ProcessExecutionException extends Exception { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - /** - * Creates a new process execution exception providing a {@code message} describing the reason and the respective - * {@code cause}. - * - * @param message - * The message. - * @param cause - * The cause. - */ - public ProcessExecutionException(String message, Throwable cause) { - super(message, cause); - } + /** + * Creates a new process execution exception providing a {@code message} describing the reason and + * the respective {@code cause}. + * + * @param message The message. + * @param cause The cause. + */ + public ProcessExecutionException(final String message, final Throwable cause) { + super(message, cause); + } - /** - * Creates a new process execution exception providing a {@code message} describing the reason. - * - * @param message - * The message. - */ - public ProcessExecutionException(String message) { - super(message); - } + /** + * Creates a new process execution exception providing a {@code message} describing the reason. + * + * @param message The message. + */ + public ProcessExecutionException(final String message) { + super(message); + } } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolNotActiveException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolNotActiveException.java index 79c94c7b..014ec9b2 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolNotActiveException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolNotActiveException.java @@ -1,44 +1,36 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; /** + * Protocol not-active error. + * * @author tlenz * */ -public class ProtocolNotActiveException extends EAAFProtocolException { +public class ProtocolNotActiveException extends EaafProtocolException { - /** - * - */ - private static final long serialVersionUID = 1832697083163940710L; + private static final long serialVersionUID = 1832697083163940710L; - public ProtocolNotActiveException(String internalMsgId, Object[] params) { - super(internalMsgId, params); - } + public ProtocolNotActiveException(final String internalMsgId, final Object[] params) { + super(internalMsgId, params); + } } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolResponseExceptions.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolResponseExceptions.java index 194505d3..7a1af227 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolResponseExceptions.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolResponseExceptions.java @@ -1,14 +1,14 @@ package at.gv.egiz.eaaf.core.exceptions; -public class ProtocolResponseExceptions extends EAAFProtocolException { +public class ProtocolResponseExceptions extends EaafProtocolException { - private static final long serialVersionUID = -7866198705324084601L; + private static final long serialVersionUID = -7866198705324084601L; - public ProtocolResponseExceptions(String internalMsgId, Object[] params) { - super(internalMsgId, params); - } + public ProtocolResponseExceptions(final String internalMsgId, final Object[] params) { + super(internalMsgId, params); + } - public ProtocolResponseExceptions(String internalMsgId, Object[] params, Throwable e) { - super(internalMsgId, params, e); - } + public ProtocolResponseExceptions(final String internalMsgId, final Object[] params, final Throwable e) { + super(internalMsgId, params, e); + } } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/SLOException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/SLOException.java deleted file mode 100644 index 4a52e7a2..00000000 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/SLOException.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/news/understanding-eupl-v12 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -package at.gv.egiz.eaaf.core.exceptions; - -/** - * @author tlenz - * - */ -public class SLOException extends EAAFException { - private static final long serialVersionUID = -5284624715788385022L; - - /** - * @param messageId - * @param parameters - */ - public SLOException(String messageId, Object[] parameters) { - super(messageId, parameters); - - } - -} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/SloException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/SloException.java new file mode 100644 index 00000000..4924fa6a --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/SloException.java @@ -0,0 +1,36 @@ +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + +package at.gv.egiz.eaaf.core.exceptions; + +/** + * Single Log-Out processing error. + * + * @author tlenz + * + */ +public class SloException extends EaafException { + private static final long serialVersionUID = -5284624715788385022L; + + public SloException(final String messageId, final Object[] parameters) { + super(messageId, parameters); + + } + +} diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java index 773cbc4a..61149691 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java @@ -1,77 +1,75 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; import at.gv.egiz.eaaf.core.api.IRequest; /** + * Task execution error. + * * @author tlenz * */ public class TaskExecutionException extends ProcessExecutionException { - private static final long serialVersionUID = 1L; - Throwable originalException = null; - String pendingRequestID = null; - - /** - * @param message - * @param cause - */ - public TaskExecutionException(IRequest pendingReq, String message, Throwable cause) { - super(message, cause); - this.originalException = cause; - - if (pendingReq.getPendingRequestId() != null && !pendingReq.getPendingRequestId().isEmpty()) - this.pendingRequestID = pendingReq.getPendingRequestId(); - - } + private static final long serialVersionUID = 1L; + Throwable originalException = null; + String pendingRequestID = null; + + /** + * Task execution error. + * + * @param pendingReq Current processed pending-request + * @param message error message + * @param cause error reason + */ + public TaskExecutionException(final IRequest pendingReq, final String message, + final Throwable cause) { + super(message, cause); + this.originalException = cause; + + if (pendingReq.getPendingRequestId() != null && !pendingReq.getPendingRequestId().isEmpty()) { + this.pendingRequestID = pendingReq.getPendingRequestId(); + } + + } + + /** + * Get the original internal exception from task. + * + * @return the originalException + */ + public Throwable getOriginalException() { + return originalException; + + } + + /** + * Get the pending-request ID of that request, which was processed when the exception occurs. + * + * @return the pendingRequestID + */ + public String getPendingRequestID() { + return pendingRequestID; + } + - /** - * Get the original internal exception from task - * - * @return the originalException - */ - public Throwable getOriginalException() { - return originalException; - - } - /** - * Get the pending-request ID of that request, which was processed when the exception occurs - * - * @return the pendingRequestID - */ - public String getPendingRequestID() { - return pendingRequestID; - } - - - - - } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/UnavailableAttributeException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/UnavailableAttributeException.java index 626cbea7..5bc0880b 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/UnavailableAttributeException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/UnavailableAttributeException.java @@ -1,46 +1,37 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; public class UnavailableAttributeException extends AttributeBuilderException { - /** - * - */ - private static final long serialVersionUID = -1114323185905118432L; - private final String attributeName; - - public UnavailableAttributeException(String attributeName) { - super(attributeName); - this.attributeName = attributeName; - } + private static final long serialVersionUID = -1114323185905118432L; + + private final String attributeName; + + public UnavailableAttributeException(final String attributeName) { + super(attributeName); + this.attributeName = attributeName; + } - public String getAttributeName() { - return attributeName; - } + public String getAttributeName() { + return attributeName; + } } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/XPathException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/XPathException.java index fe3a96e6..d3c41994 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/XPathException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/XPathException.java @@ -1,29 +1,22 @@ -/******************************************************************************* - * Copyright 2017 Graz University of Technology - * EAAF-Core Components has been developed in a cooperation between EGIZ, - * A-SIT Plus, A-SIT, and Graz University of Technology. +/* + * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a + * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European + * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in + * compliance with the Licence. You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ -/******************************************************************************* - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software distributed under the Licence + * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence for the specific language governing permissions and limitations under + * the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text file for details on the + * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative + * works that you distribute must include a readable copy of the "NOTICE" text file. +*/ + package at.gv.egiz.eaaf.core.exceptions; @@ -33,34 +26,32 @@ import java.io.PrintWriter; /** * An exception occurred evaluating an XPath. - * + * */ public class XPathException extends RuntimeException { - /** - * - */ - private static final long serialVersionUID = 1736311265333034392L; -/** The wrapped exception. */ + + private static final long serialVersionUID = 1736311265333034392L; + /** The wrapped exception. */ private Throwable wrapped; - + /** * Create a <code>XPathException</code>. - * + * * @param message The exception message. * @param wrapped The exception being the likely cause of this exception. */ - public XPathException(String message, Throwable wrapped) { + public XPathException(final String message, final Throwable wrapped) { super(message); - this.wrapped = wrapped; + this.wrapped = wrapped; } - - public XPathException(String string) { - super(string); -} -/** + public XPathException(final String string) { + super(string); + } + + /** * Return the wrapped exception. - * + * * @return The wrapped exception being the likely cause of this exception. */ public Throwable getWrapped() { @@ -68,9 +59,12 @@ public class XPathException extends RuntimeException { } /** + * Print error message. + * * @see java.lang.Throwable#printStackTrace(java.io.PrintStream) */ - public void printStackTrace(PrintStream s) { + @Override + public void printStackTrace(final PrintStream s) { super.printStackTrace(s); if (getWrapped() != null) { s.print("Caused by: "); @@ -79,14 +73,17 @@ public class XPathException extends RuntimeException { } /** + * Print error message. + * * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter) */ - public void printStackTrace(PrintWriter s) { + @Override + public void printStackTrace(final PrintWriter s) { super.printStackTrace(s); if (getWrapped() != null) { s.print("Caused by: "); getWrapped().printStackTrace(s); } } - + } |