if (operation.get(NAME).asString().equals(PROPERTIES)) { InitialAttributeValueOperationContextAttachment attachment = context.getAttachment(InitialAttributeValueOperationContextAttachment.INITIAL_VALUES_ATTACHMENT); assert attachment != null;
@Override public TransformedOperation transformOperation(TransformationContext context, PathAddress address, ModelNode operation) { ModelNode legacyOperation = operation.clone(); Operations.setPathAddress(legacyOperation, this.addressTransformer.transform(address)); InitialAttributeValueOperationContextAttachment attachment = context.getAttachment(InitialAttributeValueOperationContextAttachment.INITIAL_VALUES_ATTACHMENT); if (attachment != null) { ModelNode value = attachment.getInitialValue(address, Operations.getAttributeName(operation)); if (value != null) { attachment.putIfAbsentInitialValue(this.addressTransformer.transform(address), Operations.getAttributeName(operation), value); } } return new TransformedOperation(legacyOperation, OperationResultTransformer.ORIGINAL_RESULT); } }
@Override public <T> T getAttachment(OperationContext.AttachmentKey<T> key) { return delegate.getAttachment(key); }
@Override public <T> T getAttachment(OperationContext.AttachmentKey<T> key) { return delegate.getAttachment(key); }
if (operation.get(NAME).asString().equals(PROPERTIES)) { InitialAttributeValueOperationContextAttachment attachment = context.getAttachment(InitialAttributeValueOperationContextAttachment.INITIAL_VALUES_ATTACHMENT); assert attachment != null;
@Override public TransformedOperation transformOperation(TransformationContext context, PathAddress address, ModelNode operation) { ModelNode legacyOperation = operation.clone(); Operations.setPathAddress(legacyOperation, this.addressTransformer.transform(address)); InitialAttributeValueOperationContextAttachment attachment = context.getAttachment(InitialAttributeValueOperationContextAttachment.INITIAL_VALUES_ATTACHMENT); if (attachment != null) { ModelNode value = attachment.getInitialValue(address, Operations.getAttributeName(operation)); if (value != null) { attachment.putIfAbsentInitialValue(this.addressTransformer.transform(address), Operations.getAttributeName(operation), value); } } return new TransformedOperation(legacyOperation, OperationResultTransformer.ORIGINAL_RESULT); } }