1 16 package org.springframework.webflow.definition.registry; 17 18 import org.springframework.beans.factory.FactoryBean; 19 import org.springframework.beans.factory.InitializingBean; 20 21 29 public abstract class AbstractFlowDefinitionRegistryFactoryBean implements FactoryBean, InitializingBean { 30 31 34 private FlowDefinitionRegistry registry = createFlowDefinitionRegistry(); 35 36 44 public void setParent(FlowDefinitionRegistry parent) { 45 registry.setParent(parent); 46 } 47 48 50 public final void afterPropertiesSet() throws Exception { 51 init(); 52 doPopulate(registry); 53 } 54 55 57 public Class getObjectType() { 58 return FlowDefinitionRegistry.class; 59 } 60 61 public boolean isSingleton() { 62 return true; 63 } 64 65 public Object getObject() throws Exception { 66 return getRegistry(); 68 } 69 70 73 public FlowDefinitionRegistry getRegistry() { 74 return registry; 75 } 76 77 79 85 protected FlowDefinitionRegistry createFlowDefinitionRegistry() { 86 return new FlowDefinitionRegistryImpl(); 87 } 88 89 95 protected void init() { 96 } 97 98 102 protected abstract void doPopulate(FlowDefinitionRegistry registry); 103 104 } | Popular Tags |