Class CsticTypeMapperImpl
java.lang.Object
de.hybris.platform.sap.productconfig.facades.impl.CsticTypeMapperImpl
- All Implemented Interfaces:
CsticTypeMapper
Default implementation of the
CsticTypeMapper.-
Field Summary
Fields inherited from interface de.hybris.platform.sap.productconfig.facades.CsticTypeMapper
READ_ONLY_AUTHOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadjustMaxLength(CsticData data) protected booleancheckReadonly(CsticValueModel csticValue, boolean isDebugEnabled) protected booleancontainsHTML(String longText, boolean isDebugEnabled) protected CsticValueDatacreateDomainValue(CsticModel csticModel, CsticValueModel csticValueModel, ClassificationSystemCPQAttributesContainer hybrisNames, boolean isDebugEnabled, boolean isDebugEnabledNameProvider, boolean useDeltaPrices) protected List<CsticValueData>createDomainValues(CsticModel model, ClassificationSystemCPQAttributesContainer hybrisNames, boolean isDebugEnabled, boolean useDeltaPrices) protected StringemptyIfNull(String value) protected voidfillPlaceholder(CsticModel model, CsticData data) generateUniqueKey(CsticModel model, String prefix) Generates a key that identifies this characteristic uniquely within this configuration.protected IntervalInDomainHelperprotected ConfigurationMessageMapperprotected PricingConfigurationParameterprotected ConfigPricingprotected ProviderFactoryprotected UniqueUIKeyGeneratorprotected UiTypeFinderprotected ValueFormatTranslatorprotected StringgetValueForUiTypeWithAdditionalValue(CsticData data, CsticModel model, String value) protected StringgetValueFromCstcData(CsticData data, boolean isDebugEnabled) protected voidhandlePriceData(CsticModel model, CsticData data, List<CsticValueData> domainValues) Adds zero prices with currency to the domain-values if the cstic is price relevant.protected voidhandleRetraction(CsticData data, CsticModel model, boolean isDebugEnabled) Handles the retraction of a cstic which means that all user inputs to this cstic are discarded.protected StringidentifyPriceRelevanceAndCurrency(CsticModel csticModel, CsticData csticData) Checks the CsticModel for price relevance (i.e.protected booleanisUiTypeDrownDownAndNullValue(UiType uiType, String value) protected booleanisUiTypeMultiselectionValue(UiType uiType) protected booleanisUiTypeReadOnly(UiType uiType) protected booleanisUiTypeWithAdditionalValue(UiType uiType) protected booleanisValueNullAndLastValidValueNotNull(CsticData data, String value) mapCsticModelToData(ConfigModel configModel, CsticModel model, String prefix, Map<String, ClassificationSystemCPQAttributesContainer> nameMap) Maps a single characteristic.protected voidmapNumericSpecifics(CsticModel model, CsticData data) voidsetIntervalHandler(IntervalInDomainHelper intervalHandler) voidsetMessagesMapper(ConfigurationMessageMapper messagesMapper) voidsetNameProvider(ClassificationSystemCPQAttributesProvider nameProvider) protected voidsetPrice(CsticValueModel csticValueModel, CsticValueData domainValue, boolean useDeltaPrices) voidsetPricingFactory(ConfigPricing pricingFactory) voidsetProviderFactory(ProviderFactory providerFactory) voidsetUiKeyGenerator(UniqueUIKeyGenerator uiKeyGenerator) voidsetUiTypeFinder(UiTypeFinder uiTypeFinder) voidsetValueFormatTranslator(ValueFormatTranslator valueFormatTranslator) voidupdateCsticModelValuesFromData(CsticData data, CsticModel model) Updates a single characteristic.
-
Constructor Details
-
CsticTypeMapperImpl
public CsticTypeMapperImpl()
-
-
Method Details
-
mapCsticModelToData
public CsticData mapCsticModelToData(ConfigModel configModel, CsticModel model, String prefix, Map<String, ClassificationSystemCPQAttributesContainer> nameMap) Description copied from interface:CsticTypeMapperMaps a single characteristic. Model -> DTO.- Specified by:
mapCsticModelToDatain interfaceCsticTypeMapper- Parameters:
configModel- configuration model as contextmodel- source - characteristic Modelprefix- name of the group, this characteristic belongs tonameMap- cache for hybris classification system access- Returns:
- target - characteristic DTO
-
adjustMaxLength
-
fillPlaceholder
-
emptyIfNull
-
mapNumericSpecifics
-
createDomainValues
protected List<CsticValueData> createDomainValues(CsticModel model, ClassificationSystemCPQAttributesContainer hybrisNames, boolean isDebugEnabled, boolean useDeltaPrices) -
handlePriceData
Adds zero prices with currency to the domain-values if the cstic is price relevant.- Parameters:
model-data-domainValues-
-
createDomainValue
protected CsticValueData createDomainValue(CsticModel csticModel, CsticValueModel csticValueModel, ClassificationSystemCPQAttributesContainer hybrisNames, boolean isDebugEnabled, boolean isDebugEnabledNameProvider, boolean useDeltaPrices) -
setPrice
protected void setPrice(CsticValueModel csticValueModel, CsticValueData domainValue, boolean useDeltaPrices) -
checkReadonly
-
updateCsticModelValuesFromData
Description copied from interface:CsticTypeMapperUpdates a single characteristic. DTO -> Model.- Specified by:
updateCsticModelValuesFromDatain interfaceCsticTypeMapper- Parameters:
data- source - characteristic DTOmodel- target - characteristic Model
-
getValueForUiTypeWithAdditionalValue
protected String getValueForUiTypeWithAdditionalValue(CsticData data, CsticModel model, String value) -
isValueNullAndLastValidValueNotNull
-
isUiTypeDrownDownAndNullValue
-
isUiTypeWithAdditionalValue
-
isUiTypeMultiselectionValue
-
handleRetraction
Handles the retraction of a cstic which means that all user inputs to this cstic are discarded. This is needed for conflict solving- Parameters:
data-model-
-
getValueFromCstcData
-
generateUniqueKey
Description copied from interface:CsticTypeMapperGenerates a key that identifies this characteristic uniquely within this configuration.- Specified by:
generateUniqueKeyin interfaceCsticTypeMapper- Parameters:
model- characteristic modelprefix- ui group name the cstic belongs to- Returns:
- unique key
-
containsHTML
-
identifyPriceRelevanceAndCurrency
Checks the CsticModel for price relevance (i.e. at least one assignable value has a value price). It sets the priceRelevant-flag at csticData and returns the relevant currency (ISO) if the cstic is price relevant.- Parameters:
csticModel- model to be checkedcsticData- DTO to be modified- Returns:
- currency (ISO) if cstic is price relevant otherwise null
-
setUiTypeFinder
- Parameters:
uiTypeFinder-
-
getUiTypeFinder
-
setPricingFactory
- Parameters:
pricingFactory-
-
getPricingFactory
- Returns:
- pricingFactory
-
setValueFormatTranslator
- Parameters:
valueFormatTranslator- the valueFormatTranslator to set
-
getValueFormatTranslator
- Returns:
- the valueFormatTranslator
-
setNameProvider
- Parameters:
nameProvider- hybris characteristic and value name provider
-
getNameProvider
- Returns:
- the hybris characteristic and value name provider
-
setUiKeyGenerator
- Parameters:
uiKeyGenerator- for generating uniqueKeys
-
getUiKeyGenerator
-
getIntervalHandler
-
setIntervalHandler
- Parameters:
intervalHandler-
-
isUiTypeReadOnly
-
getPricingConfigurationParameters
- Returns:
- the pricingConfigurationParameter
-
getProviderFactory
-
setProviderFactory
- Parameters:
providerFactory- the provider factory to set
-
getMessagesMapper
-
setMessagesMapper
- Parameters:
messagesMapper- the messages mapper to set
-