Skip to content

Package: DeviceManagementRequestContentException

DeviceManagementRequestContentException

nameinstructionbranchcomplexitylinemethod
DeviceManagementRequestContentException(Throwable, Object)
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getRequestContent()
M: 3 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) 2021, 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.device.management.exception;
14:
15: import org.eclipse.kapua.KapuaSerializable;
16:
17: import javax.validation.constraints.NotNull;
18:
19: /**
20: * {@link DeviceManagementRequestException} to {@code throw} when the content of the request has any problem.
21: *
22: * @since 1.5.0
23: */
24: public class DeviceManagementRequestContentException extends DeviceManagementRequestException {
25:
26: private static final long serialVersionUID = 6369408505280888324L;
27:
28: private final Object requestContent;
29:
30: /**
31: * Constructor.
32: *
33: * @param cause The root cause of the {@link Exception}.
34: * @param requestContent The content that cannot be serialized.
35: * @since 1.1.0
36: */
37: public DeviceManagementRequestContentException(@NotNull Throwable cause, @NotNull Object requestContent) {
38: super(DeviceManagementErrorCodes.REQUEST_CONTENT, cause, requestContent);
39:
40: this.requestContent = requestContent;
41: }
42:
43: /**
44: * Gets the {@link KapuaSerializable}
45: *
46: * @return The {@link KapuaSerializable}
47: * @since 1.1.0
48: */
49: public Object getRequestContent() {
50: return requestContent;
51: }
52:
53: }