|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils
class WebMetaUtils extends java.lang.Object
Provides utility methods used to support meta-programming. In particular commons methods to register tag library method invokations as new methods an a given MetaClass.
Method Summary | |
---|---|
static groovy.lang.Closure
|
createAndPrepareCommandObjectAction(groovy.lang.GroovyObject controller, groovy.lang.Closure originalAction, java.lang.String actionName, org.springframework.context.ApplicationContext ctx)
|
static groovy.lang.Closure
|
createCommandObjectBindingAction(org.springframework.context.ApplicationContext ctx)
Creates a command object binding action that can be used to replace an existing action |
static void
|
enhanceCommandObject(org.springframework.context.ApplicationContext ctx, java.lang.Class commandObjectClass)
Enhances a command object with new capabilities such as validation and constraints handling |
static void
|
enhanceTagLibMetaClass(GrailsTagLibClass taglib, TagLibraryLookup gspTagLibraryLookup)
|
static java.util.Map
|
getCommandObjectBindingParams(java.lang.Class commandObjectClass, java.util.Map params)
|
static boolean
|
isCommandObjectAction(groovy.lang.Closure callable)
Checks whether the given action is a command object action |
static groovy.lang.Closure
|
prepareCommandObjectBindingAction(groovy.lang.Closure action, groovy.lang.Closure originalAction, java.lang.String actionName, java.lang.Object controller, org.springframework.context.ApplicationContext ctx)
Prepares a command object binding action for usage |
static void
|
prepareCommandObjectBindingAction(java.lang.reflect.Method action, java.lang.Class[] commandObjectClasses, org.springframework.context.ApplicationContext ctx)
Prepares a command object binding action for usage |
static java.lang.Object
|
registerCommonWebProperties(groovy.lang.MetaClass mc, GrailsApplication application)
This creates the difference dynamic methods and properties on the controllers. |
static java.lang.Object
|
registerMethodMissingForTags(groovy.lang.MetaClass mc, TagLibraryLookup gspTagLibraryLookup, java.lang.String namespace, java.lang.String name)
|
static java.lang.Object
|
registerMethodMissingForTags(groovy.lang.MetaClass mc, org.springframework.context.ApplicationContext ctx, GrailsTagLibClass tagLibraryClass, java.lang.String name)
|
static void
|
registerPropertyMissingForTag(groovy.lang.MetaClass mc, java.lang.String name, java.lang.Object result)
|
static java.lang.Object
|
registerStreamCharBufferMetaClass()
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Method Detail |
---|
static groovy.lang.Closure createAndPrepareCommandObjectAction(groovy.lang.GroovyObject controller, groovy.lang.Closure originalAction, java.lang.String actionName, org.springframework.context.ApplicationContext ctx)
static groovy.lang.Closure createCommandObjectBindingAction(org.springframework.context.ApplicationContext ctx)
ctx
- The ApplicationContext
static void enhanceCommandObject(org.springframework.context.ApplicationContext ctx, java.lang.Class commandObjectClass)
commandObjectClass
- The command object class
static void enhanceTagLibMetaClass(GrailsTagLibClass taglib, TagLibraryLookup gspTagLibraryLookup)
static java.util.Map getCommandObjectBindingParams(java.lang.Class commandObjectClass, java.util.Map params)
static boolean isCommandObjectAction(groovy.lang.Closure callable)
callable
- The action to check
static groovy.lang.Closure prepareCommandObjectBindingAction(groovy.lang.Closure action, groovy.lang.Closure originalAction, java.lang.String actionName, java.lang.Object controller, org.springframework.context.ApplicationContext ctx)
action
- The binding actionoriginalAction
- The original action to be replacecactionName
- The action namecontroller
- The controller
@SuppressWarnings("rawtypes") static void prepareCommandObjectBindingAction(java.lang.reflect.Method action, java.lang.Class[] commandObjectClasses, org.springframework.context.ApplicationContext ctx)
action
- The binding action
static java.lang.Object registerCommonWebProperties(groovy.lang.MetaClass mc, GrailsApplication application)
static java.lang.Object registerMethodMissingForTags(groovy.lang.MetaClass mc, TagLibraryLookup gspTagLibraryLookup, java.lang.String namespace, java.lang.String name)
static java.lang.Object registerMethodMissingForTags(groovy.lang.MetaClass mc, org.springframework.context.ApplicationContext ctx, GrailsTagLibClass tagLibraryClass, java.lang.String name)
static void registerPropertyMissingForTag(groovy.lang.MetaClass mc, java.lang.String name, java.lang.Object result)
static java.lang.Object registerStreamCharBufferMetaClass()
Groovy Documentation