Package net.shibboleth.idp.attribute.transcoding.impl

# Class AttributeRegistryServiceStrategy

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.transcoding.impl.AttributeRegistryServiceStrategy

All Implemented Interfaces:
  `Function<ApplicationContext,AbstractServiceableComponent<AttributeTranscoderRegistry>>`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`, `NonnullFunction<ApplicationContext,AbstractServiceableComponent<AttributeTranscoderRegistry>>`

public class AttributeRegistryServiceStrategy extends AbstractIdentifiableInitializableComponent implements NonnullFunction<ApplicationContext,AbstractServiceableComponent<AttributeTranscoderRegistry>>
Strategy for summoning up an `AttributeTranscoderRegistryImpl` from a populated `ApplicationContext`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<Map<String,Object>,Predicate<ProfileRequestContext>>`
`extendedConditionFactory`
Optional factory function for building extended activation conditions.
`private Collection<AttributeTranscoderRegistry.NamingFunction<?>>`
`namingRegistry`
Name of bean to supply naming function registry property.

## Constructor Summary

Constructors
Constructor
Description
`AttributeRegistryServiceStrategy()`

## Method Summary

Modifier and Type
Method
Description
`AbstractServiceableComponent<AttributeTranscoderRegistry>`
`apply(ApplicationContext appContext)`
`void`
`setExtendedConditionFactory(Function<Map<String,Object>,Predicate<ProfileRequestContext>> factory)`
Set a factory function to call to consume a rule set and produce an optional "extended" activation condition `Predicate`.
`void`
`setNamingRegistry(Collection<AttributeTranscoderRegistry.NamingFunction<?>> namingFunctions)`
Sets the collection of `AttributeTranscoderRegistry.NamingFunction`s to install into the registry.

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, 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 java.util.function.Function

`andThen, compose`

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

## Field Details

### namingRegistry

@Nullable private Collection<AttributeTranscoderRegistry.NamingFunction<?>> namingRegistry
Name of bean to supply naming function registry property.

### extendedConditionFactory

@Nullable private Function<Map<String,Object>,Predicate<ProfileRequestContext>> extendedConditionFactory
Optional factory function for building extended activation conditions.

## Constructor Details

### AttributeRegistryServiceStrategy

public AttributeRegistryServiceStrategy()

## Method Details

### setNamingRegistry

@Autowired public void setNamingRegistry(@Nullable Collection<AttributeTranscoderRegistry.NamingFunction<?>> namingFunctions)
Sets the collection of `AttributeTranscoderRegistry.NamingFunction`s to install into the registry.

This is done for auto-wiring exposure since plugins may be supplying additional functions outside the registry's own service context.

Parameters:
  `namingFunctions` - collection of functions to install

### setExtendedConditionFactory

public void setExtendedConditionFactory(@Nullable Function<Map<String,Object>,Predicate<ProfileRequestContext>> factory)
Set a factory function to call to consume a rule set and produce an optional "extended" activation condition `Predicate`.

This allows deployments to define extended property names that represent condition types not known to this layer of the code base.

Parameters:
  `factory` - factory function

### apply

@Nonnull public AbstractServiceableComponent<AttributeTranscoderRegistry> apply(@Nullable ApplicationContext appContext)

Specified by:
  `apply` in interface `Function<ApplicationContext,AbstractServiceableComponent<AttributeTranscoderRegistry>>`
Specified by:
  `apply` in interface `NonnullFunction<ApplicationContext,AbstractServiceableComponent<AttributeTranscoderRegistry>>`