Skip to content

Package: KapuaResponseCode

KapuaResponseCode

nameinstructionbranchcomplexitylinemethod
isAccepted()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isBadRequest()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isInternalError()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isNotFound()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 44 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2020 Eurotech and/or its affiliates and others
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License v1.0
6: * which accompanies this distribution, and is available at
7: * http://www.eclipse.org/legal/epl-v10.html
8: *
9: * Contributors:
10: * Eurotech - initial API and implementation
11: *******************************************************************************/
12: package org.eclipse.kapua.service.device.management.message.response;
13:
14: /**
15: * Request/reply message response code.
16: *
17: * @since 1.0
18: */
19: public enum KapuaResponseCode {
20: /**
21: * Accepted
22: */
23: ACCEPTED, // 200, 204
24: /**
25: * Bad request
26: */
27: BAD_REQUEST, // 400
28: /**
29: * Resource not found
30: */
31: NOT_FOUND, // 404
32: /**
33: * Internal error
34: */
35: INTERNAL_ERROR; // 500
36:
37: public boolean isAccepted() {
38: return ACCEPTED.equals(this);
39: }
40:
41: public boolean isBadRequest() {
42: return BAD_REQUEST.equals(this);
43: }
44:
45: public boolean isNotFound() {
46: return NOT_FOUND.equals(this);
47: }
48:
49: public boolean isInternalError() {
50: return INTERNAL_ERROR.equals(this);
51: }
52: }