public class FreeMarkerBeanWriter extends Object implements BeanWriter
Modifier and Type | Field and Description |
---|---|
protected org.smooks.api.ApplicationContext |
appContext |
protected static org.slf4j.Logger |
LOGGER |
static String |
MODEL_CTX_KEY |
protected org.smooks.support.FreeMarkerTemplate |
template |
protected String |
templateConfig |
protected static WriteAttribsDirective |
writeAttribsDirective |
protected static WriteBeanDirective |
writeBeanDirective |
protected static org.smooks.cartridges.javabean.dynamic.serialize.freemarker.WriteNamespacesDirective |
writeNamespacesDirective |
protected static WriteBeanPreTextDirective |
writePreTextDirective |
Constructor and Description |
---|
FreeMarkerBeanWriter() |
Modifier and Type | Method and Description |
---|---|
void |
postConstruct() |
void |
write(Object bean,
Writer writer,
Model model)
Write the specified bean to the supplied writer.
|
protected static final org.slf4j.Logger LOGGER
public static final String MODEL_CTX_KEY
@Inject protected org.smooks.api.ApplicationContext appContext
@Inject @Named(value="template") protected String templateConfig
protected org.smooks.support.FreeMarkerTemplate template
protected static final org.smooks.cartridges.javabean.dynamic.serialize.freemarker.WriteNamespacesDirective writeNamespacesDirective
protected static final WriteBeanDirective writeBeanDirective
protected static final WriteBeanPreTextDirective writePreTextDirective
protected static final WriteAttribsDirective writeAttribsDirective
@PostConstruct public void postConstruct()
public void write(Object bean, Writer writer, Model model) throws BeanRegistrationException, IOException
BeanWriter
write
in interface BeanWriter
bean
- The bean instance.writer
- The target writer.model
- The Model
instance that "owns" the bean.BeanRegistrationException
- Unknown bean instance.IOException
- Error writing bean to writer
.Copyright © 2024. All rights reserved.