Class IsAdminUsernameCollectionEnabled

All Implemented Interfaces:
Predicate<ProfileRequestContext>, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent

public class IsAdminUsernameCollectionEnabled extends AbstractIdentifiableInitializableComponent implements Predicate<ProfileRequestContext>
A predicate that determines if username collection is required as a first step to the registration process. This is determined either from a static flag, or a dynamic function.
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • usernameCollectionRequiredPredicate

      private Predicate<ProfileRequestContext> usernameCollectionRequiredPredicate
      The predicate that determines if username collection is required.
  • Constructor Details

    • IsAdminUsernameCollectionEnabled

      public IsAdminUsernameCollectionEnabled()
  • Method Details

    • setUsernameCollectionRequiredPredicate

      public void setUsernameCollectionRequiredPredicate(Predicate<ProfileRequestContext> predicate)
      Set the predicate that determines if username collection is required.
      Parameters:
      predicate - is username collection required, predicate.
    • setUsernameCollectionRequired

      public void setUsernameCollectionRequired(boolean flag)
      Set the flag that determines if username collection is required.
      Parameters:
      flag - is username collection required?.
    • test

      public boolean test(@Nullable ProfileRequestContext input)
      Specified by:
      test in interface Predicate<ProfileRequestContext>