Package net.shibboleth.idp.profile.spring.factory

# Class FlowDefinitionRegistryFactoryBean

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<FlowDefinitionRegistry>
net.shibboleth.idp.profile.spring.factory.FlowDefinitionRegistryFactoryBean

All Implemented Interfaces:
  `Aware`, `BeanClassLoaderAware`, `BeanFactoryAware`, `DisposableBean`, `FactoryBean<FlowDefinitionRegistry>`, `InitializingBean`

public class FlowDefinitionRegistryFactoryBean extends AbstractFactoryBean<FlowDefinitionRegistry>
A bean factory for creating `FlowDefinitionRegistry` instances, based on the programmatic builder built into SWF.

Overrides the resource factory implementation, which they neglected to support, and that's where all the fancy derivation of flow IDs lives.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private static class`
`FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry`
Copied from SWF, a basic registry implementation.

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`basePath`
Base path for registry.
`private FlowBuilderServices`
`flowBuilderServices`
Required collaborator.
`private Map<String,String>`
`flowLocationPatterns`
Pattern-based flow mappings from pattern to base location to apply.
`private Map<String,String>`
`flowLocations`
Explicit flow mappings from flow ID to resource path.
`private final org.slf4j.Logger`
`log`
Class logger.
`private FlowDefinitionRegistry`
`parent`
Optional parent reference.

### Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

`logger`

### Fields inherited from interface org.springframework.beans.factory.FactoryBean

`OBJECT_TYPE_ATTRIBUTE`

## Constructor Summary

Constructors
Constructor
Description
`FlowDefinitionRegistryFactoryBean()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected FlowDefinitionRegistry`
`createInstance()`
`protected void`
`destroyInstance(FlowDefinitionRegistry instance)`
`Class<?>`
`getObjectType()`
`private void`
`registerFlow(FlowDefinitionResource resource, FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)`
Register a flow resource into the registry.
`private void`
`registerFlowLocationPatterns(FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry, FlowDefinitionResourceFactory resourceFactory)`
Register flows derived from resource patterns.
`private void`
`registerFlowLocations(FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry, FlowDefinitionResourceFactory resourceFactory)`
Register explicit flow mappings.
`void`
`setBasePath(String path)`
Configure the base path where flow definitions are found.
`void`
`setFlowBuilderServices(FlowBuilderServices builderServices)`
Set the `FlowBuilderServices` to use for defining custom services needed to build the flows registered in this registry.
`void`
`setFlowLocationPatterns(Map<String,String> patternMap)`
Registers a set of flows resolved from a resource location pattern as the mapping key, with an optional value containing a portion to strip when computing the flow IDs, with the default base location applied if empty/null.
`void`
`setFlowLocations(Map<String,String> locationMap)`
Set explicit flow ID to resource mappings.
`void`
`setParent(FlowDefinitionRegistry parentRegistry)`
Set a parent registry.
`private void`
`updateFlowAttributes(LocalAttributeMap<Object> attributes)`
Update flow attributes with development bit.

### Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

`afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton`

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

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

## Field Details

### log

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

### flowLocations

@Nonnull private Map<String,String> flowLocations
Explicit flow mappings from flow ID to resource path.

### flowLocationPatterns

@Nonnull private Map<String,String> flowLocationPatterns
Pattern-based flow mappings from pattern to base location to apply.

### flowBuilderServices

@Nullable private FlowBuilderServices flowBuilderServices
Required collaborator.

### basePath

@Nullable private String basePath
Base path for registry.

### parent

@Nullable private FlowDefinitionRegistry parent
Optional parent reference.

## Constructor Details

### FlowDefinitionRegistryFactoryBean

public FlowDefinitionRegistryFactoryBean()
Constructor.

## Method Details

### getObjectType

public Class<?> getObjectType()

Specified by:
  `getObjectType` in interface `FactoryBean<FlowDefinitionRegistry>`
Specified by:
  `getObjectType` in class `AbstractFactoryBean<FlowDefinitionRegistry>`

### setBasePath

public void setBasePath(@Nullable String path)
Configure the base path where flow definitions are found.

Parameters:
  `path` - the base path to use

### setFlowLocations

public void setFlowLocations(@Nonnull Map<String,String> locationMap)
Set explicit flow ID to resource mappings.

Parameters:
  `locationMap` - mappings from flow ID to resource

### setFlowLocationPatterns

public void setFlowLocationPatterns(@Nonnull Map<String,String> patternMap)
Registers a set of flows resolved from a resource location pattern as the mapping key, with an optional value containing a portion to strip when computing the flow IDs, with the default base location applied if empty/null.

Parameters:
  `patternMap` - the mappings to use

### setFlowBuilderServices

public void setFlowBuilderServices(@Nonnull FlowBuilderServices builderServices)
Set the `FlowBuilderServices` to use for defining custom services needed to build the flows registered in this registry.

Parameters:
  `builderServices` - the `FlowBuilderServices` instance

### setParent

public void setParent(@Nullable FlowDefinitionRegistry parentRegistry)
Set a parent registry.

Parameters:
  `parentRegistry` - the parent registry

### createInstance

@Nonnull protected FlowDefinitionRegistry createInstance() throws Exception

Specified by:
  `createInstance` in class `AbstractFactoryBean<FlowDefinitionRegistry>`
Throws:
  `Exception`

### destroyInstance

protected void destroyInstance(@Nullable FlowDefinitionRegistry instance) throws Exception

Overrides:
  `destroyInstance` in class `AbstractFactoryBean<FlowDefinitionRegistry>`
Throws:
  `Exception`

### registerFlowLocations

private void registerFlowLocations(@Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry, @Nonnull FlowDefinitionResourceFactory resourceFactory)
Register explicit flow mappings.

Parameters:
  `flowRegistry` - the flow registry
  `resourceFactory` - the flow definition resource factory

### registerFlowLocationPatterns

private void registerFlowLocationPatterns(@Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry, @Nonnull FlowDefinitionResourceFactory resourceFactory)
Register flows derived from resource patterns.

Parameters:
  `flowRegistry` - the flow registry
  `resourceFactory` - the flow definition resource factory

### registerFlow

private void registerFlow(@Nonnull FlowDefinitionResource resource, @Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)
Register a flow resource into the registry.

Parameters:
  `resource` - the flow resource
  `flowRegistry` - the registry

### updateFlowAttributes

private void updateFlowAttributes(@Nonnull LocalAttributeMap<Object> attributes)
Update flow attributes with development bit.

Parameters:
  `attributes` - attribute map to update