public class FragmentSerializer extends Object implements SAXVisitBefore, SAXVisitAfter, DOMVisitBefore, DOMVisitAfter, Producer, VisitLifecycleCleanable
| Constructor and Description |
|---|
FragmentSerializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
executeVisitLifecycleCleanup(Fragment fragment,
ExecutionContext executionContext)
Cleanup the resources allocated by this resource for the specified ExecutionContext.
|
Set<? extends Object> |
getProducts()
Get the set of products produced by this producer instance.
|
FragmentSerializer |
setBindTo(String bindTo)
Set the bind-to beanId for the serialized fragment.
|
FragmentSerializer |
setChildContentOnly(boolean childContentOnly)
Set whether or not the child content only should be serialized.
|
FragmentSerializer |
setOmitXMLDeclaration(boolean omitXMLDeclaration)
Omit the XML Declaration from the serialized fragments.
|
FragmentSerializer |
setRetain(boolean retain)
Retain the fragment bean in the
BeanContext after it's creating fragment
has been processed. |
void |
visitAfter(Element element,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitAfter(SAXElement saxElement,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitBefore(Element element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
void |
visitBefore(SAXElement saxElement,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
@ConfigParam public FragmentSerializer setBindTo(String bindTo)
bindTo - The bind-to beanId for the serialized fragment.@ConfigParam(defaultVal="false") public FragmentSerializer setOmitXMLDeclaration(boolean omitXMLDeclaration)
omitXMLDeclaration - True if the XML declaration is to be omitted, otherwise false.@ConfigParam(defaultVal="false") public FragmentSerializer setChildContentOnly(boolean childContentOnly)
childContentOnly - True if the child content only (exclude
the targeted element itself), otherwise false.@ConfigParam(defaultVal="false") public FragmentSerializer setRetain(boolean retain)
BeanContext after it's creating fragment
has been processed.retain - True if the fragment bean is to be retained in the BeanContext,
otherwise false.public Set<? extends Object> getProducts()
ProducergetProducts in interface Producerpublic void visitBefore(SAXElement saxElement, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitBeforevisitBefore in interface SAXVisitBeforesaxElement - The SAX element being visited.executionContext - Execution context.SmooksException - Event processing failure.IOException - Error writing event to output writer.public void visitAfter(SAXElement saxElement, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitAftervisitAfter in interface SAXVisitAftersaxElement - The SAX element being visited.executionContext - Execution context.SmooksException - Event processing failure.IOException - Error writing event to output writer.public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitBeforevisitBefore in interface DOMVisitBeforeelement - The DOM element being visited.executionContext - Request relative instance.SmooksException - Element processing failure.public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitAftervisitAfter in interface DOMVisitAfterelement - The DOM element being visited.executionContext - Request relative instance.SmooksException - Element processing failure.public void executeVisitLifecycleCleanup(Fragment fragment, ExecutionContext executionContext)
VisitLifecycleCleanableexecuteVisitLifecycleCleanup in interface VisitLifecycleCleanablefragment - The fragment.executionContext - The ExecutionContext.Copyright © 2020. All rights reserved.