Package net.shibboleth.idp.profile.interceptor.impl

# Class PopulateProfileInterceptorContext

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.profile.interceptor.AbstractProfileInterceptorAction
net.shibboleth.idp.profile.interceptor.impl.PopulateProfileInterceptorContext

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `ProfileAction`, `Aware`, `MessageSource`, `MessageSourceAware`, `Action`

public class PopulateProfileInterceptorContext extends AbstractProfileInterceptorAction
An profile interceptor action that populates a `ProfileInterceptorContext` with `ProfileInterceptorFlowDescriptor` objects based on flow IDs from a lookup function.

The flow IDs used for filtering must omit the `ProfileInterceptorFlowDescriptor.FLOW_ID_PREFIX` prefix.

Event:
  `EventIds.PROCEED_EVENT_ID`, `IdPEventIds.INVALID_PROFILE_CONFIG`
Postcondition:
  The ProfileInterceptorContext is modified as above.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,Collection<String>>`
`activeFlowsLookupStrategy`
Lookup function for the flow IDs to activate from within the available set.
`private Collection<ProfileInterceptorFlowDescriptor>`
`availableFlows`
The flows to make available for possible use.
`private final org.slf4j.Logger`
`log`
Class logger.
`private String`
`loggingLabel`
A label for logging activity indicating what type of flows are being handled.

## Constructor Summary

Constructors
Constructor
Description
`PopulateProfileInterceptorContext()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext, ProfileInterceptorContext interceptorContext)`
Performs this profile interceptor action.
`protected void`
`doInitialize()`
`void`
`setActiveFlowsLookupStrategy(Function<ProfileRequestContext,Collection<String>> strategy)`
Set the lookup strategy to use for the interceptor flows to activate.
`void`
`setAvailableFlows(Collection<ProfileInterceptorFlowDescriptor> flows)`
Set the flows available for possible use.
`void`
`setLoggingLabel(String label)`
Set a label for logging indicating which "type" of interceptors are being handled.

### Methods inherited from class net.shibboleth.idp.profile.interceptor.AbstractProfileInterceptorAction

`doExecute, doPreExecute, doPreExecute, setLookupStrategy`

### Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction

`doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy`

### Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

`getActivationCondition, setActivationCondition`

### Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

`doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier`

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

### availableFlows

@Nonnull private Collection<ProfileInterceptorFlowDescriptor> availableFlows
The flows to make available for possible use.

### activeFlowsLookupStrategy

@NonnullAfterInit private Function<ProfileRequestContext,Collection<String>> activeFlowsLookupStrategy
Lookup function for the flow IDs to activate from within the available set.

### loggingLabel

@Nullable private String loggingLabel
A label for logging activity indicating what type of flows are being handled.

## Constructor Details

### PopulateProfileInterceptorContext

public PopulateProfileInterceptorContext()
Constructor.

## Method Details

### setAvailableFlows

public void setAvailableFlows(@Nonnull Collection<ProfileInterceptorFlowDescriptor> flows)
Set the flows available for possible use.

Parameters:
  `flows` - the flows available for possible use

### setActiveFlowsLookupStrategy

public void setActiveFlowsLookupStrategy(@Nonnull Function<ProfileRequestContext,Collection<String>> strategy)
Set the lookup strategy to use for the interceptor flows to activate.

Parameters:
  `strategy` - lookup strategy

### setLoggingLabel

public void setLoggingLabel(@Nullable @NotEmpty String label)
Set a label for logging indicating which "type" of interceptors are being handled.

Parameters:
  `label` - logging label
Since:
  4.2.0

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull ProfileInterceptorContext interceptorContext)
Performs this profile interceptor action. Default implementation does nothing.

Overrides:
  `doExecute` in class `AbstractProfileInterceptorAction`
Parameters:
  `profileRequestContext` - the current profile request context
  `interceptorContext` - the current profile interceptor context