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 Set<String> |
formats
Formats to apply policy to.
|
private Logger |
log
Class logger.
|
private com.google.common.base.Function<ProfileRequestContext,SAMLObject> |
objectLookupStrategy
Object lookup function.
|
private com.google.common.base.Function<ProfileRequestContext,String> |
requesterIdLookupStrategy
Requester ID lookup function.
|
private com.google.common.base.Function<ProfileRequestContext,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(String requesterId,
String responderId,
String format,
String nameQualifier,
String spNameQualifier)
Apply the predicate to the request.
|
protected void |
doInitialize() |
void |
setFormats(Collection<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,String> strategy)
Set the strategy used to locate the requester ID.
|
void |
setResponderIdLookupStrategy(com.google.common.base.Function<ProfileRequestContext,String> strategy)
Set the strategy used to locate the responder ID.
|
destroy, doDestroy, initialize, isDestroyed, isInitialized
@Nullable private com.google.common.base.Function<ProfileRequestContext,String> requesterIdLookupStrategy
@Nullable private com.google.common.base.Function<ProfileRequestContext,String> responderIdLookupStrategy
@NonnullAfterInit private com.google.common.base.Function<ProfileRequestContext,SAMLObject> objectLookupStrategy
public AbstractNameIDPolicyPredicate()
public void setRequesterIdLookupStrategy(@Nullable com.google.common.base.Function<ProfileRequestContext,String> strategy)
strategy
- lookup strategypublic void setResponderIdLookupStrategy(@Nullable com.google.common.base.Function<ProfileRequestContext,String> strategy)
strategy
- lookup strategypublic void setObjectLookupStrategy(@Nullable com.google.common.base.Function<ProfileRequestContext,SAMLObject> strategy)
strategy
- lookup functionpublic void setFormats(@Nonnull @NonnullElements Collection<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.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.ComponentInitializationException
public 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 String requesterId, @Nullable String responderId, @Nullable String format, @Nullable String nameQualifier, @Nullable String spNameQualifier)
requesterId
- the requesterresponderId
- the responderformat
- format of identifiernameQualifier
- the NameQualifierspNameQualifier
- the SPNameQualifierCopyright © 1999–2015 JBoss by Red Hat. All rights reserved.