Class EntityAttributesPredicate
java.lang.Object
org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
- All Implemented Interfaces:
Predicate<EntityDescriptor>
Predicate to determine whether an
EntityDescriptor or its parent groups contain an EntityAttributes
extension Attribute that matches the predicate's criteria.
This class uses a nested helper class, EntityAttributesPredicate.Candidate, to capture the rules to check for, with each such
object representing a single condition that the predicate can combine either via an AND or OR semantic to produce
the final result. Each EntityAttributesPredicate.Candidate's own matching rules must match entirely.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn object to encapsulate the set of criteria that must be satisfied by anEntityAttributesextension to satisfy the enclosing predicate.private classDetermines whether anEntityAttributesPredicate.Candidatecriterion is satisfied by theAttributes in anEntityAttributesextension. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collection<EntityAttributesPredicate.Candidate>Candidates to check for.private final org.slf4j.LoggerClass logger.private final booleanWhether all the candidates must match.private final booleanWhether 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.booleanGet whether all candidates must match.booleanGet whether to trim tags for comparison.booleantest(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
Candidates to check for.
-
-
Constructor Details
-
EntityAttributesPredicate
public EntityAttributesPredicate(@Nonnull @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates) Constructor.- Parameters:
candidates- theEntityAttributesPredicate.Candidatecriteria to check for
-
EntityAttributesPredicate
public EntityAttributesPredicate(@Nonnull @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates, @ParameterName(name="trim") boolean trim) Constructor.- Parameters:
candidates- theEntityAttributesPredicate.Candidatecriteria to check fortrim- true iff the values found in the metadata should be trimmed before comparison
-
EntityAttributesPredicate
public EntityAttributesPredicate(@Nonnull @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates, @ParameterName(name="trim") boolean trim, @ParameterName(name="all") boolean all) Constructor.- Parameters:
candidates- theEntityAttributesPredicate.Candidatecriteria 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 @Unmodifiable @NotLive public Collection<EntityAttributesPredicate.Candidate> getCandidates()Get the candidate criteria.- Returns:
- the candidate criteria
-
test
- Specified by:
testin interfacePredicate<EntityDescriptor>
-