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 creatingFlowDefinitionRegistryinstances, 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 classFlowDefinitionRegistryFactoryBean.DefaultFlowRegistryCopied from SWF, a basic registry implementation.
-
Field Summary
Fields Modifier and Type Field Description private StringbasePathBase path for registry.private FlowBuilderServicesflowBuilderServicesRequired collaborator.private Map<String,String>flowLocationPatternsPattern-based flow mappings from pattern to base location to apply.private Map<String,String>flowLocationsExplicit flow mappings from flow ID to resource path.private FlowDefinitionResourceFactoryflowResourceFactoryOverriden resource factory, the whole reason for this class.private org.slf4j.LoggerlogClass logger.private FlowDefinitionRegistryparentOptional 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FlowDefinitionRegistrycreateInstance()protected voiddestroyInstance(FlowDefinitionRegistry instance)Class<?>getObjectType()private voidregisterFlow(FlowDefinitionResource resource, FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)Register a flow resource into the registry.private voidregisterFlowLocationPatterns(FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)Register flows derived from resource patterns.private voidregisterFlowLocations(FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)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 Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
flowLocations
@Nonnull @NonnullElements private Map<String,String> flowLocations
Explicit flow mappings from flow ID to resource path.
-
flowLocationPatterns
@Nonnull @NonnullElements 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.
-
flowResourceFactory
@Nullable private FlowDefinitionResourceFactory flowResourceFactory
Overriden resource factory, the whole reason for this class.
-
-
Method Detail
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceFactoryBean<FlowDefinitionRegistry>- Specified by:
getObjectTypein classAbstractFactoryBean<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 @NonnullElements 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 theFlowBuilderServicesto use for defining custom services needed to build the flows registered in this registry.- Parameters:
builderServices- theFlowBuilderServicesinstance
-
setParent
public void setParent(@Nullable FlowDefinitionRegistry parentRegistry)Set a parent registry.- Parameters:
parentRegistry- the parent registry
-
createInstance
protected FlowDefinitionRegistry createInstance() throws Exception
- Specified by:
createInstancein classAbstractFactoryBean<FlowDefinitionRegistry>- Throws:
Exception
-
destroyInstance
protected void destroyInstance(FlowDefinitionRegistry instance) throws Exception
- Overrides:
destroyInstancein 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
private void updateFlowAttributes(@Nonnull LocalAttributeMap<Object> attributes)Update flow attributes with development bit.- Parameters:
attributes- attribute map to update
-
-