public static String getAllGroupsTargetFilter ( final List < RolloutGroup > groups ) { if ( groups . stream ( ) . anyMatch ( group -> StringUtils . isEmpty ( group . getTargetFilterQuery ( ) ) ) ) { return "" ; } return "(" + groups . stream ( ) . map ( RolloutGroup :: getTargetFilterQuery ) . distinct ( ) . sorted ( ) . collect ( Collectors . joining ( "),(" ) ) + ")" ; }
Creates an RSQL expression that matches all targets in the provided groups . Links all target filter queries with OR .