com.acciente.induction.dispatcher.model
Class ModelFactory

java.lang.Object
  extended by com.acciente.induction.dispatcher.model.ModelFactory

public class ModelFactory
extends Object

Internal. This class is the factory used to instantiate new Model object instances

Author:
Adinath Raveendra Raj

Constructor Summary
ModelFactory(ClassLoader oClassLoader, javax.servlet.ServletConfig oServletConfig, Config.FileUpload oFileUploadConfig)
           
 
Method Summary
 Object createModel(Config.ModelDefs.ModelDef oModelDef, javax.servlet.http.HttpServletRequest oHttpServletRequest)
           
 Object createSystemModel(Class oSystemModelClass, javax.servlet.http.HttpServletRequest oHttpServletRequest)
           
 boolean isModelStale(Config.ModelDefs.ModelDef oModelDef, Object oModel)
           
 void setModelPool(ModelPool oModelPool)
          Used to set a model pool for use in model-to-model dendency injection (note the cyclic relationship between ModelFactory class and the ModelPool class, also the same relationship between the object instances)
 void setRedirectResolver(RedirectResolverExecutor oRedirectResolverExecutor)
          This method exists to set the redirect resolver after construction of the model factory since there is a cyclic dependency between the redirect resolver and the model factory
 void setTemplatingEngine(TemplatingEngine oTemplatingEngine)
          This method exists to set the templating engine after construction of the model factory since there is a cyclic dependency between the templating engine and the model factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelFactory

public ModelFactory(ClassLoader oClassLoader,
                    javax.servlet.ServletConfig oServletConfig,
                    Config.FileUpload oFileUploadConfig)
Method Detail

setModelPool

public void setModelPool(ModelPool oModelPool)
Used to set a model pool for use in model-to-model dendency injection (note the cyclic relationship between ModelFactory class and the ModelPool class, also the same relationship between the object instances)

Parameters:
oModelPool - a model pool instance

setRedirectResolver

public void setRedirectResolver(RedirectResolverExecutor oRedirectResolverExecutor)
This method exists to set the redirect resolver after construction of the model factory since there is a cyclic dependency between the redirect resolver and the model factory

Parameters:
oRedirectResolverExecutor - the redirect resolver

setTemplatingEngine

public void setTemplatingEngine(TemplatingEngine oTemplatingEngine)
This method exists to set the templating engine after construction of the model factory since there is a cyclic dependency between the templating engine and the model factory

Parameters:
oTemplatingEngine - the redirect resolver

createModel

public Object createModel(Config.ModelDefs.ModelDef oModelDef,
                          javax.servlet.http.HttpServletRequest oHttpServletRequest)
                   throws InvocationTargetException,
                          ConstructorNotFoundException,
                          com.acciente.commons.reflect.ParameterProviderException,
                          IllegalAccessException,
                          InstantiationException,
                          MethodNotFoundException,
                          ClassNotFoundException
Throws:
InvocationTargetException
ConstructorNotFoundException
com.acciente.commons.reflect.ParameterProviderException
IllegalAccessException
InstantiationException
MethodNotFoundException
ClassNotFoundException

isModelStale

public boolean isModelStale(Config.ModelDefs.ModelDef oModelDef,
                            Object oModel)
                     throws ClassNotFoundException,
                            ConstructorNotFoundException,
                            InvocationTargetException,
                            IllegalAccessException,
                            InstantiationException
Throws:
ClassNotFoundException
ConstructorNotFoundException
InvocationTargetException
IllegalAccessException
InstantiationException

createSystemModel

public Object createSystemModel(Class oSystemModelClass,
                                javax.servlet.http.HttpServletRequest oHttpServletRequest)


Copyright © 2008-2013 Acciente, LLC. All Rights Reserved.