|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD | |||||||
public interface GrailsTemplateGenerator
Defines methods for generating Grails artifacts from a domain class.
| Method Summary | |
|---|---|
void
|
generateController(GrailsDomainClass domainClass, java.lang.String destDir)
Generates a controller for the supplied domain class. |
void
|
generateController(GrailsDomainClass domainClass, java.io.Writer out)
Generates a controller for the specified domain class, writing the result to the specified java.io.Writer instance. |
void
|
generateView(GrailsDomainClass domainClass, java.lang.String viewName, java.io.Writer out)
Generates a view for the specified domain class and view name writing the result to the specified java.io.Writer instance. |
void
|
generateView(GrailsDomainClass domainClass, java.lang.String viewName, java.lang.String destDir)
Generates a view for the specified domain class and view name to the target directory. |
void
|
generateViews(GrailsDomainClass domainClass, java.lang.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 |
|---|
public void generateController(GrailsDomainClass domainClass, java.lang.String destDir)
domainClass - The DomainClass to generate views fordestDir - The destination directory to generate views to
public void generateController(GrailsDomainClass domainClass, java.io.Writer out)
domainClass - The domain class to generate a controller forout - The Writer to write to
public void generateView(GrailsDomainClass domainClass, java.lang.String viewName, java.io.Writer out)
viewName - The name of the viewout - The writer to write todomainClass - The domain class to generate views for
public void generateView(GrailsDomainClass domainClass, java.lang.String viewName, java.lang.String destDir)
domainClass - The domain classviewName - The view namedestDir - The destination
public void generateViews(GrailsDomainClass domainClass, java.lang.String destDir)
domainClass - The DomainClass to generate views fordestDir - The destination directory to generate views to
public void setOverwrite(boolean shouldOverwrite)
shouldOverwrite - Whether views should be overwritten when generating
public void setResourceLoader(ResourceLoader resourceLoader)
resourceLoader - The ResourceLoader instance
Groovy Documentation