Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.scaffolding
Class DefaultGrailsTemplateGenerator

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

All Implemented Interfaces:
  groovy.lang.GroovyObject, GrailsTemplateGenerator, ResourceLoaderAware

    public class DefaultGrailsTemplateGenerator

extends Object
implements GrailsTemplateGenerator, ResourceLoaderAware, groovy.lang.GroovyObject

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

### DefaultGrailsTemplateGenerator

    public DefaultGrailsTemplateGenerator(ClassLoader classLoader)

### DefaultGrailsTemplateGenerator

    public DefaultGrailsTemplateGenerator()

Method Detail

### getLOG

    public static org.apache.commons.logging.Log getLOG()

### getBasedir

    public String getBasedir()

### setBasedir

    public void setBasedir(String value)

### getOverwrite

    public boolean getOverwrite()

### isOverwrite

    public boolean isOverwrite()

### setOverwrite

    public void setOverwrite(boolean value)

  Description copied from interface: `GrailsTemplateGenerator`
  Whether the generator should overwrite existing files (defaults to false)

  Specified by:
    `setOverwrite` in interface `GrailsTemplateGenerator`
  Parameters:
    `value` - Whether views should be overwritten when generating

### getEngine

    public Object getEngine()

### setEngine

    public void setEngine(Object value)

### getResourceLoader

    public ResourceLoader getResourceLoader()

### getRenderEditorTemplate

    public groovy.text.Template getRenderEditorTemplate()

### setRenderEditorTemplate

    public void setRenderEditorTemplate(groovy.text.Template value)

### getDomainSuffix

    public String getDomainSuffix()

### setDomainSuffix

    public void setDomainSuffix(String value)

### getRenderEditor

    public Object getRenderEditor()

### setRenderEditor

    public void setRenderEditor(Object value)

### setResourceLoader

    public void setResourceLoader(ResourceLoader rl)

  Description copied from interface: `GrailsTemplateGenerator`
  The resource loader to use to load templates from

  Specified by:
    `setResourceLoader` in interface `GrailsTemplateGenerator`
  Specified by:
    `setResourceLoader` in interface `ResourceLoaderAware`
  Parameters:
    `rl` - The ResourceLoader instance

### generateViews

    public void generateViews(GrailsDomainClass domainClass,
                              String destdir)

  Description copied from interface: `GrailsTemplateGenerator`
  Generates the necessary views for the supplied domain class

  Specified by:
    `generateViews` in interface `GrailsTemplateGenerator`
  Parameters:
    `domainClass` - The DomainClass to generate views for
    `destdir` - The destination directory to generate views to

### generateController

    public void generateController(GrailsDomainClass domainClass,
                                   String destdir)

  Description copied from interface: `GrailsTemplateGenerator`
  Generates a controller for the supplied domain class

  Specified by:
    `generateController` in interface `GrailsTemplateGenerator`
  Parameters:
    `domainClass` - The DomainClass to generate views for
    `destdir` - The destination directory to generate views to

### generateView

    public void generateView(GrailsDomainClass domainClass,
                             String viewName,
                             String destDir)

  Description copied from interface: `GrailsTemplateGenerator`
  Generates a view for the specified domain class and view name to the target directory

  Specified by:
    `generateView` in interface `GrailsTemplateGenerator`
  Parameters:
    `domainClass` - The domain class
    `viewName` - The view name
    `destDir` - The destination

### generateView

    public void generateView(GrailsDomainClass domainClass,
                             String viewName,
                             Writer out)

  Description copied from interface: `GrailsTemplateGenerator`
  Generates a view for the specified domain class and view name writing the result to the specified java.io.Writer instance

  Specified by:
    `generateView` in interface `GrailsTemplateGenerator`
  Parameters:
    `domainClass` - The domain class to generate views for
    `viewName` - The name of the view
    `out` - The writer to write to

### generateController

    public void generateController(GrailsDomainClass domainClass,
                                   Writer out)

  Description copied from interface: `GrailsTemplateGenerator`
  Generates a controller for the specified domain class, writing the result to the specified java.io.Writer instance

  Specified by:
    `generateController` in interface `GrailsTemplateGenerator`
  Parameters:
    `domainClass` - The domain class to generate a controller for
    `out` - The Writer to write to

### getTemplateNames

    public Object getTemplateNames()

### $getStaticMetaClass

    protected groovy.lang.MetaClass $getStaticMetaClass()

### getMetaClass

    public groovy.lang.MetaClass getMetaClass()

  Specified by:
    `getMetaClass` in interface `groovy.lang.GroovyObject`

### setMetaClass

    public void setMetaClass(groovy.lang.MetaClass mc)

  Specified by:
    `setMetaClass` in interface `groovy.lang.GroovyObject`

### invokeMethod

    public Object invokeMethod(String method,
                               Object arguments)

  Specified by:
    `invokeMethod` in interface `groovy.lang.GroovyObject`

### getProperty

    public Object getProperty(String property)

  Specified by:
    `getProperty` in interface `groovy.lang.GroovyObject`

### setProperty

    public void setProperty(String property,
                            Object value)

  Specified by:
    `setProperty` in interface `groovy.lang.GroovyObject`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2005-2009 The Grails project