private static void registerTransformers_1_1_0(SubsystemRegistration subsystemRegistration) {
ModelVersion subsystem110 = ModelVersion.create(1, 1);
ResourceTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance()
.getAttributeBuilder()
.addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, EJB3SubsystemRootResourceDefinition.ENABLE_STATISTICS)
.addRejectCheck(new RejectAttributeChecker.DefaultRejectAttributeChecker() {
@Override
public String getRejectionLogMessage(Map<String, ModelNode> attributes) {
return EjbMessages.MESSAGES.rejectTransformationDefinedDefaultSecurityDomain();
}
@Override
protected boolean rejectAttribute(PathAddress address, String attributeName, ModelNode attributeValue,
TransformationContext context) {
return attributeValue.isDefined();
}
}, EJB3SubsystemRootResourceDefinition.DEFAULT_SECURITY_DOMAIN)
.addRejectCheck(new RejectAttributeChecker.DefaultRejectAttributeChecker() {
@Override
public String getRejectionLogMessage(Map<String, ModelNode> attributes) {
return EjbMessages.MESSAGES.rejectTransformationDefinedDefaultMissingMethodPermissionsDenyAccess();
}
@Override
protected boolean rejectAttribute(PathAddress address, String attributeName, ModelNode attributeValue,
TransformationContext context) {
return attributeValue.isDefined() && attributeValue.asBoolean();
}
}, EJB3SubsystemRootResourceDefinition.DEFAULT_MISSING_METHOD_PERMISSIONS_DENY_ACCESS)
.setDiscard(DiscardAttributeChecker.UNDEFINED, EJB3SubsystemRootResourceDefinition.DEFAULT_SECURITY_DOMAIN)
.setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(new ModelNode(false)), EJB3SubsystemRootResourceDefinition.DEFAULT_MISSING_METHOD_PERMISSIONS_DENY_ACCESS)
.end();
EJB3RemoteResourceDefinition.registerTransformers_1_1_0(builder);
UnboundedQueueThreadPoolResourceDefinition.registerTransformers1_0(builder, EJB3SubsystemModel.THREAD_POOL);
StrictMaxPoolResourceDefinition.registerTransformers_1_1_0(builder);
FilePassivationStoreResourceDefinition.registerTransformers_1_1_0(builder);
ClusterPassivationStoreResourceDefinition.registerTransformers_1_1_0(builder);
TimerServiceResourceDefinition.registerTransformers_1_1_0(builder);
TransformationDescription.Tools.register(builder.build(), subsystemRegistration, subsystem110);
}