Search in sources :

Example 1 with DiscardAttributeValueChecker

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

the class IDMExtension method registerTransformers_1_0.

private void registerTransformers_1_0(ExtensionContext context, SubsystemRegistration subsystemRegistration) {
    ResourceTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
    ResourceTransformationDescriptionBuilder partitionManagerResourceBuilder = builder.addChildResource(PartitionManagerResourceDefinition.INSTANCE);
    ResourceTransformationDescriptionBuilder identityConfigResourceBuilder = partitionManagerResourceBuilder.addChildResource(IdentityConfigurationResourceDefinition.INSTANCE);
    ResourceTransformationDescriptionBuilder ldapTransfDescBuilder = identityConfigResourceBuilder.addChildResource(LDAPStoreResourceDefinition.INSTANCE);
    ldapTransfDescBuilder.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, LDAPStoreResourceDefinition.ACTIVE_DIRECTORY).setDiscard(new DiscardAttributeValueChecker(new ModelNode(false)), LDAPStoreResourceDefinition.ACTIVE_DIRECTORY);
    ldapTransfDescBuilder.getAttributeBuilder().addRejectCheck(RejectAttributeChecker.DEFINED, LDAPStoreResourceDefinition.UNIQUE_ID_ATTRIBUTE_NAME).setDiscard(DiscardAttributeChecker.UNDEFINED, LDAPStoreResourceDefinition.UNIQUE_ID_ATTRIBUTE_NAME);
    Tools.register(builder.build(), subsystemRegistration, ModelVersion.create(1, 0));
}
Also used : DiscardAttributeValueChecker(org.jboss.as.controller.transform.description.DiscardAttributeChecker.DiscardAttributeValueChecker) ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder) ModelNode(org.jboss.dmr.ModelNode)

Aggregations

DiscardAttributeValueChecker (org.jboss.as.controller.transform.description.DiscardAttributeChecker.DiscardAttributeValueChecker)1 ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)1 ModelNode (org.jboss.dmr.ModelNode)1