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

# Class IsConsentRequiredPredicate

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

All Implemented Interfaces:
  `Predicate<ProfileRequestContext>`

public class IsConsentRequiredPredicate extends Object implements Predicate<ProfileRequestContext>
Predicate that returns whether consent is required by comparing the previous and current consents from the consent context.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,ConsentContext>`
`consentContextLookupStrategy`
Consent context lookup strategy.
`private Function<ProfileRequestContext,ConsentFlowDescriptor>`
`consentFlowDescriptorLookupStrategy`
Consent flow descriptor lookup strategy.
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`IsConsentRequiredPredicate()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`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.
`boolean`
`test(ProfileRequestContext input)`

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

`and, negate, or`

## Field Details

### log

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

### consentContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,ConsentContext> consentContextLookupStrategy
Consent context lookup strategy.

### consentFlowDescriptorLookupStrategy

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

## Constructor Details

### IsConsentRequiredPredicate

public IsConsentRequiredPredicate()
Constructor.

## Method Details

### setConsentContextLookupStrategy

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

Parameters:
  `strategy` - consent context lookup strategy

### setConsentFlowDescriptorLookupStrategy

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

Parameters:
  `strategy` - consent flow descriptor lookup strategy

### test

public boolean test(@Nullable ProfileRequestContext input)

Specified by:
  `test` in interface `Predicate<ProfileRequestContext>`