+ public Document handle(Document requestMessage, NetconfOperationChainedExecution subsequentOperation) throws NetconfDocumentedException {
+ Preconditions.checkArgument(!subsequentOperation.isExecutionTermination(),
+ "Subsequent netconf operation expected by %s", this);
+
+ if (isCommitWithoutNotification(requestMessage)) {
+ LOG.debug("Skipping commit notification");
+ } else {
+ // Send commit notification if commit was not issued by persister
+ removePersisterAttributes(requestMessage);
+ Element cfgSnapshot = getConfigSnapshot(operationRouter);
+ LOG.debug("Config snapshot retrieved successfully {}", cfgSnapshot);
+ notificationProducer.sendCommitNotification("ok", cfgSnapshot, transformCapabilities(cap.getCapabilities()));
+ }
+
+ return subsequentOperation.execute(requestMessage);
+ }
+
+ // FIXME move somewhere to util since this is required also by negotiatiorFactory
+ public static Set<String> transformCapabilities(final Capabilities capabilities) {
+ return Sets.newHashSet(Collections2.transform(capabilities.getCapability(), new Function<Uri, String>() {
+ @Override
+ public String apply(final Uri uri) {
+ return uri.getValue();
+ }
+ }));