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 classCopied from SWF, a basic registry implementation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringBase path for registry.private FlowBuilderServicesRequired collaborator.Pattern-based flow mappings from pattern to base location to apply.Explicit flow mappings from flow ID to resource path.private final org.slf4j.LoggerClass logger.private FlowDefinitionRegistryOptional parent reference.Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FlowDefinitionRegistryprotected voiddestroyInstance(FlowDefinitionRegistry instance) Class<?>private voidregisterFlow(FlowDefinitionResource resource, FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry) Register a flow resource into the registry.private voidregisterFlowLocationPatterns(FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry, FlowDefinitionResourceFactory resourceFactory) Register flows derived from resource patterns.private voidregisterFlowLocations(FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry, FlowDefinitionResourceFactory resourceFactory) Register explicit flow mappings.voidsetBasePath(String path) Configure the base path where flow definitions are found.voidsetFlowBuilderServices(FlowBuilderServices builderServices) Set theFlowBuilderServicesto use for defining custom services needed to build the flows registered in this registry.voidsetFlowLocationPatterns(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.voidsetFlowLocations(Map<String, String> locationMap) Set explicit flow ID to resource mappings.voidsetParent(FlowDefinitionRegistry parentRegistry) Set a parent registry.private voidupdateFlowAttributes(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.
-
-
Constructor Details
-
FlowDefinitionRegistryFactoryBean
public FlowDefinitionRegistryFactoryBean()Constructor.
-
-
Method Details
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<FlowDefinitionRegistry>- Specified by:
getObjectTypein 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 theFlowBuilderServicesto use for defining custom services needed to build the flows registered in this registry.- Parameters:
builderServices- theFlowBuilderServicesinstance
-
setParent
Set a parent registry.- Parameters:
parentRegistry- the parent registry
-
createInstance
- Specified by:
createInstancein classAbstractFactoryBean<FlowDefinitionRegistry>- Throws:
Exception
-
destroyInstance
- Overrides:
destroyInstancein classAbstractFactoryBean<FlowDefinitionRegistry>- Throws:
Exception
-
registerFlowLocations
private void registerFlowLocations(@Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry, @Nonnull FlowDefinitionResourceFactory resourceFactory) Register explicit flow mappings.- Parameters:
flowRegistry- the flow registryresourceFactory- 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 registryresourceFactory- 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 resourceflowRegistry- the registry
-
updateFlowAttributes
Update flow attributes with development bit.- Parameters:
attributes- attribute map to update
-