Class ClassificationSystemCPQAttributesProviderImpl

    • Constructor Detail

      • ClassificationSystemCPQAttributesProviderImpl

        public ClassificationSystemCPQAttributesProviderImpl()
    • Method Detail

      • extractValueDescriptionsFromAttributeModel

        protected java.util.Map<java.lang.String,​java.lang.String> extractValueDescriptionsFromAttributeModel​(java.util.Collection<ClassificationAttributeValueModel> attrValues)
      • extractCsticValueMediaFromAttributeModel

        protected java.util.Map<java.lang.String,​java.util.Collection<MediaModel>> extractCsticValueMediaFromAttributeModel​(java.util.Collection<ClassificationAttributeValueModel> attrValues)
      • extractValueNamesFromAttributeModel

        protected java.util.Map<java.lang.String,​java.lang.String> extractValueNamesFromAttributeModel​(java.util.Collection<ClassificationAttributeValueModel> attrValues)
      • convertMediaToImages

        protected java.util.List<ImageData> convertMediaToImages​(java.util.Collection<MediaModel> media,
                                                                 java.util.Map<java.lang.String,​CPQImageType> cpqMediaFormatQualifiers)
      • logValue

        protected void logValue​(java.lang.String className,
                                java.lang.String nameType,
                                java.lang.String name,
                                java.lang.String targetType,
                                java.lang.String sourceType,
                                java.lang.String value,
                                boolean isDebugEnabled)
      • getClassificationAttribute

        protected ClassificationAttributeModel getClassificationAttribute​(java.lang.String name,
                                                                          ClassificationSystemVersionModel systemVersion)
        Retrieves the hybris classification attribute for a characteristic name (which is part of a CPQ configuraton model).
        Parameters:
        name - Language independent name of characteristic
        systemVersion -
        Returns:
        Classification attribute
      • getOverviewValueName

        public java.lang.String getOverviewValueName​(CsticValueModel valueModel,
                                                     CsticModel csticModel,
                                                     ClassificationSystemCPQAttributesContainer cpqAttributes,
                                                     boolean isDebugEnabled)
        Description copied from interface: ClassificationSystemCPQAttributesProvider
        returns the display name for the cstic value in context of the overview page. In case a display name is present in the CPQ attribute container it will be returned, otherwise the display name is extracted from the cstic value model.
        Specified by:
        getOverviewValueName in interface ClassificationSystemCPQAttributesProvider
        Parameters:
        valueModel - value model of the cstic value
        csticModel - model of the cstic
        cpqAttributes - CPQ attribute container with hybris cstic value name
        isDebugEnabled - only if true, debug logs will be written
        Returns:
        cstic name to be displayed on the overview page
      • getSystemVersion

        protected ClassificationSystemVersionModel getSystemVersion()
        Determines the classification system we use for retrieving the hybris classification attributes for CPQ characteristics. Checks the classification systems that are attached to a base store.

        If no system is available, null is returned.

        If at least one system is available: Returns the first one which contains '300' as part of its name, as this matches the customizing proposal for SAP Integration. '300' stands for class type 300 in ERP, which is typically used for product configuration.

        If no system contains '300', the first one found is returned.

        NOTE The pattern '300' can also be replaced, in this case override method getClassificationSystemPattern
        Returns:
        classification system Version model
      • getClassificationSystemSubString

        protected java.lang.String getClassificationSystemSubString()
        Returns substring we search for in the available classification systems. The first system which contains this substring will be used to determine hybris attributes for CPQ characteristics names
        Returns:
        "300"
      • setClassificationService

        public void setClassificationService​(ClassificationSystemService classificationService)
        Parameters:
        classificationService - injects the classification service, required to access the hybris classification system
      • setBaseStoreService

        public void setBaseStoreService​(BaseStoreService baseStoreService)
        Parameters:
        baseStoreService - injects the base store service, required to access the hybris classification system
      • getUiTypeFinder

        protected UiTypeFinder getUiTypeFinder()
      • setUiTypeFinder

        public void setUiTypeFinder​(UiTypeFinder uiTypeFinder)
        Parameters:
        uiTypeFinder - characteristic UI type finder
      • setValueFormatTranslator

        public void setValueFormatTranslator​(ValueFormatTranslator valueFormatTranslator)
        Parameters:
        valueFormatTranslator - value format translator
      • setCpqCsticImageFormatMapping

        public void setCpqCsticImageFormatMapping​(CPQImageFormatMapping cpqCsticImageFormatMapping)
        Parameters:
        cpqCsticImageFormatMapping - the cpqCsticImageFormatMapping to set
      • getCpqCsticValueImageFormatMapping

        protected CPQImageFormatMapping getCpqCsticValueImageFormatMapping()
      • setCpqCsticValueImageFormatMapping

        public void setCpqCsticValueImageFormatMapping​(CPQImageFormatMapping cpqCsticValueImageFormatMapping)
        Parameters:
        cpqCsticValueImageFormatMapping - the cpqCsticValueImageFormatMapping to set
      • setImagePopulator

        public void setImagePopulator​(ImagePopulator imagePopulator)
        Parameters:
        imagePopulator - the imagePopulator to set
      • setFlexibleSearchService

        public void setFlexibleSearchService​(FlexibleSearchService flexibleSearchService)
        Parameters:
        flexibleSearchService - the flexibleSearchService to set