diff options
author | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2021-05-25 18:57:29 +0530 |
---|---|---|
committer | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2021-06-14 10:22:54 +0530 |
commit | 17614362f2550c29dcd746ee2c1bc01d0df5de65 (patch) | |
tree | 97930a14a08c610efceb4aebb4f457e0cf42b2f8 /sdnr/wt/common-yang/utils/src | |
parent | db9f267b3930a28054e967c75db228e27663aedc (diff) |
Improve Websocket notification interface
Improve websocket notification interface
Issue-ID: CCSDK-3315
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Change-Id: I0ded865adddb546ade98df4760e0a32ec964295a
Signed-off-by: Ravi Pendurty <ravi.pendurty@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.java | 12 |
1 files changed, 10 insertions, 2 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 ac6b1b5c5..3086167bf 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 @@ -219,7 +219,7 @@ public class YangToolsMapperHelper { return true; } } - return false; + return ifToImplement.isAssignableFrom(clz); } /** @@ -235,7 +235,12 @@ public class YangToolsMapperHelper { final StringBuilder ret = new StringBuilder(name.length()); if (!name.startsWith("_")) ret.append('_'); + ret.append(toCamelCase(name)); + return ret.toString(); + } + public static String toCamelCase(final String name) { int start = 0; + final StringBuilder ret = new StringBuilder(name.length()); for (final String word : name.split("-")) { if (!word.isEmpty()) { if (start++ == 0) { @@ -248,7 +253,10 @@ public class YangToolsMapperHelper { } return ret.toString(); } - + public static String toCamelCaseClassName(final String name) { + final String clsName = toCamelCase(name); + return clsName.substring(0,1).toUpperCase()+clsName.substring(1); + } private static BundleContext getBundleContext() { Bundle bundle = FrameworkUtil.getBundle(YangToolsMapperHelper.class); return bundle != null ? bundle.getBundleContext() : null; |