com.tobedevoured.modelcitizen.spring
Class ModelFactoryBean

java.lang.Object
  extended by com.tobedevoured.modelcitizen.ModelFactory
      extended by 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


Constructor Summary
ModelFactoryBean()
           
 
Method Summary
protected  Object createNewInstance(Erector erector)
          Create new instance of model before blueprint values are set.
 void registerBlueprint(Object blueprint)
          Register Blueprints, autowire them from Spring Context if they have the @SpringBlueprint annotation
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
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
 

Constructor Detail

ModelFactoryBean

public ModelFactoryBean()
Method Detail

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.