List<ModelNode> createWriteAttributeOperations(ModelNode operation) { PathAddressConfig cfg = registry.getConfig(operation); if (cfg == null || !operation.get(OP).asString().equals(ADD)) { return Collections.emptyList(); } return cfg.createWriteAttributeOperations(operation); }
PathAddressConfig getConfig(Iterator<PathElement> address) { if (address.hasNext()) { PathElement element = address.next(); PathAddressConfigRegistry child = children.get(element); if (child == null) { child = wildcardChildren.get(element.getKey()); } if (child != null) { return child.getConfig(address); } return null; } else { return config; } }
ModelNode correctOperation(ModelNode operation) { PathAddressConfig cfg = registry.getConfig(operation); if (cfg == null) { throw new IllegalStateException("No path address config found for " + PathAddress.pathAddress(operation.get(OP_ADDR))); } operation = cfg.correctOperation(operation); return operation; }
PathAddressConfig getConfig(ModelNode operation) { return getConfig(PathAddress.pathAddress(operation.get(OP_ADDR)).iterator()); }
boolean expectFailed(ModelNode operation) { PathAddressConfig cfg = registry.getConfig(operation); if (cfg == null) { return false; } if (cfg.expectFailed(operation)) { return true; } return false; }
ModelNode correctWriteAttributeOperation(ModelNode operation) { PathAddressConfig cfg = registry.getConfig(operation); if (cfg == null) { return operation; } return cfg.correctWriteAttributeOperation(operation); }
public void operationDone(ModelNode operation) { PathAddressConfig cfg = registry.getConfig(operation); if (cfg == null) { return; } cfg.operationDone(operation); }
boolean canCorrectMore(ModelNode operation) { PathAddressConfig cfg = registry.getConfig(operation); if (cfg == null) { return false; } if (cfg.canCorrectMore(operation)) { return true; } return false; }
boolean expectDiscarded(ModelNode operation) { PathAddressConfig cfg = registry.getConfig(operation); if (cfg == null) { return false; } if (cfg.expectDiscarded(operation)) { return true; } return false; }
boolean expectFailedWriteAttributeOperation(ModelNode operation) { PathAddressConfig cfg = registry.getConfig(operation); if (cfg == null) { return false; } return cfg.expectFailedWriteAttributeOperation(operation); }