Class EntityAttributesPredicate
- java.lang.Object
-
- org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
-
- All Implemented Interfaces:
Predicate<EntityDescriptor>,Predicate<EntityDescriptor>
public class EntityAttributesPredicate extends Object implements Predicate<EntityDescriptor>
Predicate to determine whether anEntityDescriptoror its parent groups contain anEntityAttributesextensionAttributethat matches the predicate's criteria.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntityAttributesPredicate.CandidateAn object to encapsulate the set of criteria that must be satisfied by anEntityAttributesextension to satisfy the enclosing predicate.private classEntityAttributesPredicate.EntityAttributesMatcherDetermines whether anEntityAttributesPredicate.Candidatecriterion is satisfied by theAttributes in anEntityAttributesextension.
-
Field Summary
Fields Modifier and Type Field Description private Collection<EntityAttributesPredicate.Candidate>candidateSetCandidates to check for.private org.slf4j.LoggerlogClass logger.private booleanmatchAllWhether all the candidates must match.private booleantrimTagsWhether 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.booleangetMatchAll()Get whether all candidates must match.booleangetTrimTags()Get whether to trim tags for comparison.booleantest(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.Candidatecriteria to check for
-
EntityAttributesPredicate
public EntityAttributesPredicate(@Nonnull @NonnullElements @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 @NonnullElements @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 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:
testin interfacePredicate<EntityDescriptor>
-
-