java.lang.Object
de.hybris.platform.ruleengineservices.rule.evaluation.actions.impl.DefaultRAOLookupService
All Implemented Interfaces:
RAOLookupService

public class DefaultRAOLookupService extends Object implements RAOLookupService
Default implementation of RAOLookupService
  • Constructor Details

    • DefaultRAOLookupService

      public DefaultRAOLookupService()
  • Method Details

    • lookupRAOByType

      public <T> Optional<T> lookupRAOByType(Class<T> raoType, RuleActionContext context, Predicate<T>... raoFilters)
      Description copied from interface: RAOLookupService
      Performs lookup for the RAO object identified by its type within provided RuleActionContext
      Specified by:
      lookupRAOByType in interface RAOLookupService
      Type Parameters:
      T - expected RAO object type
      Parameters:
      raoType - class type of RAO objects to look for
      context - instance of RuleActionContext
      raoFilters - optional set of Predicate to perform filtering against found RAO objects
      Returns:
      RAO object wrapped in Optional, or Optional.empty() in case no RAO object found that meets lookup and filtering criteria
    • lookupRAOObjectsByType

      public <T> List<T> lookupRAOObjectsByType(Class<T> raoType, RuleActionContext context, Predicate<T>... raoFilters)
      Description copied from interface: RAOLookupService
      Performs lookup for the RAO objects identified by its type within provided RuleActionContext
      Specified by:
      lookupRAOObjectsByType in interface RAOLookupService
      Type Parameters:
      T - expected RAO object type
      Parameters:
      raoType - class type of RAO objects to look for
      context - instance of RuleActionContext
      raoFilters - optional set of Predicate to perform filtering against found RAO objects
      Returns:
      list of found RAO objects that satisfy lookup criteria, or Collections.emptyList()
    • checkAndGetRuleContext

      protected org.drools.core.spi.KnowledgeHelper checkAndGetRuleContext(RuleActionContext context)
      Checks that the given ruleContext is of type KnowledgeHelper (i.e. drools-specific)
      Parameters:
      context - the RuleActionContext instance
      Returns:
      the KnowledgeHelper