/** * Get the registry of predicate factories for custom principal evaluation. * * <p>This object is only needed when evaluating a {@link RequestedPrincipalContext}, so the presence of it at * this level of the tree is solely for use by the {@link #addRequestedPrincipalContext(String, List, boolean)} * helper method.</p> * * @return predicate factory registry */ @Nonnull public PrincipalEvalPredicateFactoryRegistry getPrincipalEvalPredicateFactoryRegistry() { final RequestedPrincipalContext rpCtx = getSubcontext(RequestedPrincipalContext.class); if (rpCtx != null) { return rpCtx.getPrincipalEvalPredicateFactoryRegistry(); } else if (evalRegistry != null) { return evalRegistry; } else { return new PrincipalEvalPredicateFactoryRegistry(); } }
getLogPrefix(), requestedPrincipalCtx.getOperator(), p.getName()); final PrincipalEvalPredicateFactory factory = requestedPrincipalCtx.getPrincipalEvalPredicateFactoryRegistry().lookup( p.getClass(), requestedPrincipalCtx.getOperator()); if (factory != null) {
for (final Principal p : requestedPrincipalCtx.getRequestedPrincipals()) { final PrincipalEvalPredicateFactory factory = requestedPrincipalCtx.getPrincipalEvalPredicateFactoryRegistry().lookup( p.getClass(), requestedPrincipalCtx.getOperator()); if (factory != null) {
for (final Principal p : rpCtx.getRequestedPrincipals()) { final PrincipalEvalPredicateFactory factory = rpCtx.getPrincipalEvalPredicateFactoryRegistry().lookup(p.getClass(), rpCtx.getOperator()); if (factory != null) { final PrincipalEvalPredicate predicate = factory.getPredicate(p);