Package com.axelor.text
Interface Templates
-
- All Known Implementing Classes:
GroovyTemplates
,StringTemplates
public interface Templates
This interface defines API for template engine integration.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Template
from(File file)
Create a newTemplate
instance from the given template file.Template
from(Reader reader)
Create a newTemplate
instance from the given reader.Template
fromText(String text)
Create a newTemplate
instance from the given template text.
-
-
-
Method Detail
-
fromText
Template fromText(String text)
Create a newTemplate
instance from the given template text.- Parameters:
text
- the template text- Returns:
- an instance of
Template
-
from
Template from(File file) throws IOException
Create a newTemplate
instance 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 newTemplate
instance from the given reader.- Parameters:
reader
- theReader
to read the template- Returns:
- an instance of
Template
- Throws:
IOException
- if reader throwsIOException
-
-