Package net.shibboleth.idp.profile.messaging.impl

# Class SelectProfileConfiguration

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
net.shibboleth.idp.profile.messaging.impl.SelectProfileConfiguration

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `MessageHandler`

public class SelectProfileConfiguration extends AbstractMessageHandler
Action that selects the `ProfileConfiguration` for the given message context and sets it in the looked-up `RelyingPartyContext`.

Postcondition:
  InOutOperationContext.getSubcontext(RelyingPartyContext.class).getProfileConfiguration() != null

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<MessageContext,String>`
`profileIdLookupStrategy`
Strategy used to locate the effective profile ID associated with a given `MessageContext`.
`private Function<MessageContext,ProfileRequestContext>`
`profileRequestContextLookupStrategy`
Strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.
`private Function<MessageContext,RelyingPartyContext>`
`relyingPartyContextLookupStrategy`
Strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.
`private RelyingPartyContext`
`rpCtx`
The RelyingPartyContext to operate on.

## Constructor Summary

Constructors
Constructor
Description
`SelectProfileConfiguration()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`protected void`
`doInvoke(MessageContext messageContext)`
`protected boolean`
`doPreInvoke(MessageContext messageContext)`
`Function<MessageContext,ProfileRequestContext>`
`getProfileRequestContextLookupStrategy()`
Get the strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.
`void`
`setProfiledIdLookupStrategy(Function<MessageContext,String> strategy)`
Set the strategy used to locate the effective profile ID associated with a given `MessageContext`.
`void`
`setProfileRequestContextLookupStrategy(Function<MessageContext,ProfileRequestContext> strategy)`
Set the strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.
`void`
`setRelyingPartyContextLookupStrategy(Function<MessageContext,RelyingPartyContext> strategy)`
Set the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

### Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler

`doPostInvoke, doPostInvoke, getActivationCondition, getLogPrefix, invoke, isPreInvokeCalled, setActivationCondition`

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

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.InitializableComponent

`initialize, isInitialized`

## Field Details

### log

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

### relyingPartyContextLookupStrategy

@NonnullAfterInit private Function<MessageContext,RelyingPartyContext> relyingPartyContextLookupStrategy
Strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

### profileRequestContextLookupStrategy

@Nonnull private Function<MessageContext,ProfileRequestContext> profileRequestContextLookupStrategy
Strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.

### profileIdLookupStrategy

@NonnullAfterInit private Function<MessageContext,String> profileIdLookupStrategy
Strategy used to locate the effective profile ID associated with a given `MessageContext`.

### rpCtx

@Nullable private RelyingPartyContext rpCtx
The RelyingPartyContext to operate on.

## Constructor Details

### SelectProfileConfiguration

public SelectProfileConfiguration()
Constructor.

## Method Details

### setRelyingPartyContextLookupStrategy

public void setRelyingPartyContextLookupStrategy(@Nonnull Function<MessageContext,RelyingPartyContext> strategy)
Set the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

Parameters:
  `strategy` - strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`

### getProfileRequestContextLookupStrategy

@Nonnull public Function<MessageContext,ProfileRequestContext> getProfileRequestContextLookupStrategy()
Get the strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.

Returns:
  lookup strategy

### setProfileRequestContextLookupStrategy

public void setProfileRequestContextLookupStrategy(@Nonnull Function<MessageContext,ProfileRequestContext> strategy)
Set the strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.

Parameters:
  `strategy` - lookup strategy

### setProfiledIdLookupStrategy

public void setProfiledIdLookupStrategy(@Nonnull Function<MessageContext,String> strategy)
Set the strategy used to locate the effective profile ID associated with a given `MessageContext`.

Parameters:
  `strategy` - strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### doPreInvoke

protected boolean doPreInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException

Overrides:
  `doPreInvoke` in class `AbstractMessageHandler`
Throws:
  `MessageHandlerException`

### doInvoke

protected void doInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException

Specified by:
  `doInvoke` in class `AbstractMessageHandler`
Throws:
  `MessageHandlerException`