Package net.shibboleth.profile.audit.impl

# Class AttributesAuditExtractor

java.lang.Object
net.shibboleth.profile.audit.impl.AttributesAuditExtractor

All Implemented Interfaces:
  `Function<ProfileRequestContext,Collection<String>>`

public class AttributesAuditExtractor extends Object implements Function<ProfileRequestContext,Collection<String>>
`Function` that returns the attribute IDs from an `AttributeContext`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Predicate<ProfileRequestContext>`
`activationCondition`
A predicate to control whether attributes should be extracted for logging.
`private final Function<ProfileRequestContext,AttributeContext>`
`attributeContextLookupStrategy`
Lookup strategy for AttributeContext to read from.
`private boolean`
`useUnfiltered`
Extract the unfiltered attribute list instead of the filtered list.

## Constructor Summary

Constructors
Constructor
Description
`AttributesAuditExtractor()`
Constructor.
`AttributesAuditExtractor(Function<ProfileRequestContext,AttributeContext> strategy)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Collection<String>`
`apply(ProfileRequestContext input)`
`void`
`setActivationCondition(Predicate<ProfileRequestContext> condition)`
Set a condition to evaluate to control whether attributes are extracted for logging.
`void`
`setUseUnfiltered(boolean flag)`
Set whether to extract the list of unfiltered attributes instead of the filtered attributes.

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

### useUnfiltered

private boolean useUnfiltered
Extract the unfiltered attribute list instead of the filtered list.

### activationCondition

@Nullable private Predicate<ProfileRequestContext> activationCondition
A predicate to control whether attributes should be extracted for logging.

### attributeContextLookupStrategy

@Nonnull private final Function<ProfileRequestContext,AttributeContext> attributeContextLookupStrategy
Lookup strategy for AttributeContext to read from.

## Constructor Details

### AttributesAuditExtractor

public AttributesAuditExtractor()
Constructor.

### AttributesAuditExtractor

public AttributesAuditExtractor(@Nonnull Function<ProfileRequestContext,AttributeContext> strategy)
Constructor.

Parameters:
  `strategy` - lookup strategy for `AttributeContext`

## Method Details

### setUseUnfiltered

public void setUseUnfiltered(boolean flag)
Set whether to extract the list of unfiltered attributes instead of the filtered attributes.

Parameters:
  `flag` - flag to set

### setActivationCondition

public void setActivationCondition(@Nullable Predicate<ProfileRequestContext> condition)
Set a condition to evaluate to control whether attributes are extracted for logging.

This is used primarily to prevent logging of attributes for profiles in which attributes may be resolved, but not actually disclosed to a relying party.

Parameters:
  `condition` - condition to evaluate

### apply

@Nullable public Collection<String> apply(@Nullable ProfileRequestContext input)

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