mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-27 14:23:56 +00:00
updated java doc in templating
This commit is contained in:
@@ -42,6 +42,9 @@ public class Template {
|
||||
@Getter
|
||||
private Instant lastModified;
|
||||
|
||||
/**
|
||||
* The time this template was created in the database
|
||||
*/
|
||||
@Column(name = "created")
|
||||
private Instant created;
|
||||
|
||||
@@ -50,6 +53,9 @@ public class Template {
|
||||
this.created = Instant.now();
|
||||
}
|
||||
|
||||
/**
|
||||
* The time this template was updated in the database, only works when using the bot, does not work with triggers.
|
||||
*/
|
||||
@Column(name = "updated")
|
||||
private Instant updated;
|
||||
|
||||
|
||||
@@ -33,7 +33,19 @@ public interface TemplateService {
|
||||
* @return The template rendered as string.
|
||||
*/
|
||||
String renderTemplate(String key, Object model);
|
||||
|
||||
/**
|
||||
* Renders the template without considering any model to be used. If a property is used in the given template, this will throw an exception.
|
||||
* This is just a quick way to render templates, which do not *need* a model.
|
||||
* @param key The key of the template to be rendered
|
||||
* @return The template rendered as string
|
||||
*/
|
||||
String renderSimpleTemplate(String key);
|
||||
|
||||
/**
|
||||
* Renders the given {@link Templatable} object, which means it retrieves the template key and renders the given template key with the given model.
|
||||
* @param templatable The {@link Templatable} object to be rendered
|
||||
* @return The template rendered as string
|
||||
*/
|
||||
String renderTemplatable(Templatable templatable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user