Skip to content

Package: DeviceInventoryManagementService

DeviceInventoryManagementService

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;
14:
15: import org.eclipse.kapua.KapuaException;
16: import org.eclipse.kapua.model.id.KapuaId;
17: import org.eclipse.kapua.service.KapuaService;
18: import org.eclipse.kapua.service.device.management.DeviceManagementService;
19: import org.eclipse.kapua.service.device.management.inventory.model.bundle.DeviceInventoryBundle;
20: import org.eclipse.kapua.service.device.management.inventory.model.bundle.DeviceInventoryBundleAction;
21: import org.eclipse.kapua.service.device.management.inventory.model.bundle.DeviceInventoryBundles;
22: import org.eclipse.kapua.service.device.management.inventory.model.container.DeviceInventoryContainer;
23: import org.eclipse.kapua.service.device.management.inventory.model.container.DeviceInventoryContainerAction;
24: import org.eclipse.kapua.service.device.management.inventory.model.container.DeviceInventoryContainers;
25: import org.eclipse.kapua.service.device.management.inventory.model.inventory.DeviceInventory;
26: import org.eclipse.kapua.service.device.management.inventory.model.inventory.DeviceInventoryItem;
27: import org.eclipse.kapua.service.device.management.inventory.model.packages.DeviceInventoryPackages;
28: import org.eclipse.kapua.service.device.management.inventory.model.system.DeviceInventorySystemPackages;
29: import org.eclipse.kapua.service.device.registry.Device;
30:
31: /**
32: * {@link DeviceInventoryItem} {@link KapuaService} definition.
33: *
34: * @see org.eclipse.kapua.service.KapuaService
35: * @since 1.5.0
36: */
37: public interface DeviceInventoryManagementService extends DeviceManagementService {
38:
39: /**
40: * Gets the {@link DeviceInventory}
41: *
42: * @param scopeId The scope {@link KapuaId} of the target {@link Device}
43: * @param deviceId The {@link Device#getId()}
44: * @param timeout The timeout waiting for the device response
45: * @return The {@link DeviceInventory} retrieved from the {@link Device}
46: * @throws KapuaException
47: * @since 1.5.0
48: */
49: DeviceInventory getInventory(KapuaId scopeId, KapuaId deviceId, Long timeout) throws KapuaException;
50:
51: /**
52: * Gets the {@link DeviceInventoryBundles}
53: *
54: * @param scopeId The scope {@link KapuaId} of the target {@link Device}
55: * @param deviceId The {@link Device#getId()}
56: * @param timeout The timeout waiting for the device response
57: * @return The {@link DeviceInventoryBundles} retrieved from the {@link Device}
58: * @throws KapuaException
59: * @since 1.5.0
60: */
61: DeviceInventoryBundles getBundles(KapuaId scopeId, KapuaId deviceId, Long timeout) throws KapuaException;
62:
63: /**
64: * Executes an action on a {@link DeviceInventoryBundle}.
65: *
66: * @param scopeId The scope {@link KapuaId} of the target {@link Device}
67: * @param deviceId The {@link Device#getId()}
68: * @param deviceInventoryBundle The {@link DeviceInventoryBundle} to execute the action on.
69: * @param deviceInventoryBundleAction The {@link DeviceInventoryBundleAction}.
70: * @param timeout The timeout waiting for the device response
71: * @throws KapuaException
72: * @since 1.5.0
73: */
74: void execBundle(KapuaId scopeId, KapuaId deviceId, DeviceInventoryBundle deviceInventoryBundle, DeviceInventoryBundleAction deviceInventoryBundleAction, Long timeout) throws KapuaException;
75:
76: /**
77: * Gets the {@link DeviceInventoryContainers}
78: *
79: * @param scopeId The scope {@link KapuaId} of the target {@link Device}
80: * @param deviceId The {@link Device#getId()}
81: * @param timeout The timeout waiting for the device response
82: * @return The {@link DeviceInventoryContainers} retrieved from the {@link Device}
83: * @throws KapuaException
84: * @since 1.5.0
85: */
86: DeviceInventoryContainers getContainers(KapuaId scopeId, KapuaId deviceId, Long timeout) throws KapuaException;
87:
88: /**
89: * Executes an action on a {@link DeviceInventoryContainer}.
90: *
91: * @param scopeId The scope {@link KapuaId} of the target {@link Device}
92: * @param deviceId The {@link Device#getId()}
93: * @param deviceInventoryContainer The {@link DeviceInventoryContainer} to execute the action on.
94: * @param deviceInventoryContainerAction The {@link DeviceInventoryContainerAction}.
95: * @param timeout The timeout waiting for the device response
96: * @throws KapuaException
97: * @since 2.0.0
98: */
99: void execContainer(KapuaId scopeId, KapuaId deviceId, DeviceInventoryContainer deviceInventoryContainer, DeviceInventoryContainerAction deviceInventoryContainerAction, Long timeout) throws KapuaException;
100:
101: /**
102: * Gets the {@link DeviceInventorySystemPackages}
103: *
104: * @param scopeId The scope {@link KapuaId} of the target {@link Device}
105: * @param deviceId The {@link Device#getId()}
106: * @param timeout The timeout waiting for the device response
107: * @return The {@link DeviceInventorySystemPackages} retrieved from the {@link Device}
108: * @throws KapuaException
109: * @since 2.0.0
110: */
111: DeviceInventorySystemPackages getSystemPackages(KapuaId scopeId, KapuaId deviceId, Long timeout) throws KapuaException;
112:
113: /**
114: * Gets the {@link DeviceInventoryPackages}
115: *
116: * @param scopeId The scope {@link KapuaId} of the target {@link Device}
117: * @param deviceId The {@link Device#getId()}
118: * @param timeout The timeout waiting for the device response
119: * @return The {@link DeviceInventoryPackages} retrieved from the {@link Device}
120: * @throws KapuaException
121: * @since 1.5.0
122: */
123: DeviceInventoryPackages getDeploymentPackages(KapuaId scopeId, KapuaId deviceId, Long timeout) throws KapuaException;
124: }