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));
}
Aggregations