Class PrincipalEvalPredicateFactoryRegistry


  • public final class PrincipalEvalPredicateFactoryRegistry
    extends Object
    A registry of mappings between a custom Principal subtype with a matching operator and a corresponding PrincipalEvalPredicateFactory that returns predicates enforcing a particular set of matching rules for that operator and subtype.
    • Method Detail

      • lookup

        @Nullable
        public PrincipalEvalPredicateFactory lookup​(@Nonnull
                                                    Class<? extends Principal> principalType,
                                                    @Nonnull @NotEmpty
                                                    String operator)
        Get a registered predicate factory for a given principal type and operator string, if any.
        Parameters:
        principalType - a principal subtype
        operator - an operator string
        Returns:
        a corresponding predicate factory, or null
      • register

        public void register​(@Nonnull
                             Class<? extends Principal> principalType,
                             @Nonnull @NotEmpty
                             String operator,
                             @Nonnull
                             PrincipalEvalPredicateFactory factory)
        Register a predicate factory for a given operator string.
        Parameters:
        principalType - a principal subtype
        operator - an operator string
        factory - the predicate factory to register
      • deregister

        public void deregister​(@Nonnull
                               Class<? extends Principal> principalType,
                               @Nonnull @NotEmpty
                               String operator)
        Deregister a predicate factory for a given operator string.
        Parameters:
        principalType - a principal subtype
        operator - an operator string