Class BaseRunTimeConfigMockImpl
java.lang.Object
de.hybris.platform.sap.productconfig.runtime.mock.impl.BaseRunTimeConfigMockImpl
- All Implemented Interfaces:
ConfigMock
- Direct Known Subclasses:
ConfPipeMockImpl,CPQBandsawMockImpl,CPQHomeTheaterPocConfigMockImpl,CPQLaptopPocConfigMockImpl,CPQScrewdriverMockImpl,DigitalCameraMockImpl,HomeTheaterMockImpl,YSapSimplePocConfigMockImpl
implementation note
This class and all subclasses need to be immutable/state less
This class and all subclasses need to be immutable/state less
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAssignableValue(InstanceModel instance, String csticToChange, String valueToAdd, String valueDescriptionToAdd, int index) protected voidaddCsticGroup(List<CsticGroupModel> csticGroups, String name, String description, String... cstics) voidaddProductAttributes(ConfigModel model, ProductModel productModel) Allows to add attributes from product to the configurator mock modelprotected voidapplyConflicts(ConfigModel model, List<SolvableConflictModel> conflicts) protected voidcalculateTotalSavings(ConfigModel model, BigDecimal selectedSurcharge, BigDecimal obsoletePrice) voidcheckCstic(ConfigModel model, InstanceModel instance, CsticModel cstic) voidcheckInstance(ConfigModel model, InstanceModel instance) voidcheckModel(ConfigModel model) simulates an update call for the given model, applying the mock dynamicsprotected voidcheckPreconditionViolated(InstanceModel instance, CsticModel cstic, List<SolvableConflictModel> conflicts, String preconditionCsticName, String preconditionCsticValueName, String conflictText) protected voidcheckPreconditionViolated(InstanceModel instance, CsticModel cstic, List<SolvableConflictModel> conflicts, String preconditionCsticName, Set<String> preconditionCsticValueNames, String conflictText) protected ConflictingAssumptionModelcreateConflictAssumption(CsticValueModel value, CsticModel cstic, InstanceModel instance) protected ConfigModelprotected ConfigModelcreateDefaultConfigModel(boolean isSingelLevel) protected InstanceModelcreateDefaultRootInstance(ConfigModel model, String productCode, String langDepName) protected InstanceModelprotected PriceModelcreatePrice(long priceValue) protected PriceModelcreatePrice(BigDecimal priceValue) protected PriceModelcreatePrice(BigDecimal priceValue, boolean allowZeroPrice) protected PriceModelcreatePrice(BigDecimal priceValue, boolean allowZeroPrice, BigDecimal obsoletePriceValue) protected PriceModelcreatePrice(BigDecimal priceValue, BigDecimal obsoletePriceValue) protected SolvableConflictModelcreateSolvableConflict(CsticValueModel value, CsticModel cstic, InstanceModel instance) protected SolvableConflictModelcreateSolvableConflict(CsticValueModel value, CsticModel cstic, InstanceModel instance, String conflictText) protected SolvableConflictModelcreateSolvableConflict(CsticValueModel value, CsticModel cstic, InstanceModel instance, String conflictText, CsticValueModel value2, CsticModel cstic2) protected SolvableConflictModelcreateSolvableConflict(CsticValueModel value, CsticModel cstic, InstanceModel instance, String conflictText, CsticValueModel value2, CsticModel cstic2, InstanceModel instance2) protected InstanceModelcreateSubInstance(String instanceId, String name, String langDepName) protected voidformatValueNumeric(CsticValueModel value, String strValue) protected Stringprotected CommonI18NServiceprotected ProviderFactoryprotected voidhandlePriceInCaseValueIsNotSelected(ConfigModel model, CsticModel cstic, String valueName, BigDecimal surcharge, BigDecimal obsoletePrice) protected voidhandlePriceInCaseValueIsSelected(ConfigModel model, CsticModel cstic, BigDecimal selectedSurcharge, String selectedValueName, BigDecimal obsoletePrice) protected voidhandleValuePrice(ConfigModel model, CsticModel cstic, String valueName, BigDecimal surcharge) protected voidhandleValuePrice(ConfigModel model, CsticModel cstic, String pricedValueName, BigDecimal surcharge, BigDecimal obsoletePrice) protected voidremoveAssignableValue(InstanceModel instance, String csticToChange, String valueToRemove) protected voidresetValuePrices(CsticModel cstic) retrieveAssignableValue(InstanceModel instance, String csticName, String valueName) retrieveCstic(InstanceModel instance, String csticName) protected CsticValueModelretrieveValue(InstanceModel instance, String csticName) protected voidsetDeltaPrice(BigDecimal surcharge, BigDecimal obsoletePrice, CsticValueModel value) protected voidsetDeltaPriceBasedOnSelectedSurcharge(BigDecimal selectedSurcharge, CsticValueModel value) voidsetI18NService(CommonI18NService i18nService) voidsetProviderFactory(ProviderFactory providerFactory) protected voidsetValuePrice(BigDecimal surcharge, BigDecimal obsoletePrice, CsticValueModel value) protected voidsetZeroDeltaPrice(BigDecimal surcharge, BigDecimal obsoletePrice, CsticValueModel value) protected booleanshowDeltaPrices(KBKey kbKey) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.sap.productconfig.runtime.mock.ConfigMock
createDefaultConfiguration, enrichConfigurationModel, isChangeabeleVariant, isChangeableVariant, setConfigId, showDeltaPrices
-
Field Details
-
ROOT_INST_ID
- See Also:
-
-
Constructor Details
-
BaseRunTimeConfigMockImpl
public BaseRunTimeConfigMockImpl()
-
-
Method Details
-
createDefaultRootInstance
protected InstanceModel createDefaultRootInstance(ConfigModel model, String productCode, String langDepName) -
createDefaultConfigModel
-
createDefaultConfigModel
-
createInstance
-
createSubInstance
-
checkModel
Description copied from interface:ConfigMocksimulates an update call for the given model, applying the mock dynamics- Specified by:
checkModelin interfaceConfigMock- Parameters:
model- ConfigModel
-
checkInstance
- Specified by:
checkInstancein interfaceConfigMock
-
checkCstic
- Specified by:
checkCsticin interfaceConfigMock
-
formatValueNumeric
-
addCsticGroup
protected void addCsticGroup(List<CsticGroupModel> csticGroups, String name, String description, String... cstics) -
createPrice
-
createPrice
-
createPrice
-
createPrice
-
createPrice
protected PriceModel createPrice(BigDecimal priceValue, boolean allowZeroPrice, BigDecimal obsoletePriceValue) -
handleValuePrice
protected void handleValuePrice(ConfigModel model, CsticModel cstic, String valueName, BigDecimal surcharge) -
handleValuePrice
protected void handleValuePrice(ConfigModel model, CsticModel cstic, String pricedValueName, BigDecimal surcharge, BigDecimal obsoletePrice) -
handlePriceInCaseValueIsNotSelected
protected void handlePriceInCaseValueIsNotSelected(ConfigModel model, CsticModel cstic, String valueName, BigDecimal surcharge, BigDecimal obsoletePrice) -
showDeltaPrices
-
handlePriceInCaseValueIsSelected
protected void handlePriceInCaseValueIsSelected(ConfigModel model, CsticModel cstic, BigDecimal selectedSurcharge, String selectedValueName, BigDecimal obsoletePrice) -
calculateTotalSavings
protected void calculateTotalSavings(ConfigModel model, BigDecimal selectedSurcharge, BigDecimal obsoletePrice) -
setValuePrice
-
setDeltaPrice
-
setZeroDeltaPrice
protected void setZeroDeltaPrice(BigDecimal surcharge, BigDecimal obsoletePrice, CsticValueModel value) -
setDeltaPriceBasedOnSelectedSurcharge
protected void setDeltaPriceBasedOnSelectedSurcharge(BigDecimal selectedSurcharge, CsticValueModel value) -
resetValuePrices
-
createSolvableConflict
protected SolvableConflictModel createSolvableConflict(CsticValueModel value, CsticModel cstic, InstanceModel instance, String conflictText) -
createSolvableConflict
protected SolvableConflictModel createSolvableConflict(CsticValueModel value, CsticModel cstic, InstanceModel instance, String conflictText, CsticValueModel value2, CsticModel cstic2) -
createSolvableConflict
protected SolvableConflictModel createSolvableConflict(CsticValueModel value, CsticModel cstic, InstanceModel instance, String conflictText, CsticValueModel value2, CsticModel cstic2, InstanceModel instance2) -
createSolvableConflict
protected SolvableConflictModel createSolvableConflict(CsticValueModel value, CsticModel cstic, InstanceModel instance) -
createConflictAssumption
protected ConflictingAssumptionModel createConflictAssumption(CsticValueModel value, CsticModel cstic, InstanceModel instance) -
getCurrencyIso
-
checkPreconditionViolated
protected void checkPreconditionViolated(InstanceModel instance, CsticModel cstic, List<SolvableConflictModel> conflicts, String preconditionCsticName, Set<String> preconditionCsticValueNames, String conflictText) -
checkPreconditionViolated
protected void checkPreconditionViolated(InstanceModel instance, CsticModel cstic, List<SolvableConflictModel> conflicts, String preconditionCsticName, String preconditionCsticValueName, String conflictText) -
retrieveCstic
-
retrieveValue
-
retrieveAssignableValue
public CsticValueModel retrieveAssignableValue(InstanceModel instance, String csticName, String valueName) -
removeAssignableValue
protected void removeAssignableValue(InstanceModel instance, String csticToChange, String valueToRemove) -
addAssignableValue
protected void addAssignableValue(InstanceModel instance, String csticToChange, String valueToAdd, String valueDescriptionToAdd, int index) -
applyConflicts
-
addProductAttributes
Description copied from interface:ConfigMockAllows to add attributes from product to the configurator mock model- Specified by:
addProductAttributesin interfaceConfigMock
-
getI18NService
-
setI18NService
- Specified by:
setI18NServicein interfaceConfigMock
-
getProviderFactory
-
setProviderFactory
-