filter
public static Iterator<Principal> filter(@NotNull
@NotNull Iterator<Principal> resultPrincipals,
@Nullable
@Nullable String nameHint,
int searchType,
long offset,
long limit)
Inject the everyone principal in the result if the given query (defined by name hint and search type) matched
everyone and the search expects the complete set to be return (i.e. no offset and no limit defined).
- Parameters:
resultPrincipals
- The principals returned by the query.
nameHint
- The original name hint as passed to the query.
searchType
- The original search type as passed to the query.
offset
- The offset as passed to the query.
limit
- The limit as passed to the query.
- Returns:
- The principal iterator with additionally
EveryonePrincipal
attached if the given query matches the
everyone principal name or search-type and doesn't specify a range (offset or limit). If the query doesn't match
everyone or if a range was defined the original iterator is returned unmodified.