com.tobedevoured.modelcitizen.spring
Class ModelFactoryBean
java.lang.Object
com.tobedevoured.modelcitizen.ModelFactory
com.tobedevoured.modelcitizen.spring.ModelFactoryBean
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
public class ModelFactoryBean
- extends ModelFactory
- implements org.springframework.context.ApplicationContextAware
ModelFactory that is Spring aware
| Methods inherited from class com.tobedevoured.modelcitizen.ModelFactory |
addPolicy, createModel, createModel, createModel, createModel, createModel, getBlueprintPolicies, getBlueprints, getErectors, getFieldPolicies, registerBlueprint, registerBlueprint, setRegisterBlueprints, setRegisterBlueprintsByPackage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModelFactoryBean
public ModelFactoryBean()
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
createNewInstance
protected Object createNewInstance(Erector erector)
throws BlueprintTemplateException
- Create new instance of model before blueprint values are set. Autowire them from Spring Context if they have the
- Overrides:
createNewInstance in class ModelFactory
- Parameters:
erector - Erector
- Returns:
- Object
- Throws:
BlueprintTemplateException
registerBlueprint
public void registerBlueprint(Object blueprint)
throws RegisterBlueprintException
- Register Blueprints, autowire them from Spring Context if they have the @SpringBlueprint annotation
- Overrides:
registerBlueprint in class ModelFactory
- Parameters:
blueprint - Blueprint
- Throws:
RegisterBlueprintException
Copyright © 2014. All rights reserved.