Class AtpFormulaStringHandler
java.lang.Object
de.hybris.platform.warehousing.atp.handlers.AtpFormulaStringHandler
- All Implemented Interfaces:
DynamicAttributeHandler<String,AtpFormulaModel>
public class AtpFormulaStringHandler
extends Object
implements DynamicAttributeHandler<String,AtpFormulaModel>
Handler for
AtpFormulaModel.FORMULASTRING-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(AtpFormulaModel atpFormulaModel) Holds logic behind getter for dynamic attribute.protected voidinterpretFormulaVariable(AtpFormulaModel atpFormulaModel, StringBuilder formulaString, PropertyDescriptor formulaVarPropDescriptor) Interpret the given formula variable and append it to the givenStringBuilderprotected static Predicate<PropertyDescriptor>Checks if the givenPropertyDescriptoris forAtpFormulaModel.AVAILABILITYprotected voidprepareFormulaString(AtpFormulaModel atpFormulaModel, StringBuilder formulaString, Set<PropertyDescriptor> propertyDescriptors) Prepares formula string from atpformula variablesvoidset(AtpFormulaModel atpFormulaModel, String formulaString) Holds logic behind setter for dynamic attribute.voidsetAtpFormulaVar2ArithmeticOperatorMap(Map<String, String> atpFormulaVar2ArithmeticOperatorMap)
-
Field Details
-
AVAILABILITY
- See Also:
-
operatorList
-
-
Constructor Details
-
AtpFormulaStringHandler
public AtpFormulaStringHandler()
-
-
Method Details
-
isAvailable
Checks if the givenPropertyDescriptoris forAtpFormulaModel.AVAILABILITY- Returns:
- true if
AtpFormulaModel.AVAILABILITY
-
get
Description copied from interface:DynamicAttributeHandlerHolds logic behind getter for dynamic attribute.- Specified by:
getin interfaceDynamicAttributeHandler<String,AtpFormulaModel> - Parameters:
atpFormulaModel- model for which dynamic attribute is declared.- Returns:
- computed value.
-
prepareFormulaString
protected void prepareFormulaString(AtpFormulaModel atpFormulaModel, StringBuilder formulaString, Set<PropertyDescriptor> propertyDescriptors) Prepares formula string from atpformula variables- Parameters:
atpFormulaModel-formulaString-propertyDescriptors-
-
interpretFormulaVariable
protected void interpretFormulaVariable(AtpFormulaModel atpFormulaModel, StringBuilder formulaString, PropertyDescriptor formulaVarPropDescriptor) Interpret the given formula variable and append it to the givenStringBuilder- Parameters:
atpFormulaModel- theAtpFormulaModelformulaString- theStringBuilderformulaVarPropDescriptor- thePropertyDescriptor
-
set
Description copied from interface:DynamicAttributeHandlerHolds logic behind setter for dynamic attribute.- Specified by:
setin interfaceDynamicAttributeHandler<String,AtpFormulaModel> - Parameters:
atpFormulaModel- model for which dynamic attribute is declared.formulaString- the value which will be used by setter logic.
-
getAtpFormulaVar2ArithmeticOperatorMap
-
setAtpFormulaVar2ArithmeticOperatorMap
-