private DOMDataBroker domDataBroker;
private DOMNotificationService domNotification;
- private BrokerFacade() {}
+ BrokerFacade() {
+
+ }
public void setRpcService(final DOMRpcService router) {
this.rpcService = router;
}
- public void setDomNotificationService(final DOMNotificationService domNotification) {
- this.domNotification = domNotification;
+ public void setDomNotificationService(final DOMNotificationService service) {
+ this.domNotification = service;
}
public static BrokerFacade getInstance() {
}
break;
case DELETE:
- if (withoutError) {
- try {
- deleteDataWithinTransaction(patchTransaction, CONFIGURATION, patchEntity
- .getTargetNode());
- editCollection.add(new PatchStatusEntity(patchEntity.getEditId(), true, null));
- } catch (final RestconfDocumentedException e) {
- LOG.error("Error call http Patch operation {} on target {}",
- operation,
- patchEntity.getTargetNode().toString());
-
- editErrors = new ArrayList<>();
- editErrors.addAll(e.getErrors());
- editCollection.add(new PatchStatusEntity(patchEntity.getEditId(), false, editErrors));
- withoutError = false;
- }
- }
- break;
case REMOVE:
if (withoutError) {
try {
throw new RestconfDocumentedException(
error.getMessage(),
ErrorType.TRANSPORT,
- ErrorTag.RESOURCE_DENIED_TRANSPORT);
+ ErrorTag.RESOURCE_DENIED_TRANSPORT, e);
}
}
throw new RestconfDocumentedException("Error reading data.", e, e.getErrorList());
((ListSchemaNode) childSchema).getKeyDefinition());
builder.withChild(childBuilder.build());
} else if (child instanceof LeafNode) {
- final String defaultVal = ((LeafSchemaNode) childSchema).getDefault();
- final String nodeVal = ((LeafNode<String>) child).getValue();
+ final Object defaultVal = ((LeafSchemaNode) childSchema).getType().getDefaultValue().orElse(null);
+ final Object nodeVal = ((LeafNode<?>) child).getValue();
final NormalizedNodeAttrBuilder<NodeIdentifier, Object, LeafNode<Object>> leafBuilder =
Builders.leafBuilder((LeafSchemaNode) childSchema);
if (keys.contains(child.getNodeType())) {
((ListSchemaNode) childSchema).getKeyDefinition());
builder.withChild(childBuilder.build());
} else if (child instanceof LeafNode) {
- final String defaultVal = ((LeafSchemaNode) childSchema).getDefault();
- final String nodeVal = ((LeafNode<String>) child).getValue();
+ final Object defaultVal = ((LeafSchemaNode) childSchema).getType().getDefaultValue().orElse(null);
+ final Object nodeVal = ((LeafNode<?>) child).getValue();
final NormalizedNodeAttrBuilder<NodeIdentifier, Object, LeafNode<Object>> leafBuilder =
Builders.leafBuilder((LeafSchemaNode) childSchema);
if (trim) {