Class AttributePredicate
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.consent.logic.impl.AttributePredicate
- All Implemented Interfaces:
Predicate<IdPAttribute>,Component,DestructableComponent,InitializableComponent
public class AttributePredicate
extends AbstractInitializableComponent
implements Predicate<IdPAttribute>
Predicate to determine whether consent should be obtained for an attribute.
-
Field Summary
FieldsModifier and TypeFieldDescriptionSet of attribute IDs to ignore for consent.private PatternRegular expression to apply for acceptance testing.Set of attribute IDs for which to prompt for consent. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanisEmpty(IdPAttribute input) Whether the IdP attribute is empty.voidsetAttributeIdMatchExpression(Pattern expression) Set an attribute ID matching expression to apply for acceptance.voidsetIgnoredAttributeIds(Collection<String> ignored) Set the attribute IDs to ignore for consent.voidsetPromptedAttributeIds(Collection<String> prompted) Set the attribute IDs for which to prompt for consent.booleantest(IdPAttribute input) Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
promptedAttributeIds
Set of attribute IDs for which to prompt for consent. -
ignoredAttributeIds
Set of attribute IDs to ignore for consent. -
matchExpression
Regular expression to apply for acceptance testing.
-
-
Constructor Details
-
AttributePredicate
public AttributePredicate()Constructor.
-
-
Method Details
-
setPromptedAttributeIds
Set the attribute IDs for which to prompt for consent.- Parameters:
prompted- prompted attribute IDs
-
setIgnoredAttributeIds
Set the attribute IDs to ignore for consent.- Parameters:
ignored- ignored attribute IDs
-
setAttributeIdMatchExpression
Set an attribute ID matching expression to apply for acceptance.- Parameters:
expression- an attribute ID matching expression
-
test
- Specified by:
testin interfacePredicate<IdPAttribute>
-
isEmpty
Whether the IdP attribute is empty.- Parameters:
input- the IdP Attribute- Returns:
- true if the IdP attribute has no values or empty values, false otherwise
-