Skip to content

Package: DeviceInventoryPackage

DeviceInventoryPackage

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;
14:
15: import org.eclipse.kapua.service.device.management.inventory.model.bundle.DeviceInventoryBundle;
16:
17: import javax.xml.bind.annotation.XmlAccessType;
18: import javax.xml.bind.annotation.XmlAccessorType;
19: import javax.xml.bind.annotation.XmlElement;
20: import javax.xml.bind.annotation.XmlRootElement;
21: import javax.xml.bind.annotation.XmlType;
22: import java.util.List;
23:
24: /**
25: * {@link DeviceInventoryPackage} definition.
26: * <p>
27: * It represents a system package present on a device.
28: *
29: * @since 1.5.0
30: */
31: @XmlRootElement(name = "deviceInventoryDeploymentPackage")
32: @XmlAccessorType(XmlAccessType.PROPERTY)
33: @XmlType(factoryClass = DeviceInventoryPackagesXmlRegistry.class, factoryMethod = "newDeviceInventoryPackage")
34: public interface DeviceInventoryPackage {
35:
36: /**
37: * Gets the name.
38: *
39: * @return The name.
40: * @since 1.5.0
41: */
42: @XmlElement(name = "name")
43: String getName();
44:
45: /**
46: * Sets the name.
47: *
48: * @param name The name.
49: * @since 1.5.0
50: */
51: void setName(String name);
52:
53: /**
54: * Gets the bundle version.
55: *
56: * @return The version.
57: * @since 1.5.0
58: */
59: @XmlElement(name = "version")
60: String getVersion();
61:
62: /**
63: * Sets the version.
64: *
65: * @param version The version.
66: * @since 1.5.0
67: */
68: void setVersion(String version);
69:
70: /**
71: * Gets the {@link List} of {@link DeviceInventoryBundle}s.
72: *
73: * @return The {@link List} of {@link DeviceInventoryBundle}s.
74: * @since 1.5.0
75: */
76: List<DeviceInventoryBundle> getPackageBundles();
77:
78: /**
79: * Adds a {@link DeviceInventoryBundle} to the {@link List}.
80: *
81: * @param inventoryBundle The {@link DeviceInventoryBundle} to add.
82: * @since 1.5.0
83: */
84: void addPackageBundle(DeviceInventoryBundle inventoryBundle);
85:
86: /**
87: * Sets the {@link List} of {@link DeviceInventoryBundle}s.
88: *
89: * @param inventoryBundles The {@link List} of {@link DeviceInventoryBundle}s.
90: * @since 1.5.0
91: */
92: void setPackageBundles(List<DeviceInventoryBundle> inventoryBundles);
93: }