org.thymeleaf.context
Class AbstractContextExecutionInfo

Object
  extended by org.thymeleaf.context.AbstractContextExecutionInfo
All Implemented Interfaces:
IContextExecutionInfo
Direct Known Subclasses:
ContextExecutionInfo, WebContextExecutionInfo

public abstract class AbstractContextExecutionInfo
extends Object
implements IContextExecutionInfo

Abstract class for IContextExecutionInfo implementations, providing some of the features required to implement this interface.

Since:
1.0
Author:
Daniel Fernández

Constructor Summary
protected AbstractContextExecutionInfo(String templateName, Calendar now)
           
 
Method Summary
 Calendar getNow()
           Returns the current date and time (from the moment of template execution).
 String getTemplateName()
           Returns the template name.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractContextExecutionInfo

protected AbstractContextExecutionInfo(String templateName,
                                       Calendar now)
Method Detail

getTemplateName

public String getTemplateName()

Returns the template name.

Note that the same template can be resolved with different names due to aliases, links, etc. This template name refers to the one used to call the TemplateEngine.process(String, IContext) method.

Specified by:
getTemplateName in interface IContextExecutionInfo
Returns:
the template name

getNow

public Calendar getNow()

Returns the current date and time (from the moment of template execution).

Specified by:
getNow in interface IContextExecutionInfo
Returns:
the current date and time, as a Calendar


Copyright © 2011 The THYMELEAF team. All Rights Reserved.