Search in sources :

Example 11 with ChainedTransformationDescriptionBuilder

use of org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder in project wildfly by wildfly.

the class WeldTransformers method registerTransformers.

@Override
public void registerTransformers(SubsystemTransformerRegistration subsystem) {
    ModelVersion version4_0_0 = ModelVersion.create(4, 0, 0);
    ChainedTransformationDescriptionBuilder chainedBuilder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(subsystem.getCurrentSubsystemVersion());
    // Differences between the current version and 4.0.0
    ResourceTransformationDescriptionBuilder builder400 = chainedBuilder.createBuilder(subsystem.getCurrentSubsystemVersion(), version4_0_0);
    builder400.getAttributeBuilder().setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(false, true, ModelNode.TRUE), WeldResourceDefinition.LEGACY_EMPTY_BEANS_XML_TREATMENT_ATTRIBUTE).addRejectCheck(RejectAttributeChecker.ALL, WeldResourceDefinition.LEGACY_EMPTY_BEANS_XML_TREATMENT_ATTRIBUTE).end();
    chainedBuilder.buildAndRegister(subsystem, new ModelVersion[] { version4_0_0 });
}
Also used : ChainedTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder) ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder) ModelVersion(org.jboss.as.controller.ModelVersion) DiscardAttributeChecker(org.jboss.as.controller.transform.description.DiscardAttributeChecker)

Example 12 with ChainedTransformationDescriptionBuilder

use of org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder in project wildfly by wildfly.

the class JacORBExtension method registerTransformers.

/**
 * Register the transformers for the 1.3.0 version.
 *
 * @param subsystem the subsystems registration
 */
protected static void registerTransformers(final SubsystemRegistration subsystem) {
    ChainedTransformationDescriptionBuilder chained = ResourceTransformationDescriptionBuilder.Factory.createChainedSubystemInstance(CURRENT_MODEL_VERSION);
    ModelVersion MODEL_VERSION_EAP64 = ModelVersion.create(1, 4, 0);
    // also EAP6.2
    ModelVersion MODEL_VERSION_EAP63 = ModelVersion.create(1, 3, 0);
    ResourceTransformationDescriptionBuilder builder64 = chained.createBuilder(CURRENT_MODEL_VERSION, MODEL_VERSION_EAP64);
    builder64.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, JacORBSubsystemDefinitions.PERSISTENT_SERVER_ID).setDiscard(DiscardAttributeChecker.DEFAULT_VALUE, JacORBSubsystemDefinitions.PERSISTENT_SERVER_ID).setValueConverter(AttributeConverter.DEFAULT_VALUE, JacORBSubsystemDefinitions.INTEROP_CHUNK_RMI_VALUETYPES);
    ResourceTransformationDescriptionBuilder builder63 = chained.createBuilder(MODEL_VERSION_EAP64, MODEL_VERSION_EAP63);
    builder63.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, IORTransportConfigDefinition.ATTRIBUTES.toArray(new AttributeDefinition[0])).addRejectCheck(RejectAttributeChecker.DEFINED, IORASContextDefinition.ATTRIBUTES.toArray(new AttributeDefinition[0])).addRejectCheck(RejectAttributeChecker.DEFINED, IORSASContextDefinition.ATTRIBUTES.toArray(new AttributeDefinition[0])).end().rejectChildResource(IORSettingsDefinition.INSTANCE.getPathElement());
    chained.buildAndRegister(subsystem, new ModelVersion[] { MODEL_VERSION_EAP64, MODEL_VERSION_EAP63 });
}
Also used : ChainedTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder) ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder) AttributeDefinition(org.jboss.as.controller.AttributeDefinition) ModelVersion(org.jboss.as.controller.ModelVersion)

Example 13 with ChainedTransformationDescriptionBuilder

use of org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder in project wildfly by wildfly.

the class MessagingTransformers method registerTransformers.

static void registerTransformers(final SubsystemRegistration subsystem) {
    ChainedTransformationDescriptionBuilder chainedBuilder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(subsystem.getSubsystemVersion());
    // Current
    // 3.0.0 -> 2.1.0 (WildFly 8.1.0.Final)
    buildTransformers2_1_0(chainedBuilder.createBuilder(subsystem.getSubsystemVersion(), VERSION_2_1_0));
    // 2.1.0 -> 2.0.0 (WildFly 8.0.0.Final)
    buildTransformers2_0_0(chainedBuilder.createBuilder(VERSION_2_1_0, VERSION_2_0_0));
    // 2.0.0 -> 1.4.0 (AS7 7.5.0) EAP 6.4
    buildTransformers1_4_0(chainedBuilder.createBuilder(VERSION_2_0_0, VERSION_1_4_0));
    // 1.4.0 -> 1.3.0 (AS7 7.3.0) EAP 6.2 & EAP 6.3
    buildTransformers1_3_0(chainedBuilder.createBuilder(VERSION_1_4_0, VERSION_1_3_0));
    chainedBuilder.buildAndRegister(subsystem, new ModelVersion[] { VERSION_1_3_0, VERSION_1_4_0, VERSION_2_0_0, VERSION_2_1_0 });
}
Also used : ChainedTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder)

Example 14 with ChainedTransformationDescriptionBuilder

use of org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder in project wildfly by wildfly.

the class MicroProfileConfigTransformers method registerTransformers.

@Override
public void registerTransformers(SubsystemTransformerRegistration registration) {
    ChainedTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(registration.getCurrentSubsystemVersion());
    registerTransformers_WildFly_20(builder.createBuilder(MicroProfileConfigExtension.VERSION_1_1_0, MicroProfileConfigExtension.VERSION_1_0_0));
    builder.buildAndRegister(registration, new ModelVersion[] { MicroProfileConfigExtension.VERSION_1_0_0 });
}
Also used : ChainedTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder)

Example 15 with ChainedTransformationDescriptionBuilder

use of org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder in project wildfly by wildfly.

the class OpentracingTransformers method registerTransformers.

@Override
public void registerTransformers(SubsystemTransformerRegistration registration) {
    ChainedTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(registration.getCurrentSubsystemVersion());
    registerTransformers_WF_20(builder.createBuilder(SubsystemExtension.VERSION_3_0_0, SubsystemExtension.VERSION_2_0_0));
    registerTransformers_WF_19(builder.createBuilder(SubsystemExtension.VERSION_2_0_0, SubsystemExtension.VERSION_1_0_0));
    builder.buildAndRegister(registration, new ModelVersion[] { SubsystemExtension.VERSION_3_0_0, SubsystemExtension.VERSION_2_0_0, SubsystemExtension.VERSION_1_0_0 });
}
Also used : ChainedTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder)

Aggregations

ChainedTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder)27 ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)13 ModelVersion (org.jboss.as.controller.ModelVersion)6 ModelNode (org.jboss.dmr.ModelNode)4 PathAddress (org.jboss.as.controller.PathAddress)3 TransformationContext (org.jboss.as.controller.transform.TransformationContext)3 DiscardAttributeChecker (org.jboss.as.controller.transform.description.DiscardAttributeChecker)3 Map (java.util.Map)2 AttributeDefinition (org.jboss.as.controller.AttributeDefinition)1 AttributeConverter (org.jboss.as.controller.transform.description.AttributeConverter)1 RejectAttributeChecker (org.jboss.as.controller.transform.description.RejectAttributeChecker)1