aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/common-yang/utils/src
diff options
context:
space:
mode:
authorMichael Dürre <michael.duerre@highstreet-technologies.com>2024-08-15 10:04:54 +0200
committerDan Timoney <dtimoney@att.com>2024-09-12 15:48:04 -0400
commit7964e8aa9b9748678f6dadfe7b0c17c936679351 (patch)
treef4859812acd6ccccdaa698c567bb121f03f7b985 /sdnr/wt/common-yang/utils/src
parent556306410bc9c3a421cde351d287adeb705d1e8c (diff)
migrate sdnr features to potassium
adapt features and poms for potassium-sr2 Issue-ID: CCSDK-4046 Change-Id: I67e8fc442811eca40c19f1f3777f1a36812d3e35 Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/common-yang/utils/src')
-rw-r--r--sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java5
-rw-r--r--sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangToolsDeserializerModifier2.java2
-rw-r--r--sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java7
-rw-r--r--sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java7
-rw-r--r--sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java4
5 files changed, 12 insertions, 13 deletions
diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java
index 9ca07fe59..91b0a1d08 100644
--- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java
+++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java
@@ -43,6 +43,7 @@ import javax.annotation.Nullable;
import org.opendaylight.mdsal.dom.api.DOMEvent;
import org.opendaylight.mdsal.dom.api.DOMNotification;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
+
import org.opendaylight.yangtools.yang.binding.*;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -316,8 +317,8 @@ public class YangToolsMapperHelper {
}
- public static <K extends Identifier<V>, V extends Identifiable<K>> Map<K, V> toMap(List<V> list) {
- return list == null || list.isEmpty() ? null : Maps.uniqueIndex(list, Identifiable::key);
+ public static <K extends Key<V>, V extends KeyAware<K>> Map<K, V> toMap(List<V> list) {
+ return list == null || list.isEmpty() ? null : Maps.uniqueIndex(list, KeyAware::key);
}
@SuppressWarnings("unchecked")
diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangToolsDeserializerModifier2.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangToolsDeserializerModifier2.java
index 800f41481..7ee959b61 100644
--- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangToolsDeserializerModifier2.java
+++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangToolsDeserializerModifier2.java
@@ -40,8 +40,8 @@ import org.onap.ccsdk.features.sdnr.wt.yang.mapper.serialize.BaseIdentityDeseria
import org.onap.ccsdk.features.sdnr.wt.yang.mapper.serialize.ClassDeserializer;
import org.onap.ccsdk.features.sdnr.wt.yang.mapper.serialize.IdentifierDeserializer;
import org.onap.ccsdk.features.sdnr.wt.yang.mapper.serialize.TypeObjectDeserializer;
+import org.opendaylight.yangtools.concepts.Identifier;
import org.opendaylight.yangtools.yang.binding.BaseIdentity;
-import org.opendaylight.yangtools.yang.binding.Identifier;
import org.opendaylight.yangtools.yang.binding.ScalarTypeObject;
import org.opendaylight.yangtools.yang.binding.TypeObject;
import org.slf4j.Logger;
diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java
index 922257d13..75984dccb 100644
--- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java
+++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java
@@ -10,10 +10,11 @@ import java.util.List;
import java.util.Map;
import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapper;
import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper;
-import org.opendaylight.yangtools.yang.binding.Identifiable;
-import org.opendaylight.yangtools.yang.binding.Identifier;
+import org.opendaylight.yangtools.yang.binding.Key;
+import org.opendaylight.yangtools.yang.binding.KeyAware;
-public class YangtoolsMapDesirializer<K extends Identifier<V>, V extends Identifiable<K>>
+
+public class YangtoolsMapDesirializer<K extends Key<V>, V extends KeyAware<K>>
extends JsonDeserializer<Map<K, V>> {
private final Class<V> clazz;
diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java
index 4a52f57ee..6b6a07a31 100644
--- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java
+++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java
@@ -10,10 +10,11 @@ import java.util.List;
import java.util.Map;
import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapper;
import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper;
-import org.opendaylight.yangtools.yang.binding.Identifiable;
-import org.opendaylight.yangtools.yang.binding.Identifier;
+import org.opendaylight.yangtools.yang.binding.Key;
+import org.opendaylight.yangtools.yang.binding.KeyAware;
-public class YangtoolsMapDesirializer2<K extends Identifier<V>, V extends Identifiable<K>>
+
+public class YangtoolsMapDesirializer2<K extends Key<V>, V extends KeyAware<K>>
extends JsonDeserializer<Map<K, V>> {
private final Class<V> clazz;
diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java
index 2ab3fe7c3..ec75f7846 100644
--- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java
+++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java
@@ -8,13 +8,9 @@ import com.fasterxml.jackson.databind.type.CollectionLikeType;
import java.io.IOException;
import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapper;
-import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper;
-import org.opendaylight.yangtools.yang.binding.Identifiable;
-import org.opendaylight.yangtools.yang.binding.Identifier;
public class SetDeserializer<V>
extends JsonDeserializer<Set<V>> {