Skip to content

Package: DeviceAsset

DeviceAsset

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2017, 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.asset;
14:
15: import org.eclipse.kapua.service.device.management.asset.xml.DeviceAssetChannelXmlAdapter;
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.XmlElementWrapper;
21: import javax.xml.bind.annotation.XmlRootElement;
22: import javax.xml.bind.annotation.XmlType;
23: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
24: import java.util.List;
25:
26: /**
27: * {@link DeviceAsset} definition.
28: * <p>
29: * This entity is used to get information about assets installed in the device.
30: *
31: * @since 1.0.0
32: */
33: @XmlRootElement(name = "deviceAsset")
34: @XmlAccessorType(XmlAccessType.PROPERTY)
35: @XmlType(factoryClass = DeviceAssetXmlRegistry.class, factoryMethod = "newDeviceAsset")
36: public interface DeviceAsset {
37:
38: /**
39: * Gets the name.
40: *
41: * @return The name.
42: * @since 1.0.0
43: */
44: @XmlElement(name = "name")
45: String getName();
46:
47: /**
48: * Sets the name.
49: *
50: * @param name The name.
51: * @since 1.0.0
52: */
53: void setName(String name);
54:
55: /**
56: * Gets the {@link DeviceAssetChannel} available.
57: *
58: * @return The {@link DeviceAssetChannel} available.
59: * @since 1.0.0
60: */
61: @XmlElementWrapper(name = "channels")
62: @XmlElement(name = "channel")
63: @XmlJavaTypeAdapter(DeviceAssetChannelXmlAdapter.class)
64: List<DeviceAssetChannel> getChannels();
65:
66: /**
67: * Sets the {@link DeviceAssetChannel} available.
68: *
69: * @param channels The {@link DeviceAssetChannel} available.
70: * @since 1.0.0
71: */
72: void setChannels(List<DeviceAssetChannel> channels);
73: }