Skip to content

Package: KuraInventoryPackage

KuraInventoryPackage

nameinstructionbranchcomplexitylinemethod
KuraInventoryPackage()
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%
addPackageBundle(KuraInventoryBundle)
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%
getName()
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%
getPackageBundles()
M: 11 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getVersion()
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%
setName(String)
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%
setPackageBundles(List)
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%
setVersion(String)
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%

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.call.kura.model.inventory.packages;
14:
15: import com.fasterxml.jackson.annotation.JsonProperty;
16: import com.fasterxml.jackson.annotation.JsonRootName;
17: import org.eclipse.kapua.service.device.call.kura.model.inventory.bundles.KuraInventoryBundle;
18:
19: import java.util.ArrayList;
20: import java.util.List;
21:
22: /**
23: * {@link KuraInventoryPackage} definition.
24: *
25: * @since 1.5.0
26: */
27: @JsonRootName("inventoryPackage")
28: public class KuraInventoryPackage {
29:
30: @JsonProperty("name")
31: public String name;
32:
33: @JsonProperty("version")
34: public String version;
35:
36: @JsonProperty("bundles")
37: List<KuraInventoryBundle> packageBundles;
38:
39: /**
40: * Gets the name.
41: *
42: * @return The name.
43: * @since 1.5.0
44: */
45: public String getName() {
46: return name;
47: }
48:
49: /**
50: * Sets the name.
51: *
52: * @param name The name.
53: * @since 1.5.0
54: */
55: public void setName(String name) {
56: this.name = name;
57: }
58:
59: /**
60: * Gets the version.
61: *
62: * @return The version.
63: * @since 1.5.0
64: */
65: public String getVersion() {
66: return version;
67: }
68:
69: /**
70: * Gets the version.
71: *
72: * @param version The version.
73: * @since 1.5.0
74: */
75: public void setVersion(String version) {
76: this.version = version;
77: }
78:
79: /**
80: * Gets the {@link List} of {@link KuraInventoryBundle}s
81: *
82: * @return The {@link List} of {@link KuraInventoryBundle}s
83: * @since 1.5.0
84: */
85: public List<KuraInventoryBundle> getPackageBundles() {
86:• if (packageBundles == null) {
87: packageBundles = new ArrayList<>();
88: }
89:
90: return packageBundles;
91: }
92:
93: /**
94: * Adds a {@link KuraInventoryBundle} to the {@link List}.
95: *
96: * @param packageBundle The {@link KuraInventoryBundle} to add.
97: * @since 1.5.0
98: */
99: public void addPackageBundle(KuraInventoryBundle packageBundle) {
100: getPackageBundles().add(packageBundle);
101: }
102:
103: /**
104: * Sets the {@link List} of {@link KuraInventoryBundle}s
105: *
106: * @param packageBundles The {@link List} of {@link KuraInventoryBundle}s
107: * @since 1.5.0
108: */
109: public void setPackageBundles(List<KuraInventoryBundle> packageBundles) {
110: this.packageBundles = packageBundles;
111: }
112: }