Class CsticTypeMapperImpl

java.lang.Object
de.hybris.platform.sap.productconfig.facades.impl.CsticTypeMapperImpl
All Implemented Interfaces:
CsticTypeMapper

public class CsticTypeMapperImpl extends Object implements CsticTypeMapper
Default implementation of the CsticTypeMapper.
  • 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: CsticTypeMapper
      Maps a single characteristic. Model -> DTO.
      Specified by:
      mapCsticModelToData in interface CsticTypeMapper
      Parameters:
      configModel - configuration model as context
      model - source - characteristic Model
      prefix - name of the group, this characteristic belongs to
      nameMap - cache for hybris classification system access
      Returns:
      target - characteristic DTO
    • adjustMaxLength

      protected void adjustMaxLength(CsticData data)
    • fillPlaceholder

      protected void fillPlaceholder(CsticModel model, CsticData data)
    • emptyIfNull

      protected String emptyIfNull(String value)
    • mapNumericSpecifics

      protected void mapNumericSpecifics(CsticModel model, CsticData data)
    • createDomainValues

      protected List<CsticValueData> createDomainValues(CsticModel model, ClassificationSystemCPQAttributesContainer hybrisNames, boolean isDebugEnabled, boolean useDeltaPrices)
    • handlePriceData

      protected void handlePriceData(CsticModel model, CsticData data, List<CsticValueData> domainValues)
      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

      protected boolean checkReadonly(CsticValueModel csticValue, boolean isDebugEnabled)
    • updateCsticModelValuesFromData

      public void updateCsticModelValuesFromData(CsticData data, CsticModel model)
      Description copied from interface: CsticTypeMapper
      Updates a single characteristic. DTO -> Model.
      Specified by:
      updateCsticModelValuesFromData in interface CsticTypeMapper
      Parameters:
      data - source - characteristic DTO
      model - target - characteristic Model
    • getValueForUiTypeWithAdditionalValue

      protected String getValueForUiTypeWithAdditionalValue(CsticData data, CsticModel model, String value)
    • isValueNullAndLastValidValueNotNull

      protected boolean isValueNullAndLastValidValueNotNull(CsticData data, String value)
    • isUiTypeDrownDownAndNullValue

      protected boolean isUiTypeDrownDownAndNullValue(UiType uiType, String value)
    • isUiTypeWithAdditionalValue

      protected boolean isUiTypeWithAdditionalValue(UiType uiType)
    • isUiTypeMultiselectionValue

      protected boolean isUiTypeMultiselectionValue(UiType uiType)
    • handleRetraction

      protected void handleRetraction(CsticData data, CsticModel model, boolean isDebugEnabled)
      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

      protected String getValueFromCstcData(CsticData data, boolean isDebugEnabled)
    • generateUniqueKey

      public String generateUniqueKey(CsticModel model, String prefix)
      Description copied from interface: CsticTypeMapper
      Generates a key that identifies this characteristic uniquely within this configuration.
      Specified by:
      generateUniqueKey in interface CsticTypeMapper
      Parameters:
      model - characteristic model
      prefix - ui group name the cstic belongs to
      Returns:
      unique key
    • containsHTML

      protected boolean containsHTML(String longText, boolean isDebugEnabled)
    • identifyPriceRelevanceAndCurrency

      protected String identifyPriceRelevanceAndCurrency(CsticModel csticModel, CsticData csticData)
      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 checked
      csticData - DTO to be modified
      Returns:
      currency (ISO) if cstic is price relevant otherwise null
    • setUiTypeFinder

      public void setUiTypeFinder(UiTypeFinder uiTypeFinder)
      Parameters:
      uiTypeFinder -
    • getUiTypeFinder

      protected UiTypeFinder getUiTypeFinder()
    • setPricingFactory

      public void setPricingFactory(ConfigPricing pricingFactory)
      Parameters:
      pricingFactory -
    • getPricingFactory

      protected ConfigPricing getPricingFactory()
      Returns:
      pricingFactory
    • setValueFormatTranslator

      public void setValueFormatTranslator(ValueFormatTranslator valueFormatTranslator)
      Parameters:
      valueFormatTranslator - the valueFormatTranslator to set
    • getValueFormatTranslator

      protected ValueFormatTranslator getValueFormatTranslator()
      Returns:
      the valueFormatTranslator
    • setNameProvider

      public void setNameProvider(ClassificationSystemCPQAttributesProvider nameProvider)
      Parameters:
      nameProvider - hybris characteristic and value name provider
    • getNameProvider

      protected ClassificationSystemCPQAttributesProvider getNameProvider()
      Returns:
      the hybris characteristic and value name provider
    • setUiKeyGenerator

      public void setUiKeyGenerator(UniqueUIKeyGenerator uiKeyGenerator)
      Parameters:
      uiKeyGenerator - for generating uniqueKeys
    • getUiKeyGenerator

      protected UniqueUIKeyGenerator getUiKeyGenerator()
    • getIntervalHandler

      protected IntervalInDomainHelper getIntervalHandler()
    • setIntervalHandler

      public void setIntervalHandler(IntervalInDomainHelper intervalHandler)
      Parameters:
      intervalHandler -
    • isUiTypeReadOnly

      protected boolean isUiTypeReadOnly(UiType uiType)
    • getPricingConfigurationParameters

      protected PricingConfigurationParameter getPricingConfigurationParameters()
      Returns:
      the pricingConfigurationParameter
    • getProviderFactory

      protected ProviderFactory getProviderFactory()
    • setProviderFactory

      public void setProviderFactory(ProviderFactory providerFactory)
      Parameters:
      providerFactory - the provider factory to set
    • getMessagesMapper

      protected ConfigurationMessageMapper getMessagesMapper()
    • setMessagesMapper

      public void setMessagesMapper(ConfigurationMessageMapper messagesMapper)
      Parameters:
      messagesMapper - the messages mapper to set