org.openl.codegen.template.RulesCompileContext-validators.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.openl.rules.gen Show documentation
Show all versions of org.openl.rules.gen Show documentation
OpenL Code generation project
#if ($tool.length($validatorsDefinitions) > 0)
{
#foreach( $validatorsDefinition in $validatorsDefinitions )
#foreach( $validatorClass in $validatorsDefinition.ValidatorClasses )
#if ( ${tool.hasConstructorWithoutParams($validatorClass)} )
addValidator(new ${validatorClass.Name}());
#elseif ( ${tool.hasConstructorWithPropertyName($validatorClass)} )
addValidator(new ${validatorClass.Name}("${validatorsDefinition.PropertyName}"));
#elseif ( ${tool.hasConstructorWithConstraintForProperty($validatorClass)} )
addValidator(new ${validatorClass.Name}("${validatorsDefinition.PropertyName}", "${validatorsDefinition.getPropertyConstraints($validatorClass)}"));
#else
//WARNING failed to process "${validatorClass.Name}" validator.
#end
#end#end
}
#end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy