Interface ClassificationSystemCPQAttributesProvider

  • All Known Implementing Classes:
    ClassificationSystemCPQAttributesProviderImpl

    public interface ClassificationSystemCPQAttributesProvider
    Provide required logic to access the characteristic / values names from hybris classification system
    • Method Detail

      • getCPQAttributes

        ClassificationSystemCPQAttributesContainer getCPQAttributes​(java.lang.String name,
                                                                    java.util.Map<java.lang.String,​ClassificationSystemCPQAttributesContainer> nameMap)
        Get CPQ related attributes for the given cstic from the hybris classification system. It is recommended to provide a nameMap, which should be cached at least on session level, so that the results can be cached in the map and so that there is no need to query CPQ attributes on each invocation.
        Parameters:
        name - cstic name
        nameMap - to cache results
        Returns:
        CPQ attribute container
      • getDisplayName

        java.lang.String getDisplayName​(CsticModel csticModel,
                                        ClassificationSystemCPQAttributesContainer hybrisNames,
                                        boolean isDebugEnabled)
        returns the display name for the cstic. 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 model.
        Parameters:
        csticModel - model of the cstic
        hybrisNames - CPQ attribute container with hybris cstic name
        isDebugEnabled - only if true, debug logs will be written
        Returns:
        cstic name to be displayed
      • getDisplayValueName

        java.lang.String getDisplayValueName​(CsticValueModel valueModel,
                                             CsticModel csticModel,
                                             ClassificationSystemCPQAttributesContainer hybrisNames,
                                             boolean isDebugEnabled)
        returns the display name for the cstic value. 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.
        Parameters:
        valueModel - value model of the cstic value
        csticModel - model of the cstic
        hybrisNames - CPQ attribute container with hybris cstic value name
        isDebugEnabled - only if true, debug logs will be written
        Returns:
        cstic name to be displayed
      • getOverviewValueName

        java.lang.String getOverviewValueName​(CsticValueModel valueModel,
                                              CsticModel csticModel,
                                              ClassificationSystemCPQAttributesContainer hybrisNames,
                                              boolean isDebugEnabled)
        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.
        Parameters:
        valueModel - value model of the cstic value
        csticModel - model of the cstic
        hybrisNames - 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
      • getLongText

        java.lang.String getLongText​(CsticModel model,
                                     ClassificationSystemCPQAttributesContainer hybrisNames,
                                     boolean isDebugEnabled)
        returns the long text for the cstic. In case a long text is present in the CPQ attribute container it will be returned, otherwise the long text is extracted from the cstic model.
        Parameters:
        model - model of the cstic
        hybrisNames - CPQ attribute container with hybris long text
        isDebugEnabled - only if true, debug logs will be written
        Returns:
        cstic name to be displayed
      • getCsticMedia

        java.util.List<ImageData> getCsticMedia​(ClassificationSystemCPQAttributesContainer cpqAttributes)
        extracts all media assigned to this cstic from the CPQ hybris attribute container. The configuration engine model does not contain any media mappings, so this can only be maintained in hybris.
        Parameters:
        cpqAttributes - CPQ attribute container with hybris media
        Returns:
        list of medias
      • getCsticValueMedia

        java.util.List<ImageData> getCsticValueMedia​(java.lang.String csticValueKey,
                                                     ClassificationSystemCPQAttributesContainer cpqAttributes)
        extracts all media assigned to this cstic value from the CPQ hybris attribute container. The configuration engine model does not contain any media mappings, so this can only be maintained in hybris.
        Parameters:
        csticValueKey - key of the cstic value
        cpqAttributes - CPQ attribute container with hybris media
        Returns:
        list of medias
      • isDebugEnabled

        boolean isDebugEnabled()
        Returns:
        true only if debug log is enabled for the attribute container
      • getValueLongText

        java.lang.String getValueLongText​(CsticValueModel csticValueModel,
                                          CsticModel csticModel,
                                          ClassificationSystemCPQAttributesContainer hybrisNames,
                                          boolean isDebugEnabledNameProvider)
        returns the long text for a cstic value. In case a long text is present in the CPQ attribute container it will be returned, otherwise the long text is extracted from the cstic value model.
        Parameters:
        csticModel - model of the cstic
        csticValueModel - value model of the cstic
        hybrisNames - CPQ attribute container with hybris long text
        isDebugEnabled - only if true, debug logs will be written
        Returns:
        cstic name to be displayed