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>
Extended version of EntityAttributes-driven predicate that uses an optimization to check
for mapped attributes in an
AttributesMapContainer
structure.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Determines whether anEntityAttributesPredicate.Candidate
criterion 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
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
Class logger.private String
Delimiter to build string form of scoped values. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.MappedEntityAttributesPredicate
(Collection<EntityAttributesPredicate.Candidate> candidates, boolean trim) Constructor.MappedEntityAttributesPredicate
(Collection<EntityAttributesPredicate.Candidate> candidates, boolean trim, boolean all) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
doTest
(XMLObject input, String name, Collection<EntityAttributesPredicate.Candidate> candidates) Evaluate the input object's attached object metadata against the supplied candidates.void
setScopeDelimiter
(String delimiter) Set delimiter for constructing scoped values for comparison.boolean
test
(EntityDescriptor input) Methods inherited from class org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
getCandidates, getMatchAll, getTrimTags
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
scopeDelimiter
Delimiter to build string form of scoped values.
-
-
Constructor Details
-
MappedEntityAttributesPredicate
public MappedEntityAttributesPredicate(@Nonnull @NonnullElements @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates) Constructor.- Parameters:
candidates
- theEntityAttributesPredicate.Candidate
criteria to check for
-
MappedEntityAttributesPredicate
public MappedEntityAttributesPredicate(@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
-
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.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
-
setScopeDelimiter
Set delimiter for constructing scoped values for comparison.Defaults to '@'.
- Parameters:
delimiter
- delimiter to use
-
test
- Specified by:
test
in interfacePredicate<EntityDescriptor>
- Overrides:
test
in 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
-