Skip to content

Package: KapuaAuthenticationException

KapuaAuthenticationException

nameinstructionbranchcomplexitylinemethod
KapuaAuthenticationException(AuthenticationErrorCodes)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
KapuaAuthenticationException(AuthenticationErrorCodes, Object[])
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
KapuaAuthenticationException(AuthenticationErrorCodes, Throwable, Object[])
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getKapuaErrorMessagesBundle()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.authentication.exception;
14:
15: import org.eclipse.kapua.KapuaErrorCode;
16: import org.eclipse.kapua.KapuaException;
17:
18: import javax.validation.constraints.NotNull;
19:
20: /**
21: * {@link KapuaException} for `kapua-authentication-api` module.
22: *
23: * @since 2.0.0
24: */
25: public abstract class KapuaAuthenticationException extends KapuaException {
26:
27: private static final String ERROR_MESSAGE_RESOURCE_BUNDLE = "authentication-error-messages";
28:
29: /**
30: * Constructor.
31: *
32: * @param code The {@link KapuaErrorCode} associated with the {@link KapuaAuthenticationException}.
33: * @since 2.0.0
34: */
35: protected KapuaAuthenticationException(@NotNull AuthenticationErrorCodes code) {
36: super(code);
37: }
38:
39: /**
40: * Constructor.
41: *
42: * @param code The {@link KapuaErrorCode} associated with the {@link KapuaAuthenticationException}.
43: * @param arguments The arguments associated with the {@link KapuaAuthenticationException}.
44: * @since 2.0.0
45: */
46: protected KapuaAuthenticationException(@NotNull AuthenticationErrorCodes code, Object... arguments) {
47: super(code, arguments);
48: }
49:
50: /**
51: * Constructor.
52: *
53: * @param code The {@link KapuaErrorCode} associated with the {@link KapuaAuthenticationException}.
54: * @param cause The original {@link Throwable}.
55: * @param arguments The arguments associated with the {@link KapuaAuthenticationException}.
56: * @since 2.0.0
57: */
58: protected KapuaAuthenticationException(@NotNull AuthenticationErrorCodes code, @NotNull Throwable cause, Object... arguments) {
59: super(code, cause, arguments);
60: }
61:
62: @Override
63: protected String getKapuaErrorMessagesBundle() {
64: return ERROR_MESSAGE_RESOURCE_BUNDLE;
65: }
66: }