Skip to content

Package: DeviceRegistryService

DeviceRegistryService

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 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.registry;
14:
15: import org.eclipse.kapua.KapuaException;
16: import org.eclipse.kapua.model.id.KapuaId;
17: import org.eclipse.kapua.model.query.KapuaQuery;
18: import org.eclipse.kapua.service.KapuaEntityService;
19: import org.eclipse.kapua.service.KapuaUpdatableEntityService;
20: import org.eclipse.kapua.service.config.KapuaConfigurableService;
21:
22: /**
23: * Device registry service definition.
24: *
25: * @since 1.0
26: */
27: public interface DeviceRegistryService extends KapuaEntityService<Device, DeviceCreator>,
28: KapuaUpdatableEntityService<Device>,
29: KapuaConfigurableService {
30:
31: /**
32: * Returns the {@link DeviceListResult} with elements matching the provided query.
33: *
34: * @param query The {@link DeviceQuery} used to filter results.
35: * @return The {@link DeviceListResult} with elements matching the query parameter.
36: * @throws KapuaException
37: * @since 1.0.0
38: */
39: @Override
40: DeviceListResult query(KapuaQuery query) throws KapuaException;
41:
42: /**
43: * Finds a device by its unique clientId and loads it with all its properties.
44: *
45: * @param scopeId
46: * @param clientId
47: * @return
48: * @throws KapuaException
49: */
50: Device findByClientId(KapuaId scopeId, String clientId) throws KapuaException;
51: }