@Component(value="cuba_DynamicAttributesRecalculationTools")
public class DynamicAttributesRecalculationTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected GlobalConfig |
config |
protected DynamicAttributesTools |
dynamicAttributesTools |
protected MetadataTools |
metadataTools |
static java.lang.String |
NAME |
protected Scripting |
scripting |
Constructor and Description |
---|
DynamicAttributesRecalculationTools() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
evaluateGroovyScript(BaseGenericIdEntity entity,
java.lang.String groovyScript) |
void |
recalculateDynamicAttributes(BaseGenericIdEntity entity)
Performs recalculation for all dynamic attributes.
|
void |
recalculateDynamicAttributes(BaseGenericIdEntity entity,
CategoryAttribute attribute)
Performs recalculation for all dependent dynamic attributes.
|
public static final java.lang.String NAME
@Inject protected Scripting scripting
@Inject protected MetadataTools metadataTools
@Inject protected DynamicAttributesTools dynamicAttributesTools
@Inject protected GlobalConfig config
public void recalculateDynamicAttributes(BaseGenericIdEntity entity, CategoryAttribute attribute)
cuba.dynamicAttributes.maxRecalculationLevel
application property. If this property is not defined
then the default value is used (default value is 10).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 beforepublic void recalculateDynamicAttributes(BaseGenericIdEntity entity)
cuba.dynamicAttributes.maxRecalculationLevel
application property. If this property is not defined
then the default value is used (default value is 10).entity
- entity with loaded dynamic attributes.protected java.lang.Object evaluateGroovyScript(BaseGenericIdEntity entity, java.lang.String groovyScript)