summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/netconfnode-state-service/model/src/main
diff options
context:
space:
mode:
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.java11
1 files changed, 10 insertions, 1 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 6b790afc8..a348b29ad 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
@@ -49,6 +49,7 @@ public class Capabilities {
private static final Logger LOG = LoggerFactory.getLogger(Capabilities.class);
private static final String METHODNAME = "getCapability";
+ private static final String UNSUPPORTED = "Unsupported";
private final List<String> capabilities = new ArrayList<>();
private final DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
@@ -218,9 +219,17 @@ public class Capabilities {
return QName.create(capability).getRevision().get().toString();
}
}
- return "Unsupported";
+ return UNSUPPORTED;
}
+ /**
+ * Verify if QName namespace is supported by capabilities
+ * @param revision result of getRevisionForNamespace()
+ * @return true if namespace is supported.
+ */
+ static public boolean isNamespaceSupported(String revision) {
+ return revision != UNSUPPORTED;
+ }
@Override
public String toString() {