Skip to contentPackage: DeviceAssetXmlRegistry
DeviceAssetXmlRegistry
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.locator.KapuaLocator;
16:
17: import javax.xml.bind.annotation.XmlRegistry;
18:
19: /**
20: * {@link DeviceAsset} XML factory class
21: *
22: * @since 1.0.0
23: */
24: @XmlRegistry
25: public class DeviceAssetXmlRegistry {
26:
27: private static final KapuaLocator LOCATOR = KapuaLocator.getInstance();
28: private static final DeviceAssetFactory DEVICE_ASSET_FACTORY = LOCATOR.getFactory(DeviceAssetFactory.class);
29:
30: /**
31: * Instantiate a new {@link DeviceAssets}.
32: *
33: * @return The newly instantiate {@link DeviceAssets}.
34: * @since 1.0.0
35: */
36: public DeviceAssets newAssetListResult() {
37: return DEVICE_ASSET_FACTORY.newAssetListResult();
38: }
39:
40: /**
41: * Instantiate a new {@link DeviceAsset}.
42: *
43: * @return The newly instantiated {@link DeviceAsset}.
44: * @since 1.0.0
45: */
46: public DeviceAsset newDeviceAsset() {
47: return DEVICE_ASSET_FACTORY.newDeviceAsset();
48: }
49:
50: /**
51: * Instantiate a new {@link DeviceAssetChannel}.
52: *
53: * @return The newly instantiated {@link DeviceAssetChannel}.
54: * @since 1.0.0
55: */
56: public DeviceAssetChannel newDeviceAssetChannel() {
57: return DEVICE_ASSET_FACTORY.newDeviceAssetChannel();
58: }
59: }