Package: org.grails.gsp

## [Java] Class GroovyPage

- org.grails.gsp.GroovyPage

- NOTE: Based on work done by on the GSP standalone project (https://gsp.dev.java.net/)

  Base class for a GroovyPage (at the moment there is nothing in here but could be useful for providing utility methods etc.
  Authors:
    Troy Heninger
    Graeme Rocher
    Lari Hotari

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `CODEC_VARNAME` |
    `static java.lang.String` | `DEFAULT_NAMESPACE` |
    `static groovy.lang.Closure<?>` | `EMPTY_BODY_CLOSURE` |
    `static java.lang.String` | `ENCODE_AS_ATTRIBUTE_NAME` |
    `static java.lang.String` | `EXPRESSION_OUT` |
    `static java.lang.String` | `EXPRESSION_OUT_STATEMENT` |
    `static java.lang.String` | `EXTENSION` |
    `static java.lang.String` | `LINK_NAMESPACE` |
    `static java.lang.String` | `OUT` |
    `static java.lang.String` | `OUT_STATEMENT` |
    `static java.lang.String` | `PAGE_SCOPE` |
    `static java.lang.String` | `PLUGIN_CONTEXT_PATH` |
    `static java.util.Collection<java.lang.String>` | `RESERVED_NAMES` |
    `static java.lang.String` | `TEMPLATE_NAMESPACE` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovyPage ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `changeItVariable(java.lang.Object value)`
    `` | `void` | `cleanup()`
    `` | `void` | `createClosureForHtmlPart(int partNumber, int bodyClosureIndex)`
    `` | `void` | `createTagBody(int bodyClosureIndex, groovy.lang.Closure<?> bodyClosure)`
    `` | `java.lang.Object` | `evaluate(java.lang.String exprText, int lineNumber, java.lang.Object outerIt, groovy.lang.Closure<?> evaluator)` In the development environment this method is used to evaluate expressions and improve error reporting
    `` | `groovy.lang.Closure<?>` | `getBodyClosure(int index)`
    `` | `java.io.Writer` | `getExpressionOut()`
    `` | `java.lang.String` | `getGroovyPageFileName()`
    `` | `java.lang.String[]` | `getHtmlParts()`
    `` | `JspTag` | `getJspTag(java.lang.String uri, java.lang.String name)`
    `` | `java.io.Writer` | `getOut()`
    `` | `OutputContext` | `getOutputContext()`
    `` | `OutputEncodingStack` | `getOutputStack()`
    `` | `java.lang.String` | `getPluginContextPath()`
    `` | `java.lang.Object` | `getProperty(java.lang.String property)`
    `` | `protected void` | `init()`
    `` | `void` | `initRun(java.io.Writer target, OutputContext outputContext, GroovyPageMetaInfo metaInfo)`
    `` | `void` | `invokeTag(java.lang.String tagName, java.lang.String tagNamespace, int lineNumber, java.util.Map attrs, int bodyClosureIndex)` Attempts to invokes a dynamic tag
    `` | `protected boolean` | `isHtmlPart(java.lang.String htmlPart)`
    `` | `static boolean` | `isReservedName(java.lang.String name)` Return whether the given name cannot be used within the binding of a GSP
    `` | `void` | `printHtmlPart(int partNumber)`
    `` | `java.lang.Object` | `raw(java.lang.Object value)`
    `` | `void` | `registerSitemeshPreprocessMode()`
    `` | `void` | `setBodyClosure(int index, groovy.lang.Closure<?> bodyClosure)`
    `` | `void` | `setGspTagLibraryLookup(TagLibraryLookup gspTagLibraryLookup)` Sets the GSP tag library lookup class
    `` | `void` | `setHtmlParts(java.lang.String[] htmlParts)`
    `` | `void` | `setJspTagLibraryResolver(TagLibraryResolver jspTagLibraryResolver)` Sets the JSP tag library resolver to use to resolve JSP tags
    `` | `void` | `setJspTags(java.util.Map jspTags)` Sets the JSP tags used by this GroovyPage instance
    `` | `void` | `setOut(java.io.Writer newWriter)`
    `` | `void` | `setPluginContextPath(java.lang.String pluginContextPath)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class groovy.lang.Script` | `groovy.lang.Script#getBinding(), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#println(), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#run(), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(long), groovy.lang.Script#wait(), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll()`
    `class groovy.lang.GroovyObjectSupport` | `groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()`

- - ### Field Detail

    - #### public static final java.lang.String CODEC_VARNAME

    - #### public static final java.lang.String DEFAULT_NAMESPACE

    - #### public static final groovy.lang.Closure<?> EMPTY_BODY_CLOSURE

    - #### public static final java.lang.String ENCODE_AS_ATTRIBUTE_NAME

    - #### public static final java.lang.String EXPRESSION_OUT

    - #### public static final java.lang.String EXPRESSION_OUT_STATEMENT

    - #### public static final java.lang.String EXTENSION

    - #### public static final java.lang.String LINK_NAMESPACE

    - #### public static final java.lang.String OUT

    - #### public static final java.lang.String OUT_STATEMENT

    - #### public static final java.lang.String PAGE_SCOPE

    - #### public static final java.lang.String PLUGIN_CONTEXT_PATH

    - #### public static final java.util.Collection<java.lang.String> RESERVED_NAMES

    - #### public static final java.lang.String TEMPLATE_NAMESPACE

  - ### Constructor Detail

    - #### public GroovyPage()

  - ### Method Detail

    - #### public void changeItVariable(java.lang.Object value)

    - #### public void cleanup()

    - #### public final void createClosureForHtmlPart(int partNumber, int bodyClosureIndex)

    - #### public final void createTagBody(int bodyClosureIndex, groovy.lang.Closure<?> bodyClosure)

    - #### public java.lang.Object evaluate(java.lang.String exprText, int lineNumber, java.lang.Object outerIt, groovy.lang.Closure<?> evaluator)

      In the development environment this method is used to evaluate expressions and improve error reporting

      Parameters:
        `exprText` - The expression text
        `lineNumber` - The line number
        `outerIt` - The other reference to the variable 'it'
        `evaluator` - The expression evaluator
      Returns:
        The result

    - #### public final groovy.lang.Closure<?> getBodyClosure(int index)

    - #### public final java.io.Writer getExpressionOut()

    - #### public java.lang.String getGroovyPageFileName()

    - #### public java.lang.String[] getHtmlParts()

    - #### public JspTag getJspTag(java.lang.String uri, java.lang.String name)

    - #### public final java.io.Writer getOut()

    - #### public OutputContext getOutputContext()

    - #### public final OutputEncodingStack getOutputStack()

    - #### public java.lang.String getPluginContextPath()

    - #### @java.lang.Override public java.lang.Object getProperty(java.lang.String property)

    - #### protected void init()

    - #### public void initRun(java.io.Writer target, OutputContext outputContext, GroovyPageMetaInfo metaInfo)

    - #### @java.lang.SuppressWarnings({"unchecked", "rawtypes"}) public final void invokeTag(java.lang.String tagName, java.lang.String tagNamespace, int lineNumber, java.util.Map attrs, int bodyClosureIndex)

      Attempts to invokes a dynamic tag

      Parameters:
        `tagName` - The name of the tag
        `tagNamespace` - The taglib's namespace
        `lineNumber` - GSP source lineNumber
        `attrs` - The tags attributes
        `bodyClosureIndex` - The index of the body variable

    - #### protected boolean isHtmlPart(java.lang.String htmlPart)

    - #### public static final boolean isReservedName(java.lang.String name)

      Return whether the given name cannot be used within the binding of a GSP

      Parameters:
        `name` - True if it can't
      Returns:
        A boolean true or false

    - #### public final void printHtmlPart(int partNumber)

    - #### public java.lang.Object raw(java.lang.Object value)

    - #### public final void registerSitemeshPreprocessMode()

    - #### public final void setBodyClosure(int index, groovy.lang.Closure<?> bodyClosure)

    - #### public void setGspTagLibraryLookup(TagLibraryLookup gspTagLibraryLookup)

      Sets the GSP tag library lookup class

      Parameters:
        `gspTagLibraryLookup` - The class used to lookup a GSP tag library

    - #### public void setHtmlParts(java.lang.String[] htmlParts)

    - #### public void setJspTagLibraryResolver(TagLibraryResolver jspTagLibraryResolver)

      Sets the JSP tag library resolver to use to resolve JSP tags

      Parameters:
        `jspTagLibraryResolver` - The JSP tag resolve

    - #### @java.lang.SuppressWarnings("rawtypes") public void setJspTags(java.util.Map jspTags)

      Sets the JSP tags used by this GroovyPage instance

      Parameters:
        `jspTags` - The JSP tags used

    - #### public void setOut(java.io.Writer newWriter)

    - #### public void setPluginContextPath(java.lang.String pluginContextPath)