Class EntityAttributesPredicate
java.lang.Object
org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
- All Implemented Interfaces:
Predicate<EntityDescriptor>
,Predicate<EntityDescriptor>
Predicate to determine whether an
EntityDescriptor
or its parent groups contain an EntityAttributes
extension Attribute
that matches the predicate's criteria.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An object to encapsulate the set of criteria that must be satisfied by anEntityAttributes
extension to satisfy the enclosing predicate.private class
Determines whether anEntityAttributesPredicate.Candidate
criterion is satisfied by theAttribute
s in anEntityAttributes
extension. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collection<EntityAttributesPredicate.Candidate>
Candidates to check for.private final org.slf4j.Logger
Class logger.private final boolean
Whether all the candidates must match.private final boolean
Whether to trim the values in the metadata before comparison. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.EntityAttributesPredicate
(Collection<EntityAttributesPredicate.Candidate> candidates, boolean trim) Constructor.EntityAttributesPredicate
(Collection<EntityAttributesPredicate.Candidate> candidates, boolean trim, boolean all) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the candidate criteria.boolean
Get whether all candidates must match.boolean
Get whether to trim tags for comparison.boolean
test
(EntityDescriptor input)
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
trimTags
private final boolean trimTagsWhether to trim the values in the metadata before comparison. -
matchAll
private final boolean matchAllWhether all the candidates must match. -
candidateSet
@Nonnull @NonnullElements private final Collection<EntityAttributesPredicate.Candidate> candidateSetCandidates to check for.
-
-
Constructor Details
-
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 Details
-
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
- Specified by:
test
in interfacePredicate<EntityDescriptor>
-