public class StandardDialect extends AbstractProcessorDialect implements IExecutionAttributeDialect, IExpressionObjectDialect
Standard Dialect. This is the class containing the implementation of Thymeleaf Standard Dialect, including all th:* processors, expression objects, etc.
Note this dialect uses OGNL as an expression language. There is a Spring-integrated version of the Standard Dialect called the SpringStandard Dialect at the thymeleaf-spring* packages, which uses SpringEL as an expression language.
Note a class with this name existed since 1.0, but it was completely reimplemented in Thymeleaf 3.0
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
static String |
PREFIX |
static int |
PROCESSOR_PRECEDENCE |
Modifier | Constructor and Description |
---|---|
|
StandardDialect() |
protected |
StandardDialect(String name,
String prefix,
int processorPrecedence) |
Modifier and Type | Method and Description |
---|---|
static Set<IProcessor> |
createStandardProcessorsSet(String dialectPrefix)
Create a the set of Standard processors, all of them freshly instanced.
|
IStandardConversionService |
getConversionService()
Returns the Standard Conversion Service (implementation of
IStandardConversionService )
that is configured to be used at this instance of the Standard Dialect. |
IStandardCSSSerializer |
getCSSSerializer()
Returns the Standard CSS Serializer (implementation of
IStandardCSSSerializer )
that is configured to be used at this instance of the Standard Dialect. |
Map<String,Object> |
getExecutionAttributes() |
IExpressionObjectFactory |
getExpressionObjectFactory() |
IStandardExpressionParser |
getExpressionParser()
Returns the Thymeleaf Standard Expression parser (implementation of
IStandardExpressionParser )
that is configured to be used at this instance of the Standard Dialect. |
IStandardJavaScriptSerializer |
getJavaScriptSerializer()
Returns the Standard JavaScript Serializer (implementation of
IStandardJavaScriptSerializer )
that is configured to be used at this instance of the Standard Dialect. |
Set<IProcessor> |
getProcessors(String dialectPrefix) |
IStandardVariableExpressionEvaluator |
getVariableExpressionEvaluator()
Returns the variable expression evaluator (implementation of
IStandardVariableExpressionEvaluator )
that is configured to be used at this instance of the Standard Dialect. |
void |
setConversionService(IStandardConversionService conversionService)
Sets the Standard Conversion Service (implementation of
IStandardConversionService )
that should to be used at this instance of the Standard Dialect. |
void |
setCSSSerializer(IStandardCSSSerializer cssSerializer)
Sets the Standard CSS Serializer (implementation of
IStandardCSSSerializer )
that should to be used at this instance of the Standard Dialect. |
void |
setExpressionParser(IStandardExpressionParser expressionParser)
Sets the Thymeleaf Standard Expression parser (implementation of
IStandardExpressionParser )
that should be used at this instance of the Standard Dialect. |
void |
setJavaScriptSerializer(IStandardJavaScriptSerializer javaScriptSerializer)
Sets the Standard JavaScript Serializer (implementation of
IStandardJavaScriptSerializer )
that should to be used at this instance of the Standard Dialect. |
void |
setVariableExpressionEvaluator(IStandardVariableExpressionEvaluator variableExpressionEvaluator)
Sets the variable expression evaluator (implementation of
IStandardVariableExpressionEvaluator )
that should be used at this instance of the Standard Dialect. |
getDialectProcessorPrecedence, getPrefix
getName
public static final String NAME
public static final String PREFIX
public static final int PROCESSOR_PRECEDENCE
public IStandardVariableExpressionEvaluator getVariableExpressionEvaluator()
Returns the variable expression evaluator (implementation of IStandardVariableExpressionEvaluator
)
that is configured to be used at this instance of the Standard Dialect.
This is used for executing all ${...} and *{...} expressions in Thymeleaf Standard Expressions.
This will be OGNLVariableExpressionEvaluator
by default. When using the Spring Standard
Dialect, this will be a SpringEL-based implementation.
public void setVariableExpressionEvaluator(IStandardVariableExpressionEvaluator variableExpressionEvaluator)
Sets the variable expression evaluator (implementation of IStandardVariableExpressionEvaluator
)
that should be used at this instance of the Standard Dialect.
This is used for executing all ${...} and *{...} expressions in Thymeleaf Standard Expressions.
This will be an OGNLVariableExpressionEvaluator
by default. When using the Spring Standard
Dialect, this will be a SpringEL-based implementation.
This method has no effect once the Template Engine has been initialized.
Objects set here should be thread-safe.
variableExpressionEvaluator
- the new Standard Variable Expression Evaluator object. Cannot be null.public IStandardExpressionParser getExpressionParser()
Returns the Thymeleaf Standard Expression parser (implementation of IStandardExpressionParser
)
that is configured to be used at this instance of the Standard Dialect.
This will be StandardExpressionParser
by default.
public void setExpressionParser(IStandardExpressionParser expressionParser)
Sets the Thymeleaf Standard Expression parser (implementation of IStandardExpressionParser
)
that should be used at this instance of the Standard Dialect.
This will be StandardExpressionParser
by default.
This method has no effect once the Template Engine has been initialized.
Objects set here should be thread-safe.
expressionParser
- the Standard Expression Parser object to be used. Cannot be null.public IStandardConversionService getConversionService()
Returns the Standard Conversion Service (implementation of IStandardConversionService
)
that is configured to be used at this instance of the Standard Dialect.
This will be StandardConversionService
by default. In Spring environments, this will default
to an implementation delegating on Spring's own ConversionService implementation.
public void setConversionService(IStandardConversionService conversionService)
Sets the Standard Conversion Service (implementation of IStandardConversionService
)
that should to be used at this instance of the Standard Dialect.
This will be StandardConversionService
by default. In Spring environments, this will default
to an implementation delegating on Spring's own ConversionService implementation.
This method has no effect once the Template Engine has been initialized.
Objects set here should be thread-safe.
conversionService
- the Standard ConversionService object to be used. Cannot be null.public IStandardJavaScriptSerializer getJavaScriptSerializer()
Returns the Standard JavaScript Serializer (implementation of IStandardJavaScriptSerializer
)
that is configured to be used at this instance of the Standard Dialect.
This will be StandardJavaScriptSerializer
by default.
public void setJavaScriptSerializer(IStandardJavaScriptSerializer javaScriptSerializer)
Sets the Standard JavaScript Serializer (implementation of IStandardJavaScriptSerializer
)
that should to be used at this instance of the Standard Dialect.
This will be StandardJavaScriptSerializer
by default.
This method has no effect once the Template Engine has been initialized.
Objects set here should be thread-safe.
javaScriptSerializer
- the Standard JavaScript Serializer object to be used. Cannot be null.public IStandardCSSSerializer getCSSSerializer()
Returns the Standard CSS Serializer (implementation of IStandardCSSSerializer
)
that is configured to be used at this instance of the Standard Dialect.
This will be StandardCSSSerializer
by default.
public void setCSSSerializer(IStandardCSSSerializer cssSerializer)
Sets the Standard CSS Serializer (implementation of IStandardCSSSerializer
)
that should to be used at this instance of the Standard Dialect.
This will be StandardCSSSerializer
by default.
This method has no effect once the Template Engine has been initialized.
Objects set here should be thread-safe.
cssSerializer
- the Standard CSS Serializer object to be used. Cannot be null.public Map<String,Object> getExecutionAttributes()
getExecutionAttributes
in interface IExecutionAttributeDialect
public IExpressionObjectFactory getExpressionObjectFactory()
getExpressionObjectFactory
in interface IExpressionObjectDialect
public Set<IProcessor> getProcessors(String dialectPrefix)
getProcessors
in interface IProcessorDialect
public static Set<IProcessor> createStandardProcessorsSet(String dialectPrefix)
Create a the set of Standard processors, all of them freshly instanced.
dialectPrefix
- the prefix established for the Standard Dialect, needed for initializationCopyright © 2016 The THYMELEAF team. All rights reserved.