|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator
public class DefaultGrailsTemplateGenerator
Constructor Summary | |
---|---|
DefaultGrailsTemplateGenerator()
|
|
DefaultGrailsTemplateGenerator(ClassLoader classLoader)
|
Method Summary | |
---|---|
protected groovy.lang.MetaClass |
$getStaticMetaClass()
|
void |
generateController(GrailsDomainClass domainClass,
String destdir)
Generates a controller for the supplied domain class |
void |
generateController(GrailsDomainClass domainClass,
Writer out)
Generates a controller for the specified domain class, writing the result to the specified java.io.Writer instance |
void |
generateView(GrailsDomainClass domainClass,
String viewName,
String destDir)
Generates a view for the specified domain class and view name to the target directory |
void |
generateView(GrailsDomainClass domainClass,
String viewName,
Writer out)
Generates a view for the specified domain class and view name writing the result to the specified java.io.Writer instance |
void |
generateViews(GrailsDomainClass domainClass,
String destdir)
Generates the necessary views for the supplied domain class |
String |
getBasedir()
|
String |
getDomainSuffix()
|
Object |
getEngine()
|
static org.apache.commons.logging.Log |
getLOG()
|
groovy.lang.MetaClass |
getMetaClass()
|
boolean |
getOverwrite()
|
Object |
getProperty(String property)
|
Object |
getRenderEditor()
|
groovy.text.Template |
getRenderEditorTemplate()
|
ResourceLoader |
getResourceLoader()
|
Object |
getTemplateNames()
|
Object |
invokeMethod(String method,
Object arguments)
|
boolean |
isOverwrite()
|
void |
setBasedir(String value)
|
void |
setDomainSuffix(String value)
|
void |
setEngine(Object value)
|
void |
setMetaClass(groovy.lang.MetaClass mc)
|
void |
setOverwrite(boolean value)
Whether the generator should overwrite existing files (defaults to false) |
void |
setProperty(String property,
Object value)
|
void |
setRenderEditor(Object value)
|
void |
setRenderEditorTemplate(groovy.text.Template value)
|
void |
setResourceLoader(ResourceLoader rl)
The resource loader to use to load templates from |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultGrailsTemplateGenerator(ClassLoader classLoader)
public DefaultGrailsTemplateGenerator()
Method Detail |
---|
public static org.apache.commons.logging.Log getLOG()
public String getBasedir()
public void setBasedir(String value)
public boolean getOverwrite()
public boolean isOverwrite()
public void setOverwrite(boolean value)
GrailsTemplateGenerator
setOverwrite
in interface GrailsTemplateGenerator
value
- Whether views should be overwritten when generatingpublic Object getEngine()
public void setEngine(Object value)
public ResourceLoader getResourceLoader()
public groovy.text.Template getRenderEditorTemplate()
public void setRenderEditorTemplate(groovy.text.Template value)
public String getDomainSuffix()
public void setDomainSuffix(String value)
public Object getRenderEditor()
public void setRenderEditor(Object value)
public void setResourceLoader(ResourceLoader rl)
GrailsTemplateGenerator
setResourceLoader
in interface GrailsTemplateGenerator
setResourceLoader
in interface ResourceLoaderAware
rl
- The ResourceLoader instancepublic void generateViews(GrailsDomainClass domainClass, String destdir)
GrailsTemplateGenerator
generateViews
in interface GrailsTemplateGenerator
domainClass
- The DomainClass to generate views fordestdir
- The destination directory to generate views topublic void generateController(GrailsDomainClass domainClass, String destdir)
GrailsTemplateGenerator
generateController
in interface GrailsTemplateGenerator
domainClass
- The DomainClass to generate views fordestdir
- The destination directory to generate views topublic void generateView(GrailsDomainClass domainClass, String viewName, String destDir)
GrailsTemplateGenerator
generateView
in interface GrailsTemplateGenerator
domainClass
- The domain classviewName
- The view namedestDir
- The destinationpublic void generateView(GrailsDomainClass domainClass, String viewName, Writer out)
GrailsTemplateGenerator
generateView
in interface GrailsTemplateGenerator
domainClass
- The domain class to generate views forviewName
- The name of the viewout
- The writer to write topublic void generateController(GrailsDomainClass domainClass, Writer out)
GrailsTemplateGenerator
generateController
in interface GrailsTemplateGenerator
domainClass
- The domain class to generate a controller forout
- The Writer to write topublic Object getTemplateNames()
protected groovy.lang.MetaClass $getStaticMetaClass()
public groovy.lang.MetaClass getMetaClass()
getMetaClass
in interface groovy.lang.GroovyObject
public void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass
in interface groovy.lang.GroovyObject
public Object invokeMethod(String method, Object arguments)
invokeMethod
in interface groovy.lang.GroovyObject
public Object getProperty(String property)
getProperty
in interface groovy.lang.GroovyObject
public void setProperty(String property, Object value)
setProperty
in interface groovy.lang.GroovyObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |