Package org.jboss.as.controller.transform.description

Examples of org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder


    private static void registerTransformers_1_2_1(SubsystemRegistration subsystemRegistration) {
        registerTransformers1_2(subsystemRegistration, ModelVersion.create(1, 2, 1));
    }

    private static void registerTransformers1_2(SubsystemRegistration subsystemRegistration, ModelVersion subsystem12) {
        final ResourceTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
        builder.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, EJB3SubsystemRootResourceDefinition.DEFAULT_SFSB_PASSIVATION_DISABLED_CACHE);
        builder.getAttributeBuilder().setDiscard(DiscardAttributeChecker.UNDEFINED, EJB3SubsystemRootResourceDefinition.DEFAULT_SFSB_PASSIVATION_DISABLED_CACHE);

        builder.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, EJB3SubsystemRootResourceDefinition.DISABLE_DEFAULT_EJB_PERMISSIONS);
        // We can always discard this attribute, because it's meaningless without the security-manager subsystem, and
        // a legacy slave can't have that subsystem in its profile.
        builder.getAttributeBuilder().setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(new ModelNode(false)), EJB3SubsystemRootResourceDefinition.DISABLE_DEFAULT_EJB_PERMISSIONS);
        PassivationStoreResourceDefinition.registerTransformers_1_2_0(builder);
        TimerServiceResourceDefinition.registerTransformers_1_2_0(builder);
        TransformationDescription.Tools.register(builder.build(), subsystemRegistration, subsystem12);
    }
View Full Code Here


    public List<AccessConstraintDefinition> getAccessConstraints() {
        return accessConstraints;
    }

    static void registerTransformers110(ResourceTransformationDescriptionBuilder parentBuilder) {
        ResourceTransformationDescriptionBuilder builder = parentBuilder.addChildResource(PATH_XA_DATASOURCE)
                .getAttributeBuilder()
                .setDiscard(DiscardAttributeChecker.UNDEFINED,
                        org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_INCREMENTER_PROPERTIES, CONNECTION_LISTENER_CLASS,
                        CONNECTION_LISTENER_PROPERTIES,
                        org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_CLASS,
View Full Code Here

        ConnectionPropertyDefinition.registerTransformers11x(builder);
    }

    static void registerTransformers111(ResourceTransformationDescriptionBuilder parentBuilder) {
        ResourceTransformationDescriptionBuilder builder = parentBuilder.addChildResource(PATH_XA_DATASOURCE);
        builder.getAttributeBuilder()
                .setDiscard(DiscardAttributeChecker.UNDEFINED,
                        org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_INCREMENTER_PROPERTIES, CONNECTION_LISTENER_CLASS,
                        CONNECTION_LISTENER_PROPERTIES,
                        org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_CLASS,
                        org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_INCREMENTER_CLASS,
View Full Code Here

        ConnectionPropertyDefinition.registerTransformers11x(builder);
    }

    static void registerTransformers200(ResourceTransformationDescriptionBuilder parentBuilder) {
        ResourceTransformationDescriptionBuilder builder = parentBuilder.addChildResource(PATH_XA_DATASOURCE);
        builder.getAttributeBuilder()
                .setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(new ModelNode(false)), CONNECTABLE)
                .setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(false, false, new ModelNode(true)), STATISTICS_ENABLED)
                .addRejectCheck(new RejectAttributeChecker.DefaultRejectAttributeChecker() {

                    @Override
View Full Code Here

    }

    private void registerTransformers1_1_0(SubsystemRegistration registration) {
        ModelVersion version = ModelVersion.create(1, 1, 0);

        ResourceTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
        builder.getAttributeBuilder().setDiscard(DiscardAttributeChecker.ALWAYS, Attributes.STATISTICS_ENABLED);
        builder.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, Attributes.SUBSYSTEM_ATTRIBUTES).end();
        builder.getAttributeBuilder().setDiscard(DiscardAttributeChecker.ALWAYS, Attributes.WSDL_URI_SCHEME);
        builder.rejectChildResource(CLIENT_CONFIG_PATH);

        ResourceTransformationDescriptionBuilder endpoint = builder.addChildResource(ENDPOINT_CONFIG_PATH);
        endpoint.addChildResource(PRE_HANDLER_CHAIN_PATH).getAttributeBuilder().addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, Attributes.PROTOCOL_BINDINGS).end();
        endpoint.addChildResource(POST_HANDLER_CHAIN_PATH).getAttributeBuilder().addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, Attributes.PROTOCOL_BINDINGS).end();

        TransformationDescription.Tools.register(builder.build(), registration, version);
    }
