Package net.shibboleth.profile.relyingparty.impl

# Class BaseCriteriaRelyingPartyConfiigurationResolver<ReturnType>

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.profile.relyingparty.impl.BaseCriteriaRelyingPartyConfiigurationResolver<ReturnType>

Type Parameters:
  `ReturnType` - The type of data returned by the resolver

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`, `Resolver<ReturnType,CriteriaSet>`

Direct Known Subclasses:
  `CriteriaDecryptionConfigurationResolver`, `CriteriaSelfEntityIDResolver`

public abstract class BaseCriteriaRelyingPartyConfiigurationResolver<ReturnType> extends AbstractIdentifiedInitializableComponent implements Resolver<ReturnType,CriteriaSet>, IdentifiableComponent
Abstract base resolver which uses an instance of `RelyingPartyConfigurationResolver` to resolve a `RelyingPartyConfiguration` using an input `CriteriaSet` only.

The required and allowed criteria are the same as the `RelyingPartyConfigurationResolver` implementation in use.

## Field Summary

Fields
Modifier and Type
Field
Description
`private org.slf4j.Logger`
`log`
Logger.
`private ReloadableService<RelyingPartyConfigurationResolver>`
`rpcResolver`
The RelyingPartyConfigurationResolver to which to delegate.

## Constructor Summary

Constructors
Constructor
Description
`BaseCriteriaRelyingPartyConfiigurationResolver()`

## Method Summary

Modifier and Type
Method
Description
`private ProfileRequestContext`
`buildContext(CriteriaSet criteria)`
Build and populate the synthetic instance of `ProfileRequestContext` which will be used in the resolution call to the delegate as well as to resolve the entityID setting.
`protected void`
`doDestroy()`
`protected void`
`doInitialize()`
`private EntityDescriptor`
`resolveEntityDescriptor(CriteriaSet criteria)`
Resolve the EntityDescriptor from the criteria.
`private String`
`resolveEntityID(CriteriaSet criteria)`
Resolve the entityID from the criteria.
`protected Pair<RelyingPartyConfiguration,ProfileRequestContext>`
`resolveRelyingPartyConfiguration(CriteriaSet criteria)`
Resolve the `RelyingPartyConfiguration` based on the input `CriteriaSet`.
`private RoleDescriptor`
`resolveRoleDescriptor(CriteriaSet criteria)`
Resolve the RoleDescriptor from the criteria.
`void`
`setId(String componentId)`
`void`
`setRelyingPartyConfigurationResolver(ReloadableService<RelyingPartyConfigurationResolver> resolver)`
Set the `RelyingPartyConfigurationResolver` instance to which to delegate.

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

### Methods inherited from interface net.shibboleth.shared.resolver.Resolver

`resolve, resolveSingle`

## Field Details

### log

@Nonnull private org.slf4j.Logger log
Logger.

### rpcResolver

@NonnullAfterInit private ReloadableService<RelyingPartyConfigurationResolver> rpcResolver
The RelyingPartyConfigurationResolver to which to delegate.

## Constructor Details

### BaseCriteriaRelyingPartyConfiigurationResolver

public BaseCriteriaRelyingPartyConfiigurationResolver()

## Method Details

### setRelyingPartyConfigurationResolver

public void setRelyingPartyConfigurationResolver(@Nullable ReloadableService<RelyingPartyConfigurationResolver> resolver)
Set the `RelyingPartyConfigurationResolver` instance to which to delegate.

Parameters:
  `resolver` - the relying party resolver

### setId

public void setId(@Nonnull @NotEmpty String componentId)

Specified by:
  `setId` in interface `IdentifiableComponent`
Overrides:
  `setId` in class `AbstractIdentifiedInitializableComponent`

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### doDestroy

protected void doDestroy()

Overrides:
  `doDestroy` in class `AbstractInitializableComponent`

### resolveRelyingPartyConfiguration

@Nullable protected Pair<RelyingPartyConfiguration,ProfileRequestContext> resolveRelyingPartyConfiguration(@Nullable CriteriaSet criteria) throws ResolverException
Resolve the `RelyingPartyConfiguration` based on the input `CriteriaSet`.

Parameters:
  `criteria` - the criteria for resolution
Returns:
  the relying party configuration along with the internal synthetic profile request context (often necessary for further data fetching from the configuration), or null if resolution fails
Throws:
  `ResolverException` - if there is a fatal error resolving the configuration

### buildContext

@Nullable private ProfileRequestContext buildContext(@Nullable CriteriaSet criteria)
Build and populate the synthetic instance of `ProfileRequestContext` which will be used in the resolution call to the delegate as well as to resolve the entityID setting.

Parameters:
  `criteria` - the input criteria
Returns:
  the synthetic context instance, or null if required data is not supplied

### resolveEntityID

@Nullable private String resolveEntityID(@Nonnull CriteriaSet criteria)
Resolve the entityID from the criteria.

Parameters:
  `criteria` - the input criteria
Returns:
  the input entityID criterion or null if could not be resolved

### resolveEntityDescriptor

@Nullable private EntityDescriptor resolveEntityDescriptor(@Nonnull CriteriaSet criteria)
Resolve the EntityDescriptor from the criteria.

Parameters:
  `criteria` - the input criteria
Returns:
  the input entity descriptor criterion, or null if could not be resolved

### resolveRoleDescriptor

@Nullable private RoleDescriptor resolveRoleDescriptor(@Nonnull CriteriaSet criteria)
Resolve the RoleDescriptor from the criteria.

Parameters:
  `criteria` - the input criteria
Returns:
  the input role descriptor criterion or null if could not be resolved