Class EntityAttributesPredicate
- java.lang.Object
-
- org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
-
- All Implemented Interfaces:
Predicate<EntityDescriptor>
,net.shibboleth.utilities.java.support.logic.Predicate<EntityDescriptor>
public class EntityAttributesPredicate extends Object implements net.shibboleth.utilities.java.support.logic.Predicate<EntityDescriptor>
Predicate to determine whether anEntityDescriptor
or its parent groups contain anEntityAttributes
extensionAttribute
that matches the predicate's criteria.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityAttributesPredicate.Candidate
An object to encapsulate the set of criteria that must be satisfied by anEntityAttributes
extension to satisfy the enclosing predicate.private class
EntityAttributesPredicate.EntityAttributesMatcher
Determines whether anEntityAttributesPredicate.Candidate
criterion is satisfied by theAttribute
s in anEntityAttributes
extension.
-
Field Summary
Fields Modifier and Type Field Description private Collection<EntityAttributesPredicate.Candidate>
candidateSet
Candidates to check for.private org.slf4j.Logger
log
Class logger.private boolean
matchAll
Whether all the candidates must match.private boolean
trimTags
Whether to trim the values in the metadata before comparison.
-
Constructor Summary
Constructors Constructor Description EntityAttributesPredicate(Collection<EntityAttributesPredicate.Candidate> candidates)
Constructor.EntityAttributesPredicate(Collection<EntityAttributesPredicate.Candidate> candidates, boolean trim)
Constructor.EntityAttributesPredicate(Collection<EntityAttributesPredicate.Candidate> candidates, boolean trim, boolean all)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<EntityAttributesPredicate.Candidate>
getCandidates()
Get the candidate criteria.boolean
getMatchAll()
Get whether all candidates must match.boolean
getTrimTags()
Get whether to trim tags for comparison.boolean
test(EntityDescriptor input)
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
trimTags
private final boolean trimTags
Whether to trim the values in the metadata before comparison.
-
matchAll
private final boolean matchAll
Whether all the candidates must match.
-
candidateSet
@Nonnull @NonnullElements private final Collection<EntityAttributesPredicate.Candidate> candidateSet
Candidates to check for.
-
-
Constructor Detail
-
EntityAttributesPredicate
public EntityAttributesPredicate(@Nonnull @NonnullElements @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates)
Constructor.- Parameters:
candidates
- theEntityAttributesPredicate.Candidate
criteria to check for
-
EntityAttributesPredicate
public EntityAttributesPredicate(@Nonnull @NonnullElements @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates, @ParameterName(name="trim") boolean trim)
Constructor.- Parameters:
candidates
- theEntityAttributesPredicate.Candidate
criteria to check fortrim
- true iff the values found in the metadata should be trimmed before comparison
-
EntityAttributesPredicate
public EntityAttributesPredicate(@Nonnull @NonnullElements @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates, @ParameterName(name="trim") boolean trim, @ParameterName(name="all") boolean all)
Constructor.- Parameters:
candidates
- theEntityAttributesPredicate.Candidate
criteria to check fortrim
- true iff the values found in the metadata should be trimmed before comparisonall
- true iff all the criteria must match to be a successful test
-
-
Method Detail
-
getTrimTags
public boolean getTrimTags()
Get whether to trim tags for comparison.- Returns:
- true iff tags are to be trimmed for comparison
-
getMatchAll
public boolean getMatchAll()
Get whether all candidates must match.- Returns:
- true iff all candidates have to match
-
getCandidates
@Nonnull @NonnullElements @Unmodifiable @NotLive public Collection<EntityAttributesPredicate.Candidate> getCandidates()
Get the candidate criteria.- Returns:
- the candidate criteria
-
test
public boolean test(@Nullable EntityDescriptor input)
- Specified by:
test
in interfacePredicate<EntityDescriptor>
-
-