Adding ElementProcessor

There is a callback interface com.ibm.btt.element.ElementProcessor. If you want to do something before the factory creates an element, or before the factory initialize an element or after the factory initializes an element, you can implement this interface, and add your implementation to BasicElementFactory.
There is also a predefined ElementProcessor, com.ibm.btt.element.impl.ElementProcessorChain. You can add more than one ElementProcessor with ElementProcessorChain. Following is an example:
<com.ibm.btt.element.impl.ElementProcessorChain id="elementProcessor">
    <list Injection="elementProcessors">
        <yourPackage.YourElementProcessor1 />
        <yourPackage.YourElementProcessor2 />
    </list>
</com.ibm.btt.element.impl.ElementProcessorChain>

You must define it in your TagProvider, together with your element definition. You must use elementprocessors as the id.

Following is the ElementProcessor interface:
public interface ElementProcessor {
	  public Tag beforeCreateElement(Tag tag) throws ElementException;
	  public Object beforeInitializeElement(Tag tag, Object element) throws ElementException;
	  public Object afterInitializeElement(Tag tag, Object element) throws ElementException;
}