aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/netconfnode-state-service/model/src/main
diff options
context:
space:
mode:
authorhighstreetherbert <herbert.eiselt@highstreet-technologies.com>2020-07-10 17:47:11 +0200
committerhighstreetherbert <herbert.eiselt@highstreet-technologies.com>2020-07-10 17:47:25 +0200
commit49ae7927cb3137ed8ae645278082d03c83ffd940 (patch)
tree8040df647d83eec16001304ecd4e4401ceb72421 /sdnr/wt/netconfnode-state-service/model/src/main
parent23c27ddcd79913d11eac16eb42c5a43899de97a1 (diff)
Reformat sdnr netconfnode-state-service to ONAP code style
Reformat to ONAP code style Issue-ID: SDNC-1276 Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com> Change-Id: Ib7faecb419770d8ffb4b25d5d34446a2cd71fc7f Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/netconfnode-state-service/model/src/main')
-rw-r--r--sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java22
-rw-r--r--sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java11
-rw-r--r--sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeConnectListener.java28
-rw-r--r--sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateListener.java50
-rw-r--r--sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateService.java19
-rw-r--r--sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/TransactionUtils.java58
-rw-r--r--sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/VesNotificationListener.java11
7 files changed, 108 insertions, 91 deletions
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java
index ba80d305f..50176f4cf 100644
--- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java
+++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* ============LICENSE_START========================================================================
* ONAP : ccsdk feature sdnr wt
* =================================================================================================
@@ -14,7 +14,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
* ============LICENSE_END==========================================================================
- ******************************************************************************/
+ */
/**
* Convert capabilities of netconfnode into internal format. Boron and Carbon are providing
* different versions
@@ -40,8 +40,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Wrapper class for capabilites for Boron and later releases. Uses generics because yang model was
- * changed from Boron to later version. Interface class:
+ * Wrapper class for capabilites for Boron and later releases. Uses generics because yang model was changed from Boron
+ * to later version. Interface class:
* org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.connection.status.available.capabilities.AvailableCapability
*/
public class Capabilities {
@@ -61,7 +61,7 @@ public class Capabilities {
if (nnode != null) {
AvailableCapabilities availableCapabilites = nnode.getAvailableCapabilities();
if (availableCapabilites != null) {
- capabilities.constructor(availableCapabilites.getAvailableCapability());
+ capabilities.constructor(availableCapabilites.getAvailableCapability());
} else {
LOG.debug("empty capabilites");
}
@@ -78,7 +78,7 @@ public class Capabilities {
if (nnode != null) {
UnavailableCapabilities availableCapabilites = nnode.getUnavailableCapabilities();
if (availableCapabilites != null) {
- capabilities.constructor(availableCapabilites.getUnavailableCapability());
+ capabilities.constructor(availableCapabilites.getUnavailableCapability());
} else {
LOG.debug("empty capabilites");
}
@@ -102,7 +102,7 @@ public class Capabilities {
Method methodGetCapability;
for (Object capability : pcapabilities) {
- if (capability instanceof String) { // ODL Boron specific
+ if (capability instanceof String) { // ODL Boron specific
this.capabilities.add((String) capability);
} else { // Carbon specific part .. handled via generics
try {
@@ -122,6 +122,7 @@ public class Capabilities {
/**
* Get Capabilites
+ *
* @return List<String> with capabilites
*/
public List<String> getCapabilities() {
@@ -130,6 +131,7 @@ public class Capabilities {
/**
* Verify if the namespace is supported
+ *
* @param qCapability from model
* @return true if namespace is supported
*/
@@ -146,7 +148,7 @@ public class Capabilities {
*
* @param qCapability capability from the model
* @return true if supporting the model AND revision<br>
- * false if revision not available or both not found.
+ * false if revision not available or both not found.
*/
public boolean isSupportingNamespaceAndRevision(QName qCapability) {
@@ -176,6 +178,7 @@ public class Capabilities {
/**
* Provide revision as String from QName, considering older formats.
+ *
* @param qCapability that specifies the revision
* @return String with revisiondate or null
*/
@@ -204,12 +207,13 @@ public class Capabilities {
/**
* Get revision of first entry of related capability
+ *
* @param qCapability that specifies the namespace
* @return String with date or
*/
public String getRevisionForNamespace(QName qCapability) {
String namespace = qCapability.getNamespace().toString();
- for (String capability : capabilities) {
+ for (String capability : capabilities) {
if (capability.contains(namespace)) {
return QName.create(capability).getRevision().get().toString();
}
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java
index 3ca851184..1161681e6 100644
--- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java
+++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* ============LICENSE_START========================================================================
* ONAP : ccsdk feature sdnr wt
* =================================================================================================
@@ -14,7 +14,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
* ============LICENSE_END==========================================================================
- ******************************************************************************/
+ */
package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
import com.google.common.util.concurrent.ListenableFuture;
@@ -29,7 +29,7 @@ import org.opendaylight.yangtools.yang.binding.NotificationListener;
import org.opendaylight.yangtools.yang.common.RpcResult;
/**
- * Interface handling netconf connection.
+ * Interface handling netconf connection.
*/
public interface NetconfAccessor {
@@ -69,8 +69,8 @@ public interface NetconfAccessor {
/**
* Register netconf notification listener for related mountpoint
*
- * @param <T> specific child class of NotificationListener
- * @param listener listener to be called
+ * @param <T> specific child class of NotificationListener
+ * @param listener listener to be called
* @return handler to manager registration
*/
<T extends NotificationListener> ListenerRegistration<NotificationListener> doRegisterNotificationListener(
@@ -78,6 +78,7 @@ public interface NetconfAccessor {
/**
* Register notifications stream for the connection.
+ *
* @param streamName that should be "NETCONF" as default.
* @return progress indication
*/
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeConnectListener.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeConnectListener.java
index cebed4c8a..e29bb79e9 100644
--- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeConnectListener.java
+++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeConnectListener.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* ============LICENSE_START========================================================================
* ONAP : ccsdk feature sdnr wt
* =================================================================================================
@@ -14,7 +14,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
* ============LICENSE_END==========================================================================
- ******************************************************************************/
+ */
package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
@@ -25,28 +25,28 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev15
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
/**
- * Indicate if device is connected or not.
- * A NetconfNode (Mountpoint) is providing the status.
- * If this is Master and connected, this function is calles.
+ * Indicate if device is connected or not. A NetconfNode (Mountpoint) is providing the status. If this is Master and
+ * connected, this function is calles.
*/
public interface NetconfNodeConnectListener extends EventListener, AutoCloseable {
/**
* Called if device state changes to "connected" for a netconf master node.
+ *
* @param acessor containing <br>
- * - nNodeId name of mount point<br>
- * - netconfNode with related information<br>
- * - mountPoint of the node<br>
- * -netconfNodeDataBroker to access connected netconf device
+ * - nNodeId name of mount point<br>
+ * - netconfNode with related information<br>
+ * - mountPoint of the node<br>
+ * -netconfNodeDataBroker to access connected netconf device
*/
- public void onEnterConnected(@NonNull NetconfAccessor acessor );
+ public void onEnterConnected(@NonNull NetconfAccessor acessor);
+
/**
- * Notify of device state change to "not connected" mount point supervision for
- * master mountpoint HINT: This callback could be called multiple times also the
- * onEnterConnected state was not called.
+ * Notify of device state change to "not connected" mount point supervision for master mountpoint HINT: This
+ * callback could be called multiple times also the onEnterConnected state was not called.
*
- * @param nNodeId name of mount point
+ * @param nNodeId name of mount point
* @param optionalNetconfNode with new status or if removed not present
*/
public void onLeaveConnected(@NonNull NodeId nNodeId, @NonNull Optional<NetconfNode> optionalNetconfNode);
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateListener.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateListener.java
index 253af0598..fdbcf9595 100644
--- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateListener.java
+++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateListener.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* ============LICENSE_START========================================================================
* ONAP : ccsdk feature sdnr wt
* =================================================================================================
@@ -14,7 +14,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
* ============LICENSE_END==========================================================================
- ******************************************************************************/
+ */
package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
@@ -24,30 +24,32 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev15
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
/**
- * Indicate all state changes of NetconfNode (Mountpoint). Cleans up and
- * summarizes the
+ * Indicate all state changes of NetconfNode (Mountpoint). Cleans up and summarizes the
*/
public interface NetconfNodeStateListener extends EventListener {
- /**
- * New NetconfNode has been created
- * @param nNodeId of Node
- * @param netconfNode object
- */
-
- void onCreated(NodeId nNodeId, NetconfNode netconfNode);
-
- /**
- * New NetconfNode has been created
- * @param nNodeId of node
- * @param netconfNode object after change
- */
- void onStateChange(NodeId nNodeId, NetconfNode netconfNode);
-
- /**
- * NetconfNode has been removed
- * @param nNodeId of related node
- */
- void onRemoved(NodeId nNodeId);
+ /**
+ * New NetconfNode has been created
+ *
+ * @param nNodeId of Node
+ * @param netconfNode object
+ */
+
+ void onCreated(NodeId nNodeId, NetconfNode netconfNode);
+
+ /**
+ * New NetconfNode has been created
+ *
+ * @param nNodeId of node
+ * @param netconfNode object after change
+ */
+ void onStateChange(NodeId nNodeId, NetconfNode netconfNode);
+
+ /**
+ * NetconfNode has been removed
+ *
+ * @param nNodeId of related node
+ */
+ void onRemoved(NodeId nNodeId);
}
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateService.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateService.java
index 0105c36e8..4e82b3d25 100644
--- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateService.java
+++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfNodeStateService.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* ============LICENSE_START========================================================================
* ONAP : ccsdk feature sdnr wt
* =================================================================================================
@@ -14,7 +14,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
* ============LICENSE_END==========================================================================
- ******************************************************************************/
+ */
package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
@@ -26,23 +26,32 @@ public interface NetconfNodeStateService extends Registration {
/**
* Register for indication that Master NetconNode is entering or leaving Connected state.
+ *
* @param netconfNodeConnectListener
* @return managing object for listener
*/
- @NonNull <L extends NetconfNodeConnectListener> ListenerRegistration<L> registerNetconfNodeConnectListener(@NonNull L netconfNodeConnectListener);
+ @NonNull
+ <L extends NetconfNodeConnectListener> ListenerRegistration<L> registerNetconfNodeConnectListener(
+ @NonNull L netconfNodeConnectListener);
/**
* Register for all NetconfNode specific state changes
+ *
* @param netconfNodeStateListener
* @return managing object for listener
*/
- @NonNull <L extends NetconfNodeStateListener> ListenerRegistration<L> registerNetconfNodeStateListener(@NonNull L netconfNodeStateListener);
+ @NonNull
+ <L extends NetconfNodeStateListener> ListenerRegistration<L> registerNetconfNodeStateListener(
+ @NonNull L netconfNodeStateListener);
/**
* Register for Ves/DmaaP provided messages
+ *
* @param netconfNodeStateListener
* @return managing object for listener
*/
- @NonNull <L extends VesNotificationListener> ListenerRegistration<L> registerVesNotifications(@NonNull L netconfNodeStateListener);
+ @NonNull
+ <L extends VesNotificationListener> ListenerRegistration<L> registerVesNotifications(
+ @NonNull L netconfNodeStateListener);
}
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/TransactionUtils.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/TransactionUtils.java
index da8da5c7f..752e3c6b9 100644
--- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/TransactionUtils.java
+++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/TransactionUtils.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* ============LICENSE_START========================================================================
* ONAP : ccsdk feature sdnr wt
* =================================================================================================
@@ -14,7 +14,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
* ============LICENSE_END==========================================================================
- ******************************************************************************/
+ */
package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -31,32 +31,32 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
*/
public interface TransactionUtils {
- /**
- * Deliver the data back or null. Warning
- *
- * @param <T> SubType of the DataObject to be handled
- * @param dataBroker for accessing data
- * @param dataStoreType to address datastore
- * @param iid id to access data
- * @return null or object
- */
- @Nullable
- <T extends DataObject> T readData(DataBroker dataBroker, LogicalDatastoreType dataStoreType,
- InstanceIdentifier<T> iid);
+ /**
+ * Deliver the data back or null. Warning
+ *
+ * @param <T> SubType of the DataObject to be handled
+ * @param dataBroker for accessing data
+ * @param dataStoreType to address datastore
+ * @param iid id to access data
+ * @return null or object
+ */
+ @Nullable
+ <T extends DataObject> T readData(DataBroker dataBroker, LogicalDatastoreType dataStoreType,
+ InstanceIdentifier<T> iid);
- /**
- * Deliver the data back or null
- *
- * @param <T> SubType of the DataObject to be handled
- * @param dataBroker for accessing data
- * @param dataStoreType to address datastore
- * @param iid id to access data
- * @param noErrorIndication (Output) true if data could be read and are available and is not null
- * @param statusIndicator (Output) String with status indications during the read.
- * @return null or object
- */
- @Nullable
- <T extends DataObject> T readDataOptionalWithStatus(DataBroker dataBroker, LogicalDatastoreType dataStoreType,
- InstanceIdentifier<T> iid, AtomicBoolean noErrorIndication, AtomicReference<String> statusIndicator);
+ /**
+ * Deliver the data back or null
+ *
+ * @param <T> SubType of the DataObject to be handled
+ * @param dataBroker for accessing data
+ * @param dataStoreType to address datastore
+ * @param iid id to access data
+ * @param noErrorIndication (Output) true if data could be read and are available and is not null
+ * @param statusIndicator (Output) String with status indications during the read.
+ * @return null or object
+ */
+ @Nullable
+ <T extends DataObject> T readDataOptionalWithStatus(DataBroker dataBroker, LogicalDatastoreType dataStoreType,
+ InstanceIdentifier<T> iid, AtomicBoolean noErrorIndication, AtomicReference<String> statusIndicator);
-} \ No newline at end of file
+}
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/VesNotificationListener.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/VesNotificationListener.java
index e7d2481b8..8be6b85cc 100644
--- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/VesNotificationListener.java
+++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/VesNotificationListener.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* ============LICENSE_START========================================================================
* ONAP : ccsdk feature sdnr wt
* =================================================================================================
@@ -14,7 +14,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
* ============LICENSE_END==========================================================================
- ******************************************************************************/
+ */
package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
@@ -23,21 +23,22 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netconfn
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netconfnode.state.rev191011.FaultNotification;
/**
- * Indicate if device is connected or not.
- * A NetconfNode (Mountpoint) is providing the status.
- * If this is Master and connected, this function is calles.
+ * Indicate if device is connected or not. A NetconfNode (Mountpoint) is providing the status. If this is Master and
+ * connected, this function is calles.
*/
public interface VesNotificationListener extends EventListener, AutoCloseable {
/**
* Called in case of fault notification
+ *
* @param faultNotification to handle
*/
public void onNotification(FaultNotification faultNotification);
/**
* Called in case of attributeChange notification
+ *
* @param attributeChangeNotification to handle
*/
public void onNotification(AttributeChangeNotification attributeChangeNotification);