Search in sources :

Example 6 with ChainedTransformationDescriptionBuilder

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

the class BatchSubsystemExtensionTransformerRegistration method registerTransformers.

@Override
public void registerTransformers(final SubsystemTransformerRegistration subsystemRegistration) {
    final ChainedTransformationDescriptionBuilder chainedBuilder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(subsystemRegistration.getCurrentSubsystemVersion());
    chainedBuilder.createBuilder(subsystemRegistration.getCurrentSubsystemVersion(), VERSION_1_1_0).getAttributeBuilder().setDiscard(DiscardAttributeChecker.UNDEFINED, BatchSubsystemDefinition.SECURITY_DOMAIN).addRejectCheck(RejectAttributeChecker.DEFINED, BatchSubsystemDefinition.SECURITY_DOMAIN).end();
    chainedBuilder.buildAndRegister(subsystemRegistration, new ModelVersion[] { VERSION_1_1_0 });
}
Also used : ChainedTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder)

Example 7 with ChainedTransformationDescriptionBuilder

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

the class NamingExtension method registerTransformers.

private void registerTransformers(SubsystemRegistration subsystem) {
    final ModelVersion v2_0_0 = ModelVersion.create(2, 0, 0);
    ChainedTransformationDescriptionBuilder chainedBuilder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(subsystem.getSubsystemVersion());
    ResourceTransformationDescriptionBuilder builder_2_0 = chainedBuilder.createBuilder(subsystem.getSubsystemVersion(), v2_0_0);
    NamingBindingResourceDefinition.INSTANCE.registerTransformers_2_0(builder_2_0);
    chainedBuilder.buildAndRegister(subsystem, new ModelVersion[] { v2_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)

Example 8 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 9 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(new DiscardAttributeChecker.DiscardAttributeValueChecker(JacORBSubsystemDefinitions.PERSISTENT_SERVER_ID.getDefaultValue()), JacORBSubsystemDefinitions.PERSISTENT_SERVER_ID).setValueConverter(new AttributeConverter.DefaultValueAttributeConverter(JacORBSubsystemDefinitions.INTEROP_CHUNK_RMI_VALUETYPES), 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 : AttributeConverter(org.jboss.as.controller.transform.description.AttributeConverter) 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)

Aggregations

ChainedTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder)9 ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)7 ModelVersion (org.jboss.as.controller.ModelVersion)5 ModelNode (org.jboss.dmr.ModelNode)3 Map (java.util.Map)2 PathAddress (org.jboss.as.controller.PathAddress)2 TransformationContext (org.jboss.as.controller.transform.TransformationContext)2 AttributeConverter (org.jboss.as.controller.transform.description.AttributeConverter)2 AttributeDefinition (org.jboss.as.controller.AttributeDefinition)1 DiscardAttributeChecker (org.jboss.as.controller.transform.description.DiscardAttributeChecker)1 RejectAttributeChecker (org.jboss.as.controller.transform.description.RejectAttributeChecker)1