org.thymeleaf.dialect
Class AbstractDialect

Object
  extended by org.thymeleaf.dialect.AbstractDialect
All Implemented Interfaces:
IDialect
Direct Known Subclasses:
AbstractXHTMLEnabledDialect

public abstract class AbstractDialect
extends Object
implements IDialect

Abstract implementation of IDialect that returns empty sets for all dialect components.

Since:
1.0
Author:
Daniel Fernández

Constructor Summary
protected AbstractDialect()
           
 
Method Summary
 Set<IDocTypeResolutionEntry> getDocTypeResolutionEntries()
           Returns the set of DOCTYPE resolution entries.
 Set<IDocTypeTranslation> getDocTypeTranslations()
           Returns the set of DOCTYPE translations.
 Map<String,Object> getExecutionAttributes()
           Returns the execution attributes that will be set during executions of the template engine.
 Set<IProcessor> getProcessors()
           Returns the set of processors.
 boolean isLenient()
          Deprecated. The leniency flag is not used anymore since 2.1.0. Will be removed in 3.0. This method was removed from the IDialect interface and added here as a default implementation in order to allow backwards-compatibility of dialects.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.thymeleaf.dialect.IDialect
getPrefix
 

Constructor Detail

AbstractDialect

protected AbstractDialect()
Method Detail

getProcessors

public Set<IProcessor> getProcessors()
Description copied from interface: IDialect

Returns the set of processors.

Specified by:
getProcessors in interface IDialect
Returns:
the set of processors.

getExecutionAttributes

public Map<String,Object> getExecutionAttributes()
Description copied from interface: IDialect

Returns the execution attributes that will be set during executions of the template engine.

If more than one dialect are set, all of their execution attributes will be added to the available execution attributes map.

Specified by:
getExecutionAttributes in interface IDialect
Returns:
the execution attributes for this dialect.

getDocTypeTranslations

public Set<IDocTypeTranslation> getDocTypeTranslations()
Description copied from interface: IDialect

Returns the set of DOCTYPE translations.

Specified by:
getDocTypeTranslations in interface IDialect
Returns:
the set of DOCTYPE translations.

getDocTypeResolutionEntries

public Set<IDocTypeResolutionEntry> getDocTypeResolutionEntries()
Description copied from interface: IDialect

Returns the set of DOCTYPE resolution entries.

Specified by:
getDocTypeResolutionEntries in interface IDialect
Returns:
the set of DOCTYPE resolution entries.

isLenient

@Deprecated
public boolean isLenient()
Deprecated. The leniency flag is not used anymore since 2.1.0. Will be removed in 3.0. This method was removed from the IDialect interface and added here as a default implementation in order to allow backwards-compatibility of dialects.

Returns whether the dialect is lenient or not. If the dialect is not lenient, then after execution of a template no attributes or elements should exist in the result with the prefix specified by this dialect (an error is raised if such thing happens).

For non-lenient dialects, any xmlns:{prefix} attributes in the document root or any other element will be removed from output. These attributes will not be removed for lenient dialects.

When several dialects act on the same prefix, a prefix will be considered to be lenient if any of the dialects for that prefix is lenient.

Unless it is really required (for instance, in dialects with null prefix), dialects should be non-lenient.

Returns:
true if the dialect is lenient, false if not.


Copyright © 2013 The THYMELEAF team. All Rights Reserved.