org.milyn.javabean.context
Class StaticVariableBinder

java.lang.Object
  extended by org.milyn.javabean.context.StaticVariableBinder
All Implemented Interfaces:
ContentHandler, DOMElementVisitor, DOMVisitAfter, DOMVisitBefore, DOMVisitor, SAXElementVisitor, SAXVisitAfter, SAXVisitBefore, SAXVisitChildren, SAXVisitor, Visitor

public class StaticVariableBinder
extends Object
implements SAXElementVisitor, DOMElementVisitor

Static variable binding visitor.

Binds resource paramater variables into the bean context (managed by the BeanContext). The paramater values are all bound into a bean accessor Map named "statvar", so variables bound in this way can be referenced in expressions or templates as e.g "${statvar.xxx}" (for static variable "xxx").

Author:
tom.fennelly@gmail.com

Constructor Summary
StaticVariableBinder()
           
 
Method Summary
 void initialize()
           
 void onChildElement(SAXElement element, SAXElement childElement, ExecutionContext executionContext)
           
 void onChildText(SAXElement element, SAXText childText, ExecutionContext executionContext)
           
 void visitAfter(Element element, 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, toString, wait, wait, wait
 

Constructor Detail

StaticVariableBinder

public StaticVariableBinder()
Method Detail

initialize

@Initialize
public void initialize()
                throws SmooksConfigurationException
Throws:
SmooksConfigurationException

visitBefore

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

onChildText

public void onChildText(SAXElement element,
                        SAXText childText,
                        ExecutionContext executionContext)
                 throws SmooksException,
                        IOException
Specified by:
onChildText in interface SAXVisitChildren
Throws:
SmooksException
IOException

onChildElement

public void onChildElement(SAXElement element,
                           SAXElement childElement,
                           ExecutionContext executionContext)
                    throws SmooksException,
                           IOException
Specified by:
onChildElement in interface SAXVisitChildren
Throws:
SmooksException
IOException

visitAfter

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

visitBefore

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

visitAfter

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


Copyright © 2010. All Rights Reserved.