public static List<SearchResultHandler> newLdaptiveSearchResultHandlers(final List<LdapSearchEntryHandlersProperties> properties) {
        val searchResultHandlers = new ArrayList<SearchResultHandler>();
        properties.forEach(prop -> {
            switch (prop.getType()) {
                case FOLLOW_SEARCH_REFERRAL -> searchResultHandlers.add(new FollowSearchReferralHandler(prop.getSearchReferral().getLimit()));
                case FOLLOW_SEARCH_RESULT_REFERENCE -> searchResultHandlers.add(new FollowSearchResultReferenceHandler(prop.getSearchResult().getLimit()));
                case PRIMARY_GROUP -> {
                    val handler = new PrimaryGroupIdHandler();
                    val primaryGroupId = prop.getPrimaryGroupId();
                    handler.setBaseDn(primaryGroupId.getBaseDn());
                    handler.setGroupFilter(primaryGroupId.getGroupFilter());
                    searchResultHandlers.add(handler);
                }
                case RANGE_ENTRY -> searchResultHandlers.add(new RangeEntryHandler());
                case RECURSIVE_ENTRY -> {
                    val recursive = prop.getRecursive();
                    searchResultHandlers.add(
                        new RecursiveResultHandler(recursive.getSearchAttribute(),
                            recursive.getMergeAttributes().toArray(ArrayUtils.EMPTY_STRING_ARRAY)));
                }
                default -> searchResultHandlers.add(new MergeResultHandler());
            }
        });
        return searchResultHandlers;
    }
New list of ldap search result handlers derived from the supplied properties.

@param properties to inspect
@return the list of search result handlers
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java