- public Document doFilter(Document message, NetconfOperationRouter operationRouter,
- NetconfOperationFilterChain filterChain) throws NetconfDocumentedException {
- OperationNameAndNamespace operationNameAndNamespace = new OperationNameAndNamespace(message);
- if (canHandle(operationNameAndNamespace)) {
- if (isCommitWithoutNotification(message)) {
- message = removePersisterAttributes(message);
- logger.debug("Skipping commit notification");
- // fall back to filter chain
- } else {
- Document innerResult = filterChain.execute(message, operationRouter);
- Element cfgSnapshot = getConfigSnapshot(operationRouter);
- logger.debug("Config snapshot retrieved successfully {}", cfgSnapshot);
- notificationProducer.sendCommitNotification("ok", cfgSnapshot, cap.getCapabilities());
- return innerResult;
- }
- }
- return filterChain.execute(message, operationRouter);