Skip to content

Package: KuraInventoryPackages

KuraInventoryPackages

nameinstructionbranchcomplexitylinemethod
KuraInventoryPackages()
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%
addPackage(KuraInventoryPackage)
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%
getPackages()
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%
setPackages(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%

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:
18: import org.checkerframework.checker.nullness.qual.Nullable;
19: import javax.validation.constraints.NotNull;
20: import java.util.ArrayList;
21: import java.util.List;
22:
23: /**
24: * {@link KuraInventoryPackages} definition.
25: *
26: * @since 1.5.0
27: */
28: @JsonRootName("inventoryPackages")
29: public class KuraInventoryPackages {
30:
31: @JsonProperty("deploymentPackages")
32: public List<KuraInventoryPackage> packages;
33:
34: /**
35: * Gets the {@link KuraInventoryPackage}s {@link List}.
36: *
37: * @return The {@link KuraInventoryPackage}s {@link List}.
38: * @since 1.5.0
39: */
40: public List<KuraInventoryPackage> getPackages() {
41:• if (packages == null) {
42: packages = new ArrayList<>();
43: }
44:
45: return packages;
46: }
47:
48: /**
49: * Adds a {@link KuraInventoryPackage} to the {@link List}
50: *
51: * @param aPackage The {@link KuraInventoryPackage} to add.
52: * @since 1.5.0
53: */
54: public void addPackage(@NotNull KuraInventoryPackage aPackage) {
55: getPackages().add(aPackage);
56: }
57:
58: /**
59: * Sets the {@link KuraInventoryPackage}s {@link List}.
60: *
61: * @param packages The {@link KuraInventoryPackage}s {@link List}.
62: * @since 1.5.0
63: */
64: public void setPackages(@Nullable List<KuraInventoryPackage> packages) {
65: this.packages = packages;
66: }
67:
68: }