Class CalculatorBean

java.lang.Object
mc.core.system.base.BaseBean
mc.core.domain.base.dobj.calc.CalculatorBean

public class CalculatorBean extends mc.core.system.base.BaseBean
substitutes values of entity attributes through rules defined by scripting code
  • Method Details

    • updateCalculatedAttribute

      public void updateCalculatedAttribute(Long attributeId)
      starts the update of entities which have the attribute corresponding to the given id
      Parameters:
      attributeId - id of the attribute, mandatory
    • validateScript

      public void validateScript(String script, Attribute obj) throws ApplicationException
      creates a new script instance with a null entity (check the script syntax)
      Parameters:
      script - script to check
      obj - attribute to calculate with the script
      Throws:
      ApplicationException - if problem with template file (TEMPLATE_ERROR) or if script contains errors (SYNTAX_ERROR)