public class BeanInstanceCreator extends Object implements DOMElementVisitor, SAXVisitBefore, SAXVisitAfter, ContentDeliveryConfigBuilderLifecycleListener, Producer, VisitLifecycleCleanable
Modifier and Type | Field and Description |
---|---|
static String |
INIT_VAL_EXPRESSION |
Constructor and Description |
---|
BeanInstanceCreator()
Public default constructor.
|
BeanInstanceCreator(String beanId,
Class<?> beanClass)
Public default constructor.
|
BeanInstanceCreator(String beanId,
Class<T> beanClass,
Factory<? extends T> factory)
Public default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
executeVisitLifecycleCleanup(Fragment fragment,
ExecutionContext executionContext)
Cleanup the resources allocated by this resource for the specified ExecutionContext.
|
String |
getBeanId()
Get the beanId of this Bean configuration.
|
BeanRuntimeInfo |
getBeanRuntimeInfo()
Get the bean runtime information.
|
SmooksResourceConfiguration |
getConfig() |
Set<? extends Object> |
getProducts()
Get the set of products produced by this producer instance.
|
void |
handle(ContentDeliveryConfigBuilderLifecycleEvent event)
Event handler.
|
void |
initialize()
Set the resource configuration on the bean populator.
|
String |
toString() |
void |
visitAfter(Element element,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitAfter(ExecutionContext executionContext,
Fragment source) |
void |
visitAfter(SAXElement element,
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 element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
public static final String INIT_VAL_EXPRESSION
public BeanInstanceCreator()
public BeanInstanceCreator(String beanId, Class<?> beanClass)
beanId
- The beanId under which the bean instance is registered in the bean context.beanClass
- The bean runtime class.public String getBeanId()
public SmooksResourceConfiguration getConfig()
@Initialize public void initialize() throws SmooksConfigurationException
SmooksConfigurationException
- Incorrectly configured resource.public void handle(ContentDeliveryConfigBuilderLifecycleEvent event) throws SmooksConfigurationException
ContentDeliveryConfigBuilderLifecycleListener
handle
in interface ContentDeliveryConfigBuilderLifecycleListener
event
- The event.SmooksConfigurationException
- Smooks configuration exception.public BeanRuntimeInfo getBeanRuntimeInfo()
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitBefore
visitBefore
in interface DOMVisitBefore
element
- The DOM element being visited.executionContext
- Request relative instance.SmooksException
- Element processing failure.public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitBefore
visitBefore
in interface SAXVisitBefore
element
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitAfter
visitAfter
in interface DOMVisitAfter
element
- The DOM element being visited.executionContext
- Request relative instance.SmooksException
- Element processing failure.public void visitAfter(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitAfter
visitAfter
in interface SAXVisitAfter
element
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.public void visitAfter(ExecutionContext executionContext, Fragment source)
public Set<? extends Object> getProducts()
Producer
getProducts
in interface Producer
public void executeVisitLifecycleCleanup(Fragment fragment, ExecutionContext executionContext)
VisitLifecycleCleanable
executeVisitLifecycleCleanup
in interface VisitLifecycleCleanable
fragment
- The fragment.executionContext
- The ExecutionContext.Copyright © 2020. All rights reserved.