Class SimpleValueTagListener

java.lang.Object
de.hybris.bootstrap.xml.DefaultTagListener
de.hybris.bootstrap.xml.SimpleValueTagListener
All Implemented Interfaces:
TagListener
Direct Known Subclasses:
BooleanValueTagListener, ClassValueTagListener, DateTagListener, DoubleValueTagListener, IntegerValueTagListener, StringValueTagListener

public abstract class SimpleValueTagListener extends DefaultTagListener
Base class for simple value tags. This class translates either the character content or the content of a specified value attriute. The returned value is either the translated value or a map which maps the content of a specified mapping attribute to the translated value.

Some examples:

 <foo> value </foo>
 ... would translate into plain 'value', no value attribute
    or mapping attribute must be defined

 <foo bar="value"/>
 ... would translate into 'value' if 'bar' is specified value attribute

 <foo key="k1" bar="value"/>
 ... would translate into { 'k1'=>'value'} if 'bar' is specified value attribute
     and 'key' the specified mapping attribute
 
  • Field Details

  • Constructor Details

    • SimpleValueTagListener

      public SimpleValueTagListener(TagListener parent, String tagName)
      Parameters:
      parent - the parent tag listener
      tagName - the tag name which this listener is bound to
    • SimpleValueTagListener

      public SimpleValueTagListener(TagListener parent, String tagName, String valueAttribute, String mappingAttribute)
      Parameters:
      parent - the parent tag listener
      tagName - the tag name this listener is bound to
      valueAttribute - the xml attribute which contains the value to translate (optional)
      mappingAttribute - the xml attribute name which contains the key for the translated value (optional)
  • Method Details