Package io.jmix.dynattrflowui.impl
Class AttributeRecalculationManager
java.lang.Object
io.jmix.dynattrflowui.impl.AttributeRecalculationManager
@Component("dynat_AttributeRecalculationManager")
public class AttributeRecalculationManager
extends Object
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AttributeDependencies
protected final DynAttrUiProperties
protected final org.springframework.scripting.ScriptEvaluator
-
Constructor Summary
ConstructorDescriptionAttributeRecalculationManager
(org.springframework.scripting.ScriptEvaluator scriptEvaluator, AttributeDependencies attributeDependencies, DynAttrUiProperties dynAttrUiProperties) -
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
protected final org.springframework.scripting.ScriptEvaluator scriptEvaluator -
attributeDependencies
-
dynAttrUiProperties
-
-
Constructor Details
-
AttributeRecalculationManager
public AttributeRecalculationManager(org.springframework.scripting.ScriptEvaluator scriptEvaluator, AttributeDependencies attributeDependencies, DynAttrUiProperties dynAttrUiProperties)
-
-
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
-