org.thymeleaf.standard.processor.attr
Class StandardLangXmlLangAttrProcessor

Object
  extended by org.thymeleaf.processor.attr.AbstractAttrProcessor
      extended by org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor
          extended by org.thymeleaf.standard.processor.attr.AbstractStandardSingleValueMultipleAttributeModifierAttrProcessor
              extended by org.thymeleaf.standard.processor.attr.StandardLangXmlLangAttrProcessor
All Implemented Interfaces:
Comparable<IAttrProcessor>, IAttrProcessor

public final class StandardLangXmlLangAttrProcessor
extends AbstractStandardSingleValueMultipleAttributeModifierAttrProcessor

Since:
1.0
Author:
Daniel Fernández

Nested Class Summary
 
Nested classes/interfaces inherited from class org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor
AbstractAttributeModifierAttrProcessor.ModificationType
 
Field Summary
static String ATTR_NAME
           
static Integer ATTR_PRECEDENCE
           
static Set<String> TARGET_ATTR_NAMES
           
 
Constructor Summary
StandardLangXmlLangAttrProcessor()
           
 
Method Summary
 Set<AttrApplicability> getAttributeApplicabilities()
           Return the attribute applicabilities.
protected  AbstractAttributeModifierAttrProcessor.ModificationType getModificationType(Arguments arguments, TemplateResolution templateResolution, Document document, Element element, Attr attribute, String attributeName, String attributeValue, String newAttributeName)
           
protected  Set<String> getNewAttributeNames(Arguments arguments, TemplateResolution templateResolution, Document document, Element element, Attr attribute, String attributeName, String attributeValue, StandardSyntax.Value value)
           
 Integer getPrecedence()
           Return this processor's precedence.
protected  boolean removeAttributeIfEmpty(Arguments arguments, TemplateResolution templateResolution, Document document, Element element, Attr attribute, String attributeName, String attributeValue, String newAttributeName)
           
 
Methods inherited from class org.thymeleaf.standard.processor.attr.AbstractStandardSingleValueMultipleAttributeModifierAttrProcessor
getNewAttributeValues, getValueProcessorDependencies
 
Methods inherited from class org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor
process
 
Methods inherited from class org.thymeleaf.processor.attr.AbstractAttrProcessor
compareTo, getMessage, getMessageForProcessor, getMessageForTemplate
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_PRECEDENCE

public static final Integer ATTR_PRECEDENCE

ATTR_NAME

public static final String ATTR_NAME
See Also:
Constant Field Values

TARGET_ATTR_NAMES

public static final Set<String> TARGET_ATTR_NAMES
Constructor Detail

StandardLangXmlLangAttrProcessor

public StandardLangXmlLangAttrProcessor()
Method Detail

getAttributeApplicabilities

public Set<AttrApplicability> getAttributeApplicabilities()
Description copied from interface: IAttrProcessor

Return the attribute applicabilities.

These applicabilities (a set of AttrApplicability objects) specify the cases in which this attribute processor would be executed. This must at least include an attribute name (execute if attribute name is A) and can also include tag names (execute if attribute name is A and it is set in a tag with name T), companion attributes with values (execute if attribute name is A and it is set in a tag with name T which has an attribute A2 with value V), etc.

Refer to the AttrApplicability API for more details.

Returns:
the attribute applicabilities.

getPrecedence

public Integer getPrecedence()
Description copied from interface: IAttrProcessor

Return this processor's precedence.

When a tag includes several attributes that have an attribute processor associated, the precedences of these processors establish the order in which they will be executed (lowest precedence value is first). This is important because each attribute processor will be able to see the results of the previously executed ones.

Returns:
the processor's precedence (lowest will be executed first).

getNewAttributeNames

protected Set<String> getNewAttributeNames(Arguments arguments,
                                           TemplateResolution templateResolution,
                                           Document document,
                                           Element element,
                                           Attr attribute,
                                           String attributeName,
                                           String attributeValue,
                                           StandardSyntax.Value value)
Specified by:
getNewAttributeNames in class AbstractStandardSingleValueMultipleAttributeModifierAttrProcessor

getModificationType

protected AbstractAttributeModifierAttrProcessor.ModificationType getModificationType(Arguments arguments,
                                                                                      TemplateResolution templateResolution,
                                                                                      Document document,
                                                                                      Element element,
                                                                                      Attr attribute,
                                                                                      String attributeName,
                                                                                      String attributeValue,
                                                                                      String newAttributeName)
Specified by:
getModificationType in class AbstractAttributeModifierAttrProcessor

removeAttributeIfEmpty

protected boolean removeAttributeIfEmpty(Arguments arguments,
                                         TemplateResolution templateResolution,
                                         Document document,
                                         Element element,
                                         Attr attribute,
                                         String attributeName,
                                         String attributeValue,
                                         String newAttributeName)
Specified by:
removeAttributeIfEmpty in class AbstractAttributeModifierAttrProcessor


Copyright © 2011 The THYMELEAF team. All Rights Reserved.