Class CharonKbDeterminationFacadeImpl

    • Constructor Detail

      • CharonKbDeterminationFacadeImpl

        public CharonKbDeterminationFacadeImpl()
    • Method Detail

      • readKbIdForDate

        public java.lang.Integer readKbIdForDate​(java.lang.String productcode,
                                                 java.util.Date kbDate)
        Description copied from interface: CharonKbDeterminationFacade
        Reads KB ID for a given product and date. It's not required that the KB for the product/date combination is unique, if multiple knowledge bases exist, the ID for the first found KB is returned
        Specified by:
        readKbIdForDate in interface CharonKbDeterminationFacade
        Parameters:
        productcode - product code
        kbDate - Validity date of KB
        Returns:
        KB ID for first matching KB
      • hasKbForDate

        public boolean hasKbForDate​(java.lang.String productcode,
                                    java.util.Date kbDate)
        Description copied from interface: CharonKbDeterminationFacade
        Check for knowledge bases on a given date
        Specified by:
        hasKbForDate in interface CharonKbDeterminationFacade
        Parameters:
        productcode - Product code
        kbDate - Validity date
        Returns:
        Does at least one knowledge base exist?
      • hasValidKBForKey

        public boolean hasValidKBForKey​(KBKey kbKey)
        Description copied from interface: CharonKbDeterminationFacade
        checks the given key existence and validity
        Specified by:
        hasValidKBForKey in interface CharonKbDeterminationFacade
        Parameters:
        kbKey - key to check
        Returns:
        true, only if the given KBKey is known by the configuration engine and valid as of today
      • parseKBKeyFromExtConfig

        public KBKey parseKBKeyFromExtConfig​(java.lang.String productCode,
                                             java.lang.String externalcfg)
        Description copied from interface: CharonKbDeterminationFacade
        parses a KBKey from the external configuration
        Specified by:
        parseKBKeyFromExtConfig in interface CharonKbDeterminationFacade
        Parameters:
        productCode - productCode
        externalcfg - extConfig
        Returns:
        KBKey with all fields filled
      • getAllKBsOfProduct

        protected java.util.List<CPSMasterDataKBHeaderInfo> getAllKBsOfProduct​(java.lang.String productcode)
      • getCommerceExternalConfigurationStrategy

        protected CommerceExternalConfigurationStrategy getCommerceExternalConfigurationStrategy()
        Returns:
        the commerceExternalConfigurationStrategy
      • getObjectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
        Returns:
        the objectMapper
      • setRequestErrorHandler

        public void setRequestErrorHandler​(RequestErrorHandler requestErrorHandler)
        Set the error handler for REST service calls
        Parameters:
        requestErrorHandler - For wrapping the http errors we receive from the REST service call
      • setKnowledgeBasesCacheAccessService

        public void setKnowledgeBasesCacheAccessService​(KnowledgeBaseHeadersCacheAccessService knowledgeBasesCacheAccessService)
        Set the service to access the kb cache
        Parameters:
        knowledgeBasesCacheAccessService - the knowledgeBasesCacheAccessService to set
      • setCommerceExternalConfigurationStrategy

        public void setCommerceExternalConfigurationStrategy​(CommerceExternalConfigurationStrategy commerceExternalConfigurationStrategy)
        Set the configuration strategy for external configurations
        Parameters:
        commerceExternalConfigurationStrategy - The commerceExternalConfigurationStrategy to set