public void transformResource(ResourceTransformationContext context, PathAddress address, Resource resource) throws OperationFailedException {
ModelNode model = new ModelNode();
transformModulesToAttributes(address, resourceName, oldName, context, model);
resource.writeModel(model);
final ResourceTransformationContext childContext = context.addTransformedResource(PathAddress.EMPTY_ADDRESS, resource);
childContext.processChildren(resource);
}
public TransformedOperation transformOperation(TransformationContext context, PathAddress address, ModelNode operation) throws OperationFailedException {
ModelNode model = new ModelNode();
transformModulesToAttributes(address, resourceName, oldName, context, model);