Class MappedEntityAttributesPredicate
- java.lang.Object
-
- org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
-
- net.shibboleth.idp.saml.profile.logic.MappedEntityAttributesPredicate
-
- All Implemented Interfaces:
Predicate<EntityDescriptor>,Predicate<EntityDescriptor>
public class MappedEntityAttributesPredicate extends EntityAttributesPredicate
Extended version of EntityAttributes-driven predicate that uses an optimization to check for mapped attributes in anAttributesMapContainerstructure.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classMappedEntityAttributesPredicate.EntityAttributesMatcherDetermines whether anEntityAttributesPredicate.Candidatecriterion is satisfied by the mapped attributes in an entity's metadata.-
Nested classes/interfaces inherited from class org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
EntityAttributesPredicate.Candidate
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private StringscopeDelimiterDelimiter to build string form of scoped values.
-
Constructor Summary
Constructors Constructor Description MappedEntityAttributesPredicate(Collection<EntityAttributesPredicate.Candidate> candidates)Constructor.MappedEntityAttributesPredicate(Collection<EntityAttributesPredicate.Candidate> candidates, boolean trim)Constructor.MappedEntityAttributesPredicate(Collection<EntityAttributesPredicate.Candidate> candidates, boolean trim, boolean all)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleandoTest(XMLObject input, String name, Collection<EntityAttributesPredicate.Candidate> candidates)Evaluate the input object's attached object metadata against the supplied candidates.voidsetScopeDelimiter(String delimiter)Set delimiter for constructing scoped values for comparison.booleantest(EntityDescriptor input)-
Methods inherited from class org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
getCandidates, getMatchAll, getTrimTags
-
-
-
-
Constructor Detail
-
MappedEntityAttributesPredicate
public MappedEntityAttributesPredicate(@Nonnull @NonnullElements @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates)
Constructor.- Parameters:
candidates- theEntityAttributesPredicate.Candidatecriteria to check for
-
MappedEntityAttributesPredicate
public MappedEntityAttributesPredicate(@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
-
MappedEntityAttributesPredicate
public MappedEntityAttributesPredicate(@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
-
setScopeDelimiter
public void setScopeDelimiter(@Nonnull @NotEmpty String delimiter)
Set delimiter for constructing scoped values for comparison.Defaults to '@'.
- Parameters:
delimiter- delimiter to use
-
test
public boolean test(@Nullable EntityDescriptor input)- Specified by:
testin interfacePredicate<EntityDescriptor>- Overrides:
testin classEntityAttributesPredicate
-
doTest
private boolean doTest(@Nullable XMLObject input, @Nullable String name, @Nonnull @NonnullElements Collection<EntityAttributesPredicate.Candidate> candidates)Evaluate the input object's attached object metadata against the supplied candidates.Any candidates that match will be removed from the input collection.
- Parameters:
input- input objectname- label for loggingcandidates- candidates to check- Returns:
- true iff the attached object metadata matched at least one input candidate
-
-