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

# Class IsAttributeRequiredPredicate

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

All Implemented Interfaces:
  `Predicate<IdPAttribute>`

public class IsAttributeRequiredPredicate extends Object implements Predicate<IdPAttribute>
Predicate that determines whether an IdP attribute is required by the requester.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<SAMLMetadataContext,AttributeConsumingService>`
`acsLookupStrategy`
Strategy used to find the `AttributeConsumingService` from the `SAMLMetadataContext`.
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,SAMLMetadataContext>`
`metadataContextLookupStrategy`
Strategy used to find the `SAMLMetadataContext` from the `ProfileRequestContext`.
`private final Multimap<String,IdPAttribute>`
`requestedAttributesMap`
Map of requested attributes.

## Constructor Summary

Constructors
Constructor
Description
`IsAttributeRequiredPredicate(HttpServletRequest request)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected ProfileRequestContext`
`getProfileRequestContext(HttpServletRequest httpRequest)`
Get the profile request context from the HTTP servlet request.
`protected Multimap<String,IdPAttribute>`
`getRequestedAttributes(ProfileRequestContext prc)`
Get the map of requested attributes from the profile request context.
`boolean`
`test(IdPAttribute 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.

### metadataContextLookupStrategy

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

### acsLookupStrategy

@Nonnull private Function<SAMLMetadataContext,AttributeConsumingService> acsLookupStrategy
Strategy used to find the `AttributeConsumingService` from the `SAMLMetadataContext`.

### requestedAttributesMap

@Nullable private final Multimap<String,IdPAttribute> requestedAttributesMap
Map of requested attributes.

## Constructor Details

### IsAttributeRequiredPredicate

public IsAttributeRequiredPredicate(@Nullable HttpServletRequest request)
Constructor.

Parameters:
  `request` - the HTTP request

## Method Details

### getProfileRequestContext

@Nullable protected ProfileRequestContext getProfileRequestContext(@Nullable HttpServletRequest httpRequest)
Get the profile request context from the HTTP servlet request.

Parameters:
  `httpRequest` - the HTTP request
Returns:
  the profile request context or `null`

### getRequestedAttributes

@Nullable protected Multimap<String,IdPAttribute> getRequestedAttributes(@Nullable ProfileRequestContext prc)
Get the map of requested attributes from the profile request context.

Parameters:
  `prc` - the profile request context
Returns:
  the map of requested attributes or `null`

### test

public boolean test(@Nullable IdPAttribute input)

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