Interface TemplateContentProvider
- All Known Implementing Classes:
FreemarkerTemplateRepository
public interface TemplateContentProvider
Provides template content from various sources (local filesystem, remote
repository, etc.).
This interface abstracts the source of template content, allowing the loader
to work
independently of where templates are stored.
-
Method Summary
Modifier and TypeMethodDescriptiongetTemplateContent(String templatePath) Gets the content of a template file.booleantemplateExists(String templatePath) Checks if a template exists at the specified path.
-
Method Details
-
getTemplateContent
Gets the content of a template file.- Parameters:
templatePath- The path to the template file (relative to template root)- Returns:
- The template content as a string
- Throws:
TemplateRepository.TemplateNotFoundException- if the template cannot be found or read
-
templateExists
Checks if a template exists at the specified path.- Parameters:
templatePath- The path to check- Returns:
- true if the template exists, false otherwise
-