Search in sources :

Example 1 with SimpleWriteAttributeOperationTransformer

use of org.jboss.as.clustering.controller.transform.SimpleWriteAttributeOperationTransformer in project wildfly by wildfly.

the class PropertyResourceDefinition method buildTransformation.

static void buildTransformation(ModelVersion version, ResourceTransformationDescriptionBuilder parent) {
    ResourceTransformationDescriptionBuilder builder = parent.addChildResource(WILDCARD_PATH);
    if (JGroupsModel.VERSION_3_0_0.requiresTransformation(version)) {
        builder.setCustomResourceTransformer(new SimpleResourceTransformer(LEGACY_ADDRESS_TRANSFORMER));
        builder.addOperationTransformationOverride(ModelDescriptionConstants.ADD).setCustomOperationTransformer(new SimpleAddOperationTransformer(LEGACY_ADDRESS_TRANSFORMER).addAttributes(new SimpleAttribute(VALUE))).inheritResourceAttributeDefinitions();
        builder.addOperationTransformationOverride(ModelDescriptionConstants.REMOVE).setCustomOperationTransformer(new SimpleRemoveOperationTransformer(LEGACY_ADDRESS_TRANSFORMER));
        builder.addOperationTransformationOverride(ModelDescriptionConstants.READ_ATTRIBUTE_OPERATION).setCustomOperationTransformer(new SimpleReadAttributeOperationTransformer(LEGACY_ADDRESS_TRANSFORMER));
        builder.addOperationTransformationOverride(ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION).setCustomOperationTransformer(new SimpleWriteAttributeOperationTransformer(LEGACY_ADDRESS_TRANSFORMER));
        builder.addOperationTransformationOverride(ModelDescriptionConstants.UNDEFINE_ATTRIBUTE_OPERATION).setCustomOperationTransformer(new SimpleUndefineAttributeOperationTransformer(LEGACY_ADDRESS_TRANSFORMER));
        builder.addOperationTransformationOverride(ModelDescriptionConstants.DESCRIBE).setCustomOperationTransformer(new SimpleDescribeOperationTransformer(LEGACY_ADDRESS_TRANSFORMER));
    }
}
Also used : SimpleAddOperationTransformer(org.jboss.as.clustering.controller.transform.SimpleAddOperationTransformer) SimpleRemoveOperationTransformer(org.jboss.as.clustering.controller.transform.SimpleRemoveOperationTransformer) SimpleReadAttributeOperationTransformer(org.jboss.as.clustering.controller.transform.SimpleReadAttributeOperationTransformer) SimpleWriteAttributeOperationTransformer(org.jboss.as.clustering.controller.transform.SimpleWriteAttributeOperationTransformer) SimpleAttribute(org.jboss.as.clustering.controller.SimpleAttribute) SimpleUndefineAttributeOperationTransformer(org.jboss.as.clustering.controller.transform.SimpleUndefineAttributeOperationTransformer) ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder) SimpleDescribeOperationTransformer(org.jboss.as.clustering.controller.transform.SimpleDescribeOperationTransformer) SimpleResourceTransformer(org.jboss.as.clustering.controller.transform.SimpleResourceTransformer)

Aggregations

SimpleAttribute (org.jboss.as.clustering.controller.SimpleAttribute)1 SimpleAddOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleAddOperationTransformer)1 SimpleDescribeOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleDescribeOperationTransformer)1 SimpleReadAttributeOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleReadAttributeOperationTransformer)1 SimpleRemoveOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleRemoveOperationTransformer)1 SimpleResourceTransformer (org.jboss.as.clustering.controller.transform.SimpleResourceTransformer)1 SimpleUndefineAttributeOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleUndefineAttributeOperationTransformer)1 SimpleWriteAttributeOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleWriteAttributeOperationTransformer)1 ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)1