Package com.axelor.text
Interface Templates
-
- All Known Implementing Classes:
GroovyTemplates,StringTemplates
public interface TemplatesThis interface defines API for template engine integration.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Templatefrom(File file)Create a newTemplateinstance from the given template file.Templatefrom(Reader reader)Create a newTemplateinstance from the given reader.TemplatefromText(String text)Create a newTemplateinstance from the given template text.
-
-
-
Method Detail
-
fromText
Template fromText(String text)
Create a newTemplateinstance from the given template text.- Parameters:
text- the template text- Returns:
- an instance of
Template
-
from
Template from(File file) throws IOException
Create a newTemplateinstance from the given template file.- Parameters:
file- the template file- Returns:
- an instance of
Template - Throws:
IOException- if file read throwsIOException
-
from
Template from(Reader reader) throws IOException
Create a newTemplateinstance from the given reader.- Parameters:
reader- theReaderto read the template- Returns:
- an instance of
Template - Throws:
IOException- if reader throwsIOException
-
-