Package net.shibboleth.idp.consent.flow.ar.impl

# Class AbstractAttributeReleaseAction

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.consent.flow.impl.AbstractConsentAction
net.shibboleth.idp.consent.flow.ar.impl.AbstractAttributeReleaseAction

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

Direct Known Subclasses:
  `PopulateAttributeReleaseContext`, `ReleaseAttributes`, `ValidatedExtractedConsent`

public abstract class AbstractAttributeReleaseAction extends AbstractConsentAction
Base class for attribute release consent actions. Ensures that

- an `AttributeReleaseContext` is available from the `ProfileRequestContext`
- the interceptor attempted flow is an `AttributeReleaseFlowDescriptor`
- an `AttributeContext` is available from the `ProfileRequestContext`

Event:
  `EventIds.PROCEED_EVENT_ID`, `EventIds.INVALID_PROFILE_CTX`, `IdPEventIds.INVALID_ATTRIBUTE_CTX`
Precondition:
  See above.

## Field Summary

Fields
Modifier and Type
Field
Description
`private AttributeContext`
`attributeContext`
The `AttributeContext` to operate on.
`private Function<ProfileRequestContext,AttributeContext>`
`attributeContextLookupStrategy`
Strategy used to find the `AttributeContext` from the `ProfileRequestContext`.
`private AttributeReleaseContext`
`attributeReleaseContext`
The `AttributeReleaseContext` to operate on.
`private Function<ProfileRequestContext,AttributeReleaseContext>`
`attributeReleaseContextLookupStrategy`
Strategy used to find the `AttributeReleaseContext` from the `ProfileRequestContext`.
`private AttributeReleaseFlowDescriptor`
`attributeReleaseFlowDescriptor`
The attribute consent flow descriptor.
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`AbstractAttributeReleaseAction()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext, ProfileInterceptorContext interceptorContext)`
Performs this profile interceptor action's pre-execute step.
`AttributeContext`
`getAttributeContext()`
Get the attribute context.
`AttributeReleaseContext`
`getAttributeReleaseContext()`
Get the attribute release context.
`AttributeReleaseFlowDescriptor`
`getAttributeReleaseFlowDescriptor()`
Get the attribute release flow descriptor.
`void`
`setAttributeContextLookupStrategy(Function<ProfileRequestContext,AttributeContext> strategy)`
Set the attribute context lookup strategy.
`void`
`setAttributeReleaseContextLookupStrategy(Function<ProfileRequestContext,AttributeReleaseContext> strategy)`
Set the attribute release context lookup strategy.

### Methods inherited from class net.shibboleth.idp.consent.flow.impl.AbstractConsentAction

`getConsentContext, getConsentFlowDescriptor, setConsentContextLookupStrategy`

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

`doExecute, doExecute, 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, doInitialize, 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.

### attributeReleaseContext

@Nullable private AttributeReleaseContext attributeReleaseContext
The `AttributeReleaseContext` to operate on.

### attributeReleaseContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,AttributeReleaseContext> attributeReleaseContextLookupStrategy
Strategy used to find the `AttributeReleaseContext` from the `ProfileRequestContext`.

### attributeReleaseFlowDescriptor

@Nullable private AttributeReleaseFlowDescriptor attributeReleaseFlowDescriptor
The attribute consent flow descriptor.

### attributeContext

@Nullable private AttributeContext attributeContext
The `AttributeContext` to operate on.

### attributeContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,AttributeContext> attributeContextLookupStrategy
Strategy used to find the `AttributeContext` from the `ProfileRequestContext`.

## Constructor Details

### AbstractAttributeReleaseAction

public AbstractAttributeReleaseAction()
Constructor.

## Method Details

### setAttributeContextLookupStrategy

public void setAttributeContextLookupStrategy(Function<ProfileRequestContext,AttributeContext> strategy)
Set the attribute context lookup strategy.

Parameters:
  `strategy` - the attribute context lookup strategy

### setAttributeReleaseContextLookupStrategy

public void setAttributeReleaseContextLookupStrategy(@Nonnull Function<ProfileRequestContext,AttributeReleaseContext> strategy)
Set the attribute release context lookup strategy.

Parameters:
  `strategy` - the attribute release context lookup strategy

### getAttributeReleaseContext

@Nullable public AttributeReleaseContext getAttributeReleaseContext()
Get the attribute release context.

Returns:
  the attribute release context

### getAttributeReleaseFlowDescriptor

@Nullable public AttributeReleaseFlowDescriptor getAttributeReleaseFlowDescriptor()
Get the attribute release flow descriptor.

Returns:
  the attribute release flow descriptor

### getAttributeContext

@Nullable public AttributeContext getAttributeContext()
Get the attribute context.

Returns:
  the attribute context

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull ProfileInterceptorContext interceptorContext)
Performs this profile interceptor action's pre-execute step. Default implementation returns true.

Overrides:
  `doPreExecute` in class `AbstractConsentAction`
Parameters:
  `profileRequestContext` - the current profile request context
  `interceptorContext` - the current profile interceptor context
Returns:
  true iff execution should continue