Interface CharacteristicValueRulesResultHandler
- All Known Implementing Classes:
CharacteristicValueRulesResultHandlerImpl
public interface CharacteristicValueRulesResultHandler
Handles rules result for characteristic values.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessageToRulesResult(DiscountMessageRulesResultModel message, String configIg, String csticName, String csticValueName) voidcopyAndPersistRuleResults(String sourceConfigId, String targetConfigId) Copies the CharacteristicValueRulesResult from the source ProductConfiguration and persists it for the target ProductConfigurationcreates an empty instancecreates an empty instancevoiddeleteRulesResultsByConfigId(String configId) getRulesResultsByConfigId(String configId) Returns the list of CharacteristicValueResultModel objects associated with given configuration id.voidmergeDiscountAndPersistResults(CharacteristicValueRulesResultModel result, String configId) Persists a CharacteristicValueRulesResult with the given data.
-
Method Details
-
getRulesResultsByConfigId
Returns the list of CharacteristicValueResultModel objects associated with given configuration id.- Parameters:
configId- Configuration id- Returns:
- list of CharacteristicValueResultModel objects
-
deleteRulesResultsByConfigId
- Parameters:
configId- Configuration id
-
mergeDiscountAndPersistResults
Persists a CharacteristicValueRulesResult with the given data. Adds it to the list of rules result at the configuration model identified by given id. If a rules result already exists for the given characteristic/value pair the discount is added to the existing one. The discount sum cannot exceed 100%.- Parameters:
result- to persistconfigId- id of the configuration to which this result belongs to
-
addMessageToRulesResult
void addMessageToRulesResult(DiscountMessageRulesResultModel message, String configIg, String csticName, String csticValueName) - Parameters:
message- discount message instanceconfigIg- configuration idcsticName- name of cstic for which the message is persistetcsticValueName- name of cstic value for which the message is persistet - may be null
-
createInstance
CharacteristicValueRulesResultModel createInstance()creates an empty instance- Returns:
- a new instance
-
createMessageInstance
DiscountMessageRulesResultModel createMessageInstance()creates an empty instance- Returns:
- a new instance
-
copyAndPersistRuleResults
Copies the CharacteristicValueRulesResult from the source ProductConfiguration and persists it for the target ProductConfiguration- Parameters:
sourceConfigId- source configuration IdtargetConfigId- configuration Id
-