org.milyn.javabean
Class BeanInstanceCreator

java.lang.Object
  extended by org.milyn.javabean.BeanInstanceCreator
All Implemented Interfaces:
ContentHandler, DOMElementVisitor, DOMVisitAfter, DOMVisitBefore, DOMVisitor, Producer, SAXVisitAfter, SAXVisitBefore, SAXVisitor, Visitor

public class BeanInstanceCreator
extends Object
implements DOMElementVisitor, SAXVisitBefore, SAXVisitAfter, Producer

Bean instance creator visitor class.

Targeted via BeanPopulator expansion configuration.

Author:
tom.fennelly@gmail.com

Field Summary
static String INIT_VAL_EXPRESSION
           
 
Constructor Summary
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.
 
Method Summary
 String getBeanId()
          Get the beanId of this Bean configuration.
 BeanRuntimeInfo getBeanRuntimeInfo()
          Get the bean runtime information.
 Set<? extends Object> getProducts()
           
 void initialize()
          Set the resource configuration on the bean populator.
 String toString()
           
 void visitAfter(Element element, ExecutionContext executionContext)
           
 void visitAfter(ExecutionContext executionContext)
           
 void visitAfter(SAXElement element, ExecutionContext executionContext)
           
 void visitBefore(Element element, ExecutionContext executionContext)
           
 void visitBefore(SAXElement element, ExecutionContext executionContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INIT_VAL_EXPRESSION

public static final String INIT_VAL_EXPRESSION
See Also:
Constant Field Values
Constructor Detail

BeanInstanceCreator

public BeanInstanceCreator()
Public default constructor.


BeanInstanceCreator

public BeanInstanceCreator(String beanId,
                           Class<?> beanClass)
Public default constructor.

Parameters:
beanId - The beanId under which the bean instance is registered in the bean context.
beanClass - The bean runtime class.

BeanInstanceCreator

public BeanInstanceCreator(String beanId,
                           Class<T> beanClass,
                           Factory<? extends T> factory)
Public default constructor.

Parameters:
beanId - The beanId under which the bean instance is registered in the bean context.
beanClass - The bean runtime class.
Method Detail

getBeanId

public String getBeanId()
Get the beanId of this Bean configuration.

Returns:
The beanId of this Bean configuration.

initialize

@Initialize
public void initialize()
                throws SmooksConfigurationException
Set the resource configuration on the bean populator.

Throws:
SmooksConfigurationException - Incorrectly configured resource.

getBeanRuntimeInfo

public BeanRuntimeInfo getBeanRuntimeInfo()
Get the bean runtime information.

Returns:
The bean runtime information.

visitBefore

public void visitBefore(Element element,
                        ExecutionContext executionContext)
                 throws SmooksException
Specified by:
visitBefore in interface DOMVisitBefore
Throws:
SmooksException

visitBefore

public void visitBefore(SAXElement element,
                        ExecutionContext executionContext)
                 throws SmooksException,
                        IOException
Specified by:
visitBefore in interface SAXVisitBefore
Throws:
SmooksException
IOException

visitAfter

public void visitAfter(Element element,
                       ExecutionContext executionContext)
                throws SmooksException
Specified by:
visitAfter in interface DOMVisitAfter
Throws:
SmooksException

visitAfter

public void visitAfter(SAXElement element,
                       ExecutionContext executionContext)
                throws SmooksException,
                       IOException
Specified by:
visitAfter in interface SAXVisitAfter
Throws:
SmooksException
IOException

visitAfter

public void visitAfter(ExecutionContext executionContext)

getProducts

public Set<? extends Object> getProducts()
Specified by:
getProducts in interface Producer

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010. All Rights Reserved.