Package org.opensaml.saml.common.profile.logic

# Class AbstractRegistrationInfoPredicate

java.lang.Object
org.opensaml.saml.common.profile.logic.AbstractRegistrationInfoPredicate

All Implemented Interfaces:
  `Predicate<EntityDescriptor>`

Direct Known Subclasses:
  `RegistrationAuthorityPredicate`, `RegistrationPolicyPredicate`

public abstract class AbstractRegistrationInfoPredicate extends Object implements Predicate<EntityDescriptor>
Base class for predicate that acts on `RegistrationInfo` content.

## Field Summary

Fields
Modifier and Type
Field
Description
`private boolean`
`matchIfMetadataSilent`
What to do if no extension data exists.

## Constructor Summary

Constructors
Constructor
Description
`AbstractRegistrationInfoPredicate()`

## Method Summary

Modifier and Type
Method
Description
`protected abstract boolean`
`doApply(RegistrationInfo info)`
Override this method to implement the predicate.
`boolean`
`getMatchIfMetadataSilent()`
Get whether a predicate should evaluate to true if the data being matched on does not exist.
`protected RegistrationInfo`
`getRegistrationInfo(EntityDescriptor entity)`
Get the `RegistrationInfo` extension associated with an entity, if any.
`void`
`setMatchIfMetadataSilent(boolean flag)`
Set whether a predicate should evaluate to true if the data being matched on does not exist.
`boolean`
`test(EntityDescriptor input)`

### 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

### matchIfMetadataSilent

private boolean matchIfMetadataSilent
What to do if no extension data exists.

## Constructor Details

### AbstractRegistrationInfoPredicate

public AbstractRegistrationInfoPredicate()

## Method Details

### setMatchIfMetadataSilent

public void setMatchIfMetadataSilent(boolean flag)
Set whether a predicate should evaluate to true if the data being matched on does not exist.

Parameters:
  `flag` - flag to set

### getMatchIfMetadataSilent

public boolean getMatchIfMetadataSilent()
Get whether a predicate should evaluate to true if the data being matched on does not exist.

Returns:
  true iff missing data should evaluate to true

### getRegistrationInfo

@Nullable protected RegistrationInfo getRegistrationInfo(@Nullable EntityDescriptor entity)
Get the `RegistrationInfo` extension associated with an entity, if any.

Parameters:
  `entity` - the entity to examine
Returns:
  the associated extension, or null

### test

public boolean test(@Nullable EntityDescriptor input)

Specified by:
  `test` in interface `Predicate<EntityDescriptor>`

### doApply

protected abstract boolean doApply(@Nonnull RegistrationInfo info)
Override this method to implement the predicate.

Parameters:
  `info` - the information to evaluate
Returns:
  the result of the predicate