Class EveryoneFilter


  • public final class EveryoneFilter
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Iterator<java.security.Principal> filter​(@NotNull java.util.Iterator<java.security.Principal> resultPrincipals, @Nullable java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • filter

        public static java.util.Iterator<java.security.Principal> filter​(@NotNull
                                                                         @NotNull java.util.Iterator<java.security.Principal> resultPrincipals,
                                                                         @Nullable
                                                                         @Nullable java.lang.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.