public class XML extends AbstractConverter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter> implements org.codehaus.groovy.grails.web.converters.IncludeExcludeConverter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>
| Modifier and Type | Class and Description |
|---|---|
class |
XML.Builder |
Converter.CircularReferenceBehaviour| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
log |
contentType, excludes, includesDEFAULT_REQUEST_ENCODING| Constructor and Description |
|---|
XML() |
XML(java.lang.Object target) |
XML(org.codehaus.groovy.grails.web.xml.XMLStreamWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
XML |
attribute(java.lang.String name,
java.lang.String value) |
void |
build(groovy.lang.Closure c) |
XML |
chars(java.lang.String chars) |
void |
convertAnother(java.lang.Object o) |
static void |
createNamedConfig(java.lang.String name,
groovy.lang.Closure<?> callable) |
XML |
end() |
int |
getDepth() |
java.lang.String |
getElementName(java.lang.Object o) |
static ConverterConfiguration<XML> |
getNamedConfig(java.lang.String configName) |
org.codehaus.groovy.grails.web.xml.StreamingMarkupWriter |
getStream() |
org.codehaus.groovy.grails.web.xml.XMLStreamWriter |
getWriter() |
protected void |
handleCircularRelationship(java.lang.Object o) |
protected ConverterConfiguration<XML> |
initConfig() |
ObjectMarshaller<XML> |
lookupObjectMarshaller(java.lang.Object target) |
static java.lang.Object |
parse(javax.servlet.http.HttpServletRequest request)
Parses the give XML (read from the POST Body of the Request)
|
static java.lang.Object |
parse(java.io.InputStream is,
java.lang.String encoding)
Parses the given XML
|
static java.lang.Object |
parse(java.lang.String source)
Parses the given XML
|
static void |
registerObjectMarshaller(java.lang.Class<?> clazz,
groovy.lang.Closure<?> callable) |
static void |
registerObjectMarshaller(java.lang.Class<?> clazz,
int priority,
groovy.lang.Closure<?> callable) |
static void |
registerObjectMarshaller(ObjectMarshaller<XML> om) |
static void |
registerObjectMarshaller(ObjectMarshaller<XML> om,
int priority) |
void |
render(javax.servlet.http.HttpServletResponse response)
Marshalls the target and writes it a HttpServletResponse
The response will be comitted after this operation
|
void |
render(java.io.Writer out)
Marshalls the target and writes it to a java.io.Writer
|
void |
setExcludes(java.util.List<java.lang.String> excludes) |
void |
setIncludes(java.util.List<java.lang.String> includes) |
void |
setTarget(java.lang.Object target) |
XML |
startNode(java.lang.String tagName) |
java.lang.String |
toString() |
static void |
use(java.lang.String cfgName) |
static java.lang.Object |
use(java.lang.String configName,
groovy.lang.Closure<?> callable) |
static void |
withDefaultConfiguration(groovy.lang.Closure<?> callable) |
createBeanWrapper, getExcludes, getIncludes, setContentType, setEncoding, setExcludes, setIncludespublic XML()
public XML(java.lang.Object target)
public XML(org.codehaus.groovy.grails.web.xml.XMLStreamWriter writer)
protected ConverterConfiguration<XML> initConfig()
public void setTarget(java.lang.Object target)
setTarget in class AbstractConverter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>public void render(java.io.Writer out)
throws ConverterException
Converterrender in interface Converter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>out - The Writer to write toConverterExceptionpublic java.lang.String getElementName(java.lang.Object o)
public void convertAnother(java.lang.Object o)
throws ConverterException
convertAnother in interface Converter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>ConverterExceptionpublic ObjectMarshaller<XML> lookupObjectMarshaller(java.lang.Object target)
lookupObjectMarshaller in interface Converter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>public int getDepth()
public XML startNode(java.lang.String tagName)
public XML chars(java.lang.String chars)
public XML attribute(java.lang.String name, java.lang.String value)
public XML end()
protected void handleCircularRelationship(java.lang.Object o)
throws ConverterException
ConverterExceptionpublic void render(javax.servlet.http.HttpServletResponse response)
throws ConverterException
Converterrender in interface Converter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>response - The response to write toConverterExceptionpublic org.codehaus.groovy.grails.web.xml.XMLStreamWriter getWriter()
throws ConverterException
getWriter in interface Converter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>ConverterExceptionpublic org.codehaus.groovy.grails.web.xml.StreamingMarkupWriter getStream()
public void build(groovy.lang.Closure c)
throws ConverterException
build in interface Converter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>ConverterExceptionpublic java.lang.String toString()
toString in class AbstractConverter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>public static java.lang.Object parse(java.lang.String source)
throws ConverterException
source - a String containing some XMLConverterExceptionpublic static java.lang.Object parse(java.io.InputStream is,
java.lang.String encoding)
throws ConverterException
is - an InputStream to read fromencoding - the Character Encoding to useConverterExceptionpublic static java.lang.Object parse(javax.servlet.http.HttpServletRequest request)
throws ConverterException
request - an HttpServletRequestConverterExceptionpublic static ConverterConfiguration<XML> getNamedConfig(java.lang.String configName) throws ConverterException
ConverterExceptionpublic static java.lang.Object use(java.lang.String configName,
groovy.lang.Closure<?> callable)
throws ConverterException
ConverterExceptionpublic static void use(java.lang.String cfgName)
throws ConverterException
ConverterExceptionpublic static void registerObjectMarshaller(java.lang.Class<?> clazz,
groovy.lang.Closure<?> callable)
throws ConverterException
ConverterExceptionpublic static void registerObjectMarshaller(java.lang.Class<?> clazz,
int priority,
groovy.lang.Closure<?> callable)
throws ConverterException
ConverterExceptionpublic static void registerObjectMarshaller(ObjectMarshaller<XML> om) throws ConverterException
ConverterExceptionpublic static void registerObjectMarshaller(ObjectMarshaller<XML> om, int priority) throws ConverterException
ConverterExceptionpublic static void createNamedConfig(java.lang.String name,
groovy.lang.Closure<?> callable)
throws ConverterException
ConverterExceptionpublic static void withDefaultConfiguration(groovy.lang.Closure<?> callable)
throws ConverterException
ConverterExceptionpublic void setIncludes(java.util.List<java.lang.String> includes)
setIncludes in interface org.codehaus.groovy.grails.web.converters.IncludeExcludeConverter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>public void setExcludes(java.util.List<java.lang.String> excludes)
setExcludes in interface org.codehaus.groovy.grails.web.converters.IncludeExcludeConverter<org.codehaus.groovy.grails.web.xml.XMLStreamWriter>