public abstract class AbstractNameIDPolicyPredicate extends net.shibboleth.utilities.java.support.component.AbstractInitializableComponent implements com.google.common.base.Predicate<ProfileRequestContext>
Predicate that handle evaluation of name identifier content in various
scenarios.| Modifier and Type | Field and Description |
|---|---|
private java.util.Set<java.lang.String> |
formats
Formats to apply policy to.
|
private org.slf4j.Logger |
log
Class logger.
|
private com.google.common.base.Function<ProfileRequestContext,SAMLObject> |
objectLookupStrategy
Object lookup function.
|
private com.google.common.base.Function<ProfileRequestContext,java.lang.String> |
requesterIdLookupStrategy
Requester ID lookup function.
|
private com.google.common.base.Function<ProfileRequestContext,java.lang.String> |
responderIdLookupStrategy
Responder ID lookup function.
|
| Constructor and Description |
|---|
AbstractNameIDPolicyPredicate()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(ProfileRequestContext input) |
private boolean |
doApply(ProfileRequestContext input,
NameID target)
Apply policy to the target object.
|
private boolean |
doApply(ProfileRequestContext input,
NameIdentifier target)
Apply policy to the target object.
|
private boolean |
doApply(ProfileRequestContext input,
NameIDPolicy target)
Apply policy to the target object.
|
protected abstract boolean |
doApply(java.lang.String requesterId,
java.lang.String responderId,
java.lang.String format,
java.lang.String nameQualifier,
java.lang.String spNameQualifier)
Apply the predicate to the request.
|
protected void |
doInitialize() |
void |
setFormats(java.util.Collection<java.lang.String> newFormats)
Set the formats to apply the predicate to.
|
void |
setObjectLookupStrategy(com.google.common.base.Function<ProfileRequestContext,SAMLObject> strategy)
Set the lookup strategy used to locate the object to evaluate.
|
void |
setRequesterIdLookupStrategy(com.google.common.base.Function<ProfileRequestContext,java.lang.String> strategy)
Set the strategy used to locate the requester ID.
|
void |
setResponderIdLookupStrategy(com.google.common.base.Function<ProfileRequestContext,java.lang.String> strategy)
Set the strategy used to locate the responder ID.
|
destroy, doDestroy, initialize, isDestroyed, isInitialized@Nonnull private final org.slf4j.Logger log
@Nullable private com.google.common.base.Function<ProfileRequestContext,java.lang.String> requesterIdLookupStrategy
@Nullable private com.google.common.base.Function<ProfileRequestContext,java.lang.String> responderIdLookupStrategy
@NonnullAfterInit private com.google.common.base.Function<ProfileRequestContext,SAMLObject> objectLookupStrategy
@Nonnull @NonnullElements private java.util.Set<java.lang.String> formats
public AbstractNameIDPolicyPredicate()
public void setRequesterIdLookupStrategy(@Nullable
com.google.common.base.Function<ProfileRequestContext,java.lang.String> strategy)
strategy - lookup strategypublic void setResponderIdLookupStrategy(@Nullable
com.google.common.base.Function<ProfileRequestContext,java.lang.String> strategy)
strategy - lookup strategypublic void setObjectLookupStrategy(@Nullable
com.google.common.base.Function<ProfileRequestContext,SAMLObject> strategy)
strategy - lookup functionpublic void setFormats(@Nonnull @NonnullElements
java.util.Collection<java.lang.String> newFormats)
newFormats - formats to apply predicate toprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationExceptionpublic boolean apply(@Nullable
ProfileRequestContext input)
apply in interface com.google.common.base.Predicate<ProfileRequestContext>private boolean doApply(@Nullable
ProfileRequestContext input,
@Nonnull
NameIdentifier target)
input - current profile request contexttarget - target objectprivate boolean doApply(@Nullable
ProfileRequestContext input,
@Nonnull
NameID target)
input - current profile request contexttarget - target objectprivate boolean doApply(@Nullable
ProfileRequestContext input,
@Nonnull
NameIDPolicy target)
input - current profile request contexttarget - target objectprotected abstract boolean doApply(@Nullable
java.lang.String requesterId,
@Nullable
java.lang.String responderId,
@Nullable
java.lang.String format,
@Nullable
java.lang.String nameQualifier,
@Nullable
java.lang.String spNameQualifier)
requesterId - the requesterresponderId - the responderformat - format of identifiernameQualifier - the NameQualifierspNameQualifier - the SPNameQualifier