Interface ConfigurationMasterDataService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      CPSMasterDataCharacteristicContainer getCharacteristic​(java.lang.String kbId, java.lang.String characteristicId)
      Gets localised master data for characteristic
      java.util.List<java.lang.String> getGroupCharacteristicIDs​(java.lang.String kbId, java.lang.String itemKey, java.lang.String itemType, java.lang.String groupId)
      Gets characteristic ids for group.
      java.lang.String getGroupName​(java.lang.String kbId, java.lang.String itemKey, java.lang.String itemType, java.lang.String groupId)
      Gets localised name for group.
      java.lang.String getItemName​(java.lang.String kbId, java.lang.String id, java.lang.String type)
      Gets localised name for item
      java.lang.Integer getKbBuildNumber​(java.lang.String kbId)
      Retrieves the build number for the specified knowledgebase id
      CPSMasterDataKnowledgeBaseContainer getMasterData​(java.lang.String kbId)
      Get master data by KB id
      java.util.Set<java.lang.String> getPossibleValueIds​(java.lang.String kbId, java.lang.String characteristicId)
      Get all possible value ids for a given characteristic
      java.util.Set<java.lang.String> getSpecificPossibleValueIds​(java.lang.String kbId, java.lang.String itemKey, java.lang.String itemType, java.lang.String characteristicId)
      Get all specific (that have a variant condition) possible value ids for a given characteristic.
      java.lang.String getValueName​(java.lang.String kbId, java.lang.String characteristicId, java.lang.String valueId)
      Gets localised name for value
      java.lang.String getValuePricingKey​(java.lang.String kbId, java.lang.String productId, java.lang.String characteristicId, java.lang.String valueId)
      Get pricing key for value
      boolean isCharacteristicNumeric​(java.lang.String kbId, java.lang.String csticId)
      Checks if a characteristic is numeric
      boolean isProductMultilevel​(java.lang.String kbId, java.lang.String productId)
      Gives information whether product is multilevel
      void removeCachedKb​(java.lang.String kbId)
      Removes the knowledgebase from the hybris cache in order to force a reload from service
    • Method Detail

      • getItemName

        java.lang.String getItemName​(java.lang.String kbId,
                                     java.lang.String id,
                                     java.lang.String type)
        Gets localised name for item
        Parameters:
        kbId - id of the knowledgebase
        id - id of the item
        type - type of the item
        Returns:
        localised name of the item
      • getGroupName

        java.lang.String getGroupName​(java.lang.String kbId,
                                      java.lang.String itemKey,
                                      java.lang.String itemType,
                                      java.lang.String groupId)
        Gets localised name for group. In case we are requesting the group name for class nodes, the class name will be returned as the class node doesn't carry UI groups, except for the 'general' dummy group
        Parameters:
        kbId - id of the knowledgebase
        itemKey - id of the product or class
        itemType - Either SapproductconfigruntimecpsConstants.ITEM_TYPE_MARA or SapproductconfigruntimecpsConstants.ITEM_TYPE_KLAH
        groupId - id of the group. Not relevant for class nodes
        Returns:
        localised name of the group
      • isProductMultilevel

        boolean isProductMultilevel​(java.lang.String kbId,
                                    java.lang.String productId)
        Gives information whether product is multilevel
        Parameters:
        kbId - id of the knowledgebase
        productId - id of the product
        Returns:
        whether product is multilevel
      • getCharacteristic

        CPSMasterDataCharacteristicContainer getCharacteristic​(java.lang.String kbId,
                                                               java.lang.String characteristicId)
        Gets localised master data for characteristic
        Parameters:
        kbId - id of the knowledgebase
        characteristicId - id of the characteristic
        Returns:
        localised master data of the characteristic
      • getValueName

        java.lang.String getValueName​(java.lang.String kbId,
                                      java.lang.String characteristicId,
                                      java.lang.String valueId)
        Gets localised name for value
        Parameters:
        kbId - id of the knowledgebase
        characteristicId - id of the characteristic
        valueId - id of the value
        Returns:
        localised name of the value
      • getGroupCharacteristicIDs

        java.util.List<java.lang.String> getGroupCharacteristicIDs​(java.lang.String kbId,
                                                                   java.lang.String itemKey,
                                                                   java.lang.String itemType,
                                                                   java.lang.String groupId)
        Gets characteristic ids for group. In case we are requesting the characteristics for class nodes, all characteristic assigned to the class node will be returned as the class node does not carry any group besides the 'general' dummy group
        Parameters:
        kbId - id of the knowledgebase
        itemKey - id of the product or a class node
        itemType - Either SapproductconfigruntimecpsConstants.ITEM_TYPE_MARA or SapproductconfigruntimecpsConstants.ITEM_TYPE_KLAH
        groupId - id of the group. Not relevant for class nodes
        Returns:
        list of characteristic ids belonging to the group
      • getMasterData

        CPSMasterDataKnowledgeBaseContainer getMasterData​(java.lang.String kbId)
        Get master data by KB id
        Parameters:
        kbId - id of the knowledgebase
        Returns:
        knowledgebase data for the given id
      • getValuePricingKey

        java.lang.String getValuePricingKey​(java.lang.String kbId,
                                            java.lang.String productId,
                                            java.lang.String characteristicId,
                                            java.lang.String valueId)
        Get pricing key for value
        Parameters:
        kbId - id of the knowledgebase
        productId - id of the product
        characteristicId - id of the characteristic
        valueId - id of the value
        Returns:
        pricing key for the given value
      • getSpecificPossibleValueIds

        java.util.Set<java.lang.String> getSpecificPossibleValueIds​(java.lang.String kbId,
                                                                    java.lang.String itemKey,
                                                                    java.lang.String itemType,
                                                                    java.lang.String characteristicId)
        Get all specific (that have a variant condition) possible value ids for a given characteristic. For class nodes, which don't carry variant key assignments, an empty Set is returned
        Parameters:
        kbId - id of the knowledgebase
        itemKey - id of the product of of a class node
        itemType - Either SapproductconfigruntimecpsConstants.ITEM_TYPE_MARA or SapproductconfigruntimecpsConstants.ITEM_TYPE_KLAH
        characteristicId - id of the characteristic
        Returns:
        list of possible value ids
      • getPossibleValueIds

        java.util.Set<java.lang.String> getPossibleValueIds​(java.lang.String kbId,
                                                            java.lang.String characteristicId)
        Get all possible value ids for a given characteristic
        Parameters:
        kbId - id of the knowledgebase
        productId - id of the product
        characteristicId - id of the characteristic
        Returns:
        list of possible value ids
      • isCharacteristicNumeric

        boolean isCharacteristicNumeric​(java.lang.String kbId,
                                        java.lang.String csticId)
        Checks if a characteristic is numeric
        Parameters:
        kbId - Id of the knowledgebase
        csticId - Id of the characteristic
        Returns:
        whether characteristic is numeric
      • getKbBuildNumber

        java.lang.Integer getKbBuildNumber​(java.lang.String kbId)
        Retrieves the build number for the specified knowledgebase id
        Parameters:
        kbId - Id of the knowledgebase
        Returns:
        build number of the knowledgebase
      • removeCachedKb

        void removeCachedKb​(java.lang.String kbId)
        Removes the knowledgebase from the hybris cache in order to force a reload from service
        Parameters:
        kbId - Id of the knowledgebase