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
-
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 voidcalculateTotalSavings(ConfigModel model, BigDecimal selectedSurcharge, BigDecimal obsoletePrice) voidcheckCstic(ConfigModel model, InstanceModel instance, CsticModel cstic) voidcheckInstance(ConfigModel model, InstanceModel instance) voidcheckModel(ConfigModel model) protected 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(String name, 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 Stringintprotected voidhandlePriceInCaseValueIsNotSelected(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) voidprotected voidresetValuePrices(CsticModel cstic) retrieveAssignableValue(InstanceModel instance, String csticName, String valueName) retrieveCstic(InstanceModel instance, String csticName) protected CsticValueModelretrieveValue(InstanceModel instance, String csticName) voidsetConfigId(String nextConfigId) protected voidsetDeltaPrice(BigDecimal surcharge, BigDecimal obsoletePrice, CsticValueModel value) protected voidsetDeltaPriceBasedOnSelectedSurcharge(BigDecimal selectedSurcharge, CsticValueModel value) voidsetI18NService(CommonI18NService i18nService) protected voidsetValuePrice(BigDecimal surcharge, BigDecimal obsoletePrice, CsticValueModel value) protected voidsetZeroDeltaPrice(BigDecimal surcharge, BigDecimal obsoletePrice, CsticValueModel value) voidshowDeltaPrices(boolean showDeltaPrices) 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
isChangeabeleVariant, isChangeableVariant
-
Field Details
-
ROOT_INST_ID
- See Also:
-
productCode
-
-
Constructor Details
-
BaseRunTimeConfigMockImpl
public BaseRunTimeConfigMockImpl() -
BaseRunTimeConfigMockImpl
-
-
Method Details
-
showDeltaPrices
public void showDeltaPrices(boolean showDeltaPrices) - Specified by:
showDeltaPricesin interfaceConfigMock
-
createDefaultRootInstance
protected InstanceModel createDefaultRootInstance(ConfigModel model, String productCode, String langDepName) -
createDefaultConfigModel
-
createDefaultConfigModel
-
createInstance
-
createSubInstance
-
checkModel
- Specified by:
checkModelin interfaceConfigMock
-
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(CsticModel cstic, String valueName, BigDecimal surcharge, BigDecimal obsoletePrice) -
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) -
resetConflictAssumptionId
public void resetConflictAssumptionId() -
getNextConflictAssumptionId
public int getNextConflictAssumptionId() -
setConfigId
- Specified by:
setConfigIdin interfaceConfigMock
-
getConfigId
-
getCurrencyIso
-
setI18NService
- Specified by:
setI18NServicein interfaceConfigMock
-
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) -
createDefaultConfiguration
- Specified by:
createDefaultConfigurationin interfaceConfigMock
-
addProductAttributes
Description copied from interface:ConfigMockAllows to add attributes from product to the configurator mock model- Specified by:
addProductAttributesin interfaceConfigMock
-