|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TempletLoader
An object which can load a templet given a TemplateEngine
,
a MarkupLanguage
and a means of identifying the templet.
Method Summary | |
---|---|
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
Class<?> clazz)
Return a templet for a given class, looking for a template with the same name as the class in the Melati templet directory; giving a full template path as: org/melati/template/TEMPLATE_ENGINE_NAME/MARKUP_LANGUAGE/java.lang.Object.wm
which is the lowest possible template and is always found. |
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
FieldAttributes attributes)
Return a templet to render a Field. |
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
String templetName)
Return a templet by name. |
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
String purpose,
Class<?> clazz)
Return a templet by Class and Purpose. |
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
String purpose,
String templetName)
Return a templet by name and purpose. |
Method Detail |
---|
Template templet(TemplateEngine templateEngine, MarkupLanguage markupLanguage, String templetName) throws NotFoundException
templateEngine
- the TemplateEngine in usemarkupLanguage
- the markuplanguage the templet is intempletName
- the name of the templet
NotFoundException
- if template not foundTemplate templet(TemplateEngine templateEngine, MarkupLanguage markupLanguage, String purpose, String templetName) throws NotFoundException
templateEngine
- the TemplateEngine in usemarkupLanguage
- the markuplanguage the templet is inpurpose
- what the templet is for eg errortempletName
- the name of the templet
NotFoundException
- if template not foundTemplate templet(TemplateEngine templateEngine, MarkupLanguage markupLanguage, Class<?> clazz)
org/melati/template/TEMPLATE_ENGINE_NAME/MARKUP_LANGUAGE/java.lang.Object.wm
which is the lowest possible template and is always found.
The template is also looked for in the resource directory for that class.
The search results are cached, so that searches are not repeated.
templateEngine
- the TemplateEngine in usemarkupLanguage
- the markuplanguage the templet is inclazz
- the class name to translate into a template name
Template templet(TemplateEngine templateEngine, MarkupLanguage markupLanguage, String purpose, Class<?> clazz)
templateEngine
- the TemplateEngine in usemarkupLanguage
- the markuplanguage the templet is inpurpose
- what the templet is for eg errorclazz
- Class that templet renders
Template templet(TemplateEngine templateEngine, MarkupLanguage markupLanguage, FieldAttributes attributes)
templateEngine
- the TemplateEngine in usemarkupLanguage
- the markuplanguage the templet is inattributes
- a FieldAttributes the templet is for eg a Field
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |