Interface RAOLookupService

  • All Known Implementing Classes:
    DefaultRAOLookupService

    public interface RAOLookupService
    Service that provides lookup capabilities for RAO entities
    • Method Detail

      • lookupRAOByType

        <T> java.util.Optional<T> lookupRAOByType​(java.lang.Class<T> raoType,
                                                  RuleActionContext context,
                                                  java.util.function.Predicate<T>... raoFilters)
        Performs lookup for the RAO object identified by its type within provided RuleActionContext
        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

        <T> java.util.List<T> lookupRAOObjectsByType​(java.lang.Class<T> raoType,
                                                     RuleActionContext context,
                                                     java.util.function.Predicate<T>... raoFilters)
        Performs lookup for the RAO objects identified by its type within provided RuleActionContext
        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()