Package net.shibboleth.saml.profile.context.logic

# Class MappedEntityAttributesPredicate

java.lang.Object
org.opensaml.saml.common.profile.logic.EntityAttributesPredicate
net.shibboleth.saml.profile.context.logic.MappedEntityAttributesPredicate

All Implemented Interfaces:
  `Predicate<EntityDescriptor>`

public class MappedEntityAttributesPredicate extends EntityAttributesPredicate
Extended version of EntityAttributes-driven predicate that uses an optimization to check for mapped attributes in an `AttributesMapContainer` structure.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private class`
`MappedEntityAttributesPredicate.EntityAttributesMatcher`
Determines whether an `EntityAttributesPredicate.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

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private String`
`scopeDelimiter`
Delimiter 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

Modifier and Type
Method
Description
`private 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Predicate

`and, negate, or`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### scopeDelimiter

@Nonnull @NotEmpty private String 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` - the `EntityAttributesPredicate.Candidate` criteria to check for

### MappedEntityAttributesPredicate

public MappedEntityAttributesPredicate(@Nonnull @ParameterName(name="candidates") Collection<EntityAttributesPredicate.Candidate> candidates, @ParameterName(name="trim") boolean trim)
Constructor.

Parameters:
  `candidates` - the `EntityAttributesPredicate.Candidate` criteria to check for
  `trim` - 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` - the `EntityAttributesPredicate.Candidate` criteria to check for
  `trim` - true iff the values found in the metadata should be trimmed before comparison
  `all` - true iff all the criteria must match to be a successful test

## Method Details

### 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:
  `test` in interface `Predicate<EntityDescriptor>`
Overrides:
  `test` in class `EntityAttributesPredicate`

### 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 object
  `name` - label for logging
  `candidates` - candidates to check
Returns:
  true iff the attached object metadata matched at least one input candidate