Search in sources :

Example 41 with ResourceTransformationDescriptionBuilder

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

the class WebExtension method registerTransformers_1_4_0.

private void registerTransformers_1_4_0(SubsystemRegistration registration) {
    final ResourceTransformationDescriptionBuilder subsystemRoot = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
    subsystemRoot.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, WebDefinition.DEFAULT_SESSION_TIMEOUT).setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(false, true, new ModelNode(30)), WebDefinition.DEFAULT_SESSION_TIMEOUT).end();
    final ResourceTransformationDescriptionBuilder hostBuilder = subsystemRoot.addChildResource(HOST_PATH);
    final ResourceTransformationDescriptionBuilder ssoBuilder = hostBuilder.addChildResource(SSO_PATH);
    ssoBuilder.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, WebSSODefinition.HTTP_ONLY).setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(false, true, new ModelNode(true)), WebSSODefinition.HTTP_ONLY).end();
    TransformationDescription.Tools.register(subsystemRoot.build(), registration, ModelVersion.create(1, 4, 0));
}
Also used : ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder) ModelNode(org.jboss.dmr.ModelNode)

Example 42 with ResourceTransformationDescriptionBuilder

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

the class WebExtension method registerTransformers_1_3_0.

private void registerTransformers_1_3_0(SubsystemRegistration registration) {
    final ResourceTransformationDescriptionBuilder subsystemRoot = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
    subsystemRoot.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, WebDefinition.DEFAULT_SESSION_TIMEOUT).setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(false, true, new ModelNode(30)), WebDefinition.DEFAULT_SESSION_TIMEOUT).end();
    final ResourceTransformationDescriptionBuilder hostBuilder = subsystemRoot.addChildResource(HOST_PATH);
    final ResourceTransformationDescriptionBuilder ssoBuilder = hostBuilder.addChildResource(SSO_PATH);
    ssoBuilder.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, WebSSODefinition.HTTP_ONLY).setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(false, true, new ModelNode(true)), WebSSODefinition.HTTP_ONLY).end();
    final ResourceTransformationDescriptionBuilder connectorBuilder = subsystemRoot.addChildResource(CONNECTOR_PATH);
    connectorBuilder.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, WebConnectorDefinition.PROXY_BINDING, WebConnectorDefinition.REDIRECT_BINDING).setDiscard(DiscardAttributeChecker.UNDEFINED, WebSSLDefinition.SSL_PROTOCOL, WebConnectorDefinition.PROXY_BINDING, WebConnectorDefinition.REDIRECT_BINDING).end();
    connectorBuilder.addChildResource(SSL_PATH).getAttributeBuilder().addRejectCheck(RejectAttributeChecker.UNDEFINED, WebSSLDefinition.CIPHER_SUITE).end();
    TransformationDescription.Tools.register(subsystemRoot.build(), registration, ModelVersion.create(1, 3, 0));
}
Also used : ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder) ModelNode(org.jboss.dmr.ModelNode)

Example 43 with ResourceTransformationDescriptionBuilder

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

the class ManagedExecutorServiceResourceDefinition method registerTransformers6_0.

static void registerTransformers6_0(final ResourceTransformationDescriptionBuilder builder) {
    final ResourceTransformationDescriptionBuilder resourceBuilder = builder.addChildResource(PATH_ELEMENT);
    resourceBuilder.getAttributeBuilder().setDiscard(DiscardAttributeChecker.UNDEFINED, HUNG_TASK_TERMINATION_PERIOD_AD).addRejectCheck(RejectAttributeChecker.DEFINED, HUNG_TASK_TERMINATION_PERIOD_AD).end();
}
Also used : ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)

Example 44 with ResourceTransformationDescriptionBuilder

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

the class ManagedScheduledExecutorServiceResourceDefinition method registerTransformers_4_0.

static void registerTransformers_4_0(final ResourceTransformationDescriptionBuilder builder) {
    final ResourceTransformationDescriptionBuilder resourceBuilder = builder.addChildResource(PATH_ELEMENT);
    resourceBuilder.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.UNDEFINED, CORE_THREADS_AD).end();
}
Also used : ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)

Example 45 with ResourceTransformationDescriptionBuilder

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

the class JcaCachedConnectionManagerDefinition method registerTransformers110.

static void registerTransformers110(ResourceTransformationDescriptionBuilder parentBuilder) {
    ResourceTransformationDescriptionBuilder builder = parentBuilder.addChildResource(PATH_CACHED_CONNECTION_MANAGER);
    builder.getAttributeBuilder().setDiscard(DiscardAttributeChecker.ALWAYS, CcmParameters.IGNORE_UNKNOWN_CONNECTIONS.getAttribute());
}
Also used : ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)

Aggregations

ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)119 ModelNode (org.jboss.dmr.ModelNode)50 DiscardAttributeChecker (org.jboss.as.controller.transform.description.DiscardAttributeChecker)27 PathAddress (org.jboss.as.controller.PathAddress)26 TransformationContext (org.jboss.as.controller.transform.TransformationContext)16 SimpleOperationTransformer (org.jboss.as.clustering.controller.transform.SimpleOperationTransformer)9 ChainedTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ChainedTransformationDescriptionBuilder)9 ModelVersion (org.jboss.as.controller.ModelVersion)8 LegacyPropertyResourceTransformer (org.jboss.as.clustering.controller.transform.LegacyPropertyResourceTransformer)7 Resource (org.jboss.as.controller.registry.Resource)7 ResourceTransformationContext (org.jboss.as.controller.transform.ResourceTransformationContext)6 ResourceTransformer (org.jboss.as.controller.transform.ResourceTransformer)6 Map (java.util.Map)4 LegacyPropertyAddOperationTransformer (org.jboss.as.clustering.controller.transform.LegacyPropertyAddOperationTransformer)4 OperationTransformer (org.jboss.as.clustering.controller.transform.OperationTransformer)4 OperationFailedException (org.jboss.as.controller.OperationFailedException)4 AttributeConverter (org.jboss.as.controller.transform.description.AttributeConverter)4 RejectAttributeChecker (org.jboss.as.controller.transform.description.RejectAttributeChecker)4 LinkedList (java.util.LinkedList)2 ChainedOperationTransformer (org.jboss.as.clustering.controller.transform.ChainedOperationTransformer)2