From edbcf923b81b06cd4d2af3ab25697da4c23acc4a Mon Sep 17 00:00:00 2001 From: Pierantonio Merlino Date: Tue, 13 Aug 2024 14:58:50 +0200 Subject: [PATCH] deprecate(api): Deprecated `net.admin` related APIs (#5320) * Deprecated ConnectionInfo Signed-off-by: pierantoniomerlino * Deprecated EthernetMonitorService and NetworkAdminService Signed-off-by: pierantoniomerlino * Deprecated NetInterface events Signed-off-by: pierantoniomerlino * Deprecated NetRouterMode Signed-off-by: pierantoniomerlino * Deprecated DnsMonitorService Signed-off-by: pierantoniomerlino * Remove import from NetworkAdminService Signed-off-by: pierantoniomerlino * Deprecated CellularModem and ModemCdmaServiceProvider Signed-off-by: pierantoniomerlino * Deprecated several modem related classes and interfaces Signed-off-by: pierantoniomerlino * Deprecated RoutingAgentService Signed-off-by: pierantoniomerlino * Deprecated wifi releated classes and interfaces Signed-off-by: pierantoniomerlino * Small refactor Signed-off-by: pierantoniomerlino * Small refactor again Signed-off-by: pierantoniomerlino * Updated package export versions Signed-off-by: pierantoniomerlino * Updated net.modem version; updated firewall imports Signed-off-by: pierantoniomerlino --------- Signed-off-by: pierantoniomerlino --- .../org.eclipse.kura.api/META-INF/MANIFEST.MF | 10 ++--- .../org/eclipse/kura/net/ConnectionInfo.java | 17 +++++--- .../kura/net/EthernetMonitorService.java | 4 +- .../kura/net/NetInterfaceAddedEvent.java | 4 +- .../kura/net/NetInterfaceRemovedEvent.java | 4 +- .../net/NetInterfaceStateChangedEvent.java | 13 +++++-- .../org/eclipse/kura/net/NetRouterMode.java | 5 ++- .../eclipse/kura/net/NetworkAdminService.java | 21 ++++++---- .../kura/net/dns/DnsMonitorService.java | 4 +- .../eclipse/kura/net/modem/CellularModem.java | 30 +++++++++----- .../net/modem/ModemCdmaServiceProvider.java | 6 ++- .../kura/net/modem/ModemManagerService.java | 39 ++++++++++++------- .../kura/net/modem/ModemMonitorListener.java | 6 ++- .../kura/net/modem/ModemMonitorService.java | 4 +- .../kura/net/modem/ModemPdpContext.java | 6 ++- .../kura/net/modem/ModemPdpContextType.java | 4 +- .../kura/net/route/RoutingAgentService.java | 16 +++++--- .../net/wifi/WifiAccessPointAddedEvent.java | 4 +- .../net/wifi/WifiAccessPointRemovedEvent.java | 4 +- .../net/wifi/WifiClientMonitorListener.java | 6 ++- .../net/wifi/WifiClientMonitorService.java | 18 +++++---- .../kura/net/wifi/WifiHotspotInfo.java | 4 +- .../META-INF/MANIFEST.MF | 2 +- .../META-INF/MANIFEST.MF | 6 +-- .../kura/linux/net/ConnectionInfoImpl.java | 14 +++++-- .../META-INF/MANIFEST.MF | 33 +--------------- .../META-INF/MANIFEST.MF | 2 +- 27 files changed, 173 insertions(+), 113 deletions(-) diff --git a/kura/org.eclipse.kura.api/META-INF/MANIFEST.MF b/kura/org.eclipse.kura.api/META-INF/MANIFEST.MF index fcb02c390cd..fe4ef5dd9fe 100644 --- a/kura/org.eclipse.kura.api/META-INF/MANIFEST.MF +++ b/kura/org.eclipse.kura.api/META-INF/MANIFEST.MF @@ -56,12 +56,12 @@ Export-Package: org.eclipse.kura;version="1.7.0", org.eclipse.kura.message;version="1.5.0", org.eclipse.kura.message.store;version="1.0.0", org.eclipse.kura.message.store.provider;version="1.0.0", - org.eclipse.kura.net;version="2.6.0", + org.eclipse.kura.net;version="2.7.0", org.eclipse.kura.net.dhcp;version="1.2.0", - org.eclipse.kura.net.dns;version="1.1.0", + org.eclipse.kura.net.dns;version="1.2.0", org.eclipse.kura.net.firewall;version="2.1.0", - org.eclipse.kura.net.modem;version="2.4.0", - org.eclipse.kura.net.route;version="1.0.2", + org.eclipse.kura.net.modem;version="2.5.0", + org.eclipse.kura.net.route;version="1.1.0", org.eclipse.kura.net.status;version="1.1.0", org.eclipse.kura.net.status.ethernet;version="1.0.0", org.eclipse.kura.net.status.loopback;version="1.0.0", @@ -69,7 +69,7 @@ Export-Package: org.eclipse.kura;version="1.7.0", org.eclipse.kura.net.status.vlan;version="1.0.0", org.eclipse.kura.net.status.wifi;version="1.0.0", org.eclipse.kura.net.vlan;version="1.0.0", - org.eclipse.kura.net.wifi;version="2.4.0", + org.eclipse.kura.net.wifi;version="2.5.0", org.eclipse.kura.position;version="1.3.0", org.eclipse.kura.security;version="1.3.0", org.eclipse.kura.security.keystore;version="1.1.0", diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/ConnectionInfo.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/ConnectionInfo.java index 062ded89bba..d33ab39cd91 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/ConnectionInfo.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/ConnectionInfo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -17,14 +17,18 @@ import org.osgi.annotation.versioning.ProviderType; /** - * Interface for network interface 'connection info'. At runtime an interface may be associated with - * gateways or DNS but the interface itself may not be active. If this is the case the ConnectionInfo - * class is used to keep all relevant information in the event that this interface should become the - * active one. This is necessary because many operating systems to not persist this information. + * Interface for network interface 'connection info'. At runtime an interface + * may be associated with gateways or DNS but the interface itself may not be + * active. If this is the case the ConnectionInfo class is used to keep all + * relevant information in the event that this interface should become the + * active one. This is necessary because many operating systems to not persist + * this information. * * @noimplement This interface is not intended to be implemented by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public interface ConnectionInfo { /** @@ -37,7 +41,8 @@ public interface ConnectionInfo { /** * Gets the DNS addresses associated with this interface * - * @return A List of IP4Address objects representing the DNS of this interface. If there are none it returns an + * @return A List of IP4Address objects representing the DNS of this interface. + * If there are none it returns an * empty list. */ public List getDnsServers(); diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/EthernetMonitorService.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/EthernetMonitorService.java index 8623eb9c609..7dde8d21376 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/EthernetMonitorService.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/EthernetMonitorService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -18,7 +18,9 @@ * Placeholder for the EthernetLinkStateMonitorService * * @noimplement This interface is not intended to be implemented by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public interface EthernetMonitorService { } diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceAddedEvent.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceAddedEvent.java index b73ab808e3c..b477666a3a4 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceAddedEvent.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceAddedEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -21,8 +21,10 @@ * An event raised when a new network interface has been added to the system. * * @noextend This class is not intended to be subclassed by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public class NetInterfaceAddedEvent extends Event { /** Topic of the NetworkInterfaceAddedEvent */ diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceRemovedEvent.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceRemovedEvent.java index c2f57b7abbe..5c7c43700d9 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceRemovedEvent.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceRemovedEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -21,8 +21,10 @@ * An event raised when a network interface has been removed from the system. * * @noextend This class is not intended to be subclassed by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public class NetInterfaceRemovedEvent extends Event { /** Topic of the NetworkInterfaceRemovedEvent */ diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceStateChangedEvent.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceStateChangedEvent.java index 7b1cce076b6..d30388e4480 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceStateChangedEvent.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetInterfaceStateChangedEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -21,8 +21,10 @@ * Event raised when the state of a network interface has changed. * * @noextend This class is not intended to be subclassed by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public class NetInterfaceStateChangedEvent extends Event { /** Topic of the NetworkStateChangedEvent */ @@ -96,7 +98,9 @@ public enum Reason { /** The device could not be readied for configuration. */ REASON_CONFIG_FAILED, - /** IP configuration could not be reserved (no available address, timeout, etc). */ + /** + * IP configuration could not be reserved (no available address, timeout, etc). + */ REASON_CONFIG_UNAVAILABLE, /** The IP configuration is no longer valid. */ @@ -105,7 +109,10 @@ public enum Reason { /** Secrets were required, but not provided. */ REASON_NO_SECRETS, - /** The 802.1X supplicant disconnected from the access point or authentication server. */ + /** + * The 802.1X supplicant disconnected from the access point or authentication + * server. + */ REASON_SUPPLICANT_DISCONNECT, /** Configuration of the 802.1X supplicant failed. */ diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetRouterMode.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetRouterMode.java index 18d8088c23d..7efbacd09eb 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetRouterMode.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetRouterMode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -14,7 +14,10 @@ /** * Used to specify the route mode of each interface. + * + * @deprecated since version 3.0. */ +@Deprecated public enum NetRouterMode { /** DHCP and NAT **/ netRouterDchpNat, diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetworkAdminService.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetworkAdminService.java index a4113f35bf6..d9b3be7de70 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetworkAdminService.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetworkAdminService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2023 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -30,8 +30,10 @@ * Service API for getting and setting network interface configurations. * * @noimplement This interface is not intended to be implemented by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public interface NetworkAdminService { /** @@ -63,7 +65,7 @@ public List> g * @param interfaceName * @return list of NetConfig for this interface. * - * @deprecated since 2.4. Use {@link getNetworkInterfaceConfigs(tring + * @deprecated since 2.4. Use {@link getNetworkInterfaceConfigs(String * interfaceName, boolean recompute)} instead. */ @Deprecated @@ -81,8 +83,9 @@ public List> g * automatic default * @throws KuraException * - * @deprecated Since 2.4. Use the {@link ConfigurationService} to update the - * configuration of an Ethernet interface. + * @deprecated Since 2.4. Use the + * {@link org.eclipse.kura.configuration.ConfigurationService} to + * update the configuration of an Ethernet interface. */ @Deprecated public void updateEthernetInterfaceConfig(String interfaceName, boolean autoConnect, int mtu, @@ -97,8 +100,9 @@ public void updateEthernetInterfaceConfig(String interfaceName, boolean autoConn * - specifies the auto-connect value for the interface * @throws KuraException * - * @deprecated Since 2.4. Use the {@link ConfigurationService} to update the - * configuration of a Wifi interface. + * @deprecated Since 2.4. Use the + * {@link org.eclipse.kura.configuration.ConfigurationService} to + * update the configuration of a Wifi interface. */ @Deprecated public void updateWifiInterfaceConfig(String interfaceName, boolean autoConnect, WifiAccessPoint accessPoint, @@ -124,8 +128,9 @@ public void updateWifiInterfaceConfig(String interfaceName, boolean autoConnect, * - list of NetConfigs for this interface * @throws KuraException * - * @deprecated Since 2.4. Use the {@link ConfigurationService} to update the - * configuration of a Modem interface. + * @deprecated Since 2.4. Use the + * {@link org.eclipse.kura.configuration.ConfigurationService} to + * update the configuration of a Modem interface. */ @Deprecated public void updateModemInterfaceConfig(String interfaceName, String serialNum, String modemId, int pppNumber, diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/dns/DnsMonitorService.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/dns/DnsMonitorService.java index c3311289eaa..b843b3a0c26 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/dns/DnsMonitorService.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/dns/DnsMonitorService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -18,8 +18,10 @@ * Marker interface for dns server monitoring service * * @noimplement This interface is not intended to be implemented by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public interface DnsMonitorService { } diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/CellularModem.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/CellularModem.java index 4cf48aa12c9..c01cfb4c664 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/CellularModem.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/CellularModem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2022 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -22,8 +22,10 @@ /** * @noimplement This interface is not intended to be implemented by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public interface CellularModem { public enum SerialPortType { @@ -60,7 +62,8 @@ public enum SerialPortType { * @return IMSI number, null if not known * @throws KuraException * - * @deprecated since 2.4. Use {@link getMobileSubscriberIdentity(boolean recompute)} instead. + * @deprecated since 2.4. Use {@link getMobileSubscriberIdentity(boolean + * recompute)} instead. */ @Deprecated public String getMobileSubscriberIdentity() throws KuraException; @@ -71,7 +74,8 @@ public enum SerialPortType { * @return ICCID, "N/A" if not applicable * @throws KuraException * - * @deprecated since 2.4. Use {@link getIntegratedCirquitCardId(boolean recompute)} instead. + * @deprecated since 2.4. Use {@link getIntegratedCirquitCardId(boolean + * recompute)} instead. */ @Deprecated public String getIntegratedCirquitCardId() throws KuraException; @@ -95,7 +99,7 @@ public enum SerialPortType { * Reports if specified port can be opened * * @param port - * - modem's serial port + * - modem's serial port * @return 'true' if port can be opened, 'false' otherwise */ public boolean isPortReachable(String port); @@ -114,7 +118,8 @@ public enum SerialPortType { * @throws KuraException * @return signal strength * - * @deprecated since 2.4. Use {@link getSignalStrength(boolean recompute)} instead. + * @deprecated since 2.4. Use {@link getSignalStrength(boolean recompute)} + * instead. */ @Deprecated public int getSignalStrength() throws KuraException; @@ -125,7 +130,8 @@ public enum SerialPortType { * @throws KuraException * @return modem registration status as {@link ModemRegistrationStatus} * - * @deprecated since 2.4. Use {@link getRegistrationStatus(boolean recompute)} instead. + * @deprecated since 2.4. Use {@link getRegistrationStatus(boolean recompute)} + * instead. */ @Deprecated public ModemRegistrationStatus getRegistrationStatus() throws KuraException; @@ -251,7 +257,8 @@ public enum SerialPortType { * Reports signal strength in dBm * * @param recompute: - * if true the value is recomputed. Otherwise, a cached value is returned + * if true the value is recomputed. Otherwise, a cached value + * is returned * @return an integer representing the rssi * @throws KuraException * @@ -263,7 +270,8 @@ public enum SerialPortType { * Reports modem registration status * * @param recompute: - * if true the value is recomputed. Otherwise, a cached value is returned + * if true the value is recomputed. Otherwise, a cached value + * is returned * @throws KuraException * @return modem registration status as {@link ModemRegistrationStatus} * @@ -275,7 +283,8 @@ public enum SerialPortType { * Answers International Mobile Subscribe Identity (IMSI) * * @param recompute: - * if true the value is recomputed. Otherwise, a cached value is returned + * if true the value is recomputed. Otherwise, a cached value + * is returned * @return IMSI number, null if not known * @throws KuraException * @@ -287,7 +296,8 @@ public enum SerialPortType { * Answers Integrated Circuit Card Identification (ICCID) * * @param recompute: - * if true the value is recomputed. Otherwise, a cached value is returned + * if true the value is recomputed. Otherwise, a cached value + * is returned * @return ICCID, "N/A" if not applicable * @throws KuraException * diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemCdmaServiceProvider.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemCdmaServiceProvider.java index 55c8d1664db..3d4556cc2d7 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemCdmaServiceProvider.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemCdmaServiceProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -12,6 +12,10 @@ ******************************************************************************/ package org.eclipse.kura.net.modem; +/** + * @deprecated since 3.0 + */ +@Deprecated public enum ModemCdmaServiceProvider { UNKNOWN(0), diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemManagerService.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemManagerService.java index 7abd4687e47..7fc8e0b2b7d 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemManagerService.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemManagerService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2021 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -21,19 +21,27 @@ /** * @noimplement This interface is not intended to be implemented by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public interface ModemManagerService { /** * Returns the modem tracked with the given id. * - * @deprecated since 2.2 use {@link ModemManagerService#withModemService(String, Function)} instead + * @deprecated since 2.2 use + * {@link ModemManagerService#withModemService(String, Function)} + * instead * @param id - * The id of the modem, in case of an USB modem, the id is the USB port as returned by - * {@link org.eclipse.kura.usb.UsbModemDevice#getUsbPort()}, in case of a serial modem the id is the - * product name as returned by {@link org.eclipse.kura.usb.UsbModemDevice#getProductName()} - * @return The cellular modem instance, or {@code null} if a modem with the given id is not currently tracked + * The id of the modem, in case of an USB modem, the id is the USB + * port as returned by + * {@link org.eclipse.kura.usb.UsbModemDevice#getUsbPort()}, in case + * of a serial modem the id is the + * product name as returned by + * {@link org.eclipse.kura.usb.UsbModemDevice#getProductName()} + * @return The cellular modem instance, or {@code null} if a modem with the + * given id is not currently tracked */ @Deprecated public CellularModem getModemService(String id); @@ -41,7 +49,9 @@ public interface ModemManagerService { /** * Returns the list of currently tracked modems * - * @deprecated since 2.2 use {@link ModemManagerService#withAllModemServices(Function)} instead + * @deprecated since 2.2 use + * {@link ModemManagerService#withAllModemServices(Function)} + * instead * @return the list of currently tracked modems */ @Deprecated @@ -54,11 +64,14 @@ public interface ModemManagerService { * @since 2.2 * * @param - * The return type of the function + * The return type of the function * @param id - * The id of the modem, in case of an USB modem, the id is the USB port as returned by - * {@link org.eclipse.kura.usb.UsbModemDevice#getUsbPort()}, in case of a serial modem the id is the - * product name as returned by {@link org.eclipse.kura.usb.UsbModemDevice#getProductName()} + * The id of the modem, in case of an USB modem, the id is the USB + * port as returned by + * {@link org.eclipse.kura.usb.UsbModemDevice#getUsbPort()}, in case + * of a serial modem the id is the + * product name as returned by + * {@link org.eclipse.kura.usb.UsbModemDevice#getProductName()} * @param func * @return The result of the provided function applied to the modem */ @@ -72,9 +85,9 @@ public interface ModemManagerService { * @since 2.2 * * @param - * The return type of the function + * The return type of the function * @param func - * The function to be called + * The function to be called * @return The result of the provided function applied to the modem */ public T withAllModemServices(ModemFunction, T> func) throws KuraException; diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemMonitorListener.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemMonitorListener.java index f812222162b..925e6c72bfd 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemMonitorListener.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemMonitorListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -14,7 +14,11 @@ import org.osgi.annotation.versioning.ConsumerType; +/** + * @deprecated since 3.0 + */ @ConsumerType +@Deprecated public interface ModemMonitorListener { /** diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemMonitorService.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemMonitorService.java index d01d1d35b46..d7bad06b7ad 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemMonitorService.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemMonitorService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -18,8 +18,10 @@ * Marker interface for the ModemMonitor * * @noimplement This interface is not intended to be implemented by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public interface ModemMonitorService { public void registerListener(ModemMonitorListener listener); diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemPdpContext.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemPdpContext.java index 31f09d22056..8f7abe6a484 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemPdpContext.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemPdpContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2018, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -14,7 +14,9 @@ /** * @since 1.4 + * @deprecated since 3.0 */ +@Deprecated public class ModemPdpContext { private final int number; @@ -48,4 +50,4 @@ public ModemPdpContextType getType() { public String getApn() { return this.apn; } -} +} \ No newline at end of file diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemPdpContextType.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemPdpContextType.java index e50b7bbcee6..d465cb58e76 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemPdpContextType.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/modem/ModemPdpContextType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2018, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -14,7 +14,9 @@ /** * @since 1.4 + * @deprecated since 3.0 */ +@Deprecated public enum ModemPdpContextType { IP("IP"), PPP("PPP"), diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/route/RoutingAgentService.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/route/RoutingAgentService.java index 3d4eedb2e6c..91812f9bc5c 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/route/RoutingAgentService.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/route/RoutingAgentService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -19,19 +19,23 @@ import org.osgi.annotation.versioning.ProviderType; /** - * Routing agent service is used to control the static routing table. The service is used to specify - * which interfaces should be used in considering routes and what their priorities should be. + * Routing agent service is used to control the static routing table. The + * service is used to specify + * which interfaces should be used in considering routes and what their + * priorities should be. * * @noimplement This interface is not intended to be implemented by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public interface RoutingAgentService { /** * Sets interface priorities * * @param priorities - * - list of interface priorities as {@link Map} + * - list of interface priorities as {@link Map} */ public void setPriorities(Map priorities); @@ -39,7 +43,7 @@ public interface RoutingAgentService { * Adds interface to RoutingAgent * * @param netIfaceConfig - * - interface configuration as {@link NetInterfaceConfig} + * - interface configuration as {@link NetInterfaceConfig} * @throws KuraException */ @SuppressWarnings("rawtypes") @@ -49,7 +53,7 @@ public interface RoutingAgentService { * Removes interface from RoutingAgent * * @param interfaceName - * - interface name as {@link String} + * - interface name as {@link String} * @throws KuraException */ void removeInterface(String interfaceName) throws KuraException; diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiAccessPointAddedEvent.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiAccessPointAddedEvent.java index ab117ca7413..14af189590e 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiAccessPointAddedEvent.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiAccessPointAddedEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -21,8 +21,10 @@ * Emitted when a new access point is found by the device. * * @noextend This class is not intended to be subclassed by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public class WifiAccessPointAddedEvent extends Event { /** Topic of the WifiAccessPointAddedEvent */ diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiAccessPointRemovedEvent.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiAccessPointRemovedEvent.java index d0e4ddac669..249e8776846 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiAccessPointRemovedEvent.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiAccessPointRemovedEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -21,8 +21,10 @@ * Emitted when an access point disappears from view of the device. * * @noextend This class is not intended to be subclassed by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public class WifiAccessPointRemovedEvent extends Event { /** Topic of the WifiAccessPointAddedEvent */ diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiClientMonitorListener.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiClientMonitorListener.java index 940083d3b02..7c0de2e886e 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiClientMonitorListener.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiClientMonitorListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -14,7 +14,11 @@ import org.osgi.annotation.versioning.ConsumerType; +/** + * @deprecated since 3.0 + */ @ConsumerType +@Deprecated public interface WifiClientMonitorListener { /** diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiClientMonitorService.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiClientMonitorService.java index 3ea033064b3..68d3f2f03b3 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiClientMonitorService.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiClientMonitorService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2022 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -19,8 +19,10 @@ * Marker interface for wifi client monitoring service * * @noimplement This interface is not intended to be implemented by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public interface WifiClientMonitorService { public void registerListener(WifiClientMonitorListener listener); @@ -31,13 +33,14 @@ public interface WifiClientMonitorService { * Return the signal level on the given wireless interface * * @param interfaceName - * the name of the wireless interface + * the name of the wireless interface * @param ssid - * the name of the ssid the interface is attached to + * the name of the ssid the interface is attached to * @return an integer number representing the rssi * @throws KuraException * - * @deprecated since 2.4. Use {@link getSignalLevel(String interfaceName, String ssid, boolean recompute)} instead. + * @deprecated since 2.4. Use {@link getSignalLevel(String interfaceName, String + * ssid, boolean recompute)} instead. */ @Deprecated public int getSignalLevel(String interfaceName, String ssid) throws KuraException; @@ -46,11 +49,12 @@ public interface WifiClientMonitorService { * Return the signal level on the given wireless interface * * @param interfaceName - * the name of the wireless interface + * the name of the wireless interface * @param ssid - * the name of the ssid the interface is attached to + * the name of the ssid the interface is attached to * @param recompute - * if set to true, the rssi is recomputed. Otherwise a cached value is returned + * if set to true, the rssi is recomputed. Otherwise a + * cached value is returned * @return an integer number representing the rssi * @throws KuraException * diff --git a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiHotspotInfo.java b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiHotspotInfo.java index b02d70ca75a..753d72c28f2 100644 --- a/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiHotspotInfo.java +++ b/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/wifi/WifiHotspotInfo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -18,8 +18,10 @@ /** * @noextend This class is not intended to be subclassed by clients. + * @deprecated since 3.0 */ @ProviderType +@Deprecated public class WifiHotspotInfo { private final String ssid; diff --git a/kura/org.eclipse.kura.core.net/META-INF/MANIFEST.MF b/kura/org.eclipse.kura.core.net/META-INF/MANIFEST.MF index 14ad0e75116..8a50b2f0e71 100644 --- a/kura/org.eclipse.kura.core.net/META-INF/MANIFEST.MF +++ b/kura/org.eclipse.kura.core.net/META-INF/MANIFEST.MF @@ -15,7 +15,7 @@ Import-Package: org.eclipse.kura;version="[1.0,2.0)", org.eclipse.kura.net.configuration;version="[1.1,2.0)", org.eclipse.kura.net.dhcp;version="[1.0,2.0)", org.eclipse.kura.net.firewall;version="[2.0,3.0)", - org.eclipse.kura.net.modem;version="[2.4,2.5)", + org.eclipse.kura.net.modem;version="[2.5,2.6)", org.eclipse.kura.net.status.vlan;version="[1.0,2.0)", org.eclipse.kura.net.vlan;version="[1.0,2.0)", org.eclipse.kura.net.wifi;version="[2.3,3.0)", diff --git a/kura/org.eclipse.kura.linux.net/META-INF/MANIFEST.MF b/kura/org.eclipse.kura.linux.net/META-INF/MANIFEST.MF index e72c87b071b..83de0e38f98 100644 --- a/kura/org.eclipse.kura.linux.net/META-INF/MANIFEST.MF +++ b/kura/org.eclipse.kura.linux.net/META-INF/MANIFEST.MF @@ -28,8 +28,8 @@ Import-Package: javax.microedition.io, org.eclipse.kura.net.dhcp;version="[1.2,1.3)", org.eclipse.kura.net.dns;version="[1.0,2.0)", org.eclipse.kura.net.firewall;version="[2.0,3.0)", - org.eclipse.kura.net.modem;version="[2.4,2.5)", - org.eclipse.kura.net.route;version="[1.0,1.1)", + org.eclipse.kura.net.modem;version="[2.5,2.6)", + org.eclipse.kura.net.route;version="[1.1,1.2)", org.eclipse.kura.net.wifi;version="[2.1,3.0)", org.eclipse.kura.security;version="[1.1,2.0)", org.eclipse.kura.system;version="[1.0,2.0)", @@ -47,7 +47,7 @@ Export-Package: org.eclipse.kura.internal.board;version="1.0.0";x-internal:=true org.eclipse.kura.internal.linux.net.dns;version="1.0.0";x-internal:=true, org.eclipse.kura.internal.linux.net.modem;version="1.1.0";x-internal:=true, org.eclipse.kura.internal.linux.net.wifi;version="1.0.0";x-internal:=true, - org.eclipse.kura.linux.net;version="1.0.9"; + org.eclipse.kura.linux.net;version="1.1.0"; uses:="org.osgi.service.component, org.osgi.service.event, org.eclipse.kura.net, diff --git a/kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/ConnectionInfoImpl.java b/kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/ConnectionInfoImpl.java index 5848cc4c0a1..51176a107ad 100644 --- a/kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/ConnectionInfoImpl.java +++ b/kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/ConnectionInfoImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -26,6 +26,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * @deprecated since 3.0 + */ +@Deprecated public class ConnectionInfoImpl implements ConnectionInfo { private static final Logger logger = LoggerFactory.getLogger(ConnectionInfo.class); @@ -40,10 +44,11 @@ public class ConnectionInfoImpl implements ConnectionInfo { private Properties props = null; /** - * Creates a ConnectionInfo instance with the previously persisted connection properties if they existed + * Creates a ConnectionInfo instance with the previously persisted connection + * properties if they existed * * @param ifaceName - * The interface name tied to the connection information + * The interface name tied to the connection information * @throws KuraException */ public ConnectionInfoImpl(String ifaceName) throws KuraException { @@ -100,7 +105,8 @@ public IP4Address getGateway() { /** * Gets the DNS addresses associated with this interface * - * @return A List of IP4Address objects representing the DNS of this interface. If there are none it returns an + * @return A List of IP4Address objects representing the DNS of this interface. + * If there are none it returns an * empty list. */ @Override diff --git a/kura/org.eclipse.kura.net.admin.firewall/META-INF/MANIFEST.MF b/kura/org.eclipse.kura.net.admin.firewall/META-INF/MANIFEST.MF index be45ae90546..5773dce311a 100644 --- a/kura/org.eclipse.kura.net.admin.firewall/META-INF/MANIFEST.MF +++ b/kura/org.eclipse.kura.net.admin.firewall/META-INF/MANIFEST.MF @@ -8,49 +8,20 @@ Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))" Import-Package: org.apache.commons.io;version="2.4.0", org.apache.commons.lang3;version="3.4.0", org.eclipse.kura;version="[1.0,2.0)", - org.eclipse.kura.comm;version="[1.0,2.0)", - org.eclipse.kura.configuration;version="[1.1,2.0)", + org.eclipse.kura.configuration;version="[1.2,2.0)", org.eclipse.kura.core.configuration;version="[2.0,3.0)", org.eclipse.kura.core.configuration.metatype;version="[1.0,2.0)", org.eclipse.kura.core.linux.executor;version="[1.0,2.0)", - org.eclipse.kura.core.linux.util;version="[1.0,2.0)", org.eclipse.kura.core.net;version="[1.0,2.0)", - org.eclipse.kura.core.net.modem;version="[1.0,2.0)", org.eclipse.kura.core.net.util;version="[1.0,2.0)", - org.eclipse.kura.core.util;version="[1.0,2.0)", - org.eclipse.kura.crypto;version="[1.1,2.0)", org.eclipse.kura.executor;version="[1.0,2.0)", - org.eclipse.kura.internal.board;version="[1.0,2.0)", - org.eclipse.kura.internal.linux.net;version="[1.0,2.0)", - org.eclipse.kura.internal.linux.net.dns;version="[1.0,2.0)", - org.eclipse.kura.internal.linux.net.wifi;version="[1.0,2.0)", - org.eclipse.kura.linux.net;version="[1.0,2.0)", - org.eclipse.kura.linux.net.dhcp;version="[2.0,3.0)", - org.eclipse.kura.linux.net.dns;version="[1.0,2.0)", org.eclipse.kura.linux.net.iptables;version="[1.0,2.0)", - org.eclipse.kura.linux.net.modem;version="[1.1,2.0)", - org.eclipse.kura.linux.net.ppp;version="[1.1,2.0)", - org.eclipse.kura.linux.net.route;version="[1.0,2.0)", - org.eclipse.kura.linux.net.util;version="[1.0,2.0)", - org.eclipse.kura.linux.net.wifi;version="[1.0,2.0)", - org.eclipse.kura.net;version="[2.6,2.7)", + org.eclipse.kura.net;version="[2.7,3.0)", org.eclipse.kura.net.configuration;version="[1.0,2.0)", - org.eclipse.kura.net.dhcp;version="[1.2,1.3)", - org.eclipse.kura.net.dns;version="[1.1,1.2)", org.eclipse.kura.net.firewall;version="[2.0,3.0)", - org.eclipse.kura.net.modem;version="[2.4,2.5)", - org.eclipse.kura.net.route;version="[1.0,1.1)", - org.eclipse.kura.net.wifi;version="[2.2,3.0)", - org.eclipse.kura.security;version="[1.1,2.0)", - org.eclipse.kura.system;version="[1.0,2.0)", - org.eclipse.kura.usb;version="[1.0,2.0)", - org.eclipse.kura.util.base;version="[1.2,2.0)", org.osgi.framework;version="1.5.0", org.osgi.service.component;version="1.2.0", org.osgi.service.event;version="1.3.0", - org.osgi.service.io;version="1.0.0", - org.osgi.service.useradmin;version="1.0.0", - org.osgi.util.tracker;version="1.5.1", org.slf4j;version="1.7.25" Service-Component: OSGI-INF/*.xml Bundle-ClassPath: . diff --git a/kura/org.eclipse.kura.net.configuration/META-INF/MANIFEST.MF b/kura/org.eclipse.kura.net.configuration/META-INF/MANIFEST.MF index 560c4eb37c5..f87bce36157 100644 --- a/kura/org.eclipse.kura.net.configuration/META-INF/MANIFEST.MF +++ b/kura/org.eclipse.kura.net.configuration/META-INF/MANIFEST.MF @@ -11,7 +11,7 @@ Import-Package: org.eclipse.kura;version="[1.0,2.0)", org.eclipse.kura.configuration.metatype;version="[1.1,2.0)", org.eclipse.kura.core.configuration;version="[2.0,3.0)", org.eclipse.kura.core.configuration.metatype;version="[1.0,2.0)", - org.eclipse.kura.net;version="[2.6,2.7)", + org.eclipse.kura.net;version="[2.7,2.8)", org.eclipse.kura.net.modem;version="[2.4,3.0)", org.eclipse.kura.net.wifi;version="[2.4,3.0)", org.eclipse.kura.usb;version="[1.3,2.0)",