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
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 ClassesModifier and TypeClassDescriptionprivate static class
Copied from SWF, a basic registry implementation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Base path for registry.private FlowBuilderServices
Required collaborator.Pattern-based flow mappings from pattern to base location to apply.Explicit flow mappings from flow ID to resource path.private FlowDefinitionResourceFactory
Overriden resource factory, the whole reason for this class.private final org.slf4j.Logger
Class logger.private FlowDefinitionRegistry
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected FlowDefinitionRegistry
protected void
destroyInstance
(FlowDefinitionRegistry instance) Class<?>
private void
registerFlow
(FlowDefinitionResource resource, FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry) Register a flow resource into the registry.private void
Register flows derived from resource patterns.private void
Register explicit flow mappings.void
setBasePath
(String path) Configure the base path where flow definitions are found.void
setFlowBuilderServices
(FlowBuilderServices builderServices) Set theFlowBuilderServices
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
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
flowLocations
Explicit flow mappings from flow ID to resource path. -
flowLocationPatterns
Pattern-based flow mappings from pattern to base location to apply. -
flowBuilderServices
Required collaborator. -
basePath
Base path for registry. -
parent
Optional parent reference. -
flowResourceFactory
Overriden resource factory, the whole reason for this class.
-
-
Constructor Details
-
FlowDefinitionRegistryFactoryBean
public FlowDefinitionRegistryFactoryBean()Constructor.
-
-
Method Details
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<FlowDefinitionRegistry>
- Specified by:
getObjectType
in classAbstractFactoryBean<FlowDefinitionRegistry>
-
setBasePath
Configure the base path where flow definitions are found.- Parameters:
path
- the base path to use
-
setFlowLocations
Set explicit flow ID to resource mappings.- Parameters:
locationMap
- mappings from flow ID to resource
-
setFlowLocationPatterns
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
Set theFlowBuilderServices
to use for defining custom services needed to build the flows registered in this registry.- Parameters:
builderServices
- theFlowBuilderServices
instance
-
setParent
Set a parent registry.- Parameters:
parentRegistry
- the parent registry
-
createInstance
- Specified by:
createInstance
in classAbstractFactoryBean<FlowDefinitionRegistry>
- Throws:
Exception
-
destroyInstance
- Overrides:
destroyInstance
in classAbstractFactoryBean<FlowDefinitionRegistry>
- Throws:
Exception
-
registerFlowLocations
private void registerFlowLocations(@Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry) Register explicit flow mappings.- Parameters:
flowRegistry
- the flow registry
-
registerFlowLocationPatterns
private void registerFlowLocationPatterns(@Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry) Register flows derived from resource patterns.- Parameters:
flowRegistry
- the flow registry
-
registerFlow
private void registerFlow(@Nonnull FlowDefinitionResource resource, @Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry) Register a flow resource into the registry.- Parameters:
resource
- the flow resourceflowRegistry
- the registry
-
updateFlowAttributes
Update flow attributes with development bit.- Parameters:
attributes
- attribute map to update
-