com.scooterframework.tools.generator
Class ControllerScaffoldGenerator

java.lang.Object
  extended by com.scooterframework.tools.common.GeneratorImpl
      extended by com.scooterframework.tools.common.AbstractGenerator
          extended by com.scooterframework.tools.generator.ControllerScaffoldGenerator
All Implemented Interfaces:
Generator
Direct Known Subclasses:
ControllerScaffoldTestGenerator

public class ControllerScaffoldGenerator
extends AbstractGenerator

This class generates controller class code.


Field Summary
protected  java.lang.String connectionName
           
protected  java.lang.String controllerClassName
           
protected  java.lang.String controllerName
           
protected  java.lang.String fullModelClassName
           
protected  boolean hasPrimaryKey
           
protected  java.lang.String modelClassName
           
protected  java.lang.String modelName
           
protected  java.lang.String modelNameCamel
           
protected  boolean noPrefix
           
protected  boolean noSuffix
           
protected  java.lang.String packageLine
           
protected  java.lang.String packageName
           
protected  java.lang.String resourceName
           
 
Fields inherited from class com.scooterframework.tools.common.AbstractGenerator
contextName, frameworkInitiated, 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
ControllerScaffoldGenerator(java.lang.String templateFilePath, java.util.Map<java.lang.String,java.lang.String> props, java.lang.String connName, java.lang.String controller, java.lang.String model)
           
 
Method Summary
protected  java.lang.String getOutputFileName()
           
protected  java.lang.String getRelativePathToOutputFile()
           
protected  java.util.Map<java.lang.String,?> getTemplateProperties()
           
 
Methods inherited from class com.scooterframework.tools.common.AbstractGenerator
generateActiveRecordHomeInstance, getRootPath
 
Methods inherited from class com.scooterframework.tools.common.GeneratorImpl
escape, generate, generate, generate, generate, getProperty, getTemplateContent, getTemplateFileContent, 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

packageLine

protected java.lang.String packageLine

packageName

protected java.lang.String packageName

connectionName

protected java.lang.String connectionName

resourceName

protected java.lang.String resourceName

controllerName

protected java.lang.String controllerName

controllerClassName

protected java.lang.String controllerClassName

modelName

protected java.lang.String modelName

modelNameCamel

protected java.lang.String modelNameCamel

modelClassName

protected java.lang.String modelClassName

fullModelClassName

protected java.lang.String fullModelClassName

hasPrimaryKey

protected boolean hasPrimaryKey

noPrefix

protected boolean noPrefix

noSuffix

protected boolean noSuffix
Constructor Detail

ControllerScaffoldGenerator

public ControllerScaffoldGenerator(java.lang.String templateFilePath,
                                   java.util.Map<java.lang.String,java.lang.String> props,
                                   java.lang.String connName,
                                   java.lang.String controller,
                                   java.lang.String model)
Method Detail

getTemplateProperties

protected java.util.Map<java.lang.String,?> getTemplateProperties()
Specified by:
getTemplateProperties in class GeneratorImpl

getRelativePathToOutputFile

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

getOutputFileName

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