Class PrincipalEvalPredicateFactoryRegistry
- java.lang.Object
-
- net.shibboleth.idp.authn.principal.PrincipalEvalPredicateFactoryRegistry
-
public final class PrincipalEvalPredicateFactoryRegistry extends Object
A registry of mappings between a customPrincipalsubtype with a matching operator and a correspondingPrincipalEvalPredicateFactorythat returns predicates enforcing a particular set of matching rules for that operator and subtype.
-
-
Constructor Summary
Constructors Constructor Description PrincipalEvalPredicateFactoryRegistry()Constructor.PrincipalEvalPredicateFactoryRegistry(Map<Pair<Class<? extends Principal>,String>,PrincipalEvalPredicateFactory> fromMap)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegister(Class<? extends Principal> principalType, String operator)Deregister a predicate factory for a given operator string.PrincipalEvalPredicateFactorylookup(Class<? extends Principal> principalType, String operator)Get a registered predicate factory for a given principal type and operator string, if any.voidregister(Class<? extends Principal> principalType, String operator, PrincipalEvalPredicateFactory factory)Register a predicate factory for a given operator string.
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
registry
@Nonnull @NonnullElements private Map<Pair<Class<? extends Principal>,String>,PrincipalEvalPredicateFactory> registry
Storage for the registry mappings.
-
-
Constructor Detail
-
PrincipalEvalPredicateFactoryRegistry
public PrincipalEvalPredicateFactoryRegistry()
Constructor.
-
PrincipalEvalPredicateFactoryRegistry
public PrincipalEvalPredicateFactoryRegistry(@Nonnull @NonnullElements @ParameterName(name="fromMap") Map<Pair<Class<? extends Principal>,String>,PrincipalEvalPredicateFactory> fromMap)
Constructor.- Parameters:
fromMap- map to populate registry with
-
-
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 subtypeoperator- 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 subtypeoperator- an operator stringfactory- the predicate factory to register
-
-