DefaultGrailsTemplateGenerator (Grails 2.2.5)
Date: 2014-03-04

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.scaffolding
[Groovy] Class DefaultGrailsTemplateGenerator

    java.lang.Object
      org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator

All Implemented Interfaces:
  GrailsTemplateGenerator, PluginManagerAware, org.springframework.context.ResourceLoaderAware

    class DefaultGrailsTemplateGenerator
    extends java.lang.Object

Default implementation of the generator that generates grails artifacts (controllers, views etc.) from the domain model.

Authors:
  Graeme Rocher

Property Summary
`static org.apache.commons.logging.Log` | `LOG`
`java.lang.String` | `basedir`
`java.lang.String` | `domainSuffix`
`java.lang.Object` | `engine`
`GrailsApplication` | `grailsApplication`
`boolean` | `overwrite`
`GrailsPluginManager` | `pluginManager`
`java.lang.Object` | `renderEditor`
`groovy.text.Template` | `renderEditorTemplate`
`org.springframework.core.io.ResourceLoader` | `resourceLoader`

Constructor Summary
`DefaultGrailsTemplateGenerator(java.lang.ClassLoader classLoader)` Used by the scripts so that they can pass in their AntBuilder instance.
`DefaultGrailsTemplateGenerator()` Default constructor.

Method Summary
`void` | `generateController(GrailsDomainClass domainClass, java.lang.String destdir)`
`void` | `generateController(GrailsDomainClass domainClass, java.io.Writer out)`
`void` | `generateTest(GrailsDomainClass domainClass, java.lang.String destDir)`
`void` | `generateView(GrailsDomainClass domainClass, java.lang.String viewName, java.lang.String destDir)`
`void` | `generateView(GrailsDomainClass domainClass, java.lang.String viewName, java.io.Writer out)`
`void` | `generateViews(GrailsDomainClass domainClass, java.lang.String destdir)`
`java.lang.Object` | `getTemplateNames()`
`org.springframework.core.io.AbstractResource` | `getTemplateResource(java.lang.String template)`
`java.lang.Object` | `getTemplateText(java.lang.String template)`
`static java.lang.String` | `makeRelativeIfPossible(java.lang.String fileName, java.lang.String base = System.getProperty("base.dir")`
`void` | `setGrailsApplication(GrailsApplication ga)`
`void` | `setResourceLoader(org.springframework.core.io.ResourceLoader rl)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### LOG

    static final org.apache.commons.logging.Log LOG

### basedir

    java.lang.String basedir

### domainSuffix

    java.lang.String domainSuffix

### engine

    java.lang.Object engine

### grailsApplication

    GrailsApplication grailsApplication

### overwrite

    boolean overwrite

### pluginManager

    GrailsPluginManager pluginManager

### renderEditor

    java.lang.Object renderEditor

### renderEditorTemplate

    groovy.text.Template renderEditorTemplate

### resourceLoader

    org.springframework.core.io.ResourceLoader resourceLoader

Constructor Detail

### DefaultGrailsTemplateGenerator

    DefaultGrailsTemplateGenerator(java.lang.ClassLoader classLoader)

  Used by the scripts so that they can pass in their AntBuilder instance.

### DefaultGrailsTemplateGenerator

    DefaultGrailsTemplateGenerator()

  Default constructor.

Method Detail

### generateController

    void generateController(GrailsDomainClass domainClass, java.lang.String destdir)

### generateController

    void generateController(GrailsDomainClass domainClass, java.io.Writer out)

### generateTest

    void generateTest(GrailsDomainClass domainClass, java.lang.String destDir)

### generateView

    void generateView(GrailsDomainClass domainClass, java.lang.String viewName, java.lang.String destDir)

### generateView

    void generateView(GrailsDomainClass domainClass, java.lang.String viewName, java.io.Writer out)

### generateViews

    void generateViews(GrailsDomainClass domainClass, java.lang.String destdir)

### getTemplateNames

    java.lang.Object getTemplateNames()

### getTemplateResource

    org.springframework.core.io.AbstractResource getTemplateResource(java.lang.String template)

### getTemplateText

    java.lang.Object getTemplateText(java.lang.String template)

### makeRelativeIfPossible

    static java.lang.String makeRelativeIfPossible(java.lang.String fileName, java.lang.String base = System.getProperty("base.dir")

### setGrailsApplication

    void setGrailsApplication(GrailsApplication ga)

### setResourceLoader

    void setResourceLoader(org.springframework.core.io.ResourceLoader rl)

Groovy Documentation