All Downloads are FREE. Search and download functionalities are using the official Maven repository.

restx.validation.ValidatorFactoryFactoryMachine Maven / Gradle / Ivy

package restx.validation;

import com.google.common.collect.ImmutableSet;
import restx.factory.*;
import restx.validation.ValidatorFactory;


@Machine
public class ValidatorFactoryFactoryMachine extends DefaultFactoryMachine {
    private static final ValidatorFactory module = new ValidatorFactory();

    public ValidatorFactoryFactoryMachine() {
        super(0, new MachineEngine[] {
            new StdMachineEngine(Name.of(jakarta.validation.Validator.class, "hibernate.validator"), 0, BoundlessComponentBox.FACTORY) {
        private final Factory.Query ignoreXmlConfiguration = Factory.Query.byName(Name.of(java.lang.Boolean.class, "hibernate.validator.ignore.xml.configuration")).mandatory();
                @Override
                public BillOfMaterials getBillOfMaterial() {
                    return new BillOfMaterials(ImmutableSet.>of(
        ignoreXmlConfiguration
                    ));
                }

                @Override
                public jakarta.validation.Validator doNewComponent(SatisfiedBOM satisfiedBOM) {
	                    return module.validator(
	        satisfiedBOM.getOne(ignoreXmlConfiguration).get().getComponent()
	                    );
                }
            },
            new StdMachineEngine(Name.of(java.lang.Boolean.class, "hibernate.validator.ignore.xml.configuration"), 0, BoundlessComponentBox.FACTORY) {
        
                @Override
                public BillOfMaterials getBillOfMaterial() {
                    return new BillOfMaterials(ImmutableSet.>of(
        
                    ));
                }

                @Override
                public java.lang.Boolean doNewComponent(SatisfiedBOM satisfiedBOM) {
	                    return module.ignoreXmlConfigurationFlag(
	        
	                    );
                }
            },

        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy