private static final String NOTIFY_ATTR = "notify";
+ //TODO make commit notification optional
private final CommitNotifier notificationProducer;
private final NetconfMonitoringService cap;
private final NetconfOperationRouter operationRouter;
- public DefaultCommit(CommitNotifier notifier, NetconfMonitoringService cap,
- String netconfSessionIdForReporting, NetconfOperationRouter netconfOperationRouter) {
+ public DefaultCommit(final CommitNotifier notifier, final NetconfMonitoringService cap,
+ final String netconfSessionIdForReporting, final NetconfOperationRouter netconfOperationRouter) {
super(netconfSessionIdForReporting);
this.notificationProducer = notifier;
this.cap = cap;
}
@Override
- public Document handle(Document requestMessage, NetconfOperationChainedExecution subsequentOperation) throws NetconfDocumentedException {
+ public Document handle(final Document requestMessage, final NetconfOperationChainedExecution subsequentOperation) throws NetconfDocumentedException {
Preconditions.checkArgument(!subsequentOperation.isExecutionTermination(),
"Subsequent netconf operation expected by %s", this);
}
@Override
- protected Element handle(Document document, XmlElement message, NetconfOperationChainedExecution subsequentOperation) throws NetconfDocumentedException {
+ protected Element handle(final Document document, final XmlElement message, final NetconfOperationChainedExecution subsequentOperation) throws NetconfDocumentedException {
throw new UnsupportedOperationException("Never gets called");
}
return HandlingPriority.HANDLE_WITH_DEFAULT_PRIORITY.increasePriority(1);
}
- private void removePersisterAttributes(Document message) {
+ private static void removePersisterAttributes(final Document message) {
message.getDocumentElement().removeAttribute(NOTIFY_ATTR);
}
- private boolean isCommitWithoutNotification(Document message) {
+ private static boolean isCommitWithoutNotification(final Document message) {
XmlElement xmlElement = null;
try {
xmlElement = XmlElement.fromDomElementWithExpected(message.getDocumentElement(),
}
}
- private Element getConfigSnapshot(NetconfOperationRouter opRouter) throws NetconfDocumentedException {
+ private Element getConfigSnapshot(final NetconfOperationRouter opRouter) throws NetconfDocumentedException {
final Document responseDocument = opRouter.onNetconfMessage(
getConfigMessage, null);