com.scooterframework.tools.common
Class AbstractGenerator

java.lang.Object
  extended by com.scooterframework.tools.common.GeneratorImpl
      extended by com.scooterframework.tools.common.AbstractGenerator
All Implemented Interfaces:
Generator
Direct Known Subclasses:
ConnectionGenerator, ControllerApplicationGenerator, ControllerGenerator, ControllerScaffoldGenerator, ControllerSignonGenerator, ControllerTestGenerator, ModelGenerator, ResourceGenerator, SecureHeaderGenerator, SecureXMLDecoratorGenerator, ViewActionGenerator, ViewLoginGenerator, ViewLogoutGenerator, ViewMainGenerator, ViewScaffoldGenerator

public abstract class AbstractGenerator
extends GeneratorImpl

The is the super class of all app generator classes that need initiation of the application.


Field Summary
protected  java.lang.String contextName
           
static boolean frameworkInitiated
           
protected  EnvConfig wc
           
 
Fields inherited from class com.scooterframework.tools.common.GeneratorImpl
DIRECTORY_NAME_SRC, DIRECTORY_NAME_TEST, FILE_EXTENSION_JAVA, FILE_EXTENSION_JSP, FILE_EXTENSION_PROPERTIES, FILE_EXTENSION_YAML, FUNCTIONAL_TEST, linebreak, templateFilePath, UNIT_TEST
 
Fields inherited from interface com.scooterframework.tools.common.Generator
TEMPLATE_PARSER_Q, TEMPLATE_PARSER_ST, TEMPLATE_PARSER_TYPE
 
Constructor Summary
AbstractGenerator(java.util.Map<java.lang.String,java.lang.String> props)
           
AbstractGenerator(java.lang.String templateFilePath, java.util.Map<java.lang.String,java.lang.String> props)
           
 
Method Summary
protected  ActiveRecord generateActiveRecordHomeInstance(java.lang.String connName, java.lang.String model)
          Generates an ActiveRecord home instance of a model model
protected  java.lang.String getRootPath()
           
 
Methods inherited from class com.scooterframework.tools.common.GeneratorImpl
escape, generate, generate, generate, generate, getOutputFileName, getProperty, getRelativePathToOutputFile, getTemplateContent, getTemplateFileContent, getTemplateProperties, isEmpty, log, processTemplateContent, renderContent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contextName

protected java.lang.String contextName

wc

protected EnvConfig wc

frameworkInitiated

public static boolean frameworkInitiated
Constructor Detail

AbstractGenerator

public AbstractGenerator(java.util.Map<java.lang.String,java.lang.String> props)

AbstractGenerator

public AbstractGenerator(java.lang.String templateFilePath,
                         java.util.Map<java.lang.String,java.lang.String> props)
Method Detail

getRootPath

protected java.lang.String getRootPath()
Specified by:
getRootPath in class GeneratorImpl

generateActiveRecordHomeInstance

protected ActiveRecord generateActiveRecordHomeInstance(java.lang.String connName,
                                                        java.lang.String model)
Generates an ActiveRecord home instance of a model model

Parameters:
connName - db connection name
model - model name of the ActiveRecord class
Returns:
an ActiveRecord home instance of the model model