Package net.shibboleth.idp.consent.logic.impl

# Class AttributeReleaseConsentFunction

java.lang.Object
net.shibboleth.idp.consent.logic.impl.AttributeReleaseConsentFunction

All Implemented Interfaces:
  `Function<ProfileRequestContext,Map<String,Consent>>`

public class AttributeReleaseConsentFunction extends Object implements Function<ProfileRequestContext,Map<String,Consent>>
Function that returns a map of consent objects representing consent to attribute release. Each consent object represents consent to an attribute. The id of each consent object is an attribute id, and the value of each consent object is a hash of the attribute's values. A consent object is created for every consentable attribute in the attribute release context.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,AttributeReleaseContext>`
`attributeReleaseContextLookupStrategy`
Strategy used to find the `AttributeReleaseContext` from the `ProfileRequestContext`.
`private Function<ProfileRequestContext,ConsentContext>`
`consentContextLookupStrategy`
Strategy used to find the `ConsentContext` from the `ProfileRequestContext`.
`private Function<ProfileRequestContext,ConsentFlowDescriptor>`
`consentFlowDescriptorLookupStrategy`
Consent flow descriptor lookup strategy.

## Constructor Summary

Constructors
Constructor
Description
`AttributeReleaseConsentFunction()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Map<String,Consent>`
`apply(ProfileRequestContext input)`
`void`
`setAttributeReleaseContextLookupStrategy(Function<ProfileRequestContext,AttributeReleaseContext> strategy)`
Set the attribute release context lookup strategy.
`void`
`setConsentContextLookupStrategy(Function<ProfileRequestContext,ConsentContext> strategy)`
Set the consent context lookup strategy.
`void`
`setConsentFlowDescriptorLookupStrategy(Function<ProfileRequestContext,ConsentFlowDescriptor> strategy)`
Set the consent flow descriptor lookup strategy.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Field Details

### consentContextLookupStrategy

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

### consentFlowDescriptorLookupStrategy

@Nonnull private Function<ProfileRequestContext,ConsentFlowDescriptor> consentFlowDescriptorLookupStrategy
Consent flow descriptor lookup strategy.

### attributeReleaseContextLookupStrategy

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

## Constructor Details

### AttributeReleaseConsentFunction

public AttributeReleaseConsentFunction()
Constructor.

## Method Details

### setConsentContextLookupStrategy

public void setConsentContextLookupStrategy(@Nonnull Function<ProfileRequestContext,ConsentContext> strategy)
Set the consent context lookup strategy.

Parameters:
  `strategy` - the consent context lookup strategy

### setConsentFlowDescriptorLookupStrategy

public void setConsentFlowDescriptorLookupStrategy(@Nonnull Function<ProfileRequestContext,ConsentFlowDescriptor> strategy)
Set the consent flow descriptor lookup strategy.

Parameters:
  `strategy` - the consent flow descriptor 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

### apply

@Nullable public Map<String,Consent> apply(@Nullable ProfileRequestContext input)

Specified by:
  `apply` in interface `Function<ProfileRequestContext,Map<String,Consent>>`