View Full Code Here

        TransformationDescription.Tools.register(builder.build(), registration, version);
    }

    private void registerTransformers1_2_0(SubsystemRegistration registration) {
        ModelVersion version = ModelVersion.create(1, 2, 0);
        ResourceTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
        builder.getAttributeBuilder().setDiscard(DiscardAttributeChecker.ALWAYS, Attributes.STATISTICS_ENABLED);
        builder.getAttributeBuilder().setDiscard(DiscardAttributeChecker.ALWAYS, Attributes.WSDL_URI_SCHEME);
        builder.getAttributeBuilder().setDiscard(DiscardAttributeChecker.ALWAYS, Attributes.WSDL_PATH_REWRITE_RULE);
        TransformationDescription.Tools.register(builder.build(), registration, version);
    }
View Full Code Here

        context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.XTS_1_0.getUriString(), parser);
        context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.XTS_2_0.getUriString(), parser);
    }

    private void registerTransformers1x(SubsystemRegistration subsystem) {
        ResourceTransformationDescriptionBuilder builder =
                TransformationDescriptionBuilder.Factory.createSubsystemInstance();
        builder.getAttributeBuilder().setDiscard(new DiscardAttributeChecker.DefaultDiscardAttributeChecker() {
            @Override
            protected boolean isValueDiscardable(PathAddress address, String attributeName, ModelNode attributeValue, TransformationContext context) {
                return attributeValue.isDefined() && attributeValue.equals(XTSSubsystemDefinition.HOST_NAME.getDefaultValue());
            }
        }, XTSSubsystemDefinition.HOST_NAME)
        .setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(new ModelNode(false)), XTSSubsystemDefinition.DEFAULT_CONTEXT_PROPAGATION)
        .addRejectCheck(RejectAttributeChecker.DEFINED, XTSSubsystemDefinition.HOST_NAME, XTSSubsystemDefinition.DEFAULT_CONTEXT_PROPAGATION)
        .end();

        TransformationDescription.Tools.register(builder.build(), subsystem, ModelVersion.create(1, 1, 0));

    }
View Full Code Here

        if (context.isRegisterTransformers()) {
            //Note that the 'cache' attribute introduced post 1.2.0 to binding=* is only usable if binding-type=external-context which is not allowed in <=1.2.0

            // register 1.1.0 transformer
            ResourceTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
            builder.addChildResource(NamingSubsystemModel.BINDING_PATH)
                    .getAttributeBuilder()
                        .addRejectCheck(RejectAttributeChecker.DEFINED, ENVIRONMENT)
                        .setDiscard(DiscardAttributeChecker.UNDEFINED, ENVIRONMENT, CACHE)
                        //Since we need to check the binding-type, we cannot have expressions
                        .addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, BINDING_TYPE)
                        .addRejectCheck(new BindingType11RejectChecker(), BINDING_TYPE)
                        .addRejectCheck(new BindingType12RejectChecker(), BINDING_TYPE)
                        .end();
            TransformationDescription.Tools.register(builder.build(), subsystem, VERSION_1_1_0);

            // register 1.2.0 and 1.3.0 transformer
            builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
            builder.addChildResource(NamingSubsystemModel.BINDING_PATH)
                    .getAttributeBuilder()
                        .setDiscard(DiscardAttributeChecker.UNDEFINED, CACHE)
                        //Since we need to check the binding-type, we cannot have expressions
                        .addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, BINDING_TYPE)
                        .addRejectCheck(new BindingType12RejectChecker(), BINDING_TYPE)
                        .end();
            TransformationDescription.Tools.register(builder.build(), subsystem, VERSION_1_2_0);
            TransformationDescription.Tools.register(builder.build(), subsystem, VERSION_1_3_0);
        }
    }
View Full Code Here

        subsystemRoot.registerSubModel(new JAXRPropertyDefinition());
    }

    static void registerTransformerers(SubsystemRegistration subsystem) {

        ResourceTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
        builder.getAttributeBuilder()
            .addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, CONNECTION_FACTORY_ATTRIBUTE)
            .end();
        TransformationDescription.Tools.register(builder.build(), subsystem, ModelVersion.create(1, 1, 0));
    }
View Full Code Here

    }

    static void registerTransformers110(ResourceTransformationDescriptionBuilder parentBuilder) {

            ResourceTransformationDescriptionBuilder builder = parentBuilder.addChildResource(PATH_CACHED_CONNECTION_MANAGER);
            builder.getAttributeBuilder().setDiscard(DiscardAttributeChecker.ALWAYS, CcmParameters.IGNORE_UNKNOWN_CONNECTIONS.getAttribute());

        }
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.