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

# Class AbstractProtocolSupportPolicyRule

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.AbstractProtocolSupportPolicyRule

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

Direct Known Subclasses:
  `IssuerProtocolSupportPolicyRule`, `ProxiedRequesterProtocolSupportPolicyRule`, `RequesterProtocolSupportPolicyRule`

public abstract class AbstractProtocolSupportPolicyRule extends AbstractPolicyRule
Base class for Policy Rules that check whether a particular protocol is available for the supplied role.

Given the `RoleDescriptor`, this class does the match.

## 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 String`
`protocol`
What we are checking against.

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

`MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS`

## Constructor Summary

Constructors
Constructor
Description
`AbstractProtocolSupportPolicyRule()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`String`
`getProtocol()`
Get `protocol`.
`protected abstract RoleDescriptor`
`getRoleDescriptor(AttributeFilterContext filterContext)`
Gets the `RoleDescriptor` we are interested in.
`PolicyRequirementRule.Tristate`
`matches(AttributeFilterContext filterContext)`
Evaluate what this rule means.
`void`
`setProtocol(String what)`
Set `protocol`.

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

`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.

### protocol

@NonnullAfterInit private String protocol
What we are checking against.

## Constructor Details

### AbstractProtocolSupportPolicyRule

public AbstractProtocolSupportPolicyRule()

## Method Details

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractPolicyRule`
Throws:
  `ComponentInitializationException`

### getProtocol

@Nonnull public String getProtocol()
Get `protocol`.

Returns:
  `protocol`

### setProtocol

public void setProtocol(@Nonnull String what)
Set `protocol`.

Parameters:
  `what` - thing to set.

### matches

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

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

### getRoleDescriptor

@Nullable protected abstract RoleDescriptor getRoleDescriptor(@Nonnull AttributeFilterContext filterContext)
Gets the `RoleDescriptor` we are interested in.

Parameters:
  `filterContext` - current filter request context
Returns:
  the RoleDescriptr