Map<String, AttributeTransformationDescription> buildAttributes(){ Map<String, AttributeTransformationDescription> attributes = new HashMap<String, AttributeTransformationDescription>(); for (String name : allAttributes) { List<RejectAttributeChecker> checkers = attributeRestrictions.get(name); String newName = renamedAttributes.get(name); DiscardAttributeChecker discardChecker = discardedAttributes.get(name); attributes.put(name, new AttributeTransformationDescription(name, checkers, newName, discardChecker, convertedAttributes.get(name))); } return attributes; } }
if (description.shouldDiscard(address, TransformationRule.cloneAndProtect(attributeValue), operation, context)) { modelOrOp.remove(attributeName); discardedAttributes.add(attributeName); String newName = description.getNewName(); if (newName != null) { renames.put(attributeName, newName); description.rejectAttributes(rejectedAttributes, TransformationRule.cloneAndProtect(attributeValue)); AttributeTransformationDescription description = entry.getValue(); description.convertValue(address, attributeValue, operation, context); if (!attributeValue.isDefined()) { modelOrOp.remove(attributeName);
@Override void transformOperation(ModelNode operation, PathAddress address, ChainedOperationContext context) throws OperationFailedException { final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); final AttributeTransformationDescription description = attributeTransformations.get(attributeName); if(description == null) { context.invokeNext(operation); return; } final ModelNode originalModel = operation.clone(); //Make sure that context.readResourceXXX() returns an unmodifiable Resource context.setImmutableResource(true); try { //discard what can be discarded if (description.shouldDiscard(address, UNDEFINED, originalModel, context)) { context.invokeNext(OperationTransformer.DISCARD.transformOperation(context.getContext(), address, operation)); } else { context.invokeNext(operation); } } finally { context.setImmutableResource(false); } }
if (description.shouldDiscard(address, TransformationRule.cloneAndProtect(attributeValue), operation, context)) { modelOrOp.remove(attributeName); discardedAttributes.add(attributeName); String newName = description.getNewName(); if (newName != null) { renames.put(attributeName, newName); description.rejectAttributes(rejectedAttributes, TransformationRule.cloneAndProtect(attributeValue)); AttributeTransformationDescription description = entry.getValue(); description.convertValue(address, attributeValue, operation, context); if (!attributeValue.isDefined()) { modelOrOp.remove(attributeName);
@Override void transformOperation(ModelNode operation, PathAddress address, ChainedOperationContext context) throws OperationFailedException { final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); final AttributeTransformationDescription description = attributeTransformations.get(attributeName); if(description == null) { context.invokeNext(operation); return; } final ModelNode originalModel = operation.clone(); //Make sure that context.readResourceXXX() returns an unmodifiable Resource context.setImmutableResource(true); try { //discard what can be discarded if (description.shouldDiscard(address, UNDEFINED, originalModel, context)) { context.invokeNext(OperationTransformer.DISCARD.transformOperation(context.getContext(), address, operation)); } else { context.invokeNext(operation); } } finally { context.setImmutableResource(false); } }
if (description.shouldDiscard(address, TransformationRule.cloneAndProtect(attributeValue), operation, context)) { modelOrOp.remove(attributeName); discardedAttributes.add(attributeName); String newName = description.getNewName(); if (newName != null) { renames.put(attributeName, newName); description.rejectAttributes(rejectedAttributes, TransformationRule.cloneAndProtect(attributeValue)); AttributeTransformationDescription description = entry.getValue(); description.convertValue(address, attributeValue, operation, context); if (!attributeValue.isDefined()) { modelOrOp.remove(attributeName);
Map<String, AttributeTransformationDescription> buildAttributes(){ Map<String, AttributeTransformationDescription> attributes = new HashMap<String, AttributeTransformationDescription>(); for (String name : allAttributes) { List<RejectAttributeChecker> checkers = attributeRestrictions.get(name); String newName = renamedAttributes.get(name); DiscardAttributeChecker discardChecker = discardedAttributes.get(name); attributes.put(name, new AttributeTransformationDescription(name, checkers, newName, discardChecker, convertedAttributes.get(name))); } return attributes; } }
@Override void transformOperation(ModelNode operation, PathAddress address, ChainedOperationContext context) throws OperationFailedException { final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); final AttributeTransformationDescription description = attributeTransformations.get(attributeName); if(description == null) { context.invokeNext(operation); return; } final ModelNode originalModel = operation.clone(); //Make sure that context.readResourceXXX() returns an unmodifiable Resource context.setImmutableResource(true); try { //discard what can be discarded if (description.shouldDiscard(address, UNDEFINED, originalModel, context)) { context.invokeNext(OperationTransformer.DISCARD.transformOperation(context.getContext(), address, operation)); } else { context.invokeNext(operation); } } finally { context.setImmutableResource(false); } }
if (description.shouldDiscard(address, TransformationRule.cloneAndProtect(attributeValue), operation, context)) { modelOrOp.remove(attributeName); discardedAttributes.add(attributeName); String newName = description.getNewName(); if (newName != null) { renames.put(attributeName, newName); description.rejectAttributes(rejectedAttributes, TransformationRule.cloneAndProtect(attributeValue)); AttributeTransformationDescription description = entry.getValue(); description.convertValue(address, attributeValue, operation, context); if (!attributeValue.isDefined()) { modelOrOp.remove(attributeName);
Map<String, AttributeTransformationDescription> buildAttributes(){ Map<String, AttributeTransformationDescription> attributes = new HashMap<String, AttributeTransformationDescription>(); for (String name : allAttributes) { List<RejectAttributeChecker> checkers = attributeRestrictions.get(name); String newName = renamedAttributes.get(name); DiscardAttributeChecker discardChecker = discardedAttributes.get(name); attributes.put(name, new AttributeTransformationDescription(name, checkers, newName, discardChecker, convertedAttributes.get(name))); } return attributes; } }
@Override void transformOperation(ModelNode operation, PathAddress address, ChainedOperationContext context) throws OperationFailedException { final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); final AttributeTransformationDescription description = attributeTransformations.get(attributeName); if(description == null) { context.invokeNext(operation); return; } final ModelNode originalModel = operation.clone(); //Make sure that context.readResourceXXX() returns an unmodifiable Resource context.setImmutableResource(true); try { //discard what can be discarded if (description.shouldDiscard(address, UNDEFINED, originalModel, context)) { context.invokeNext(OperationTransformer.DISCARD.transformOperation(context.getContext(), address, operation)); } else { context.invokeNext(operation); } } finally { context.setImmutableResource(false); } }
final ModelNode attributeValue = operation.get(ModelDescriptionConstants.VALUE); if (description.shouldDiscard(address, attributeValue, operation, context)) { context.recordTransformedOperation(OperationTransformer.DISCARD.transformOperation(ctx, address, operation)); return; description.rejectAttributes(rejectedAttributes, attributeValue); final OperationRejectionPolicy policy; if(rejectedAttributes.hasRejections()) { description.convertValue(address, attributeValue, TransformationRule.cloneAndProtect(operation), context); String newName = description.getNewName(); if (newName != null) { operation.get(NAME).set(newName);
Map<String, AttributeTransformationDescription> buildAttributes(){ Map<String, AttributeTransformationDescription> attributes = new HashMap<String, AttributeTransformationDescription>(); for (String name : allAttributes) { List<RejectAttributeChecker> checkers = attributeRestrictions.get(name); String newName = renamedAttributes.get(name); DiscardAttributeChecker discardChecker = discardedAttributes.get(name); attributes.put(name, new AttributeTransformationDescription(name, checkers, newName, discardChecker, convertedAttributes.get(name))); } return attributes; } }
final ModelNode attributeValue = operation.get(ModelDescriptionConstants.VALUE); if (description.shouldDiscard(address, attributeValue, operation, context)) { context.recordTransformedOperation(OperationTransformer.DISCARD.transformOperation(ctx, address, operation)); return; description.rejectAttributes(rejectedAttributes, attributeValue); final OperationRejectionPolicy policy; if(rejectedAttributes.hasRejections()) { description.convertValue(address, attributeValue, TransformationRule.cloneAndProtect(operation), context); String newName = description.getNewName(); if (newName != null) { operation.get(NAME).set(newName);
final ModelNode attributeValue = operation.get(ModelDescriptionConstants.VALUE); if (description.shouldDiscard(address, attributeValue, operation, context)) { context.recordTransformedOperation(OperationTransformer.DISCARD.transformOperation(ctx, address, operation)); return; description.rejectAttributes(rejectedAttributes, attributeValue); final OperationRejectionPolicy policy; if(rejectedAttributes.hasRejections()) { description.convertValue(address, attributeValue, TransformationRule.cloneAndProtect(operation), context); String newName = description.getNewName(); if (newName != null) { operation.get(NAME).set(newName);
final ModelNode attributeValue = operation.get(ModelDescriptionConstants.VALUE); if (description.shouldDiscard(address, attributeValue, operation, context)) { context.recordTransformedOperation(OperationTransformer.DISCARD.transformOperation(ctx, address, operation)); return; description.rejectAttributes(rejectedAttributes, attributeValue); final OperationRejectionPolicy policy; if(rejectedAttributes.hasRejections()) { description.convertValue(address, attributeValue, TransformationRule.cloneAndProtect(operation), context); String newName = description.getNewName(); if (newName != null) { operation.get(NAME).set(newName);