Class Restrictions

java.lang.Object
com.atlassian.crowd.search.builder.Restrictions

public class Restrictions extends Object
  • Constructor Details

    • Restrictions

      public Restrictions()
  • Method Details

    • userSearchRestriction

      public static BooleanRestriction userSearchRestriction(String searchText)
      Returns a condition that matches a user iff the provided searchText is a substring of any name related field or an email field. String match is case insensitive.
      Parameters:
      searchText - substring to search for
      Returns:
    • optional

      public static <T> SearchRestriction optional(Function<T,SearchRestriction> provider, T value)
      Returns restriction for the provided value or NullRestriction.INSTANCE if the value is null.
      Parameters:
      provider - restriction provider, will be called only if value is not null
      value - restriction value
      Returns: