com.scooterframework.tools.generator
Class ViewScaffoldGenerator

java.lang.Object
  extended by com.scooterframework.tools.common.GeneratorImpl
      extended by com.scooterframework.tools.common.AbstractGenerator
          extended by com.scooterframework.tools.generator.ViewScaffoldGenerator
All Implemented Interfaces:
Generator
Direct Known Subclasses:
ViewAddGenerator, ViewEditGenerator, ViewIndexGenerator, ViewPagedGenerator, ViewShowGenerator

public abstract class ViewScaffoldGenerator
extends AbstractGenerator

This class generates a specific action view code.


Field Summary
protected  java.lang.String action
           
protected  java.lang.String connectionName
           
protected  java.lang.String controller
           
protected  java.lang.String modelName
           
protected  ActiveRecord recordHome
           
protected  java.lang.String relativePathToView
           
protected static java.lang.String requiredHtmlText
           
protected  java.lang.String resource
           
protected  java.lang.String viewFileName
           
 
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
ViewScaffoldGenerator(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 abstract  java.lang.String getAction()
           
protected  java.lang.String getOutputFileName()
           
protected  java.lang.String getRelativePathToOutputFile()
           
protected  java.lang.String getRootPath()
           
protected  java.util.Map<java.lang.String,java.lang.Object> getTemplateProperties()
           
 
Methods inherited from class com.scooterframework.tools.common.AbstractGenerator
generateActiveRecordHomeInstance
 
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

requiredHtmlText

protected static final java.lang.String requiredHtmlText
See Also:
Constant Field Values

connectionName

protected java.lang.String connectionName

resource

protected java.lang.String resource

controller

protected java.lang.String controller

modelName

protected java.lang.String modelName

action

protected java.lang.String action

relativePathToView

protected java.lang.String relativePathToView

viewFileName

protected java.lang.String viewFileName

recordHome

protected ActiveRecord recordHome
Constructor Detail

ViewScaffoldGenerator

public ViewScaffoldGenerator(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

getAction

protected abstract java.lang.String getAction()

getTemplateProperties

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

getRootPath

protected java.lang.String getRootPath()
Overrides:
getRootPath in class AbstractGenerator

getRelativePathToOutputFile

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

getOutputFileName

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