Search in sources :

Example 6 with LegacyPropertyAddOperationTransformer

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

the class CustomStoreResourceDefinition method buildTransformation.

static void buildTransformation(ModelVersion version, ResourceTransformationDescriptionBuilder parent) {
    ResourceTransformationDescriptionBuilder builder = InfinispanModel.VERSION_4_0_0.requiresTransformation(version) ? parent.addChildRedirection(PATH, LEGACY_PATH) : parent.addChildResource(PATH);
    if (InfinispanModel.VERSION_3_0_0.requiresTransformation(version)) {
        builder.addOperationTransformationOverride(ModelDescriptionConstants.ADD).setCustomOperationTransformer(new SimpleOperationTransformer(new LegacyPropertyAddOperationTransformer())).inheritResourceAttributeDefinitions();
        builder.setCustomResourceTransformer(new LegacyPropertyResourceTransformer());
    }
    StoreResourceDefinition.buildTransformation(version, builder);
}
Also used : LegacyPropertyResourceTransformer(org.jboss.as.clustering.controller.transform.LegacyPropertyResourceTransformer) LegacyPropertyAddOperationTransformer(org.jboss.as.clustering.controller.transform.LegacyPropertyAddOperationTransformer) ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder) SimpleOperationTransformer(org.jboss.as.clustering.controller.transform.SimpleOperationTransformer)

Aggregations

LegacyPropertyAddOperationTransformer (org.jboss.as.clustering.controller.transform.LegacyPropertyAddOperationTransformer)6 SimpleOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleOperationTransformer)6 LegacyPropertyResourceTransformer (org.jboss.as.clustering.controller.transform.LegacyPropertyResourceTransformer)5 PathAddress (org.jboss.as.controller.PathAddress)4 ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)4 ModelNode (org.jboss.dmr.ModelNode)4 Resource (org.jboss.as.controller.registry.Resource)2 TransformationContext (org.jboss.as.controller.transform.TransformationContext)2 LinkedList (java.util.LinkedList)1 List (java.util.List)1 ChainedOperationTransformer (org.jboss.as.clustering.controller.transform.ChainedOperationTransformer)1 LegacyPropertyMapGetOperationTransformer (org.jboss.as.clustering.controller.transform.LegacyPropertyMapGetOperationTransformer)1 LegacyPropertyWriteOperationTransformer (org.jboss.as.clustering.controller.transform.LegacyPropertyWriteOperationTransformer)1 OperationTransformer (org.jboss.as.clustering.controller.transform.OperationTransformer)1 SimpleAttributeConverter (org.jboss.as.clustering.controller.transform.SimpleAttributeConverter)1 Converter (org.jboss.as.clustering.controller.transform.SimpleAttributeConverter.Converter)1 SimpleDescribeOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleDescribeOperationTransformer)1 SimplePathOperationTransformer (org.jboss.as.clustering.controller.transform.SimplePathOperationTransformer)1 SimpleReadAttributeOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleReadAttributeOperationTransformer)1 SimpleRemoveOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleRemoveOperationTransformer)1