Class NameIdentifierCanonicalization.ActivationCondition
java.lang.Object
net.shibboleth.idp.saml.nameid.impl.NameIdentifierCanonicalization.ActivationCondition
- All Implemented Interfaces:
Predicate<ProfileRequestContext>
- Enclosing class:
- NameIdentifierCanonicalization
public static class NameIdentifierCanonicalization.ActivationCondition
extends Object
implements Predicate<ProfileRequestContext>
A predicate that determines if this action can run or not.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(ProfileRequestContext profileRequestContext, SubjectCanonicalizationContext c14nContext, boolean duringAction) Helper method that runs either as part of thePredicate
or directly from theNameIdentifierCanonicalization.doPreExecute(ProfileRequestContext, SubjectCanonicalizationContext)
method above.protected boolean
formatMatches
(String format, SubjectCanonicalizationContext c14nContext) Check the format against the format list.boolean
test
(ProfileRequestContext input)
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
ActivationCondition
public ActivationCondition()
-
-
Method Details
-
test
- Specified by:
test
in interfacePredicate<ProfileRequestContext>
-
formatMatches
protected boolean formatMatches(@Nonnull @NotEmpty String format, @Nonnull SubjectCanonicalizationContext c14nContext) Check the format against the format list. If we are in the action then we log the error into the C14N context and add the appropriate event to the profile request context.- Parameters:
format
- the format to checkc14nContext
- the current c14n context- Returns:
- true if the format matches
-
apply
public boolean apply(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull SubjectCanonicalizationContext c14nContext, boolean duringAction) Helper method that runs either as part of thePredicate
or directly from theNameIdentifierCanonicalization.doPreExecute(ProfileRequestContext, SubjectCanonicalizationContext)
method above.- Parameters:
profileRequestContext
- the current profile request contextc14nContext
- the current c14n contextduringAction
- true iff the method is run from the action above- Returns:
- true iff the action can operate successfully on the candidate contexts
-