|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GrailsTemplateGenerator
An interface that defines methods for generating Grails artifacts from a domain class
Method Summary | |
---|---|
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,
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 |
void |
setOverwrite(boolean shouldOverwrite)
Whether the generator should overwrite existing files (defaults to false) |
void |
setResourceLoader(ResourceLoader resourceLoader)
The resource loader to use to load templates from |
Method Detail |
---|
void setResourceLoader(ResourceLoader resourceLoader)
resourceLoader
- The ResourceLoader instancevoid generateViews(GrailsDomainClass domainClass, String destDir)
domainClass
- The DomainClass to generate views fordestDir
- The destination directory to generate views tovoid generateController(GrailsDomainClass domainClass, String destDir)
domainClass
- The DomainClass to generate views fordestDir
- The destination directory to generate views tovoid setOverwrite(boolean shouldOverwrite)
shouldOverwrite
- Whether views should be overwritten when generatingvoid generateView(GrailsDomainClass domainClass, String viewName, Writer out)
viewName
- The name of the viewout
- The writer to write todomainClass
- The domain class to generate views forvoid generateController(GrailsDomainClass domainClass, Writer out)
domainClass
- The domain class to generate a controller forout
- The Writer to write to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |