Class CsticTypeMapperImpl

    • Constructor Detail

      • CsticTypeMapperImpl

        public CsticTypeMapperImpl()
    • Method Detail

      • mapCsticModelToData

        public CsticData mapCsticModelToData​(CsticModel model,
                                             java.lang.String prefix,
                                             java.util.Map<java.lang.String,​ClassificationSystemCPQAttributesContainer> nameMap)
        Description copied from interface: CsticTypeMapper
        Maps a single characteristic. Model -> DTO.
        Specified by:
        mapCsticModelToData in interface CsticTypeMapper
        Parameters:
        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)
      • emptyIfNull

        protected java.lang.String emptyIfNull​(java.lang.String value)
      • mapNumericSpecifics

        protected void mapNumericSpecifics​(CsticModel model,
                                           CsticData data)
      • handlePriceData

        protected void handlePriceData​(CsticModel model,
                                       CsticData data,
                                       java.util.List<CsticValueData> domainValues)
        Adds zero prices with currency to the domain-values if the cstic is price relevant.
        Parameters:
        model -
        data -
        domainValues -
      • checkReadonly

        protected boolean checkReadonly​(CsticValueModel csticValue,
                                        boolean isDebugEnabled)
      • getValueForUiTypeWithAdditionalValue

        protected java.lang.String getValueForUiTypeWithAdditionalValue​(CsticData data,
                                                                        CsticModel model,
                                                                        java.lang.String value)
      • isUiTypeDrownDownAndNullValue

        protected boolean isUiTypeDrownDownAndNullValue​(UiType uiType,
                                                        java.lang.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 java.lang.String getValueFromCstcData​(CsticData data,
                                                        boolean isDebugEnabled)
      • generateUniqueKey

        public java.lang.String generateUniqueKey​(CsticModel model,
                                                  java.lang.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​(java.lang.String longText,
                                       boolean isDebugEnabled)
      • identifyPriceRelevanceAndCurrency

        protected java.lang.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
      • setUiKeyGenerator

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

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

        protected boolean isUiTypeReadOnly​(UiType uiType)
      • getPricingConfigurationParameters

        protected PricingConfigurationParameter getPricingConfigurationParameters()
        Returns:
        the pricingConfigurationParameter
      • setProviderFactory

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

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