|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.web.converters.AbstractConverter<XMLStreamWriter> grails.converters.XML
public class XML
A converter that converts domain classes to XML
Nested Class Summary | |
---|---|
class |
XML.Builder
|
Nested classes/interfaces inherited from interface org.codehaus.groovy.grails.web.converters.Converter |
---|
Converter.CircularReferenceBehaviour |
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
log
|
Fields inherited from interface org.codehaus.groovy.grails.web.converters.Converter |
---|
DEFAULT_REQUEST_ENCODING |
Constructor Summary | |
---|---|
XML()
|
|
XML(Object target)
|
Method Summary | |
---|---|
XML |
attribute(String name,
String value)
|
void |
build(groovy.lang.Closure c)
|
XML |
chars(String chars)
|
void |
convertAnother(Object o)
|
static void |
createNamedConfig(String name,
groovy.lang.Closure callable)
|
XML |
end()
|
int |
getDepth()
|
String |
getElementName(Object o)
|
static ConverterConfiguration<XML> |
getNamedConfig(String configName)
|
StreamingMarkupWriter |
getStream()
|
XMLStreamWriter |
getWriter()
|
protected void |
handleCircularRelationship(Object o)
|
protected ConverterConfiguration<XML> |
initConfig()
|
ObjectMarshaller<XML> |
lookupObjectMarshaller(Object target)
|
static Object |
parse(HttpServletRequest request)
Parses the give XML (read from the POST Body of the Request) |
static Object |
parse(InputStream is,
String encoding)
Parses the given XML |
static Object |
parse(String source)
Parses the given XML |
static void |
registerObjectMarshaller(Class clazz,
groovy.lang.Closure callable)
|
static void |
registerObjectMarshaller(Class clazz,
int priority,
groovy.lang.Closure callable)
|
static void |
registerObjectMarshaller(ObjectMarshaller<XML> om)
|
static void |
registerObjectMarshaller(ObjectMarshaller<XML> om,
int priority)
|
void |
render(HttpServletResponse response)
Marshalls the target and writes it a HttpServletResponse The response will be comitted after this operation |
void |
render(Writer out)
Marshalls the target and writes it to a java.io.Writer |
void |
setTarget(Object target)
|
XML |
startNode(String tagName)
|
String |
toString()
Renders the result to a String and returns it |
static void |
use(String cfgName)
|
static Object |
use(String configName,
groovy.lang.Closure callable)
|
static void |
withDefaultConfiguration(groovy.lang.Closure callable)
|
Methods inherited from class org.codehaus.groovy.grails.web.converters.AbstractConverter |
---|
createBeanWrapper |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log log
Constructor Detail |
---|
public XML()
public XML(Object target)
Method Detail |
---|
protected ConverterConfiguration<XML> initConfig()
public void setTarget(Object target)
setTarget
in class AbstractConverter<XMLStreamWriter>
public void render(Writer out) throws ConverterException
Converter
render
in interface Converter<XMLStreamWriter>
out
- The Writer to write to
ConverterException
public String getElementName(Object o)
public void convertAnother(Object o) throws ConverterException
convertAnother
in interface Converter<XMLStreamWriter>
ConverterException
public ObjectMarshaller<XML> lookupObjectMarshaller(Object target)
lookupObjectMarshaller
in interface Converter<XMLStreamWriter>
public int getDepth()
public XML startNode(String tagName)
public XML chars(String chars)
public XML attribute(String name, String value)
public XML end()
protected void handleCircularRelationship(Object o) throws ConverterException
ConverterException
public void render(HttpServletResponse response) throws ConverterException
Converter
render
in interface Converter<XMLStreamWriter>
response
- The response to write to
ConverterException
public XMLStreamWriter getWriter() throws ConverterException
getWriter
in interface Converter<XMLStreamWriter>
ConverterException
public StreamingMarkupWriter getStream()
public void build(groovy.lang.Closure c) throws ConverterException
build
in interface Converter<XMLStreamWriter>
ConverterException
public String toString()
AbstractConverter
toString
in class AbstractConverter<XMLStreamWriter>
public static Object parse(String source) throws ConverterException
source
- a String containing some XML
ConverterException
public static Object parse(InputStream is, String encoding) throws ConverterException
is
- an InputStream to read fromencoding
- the Character Encoding to use
ConverterException
public static Object parse(HttpServletRequest request) throws ConverterException
request
- an HttpServletRequest
ConverterException
public static ConverterConfiguration<XML> getNamedConfig(String configName) throws ConverterException
ConverterException
public static Object use(String configName, groovy.lang.Closure callable) throws ConverterException
ConverterException
public static void use(String cfgName) throws ConverterException
ConverterException
public static void registerObjectMarshaller(Class clazz, groovy.lang.Closure callable) throws ConverterException
ConverterException
public static void registerObjectMarshaller(Class clazz, int priority, groovy.lang.Closure callable) throws ConverterException
ConverterException
public static void registerObjectMarshaller(ObjectMarshaller<XML> om) throws ConverterException
ConverterException
public static void registerObjectMarshaller(ObjectMarshaller<XML> om, int priority) throws ConverterException
ConverterException
public static void createNamedConfig(String name, groovy.lang.Closure callable) throws ConverterException
ConverterException
public static void withDefaultConfiguration(groovy.lang.Closure callable) throws ConverterException
ConverterException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |