Package net.shibboleth.idp.attribute.filter.policyrule.saml.impl

# Class AbstractRegistrationAuthorityPolicyRule

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.filter.policyrule.impl.AbstractPolicyRule
net.shibboleth.idp.attribute.filter.policyrule.saml.impl.AbstractRegistrationAuthorityPolicyRule

All Implemented Interfaces:
  `PolicyRequirementRule`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`

Direct Known Subclasses:
  `IssuerRegistrationAuthorityPolicyRule`, `ProxiedRequesterRegistrationAuthorityPolicyRule`, `RequesterRegistrationAuthorityPolicyRule`

public abstract class AbstractRegistrationAuthorityPolicyRule extends AbstractPolicyRule
Base class for rules operating on the RPI extension in metadata.

## Nested Class Summary

## Nested classes/interfaces inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule

`PolicyRequirementRule.Tristate`

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private boolean`
`matchIfMetadataSilent`
What to say if no MDRPI is present.
`private Set<String>`
`registrars`
The registrars to match against.

### Fields inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule

`MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS`

## Constructor Summary

Constructors
Constructor
Description
`AbstractRegistrationAuthorityPolicyRule()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected abstract EntityDescriptor`
`getEntityMetadata(AttributeFilterContext filterContext)`
Gets the entity descriptor for the rule to check.
`Set<String>`
`getRegistrars()`
Get the candidate registrars.
`private RegistrationInfo`
`getRegistrationInfo(AttributeFilterContext filterContext)`
Look for the `RegistrationInfo` inside the peer's entity description.
`boolean`
`isMatchIfMetadataSilent()`
Get what to do if there is no mdrpi/extensions.
`PolicyRequirementRule.Tristate`
`matches(AttributeFilterContext filterContext)`
Evaluate what this rule means.
`void`
`setMatchIfMetadataSilent(boolean value)`
Set what to do if there is no mdrpi/extensions.
`void`
`setRegistrars(Collection<String> theIssuers)`
Set the candidate registrars.

### Methods inherited from class net.shibboleth.idp.attribute.filter.policyrule.impl.AbstractPolicyRule

`doInitialize, getLogPrefix`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized`

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

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

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

## Field Details

### log

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

### registrars

@Nonnull private Set<String> registrars
The registrars to match against.

### matchIfMetadataSilent

private boolean matchIfMetadataSilent
What to say if no MDRPI is present.

## Constructor Details

### AbstractRegistrationAuthorityPolicyRule

public AbstractRegistrationAuthorityPolicyRule()
Constructor.

## Method Details

### getRegistrars

@Nonnull @Unmodifiable @NotLive public Set<String> getRegistrars()
Get the candidate registrars.

Returns:
  the issuers

### setRegistrars

public void setRegistrars(@Nonnull Collection<String> theIssuers)
Set the candidate registrars.

Parameters:
  `theIssuers` - candidate registrars

### isMatchIfMetadataSilent

public boolean isMatchIfMetadataSilent()
Get what to do if there is no mdrpi/extensions.

Returns:
  Returns the matchIfMetadataSilent.

### setMatchIfMetadataSilent

public void setMatchIfMetadataSilent(boolean value)
Set what to do if there is no mdrpi/extensions.

Parameters:
  `value` - The matchIfMetadataSilent to set.

### getEntityMetadata

@Nullable protected abstract EntityDescriptor getEntityMetadata(@Nonnull AttributeFilterContext filterContext)
Gets the entity descriptor for the rule to check.

Parameters:
  `filterContext` - current filter request context
Returns:
  entity descriptor for the entity to check or null if not found

### getRegistrationInfo

@Nullable private RegistrationInfo getRegistrationInfo(@Nonnull AttributeFilterContext filterContext)
Look for the `RegistrationInfo` inside the peer's entity description.

Parameters:
  `filterContext` - the context of the operation
Returns:
  The registration info for the SP in the context

### matches

@Nonnull public PolicyRequirementRule.Tristate matches(@Nonnull AttributeFilterContext filterContext)
Evaluate what this rule means.

Parameters:
  `filterContext` - the context.
Returns:
  whether the rule holds