public class DefaultConverterConfiguration<C extends Converter> extends java.lang.Object implements ConverterConfiguration<C>
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultConverterConfiguration.Entry |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PRIORITY |
| Constructor and Description |
|---|
DefaultConverterConfiguration() |
DefaultConverterConfiguration(ConverterConfiguration<C> delegate) |
DefaultConverterConfiguration(ConverterConfiguration<C> delegate,
org.codehaus.groovy.grails.support.proxy.ProxyHandler proxyHandler) |
DefaultConverterConfiguration(java.util.List<ObjectMarshaller<C>> oms) |
DefaultConverterConfiguration(java.util.List<ObjectMarshaller<C>> oms,
org.codehaus.groovy.grails.support.proxy.ProxyHandler proxyHandler) |
DefaultConverterConfiguration(org.codehaus.groovy.grails.support.proxy.ProxyHandler proxyHandler) |
| Modifier and Type | Method and Description |
|---|---|
Converter.CircularReferenceBehaviour |
getCircularReferenceBehaviour()
Lookup the configured CircularReferenceBehaviour (how the converter should behave when a circular reference is detected)
|
java.lang.String |
getEncoding()
Lookup the configured default Character encoding for the Converter
|
ObjectMarshaller<C> |
getMarshaller(java.lang.Object o)
Lookup the ObjectMarshaller with the highest priority that support to marshall the given object
|
java.util.List<ObjectMarshaller<C>> |
getOrderedObjectMarshallers()
Retrieve the ordered list of ObjectMarshallers
|
org.codehaus.groovy.grails.support.proxy.ProxyHandler |
getProxyHandler()
Lookup the ProxyHandler used to deal with proxies instances.
|
boolean |
isCacheObjectMarshallerByClass()
Enables caching object marshaller selection by class.
|
boolean |
isPrettyPrint()
Lookup method whether the converter should default to pretty printed output
|
void |
registerObjectMarshaller(java.lang.Class<?> c,
groovy.lang.Closure callable) |
void |
registerObjectMarshaller(java.lang.Class<?> c,
int priority,
groovy.lang.Closure callable) |
void |
registerObjectMarshaller(ObjectMarshaller<C> marshaller) |
void |
registerObjectMarshaller(ObjectMarshaller<C> marshaller,
int priority) |
void |
setCacheObjectMarshallerByClass(boolean cacheObjectMarshallerByClass) |
void |
setCircularReferenceBehaviour(Converter.CircularReferenceBehaviour circularReferenceBehaviour) |
void |
setEncoding(java.lang.String encoding) |
void |
setPrettyPrint(boolean prettyPrint) |
public static final int DEFAULT_PRIORITY
public DefaultConverterConfiguration()
public DefaultConverterConfiguration(ConverterConfiguration<C> delegate)
public DefaultConverterConfiguration(org.codehaus.groovy.grails.support.proxy.ProxyHandler proxyHandler)
public DefaultConverterConfiguration(ConverterConfiguration<C> delegate, org.codehaus.groovy.grails.support.proxy.ProxyHandler proxyHandler)
public DefaultConverterConfiguration(java.util.List<ObjectMarshaller<C>> oms)
public DefaultConverterConfiguration(java.util.List<ObjectMarshaller<C>> oms, org.codehaus.groovy.grails.support.proxy.ProxyHandler proxyHandler)
public java.lang.String getEncoding()
ConverterConfigurationgetEncoding in interface ConverterConfiguration<C extends Converter>public void setEncoding(java.lang.String encoding)
public Converter.CircularReferenceBehaviour getCircularReferenceBehaviour()
ConverterConfigurationgetCircularReferenceBehaviour in interface ConverterConfiguration<C extends Converter>Converter.CircularReferenceBehaviourpublic boolean isPrettyPrint()
ConverterConfigurationisPrettyPrint in interface ConverterConfiguration<C extends Converter>public void setPrettyPrint(boolean prettyPrint)
public java.util.List<ObjectMarshaller<C>> getOrderedObjectMarshallers()
ConverterConfigurationgetOrderedObjectMarshallers in interface ConverterConfiguration<C extends Converter>public void setCircularReferenceBehaviour(Converter.CircularReferenceBehaviour circularReferenceBehaviour)
public void registerObjectMarshaller(ObjectMarshaller<C> marshaller)
public void registerObjectMarshaller(ObjectMarshaller<C> marshaller, int priority)
public void registerObjectMarshaller(java.lang.Class<?> c,
int priority,
groovy.lang.Closure callable)
public void registerObjectMarshaller(java.lang.Class<?> c,
groovy.lang.Closure callable)
public ObjectMarshaller<C> getMarshaller(java.lang.Object o)
ConverterConfigurationgetMarshaller in interface ConverterConfiguration<C extends Converter>o - the object which is about to be convertedpublic org.codehaus.groovy.grails.support.proxy.ProxyHandler getProxyHandler()
ConverterConfigurationgetProxyHandler in interface ConverterConfiguration<C extends Converter>public boolean isCacheObjectMarshallerByClass()
ConverterConfigurationisCacheObjectMarshallerByClass in interface ConverterConfiguration<C extends Converter>public void setCacheObjectMarshallerByClass(boolean cacheObjectMarshallerByClass)