Package mc.core.domain.base.dobj.calc
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 Summary
Modifier and TypeMethodDescriptionvoidupdateCalculatedAttribute(Long attributeId) starts the update of entities which have the attribute corresponding to the given idvoidvalidateScript(String script, Attribute obj) creates a new script instance with a null entity (check the script syntax)
-
Method Details
-
updateCalculatedAttribute
starts the update of entities which have the attribute corresponding to the given id- Parameters:
attributeId- id of the attribute, mandatory
-
validateScript
creates a new script instance with a null entity (check the script syntax)- Parameters:
script- script to checkobj- attribute to calculate with the script- Throws:
ApplicationException- if problem with template file (TEMPLATE_ERROR) or if script contains errors (SYNTAX_ERROR)
-