Package io.jmix.dynattrui.impl
Class AttributeRecalculationManager
java.lang.Object
io.jmix.dynattrui.impl.AttributeRecalculationManager
@Component("dynat_AttributeRecalculationManager")
public class AttributeRecalculationManager
extends Object
-
Field Summary
Modifier and TypeFieldDescriptionprotected AttributeDependencies
protected DynAttrUiProperties
protected org.springframework.scripting.ScriptEvaluator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
evaluateNewValue
(Object entity, String script) void
recalculateByAttribute
(Object entity, AttributeDefinition attribute) Performs recalculation for all dependent dynamic attributes.
-
Field Details
-
scriptEvaluator
@Autowired protected org.springframework.scripting.ScriptEvaluator scriptEvaluator -
attributeDependencies
-
dynAttrUiProperties
-
-
Constructor Details
-
AttributeRecalculationManager
public AttributeRecalculationManager()
-
-
Method Details
-
recalculateByAttribute
Performs recalculation for all dependent dynamic attributes. Recalculation is performed hierarchically.Recalculation level limited by
cuba.dynamicAttributes.maxRecalculationLevel
application property. If this property is not defined then the default value is used (default value is 10).- Parameters:
entity
- entity with loaded dynamic attributes.attribute
- an attribute from which the recalculation begins. Value for this attribute won't be changed, it is assumed that this attribute was updated before
-
evaluateNewValue
-