public abstract class GroovyPage extends Script
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.
Modifiers | Name | Description |
---|---|---|
static String |
CODEC_VARNAME |
|
static String |
DEFAULT_NAMESPACE |
|
static Closure<?> |
EMPTY_BODY_CLOSURE |
|
static String |
ENCODE_AS_ATTRIBUTE_NAME |
|
static String |
EXPRESSION_OUT |
|
static String |
EXPRESSION_OUT_STATEMENT |
|
static String |
EXTENSION |
|
static String |
OUT |
|
static String |
OUT_STATEMENT |
|
static String |
PAGE_SCOPE |
|
static String |
PLUGIN_CONTEXT_PATH |
|
static Collection<String> |
RESERVED_NAMES |
|
protected TagLibraryLookup |
gspTagLibraryLookup |
|
protected OutputContext |
outputContext |
Constructor and description |
---|
GroovyPage() |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
applyTagInvocationContextCustomizers(TagInvocationContext tagInvocationContext) |
|
public void |
changeItVariable(Object value) |
|
public void |
cleanup() |
|
public final void |
createClosureForHtmlPart(int partNumber, int bodyClosureIndex) |
|
public final void |
createTagBody(int bodyClosureIndex, Closure<?> bodyClosure) |
|
public Object |
evaluate(String exprText, int lineNumber, Object outerIt, Closure<?> evaluator) In the development environment this method is used to evaluate expressions and improve error reporting |
|
public final Closure<?> |
getBodyClosure(int index) |
|
public final Writer |
getExpressionOut() |
|
public abstract String |
getGroovyPageFileName() |
|
public String[] |
getHtmlParts() |
|
public JspTag |
getJspTag(String uri, String name) |
|
public final Writer |
getOut() |
|
public OutputContext |
getOutputContext() |
|
public final OutputEncodingStack |
getOutputStack() |
|
public String |
getPluginContextPath() |
|
public Object |
getProperty(String property) |
|
protected void |
init() |
|
public void |
initRun(Writer target, OutputContext outputContext, GroovyPageMetaInfo metaInfo) |
|
public final void |
invokeTag(String tagName, String tagNamespace, int lineNumber, Map attrs, int bodyClosureIndex) Attempts to invoke a dynamic tag |
|
protected boolean |
isHtmlPart(String htmlPart) |
|
public static final boolean |
isReservedName(String name) Return whether the given name cannot be used within the binding of a GSP |
|
protected JspTagLib |
lookupJspTagLib(String jspTagLibName) |
|
protected Object |
lookupTagDispatcher(String namespace) |
|
public final void |
printHtmlPart(int partNumber) |
|
public Object |
raw(Object value) |
|
public final void |
registerSitemeshPreprocessMode() |
|
protected Object |
resolveProperty(String property) |
|
public final void |
setBodyClosure(int index, Closure<?> bodyClosure) |
|
public void |
setGspTagLibraryLookup(TagLibraryLookup gspTagLibraryLookup) Sets the GSP tag library lookup class |
|
public void |
setHtmlParts(String[] htmlParts) |
|
public void |
setJspTagLibraryResolver(TagLibraryResolver jspTagLibraryResolver) Sets the JSP tag library resolver to use to resolve JSP tags |
|
public void |
setJspTags(Map jspTags) Sets the JSP tags used by this GroovyPage instance |
|
public void |
setOut(Writer newWriter) |
|
public void |
setPluginContextPath(String pluginContextPath) |
Methods inherited from class | Name |
---|---|
class Script |
equals, evaluate, evaluate, getBinding, getClass, getMetaClass, getProperty, hashCode, invokeMethod, notify, notifyAll, print, printf, printf, println, println, run, run, setBinding, setMetaClass, setProperty, toString, wait, wait, wait |
In the development environment this method is used to evaluate expressions and improve error reporting
exprText
- The expression textlineNumber
- The line numberouterIt
- The other reference to the variable 'it'evaluator
- The expression evaluatorAttempts to invoke a dynamic tag
tagName
- The name of the tagtagNamespace
- The taglib's namespacelineNumber
- GSP source lineNumberattrs
- The tags attributesbodyClosureIndex
- The index of the body variableReturn whether the given name cannot be used within the binding of a GSP
name
- True if it can'tSets the GSP tag library lookup class
gspTagLibraryLookup
- The class used to lookup a GSP tag librarySets the JSP tag library resolver to use to resolve JSP tags
jspTagLibraryResolver
- The JSP tag resolveSets the JSP tags used by this GroovyPage instance
jspTags
- The JSP tags used