Interface MasterDataContainerResolver

All Known Implementing Classes:
MasterDataContainerResolverImpl

public interface MasterDataContainerResolver
Resolver for reading specific master data from a CPSMasterDataKnowledgeBaseContainer.
  • Method Details

    • getCharacteristic

      Gets localized master data for characteristic
      Parameters:
      kbContainer - container with cached master data
      csticId - id of the characteristic
      Returns:
      localized master data of the characteristic
    • getCharacteristicNameWithFallback

      String getCharacteristicNameWithFallback(MasterDataContext ctxt, String csticId)
      Gets localized name for characteristic. If it is not maintained it retrieves the localized name from the fallback language (if maintained). Otherwise null is returned
      Parameters:
      ctxt - master data context
      csticId - id of the characteristic
      Returns:
      Localized name for characteristic
    • getPossibleValueIds

      Set<String> getPossibleValueIds(CPSMasterDataKnowledgeBaseContainer kbContainer, String csticId)
      Get all possible value ids for a given characteristic
      Parameters:
      kbContainer - container with cached master data
      productId - id of the product
      csticId - id of the characteristic
      Returns:
      list of possible value ids
    • getValueNameWithFallback

      String getValueNameWithFallback(MasterDataContext ctxt, String csticId, String valueId)
      Gets localized name for value. If it is not maintained it retrieves the localized name from the fallback language (if maintained). Otherwise null is returned
      Parameters:
      ctxt - master data context
      csticId - id of the characteristic
      valueId - id of the value
      Returns:
      localized name of the value (or localized name from fallback language)
    • getValueName

      String getValueName(CPSMasterDataKnowledgeBaseContainer kbContainer, String csticId, String valueId)
      Gets localized name for value
      Parameters:
      kbContainer - container with cached master data
      csticId - id of the characteristic
      valueId - id of the value
      Returns:
      localized name of the value
    • getValueDescription

      String getValueDescription(CPSMasterDataKnowledgeBaseContainer kbContainer, String characteristicId, String valueId)
      Gets localized description for value
      Parameters:
      kbContainer - container with cached master data
      characteristicId - id of the characteristic
      valueId - id of the value
      Returns:
      localized description of the value
    • getValueDescriptionWithFallback

      String getValueDescriptionWithFallback(MasterDataContext ctxt, String characteristicId, String valueId)
      Gets localized description for value. If it is not maintained it retrieves the localized description from the fallback language (if maintained). Otherwise null is returned
      Parameters:
      ctxt - master data context
      characteristicId - id of the characteristic
      valueId - id of the value
      Returns:
      localized description of the value (or localized name from fallback language)
    • isCharacteristicNumeric

      boolean isCharacteristicNumeric(CPSMasterDataKnowledgeBaseContainer kbContainer, String csticId)
      Checks if a characteristic is numeric
      Parameters:
      kbContainer - container with cached master data
      csticId - Id of the characteristic
      Returns:
      whether characteristic is numeric
    • getGroupCharacteristicIDs

      List<String> getGroupCharacteristicIDs(CPSMasterDataKnowledgeBaseContainer kbContainer, String itemKey, String itemType, 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:
      kbContainer - container with cached master data
      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
    • getItemName

      String getItemName(CPSMasterDataKnowledgeBaseContainer kbContainer, String itemKey, String itemType)
      Gets localized name for item
      Parameters:
      kbContainer - container with cached master data
      itemKey - id of the item
      itemType - type of the item
      Returns:
      localized name of the item
    • getItemNameWithFallback

      String getItemNameWithFallback(MasterDataContext ctxt, String itemKey, String itemType)
      Gets localized name for item. If it is not maintained it retrieves the localized name from the fallback language (if maintained). Otherwise null is returned
      Parameters:
      kbContainer - container with cached master data
      itemKey - id of the item
      itemType - type of the item
      Returns:
      localized name of the item
    • getGroupName

      String getGroupName(CPSMasterDataKnowledgeBaseContainer kbContainer, String itemKey, String itemType, String groupId)
      Gets localized 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:
      kbContainer - container with cached master data
      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:
      localized name of the group
    • getGroupNameWithFallback

      String getGroupNameWithFallback(MasterDataContext ctxt, String itemKey, String itemType, String groupId)
      Gets localized 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. If a localized name is not maintained it retrieves the localized name from the fallback language (if maintained). Otherwise null is returned
      Parameters:
      ctxt - master data context
      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:
      localized name of the group (of localized name from fallback language)
    • getValuePricingKey

      String getValuePricingKey(CPSMasterDataKnowledgeBaseContainer kbContainer, String productId, String csticId, String valueId)
      Get pricing key for value
      Parameters:
      kbContainer - container with cached master data
      productId - id of the product
      csticId - id of the characteristic
      valueId - id of the value
      Returns:
      pricing key for the given value
    • getSpecificPossibleValueIds

      Set<String> getSpecificPossibleValueIds(CPSMasterDataKnowledgeBaseContainer kbContainer, String productId, String itemType, String csticId)
      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:
      kbContainer - container with cached master data
      productId - id of the product of of a class node
      itemType - Either SapproductconfigruntimecpsConstants.ITEM_TYPE_MARA or SapproductconfigruntimecpsConstants.ITEM_TYPE_KLAH
      csticId - id of the characteristic
      Returns:
      list of possible value ids
    • isProductMultilevel

      boolean isProductMultilevel(CPSMasterDataKnowledgeBaseContainer kbContainer, String productId)
      Gives information whether product is multilevel
      Parameters:
      kbContainer - container with cached master data
      productId - id of the product
      Returns:
      whether product is multilevel
    • getKbBuildNumber

      Integer getKbBuildNumber(CPSMasterDataKnowledgeBaseContainer kbContainer)
      Retrieves knowledgebase build number for given master data container
      Parameters:
      kbContainer - container with cached master data
      Returns:
      build number of the knowledgebase
    • getFallbackKbCacheContainer

      CPSMasterDataKnowledgeBaseContainer getFallbackKbCacheContainer(MasterDataContext ctxt)
      Returns the fallback knowledgebase cache container
      Parameters:
      ctxt -
      Returns:
      knowledgebase cache container