Class MappedEntityAttributesPredicate
java.lang.Object
org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
net.shibboleth.saml.profile.context.logic.MappedEntityAttributesPredicate
- All Implemented Interfaces:
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 classDetermines 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
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private StringDelimiter 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 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
-
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 @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates) Constructor.- Parameters:
candidates- theEntityAttributesPredicate.Candidatecriteria to check for
-
MappedEntityAttributesPredicate
public MappedEntityAttributesPredicate(@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
-
MappedEntityAttributesPredicate
public MappedEntityAttributesPredicate(@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
-
setScopeDelimiter
Set delimiter for constructing scoped values for comparison.Defaults to '@'.
- Parameters:
delimiter- delimiter to use
-
test
- Specified by:
testin interfacePredicate<EntityDescriptor>- Overrides:
testin classEntityAttributesPredicate
-
doTest
private boolean doTest(@Nonnull XMLObject input, @Nullable String name, @Nonnull 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
-