Skip to content

Package: DeviceConfigurationStoreService

DeviceConfigurationStoreService

Coverage

1: /*******************************************************************************
2: * Copyright (c) 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.configuration.store;
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.config.KapuaConfigurableService;
19: import org.eclipse.kapua.service.device.management.app.settings.ByDeviceAppManagementSettingsService;
20: import org.eclipse.kapua.service.device.management.configuration.DeviceComponentConfiguration;
21: import org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration;
22: import org.eclipse.kapua.service.device.management.configuration.store.settings.DeviceConfigurationStoreSettings;
23: import org.eclipse.kapua.service.device.registry.Device;
24:
25: /**
26: * {@link DeviceConfiguration} store {@link KapuaService} definition.
27: *
28: * @since 2.0.0
29: */
30: public interface DeviceConfigurationStoreService extends KapuaService, KapuaConfigurableService, ByDeviceAppManagementSettingsService<DeviceConfigurationStoreSettings> {
31:
32: /**
33: * Stores the {@link DeviceConfiguration}.
34: *
35: * @param scopeId The {@link Device#getScopeId()}.
36: * @param deviceId The {@link Device#getId()}.
37: * @param deviceConfiguration The {@link DeviceConfiguration} to store.
38: * @throws KapuaException
39: * @since 2.0.0
40: */
41: void storeConfigurations(KapuaId scopeId, KapuaId deviceId, DeviceConfiguration deviceConfiguration) throws KapuaException;
42:
43: /**
44: * Stores the {@link DeviceComponentConfiguration}
45: *
46: * @param scopeId The {@link Device#getScopeId()}.
47: * @param deviceId The {@link Device#getId()}.
48: * @param deviceComponentConfiguration The {@link DeviceComponentConfiguration} to store.
49: * @throws KapuaException
50: * @since 2.0.0
51: */
52: void storeConfigurations(KapuaId scopeId, KapuaId deviceId, DeviceComponentConfiguration deviceComponentConfiguration) throws KapuaException;
53:
54: /**
55: * Gets the last stored {@link DeviceConfiguration}
56: *
57: * @param scopeId The {@link Device#getScopeId()}.
58: * @param deviceId The {@link Device#getId()}.
59: * @return The last stored {@link DeviceConfiguration}.
60: * @throws KapuaException
61: * @since 2.0.0
62: */
63: DeviceConfiguration getConfigurations(KapuaId scopeId, KapuaId deviceId) throws KapuaException;
64:
65: /**
66: * Gets the last stored {@link DeviceComponentConfiguration}.
67: *
68: * @param scopeId The {@link Device#getScopeId()}.
69: * @param deviceId The {@link Device#getId()}.
70: * @param configurationComponentPid The {@link DeviceComponentConfiguration#getId()}.
71: * @return The last stored {@link DeviceComponentConfiguration}.
72: * @throws KapuaException
73: * @since 2.0.0
74: */
75: DeviceComponentConfiguration getConfigurations(KapuaId scopeId, KapuaId deviceId, String configurationComponentPid) throws KapuaException;
76:
77: }