org.thymeleaf.testing.templateengine.engine.resolver
Class TestTemplateResolver

Object
  extended by org.thymeleaf.testing.templateengine.engine.resolver.TestTemplateResolver
All Implemented Interfaces:
org.thymeleaf.templateresolver.ITemplateResolver

public class TestTemplateResolver
extends Object
implements org.thymeleaf.templateresolver.ITemplateResolver


Field Summary
static String TEST_TEMPLATE_CONVERSION_CHARSET
           
 
Constructor Summary
TestTemplateResolver()
           
 
Method Summary
protected  void checkInitialized()
           Check the template resolver is initialized, and throw an exception if it is not.
protected  void checkNotInitialized()
           Check the template resolver is not initialized, and throw an exception if it is.
 String getName()
           Returns the name of the template resolver
 Integer getOrder()
           Returns the order in which this template resolver will be asked to resolve templates as a part of the chain of resolvers configured into the template engine.
 void initialize()
           Initialize this template resolver.
protected  void initializeSpecific()
           Initialize specific aspects of a subclass.
protected  boolean isInitialized()
           
 org.thymeleaf.templateresolver.TemplateResolution resolveTemplate(org.thymeleaf.TemplateProcessingParameters templateProcessingParameters)
           
 void setName(String name)
           Sets a new name for the Template Resolver.
 void setOrder(Integer order)
           Sets a new order for the template engine in the chain.
protected  String unsafeGetName()
           Uninitialized method meant only for use by subclasses.
protected  Integer unsafeGetOrder()
           Unsynchronized method meant only for use by subclasses.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_TEMPLATE_CONVERSION_CHARSET

public static final String TEST_TEMPLATE_CONVERSION_CHARSET
See Also:
Constant Field Values
Constructor Detail

TestTemplateResolver

public TestTemplateResolver()
Method Detail

isInitialized

protected final boolean isInitialized()

initialize

public final void initialize()

Initialize this template resolver.

Once initialized the configuration parameters of this template resolvers cannot be changed.

Initialization is automatically triggered by the Template Engine before processing the first template.

Specified by:
initialize in interface org.thymeleaf.templateresolver.ITemplateResolver

initializeSpecific

protected void initializeSpecific()

Initialize specific aspects of a subclass. This method is called during initialization of TemplateResolver (initialize()) and is meant for being overridden by subclasses.


checkNotInitialized

protected final void checkNotInitialized()

Check the template resolver is not initialized, and throw an exception if it is.

Calling this method allows to protect calls to methods that change the configuration, ensuring the template resolver has not been initialized yet.


checkInitialized

protected final void checkInitialized()

Check the template resolver is initialized, and throw an exception if it is not.

Calling this method allows to protect calls to methods that need the template resolver to be already initialized.


getName

public String getName()

Returns the name of the template resolver

Specified by:
getName in interface org.thymeleaf.templateresolver.ITemplateResolver
Returns:
the name of the template resolver

unsafeGetName

protected String unsafeGetName()

Uninitialized method meant only for use by subclasses.

Returns:
the name

setName

public void setName(String name)

Sets a new name for the Template Resolver.

Parameters:
name - the new name

getOrder

public Integer getOrder()

Returns the order in which this template resolver will be asked to resolve templates as a part of the chain of resolvers configured into the template engine.

Order should start with 1.

Specified by:
getOrder in interface org.thymeleaf.templateresolver.ITemplateResolver
Returns:
the order in which this template resolver will be called in the chain.

unsafeGetOrder

protected Integer unsafeGetOrder()

Unsynchronized method meant only for use by subclasses.

Returns:
the order

setOrder

public void setOrder(Integer order)

Sets a new order for the template engine in the chain. Order should start with 1.

Parameters:
order - the new order.

resolveTemplate

public org.thymeleaf.templateresolver.TemplateResolution resolveTemplate(org.thymeleaf.TemplateProcessingParameters templateProcessingParameters)
Specified by:
resolveTemplate in interface org.thymeleaf.templateresolver.ITemplateResolver


Copyright © 2013 The THYMELEAF team. All Rights Reserved.