Class DynamicCalculatedAttributeEvaluatorRegistry

java.lang.Object
io.jmix.dynmodel.impl.DynamicCalculatedAttributeEvaluatorRegistry
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

@Component("dynmod_DynamicCalculatedAttributeEvaluatorRegistry") public class DynamicCalculatedAttributeEvaluatorRegistry extends Object implements org.springframework.beans.factory.InitializingBean
Maintains calculated-attribute evaluators registered in the application context.
  • Field Details

  • Constructor Details

    • DynamicCalculatedAttributeEvaluatorRegistry

      public DynamicCalculatedAttributeEvaluatorRegistry()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Indexes evaluator beans by name and rejects duplicate names.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • getEvaluator

      public DynamicCalculatedAttributeEvaluator getEvaluator(DynamicAttributeDefinition attributeDef, String entityName, String defaultEvaluator)
      Resolves and returns the evaluator for a calculated dynamic attribute definition.
      Parameters:
      attributeDef - dynamic attribute definition with calculated settings
      entityName - owner entity name used in validation messages
      defaultEvaluator - application default evaluator name
      Returns:
      matching evaluator
    • findEvaluator

      public @Nullable DynamicCalculatedAttributeEvaluator findEvaluator(String evaluatorName)
      Finds an evaluator by name without throwing if it is absent.
      Parameters:
      evaluatorName - evaluator name
      Returns:
      evaluator bean, or null
    • resolveEvaluatorName

      public String resolveEvaluatorName(@Nullable String declaredEvaluator, String defaultEvaluator)
      Resolves evaluator name according to the calculated-attribute precedence rules.
      Parameters:
      declaredEvaluator - evaluator declared on an attribute
      defaultEvaluator - application default evaluator
      Returns:
      effective evaluator name