Skip to content

Package: DeviceInventoryPackageImpl

DeviceInventoryPackageImpl

nameinstructionbranchcomplexitylinemethod
DeviceInventoryPackageImpl()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
addPackageBundle(DeviceInventoryBundle)
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.management.inventory.model.packages.internal;
14:
15: import org.eclipse.kapua.service.device.management.inventory.model.bundle.DeviceInventoryBundle;
16: import org.eclipse.kapua.service.device.management.inventory.model.inventory.DeviceInventoryItem;
17: import org.eclipse.kapua.service.device.management.inventory.model.packages.DeviceInventoryPackage;
18:
19: import java.util.ArrayList;
20: import java.util.List;
21:
22: /**
23: * {@link DeviceInventoryItem} implementation.
24: *
25: * @since 1.5.0
26: */
27: public class DeviceInventoryPackageImpl implements DeviceInventoryPackage {
28:
29: private String name;
30: private String version;
31: private List<DeviceInventoryBundle> packageBundles;
32:
33: /**
34: * Constructor.
35: *
36: * @since 1.5.0
37: */
38: public DeviceInventoryPackageImpl() {
39: }
40:
41: @Override
42: public String getName() {
43: return name;
44: }
45:
46: @Override
47: public void setName(String name) {
48: this.name = name;
49: }
50:
51: @Override
52: public String getVersion() {
53: return version;
54: }
55:
56: @Override
57: public void setVersion(String version) {
58: this.version = version;
59: }
60:
61: @Override
62: public List<DeviceInventoryBundle> getPackageBundles() {
63:• if (packageBundles == null) {
64: packageBundles = new ArrayList<>();
65: }
66:
67: return packageBundles;
68: }
69:
70: @Override
71: public void addPackageBundle(DeviceInventoryBundle inventoryBundle) {
72: getPackageBundles().add(inventoryBundle);
73: }
74:
75: @Override
76: public void setPackageBundles(List<DeviceInventoryBundle> packageBundles) {
77: this.packageBundles = packageBundles;
78: }
79: }