|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.melati.template.ClassNameTempletLoader
public final class ClassNameTempletLoader
Load a template to render an object based upon the object's class.
| Method Summary | |
|---|---|
protected static java.lang.String |
classpathTempletPath(java.lang.Class clazz,
TemplateEngine templateEngine)
|
static ClassNameTempletLoader |
getInstance()
|
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.Class clazz)
Get a templet for a class. |
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
FieldAttributes attributes)
Get a templet either from the FieldAttributes or the class name. |
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.String name)
Get a templet by its name, looking only in the templets directory. |
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.String purpose,
java.lang.Class clazz)
Get a templet based upon class name and optional purpose, looking in the templets directory and also the classpath. |
Template |
templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.String purpose,
java.lang.String name)
Get a templet by name, with optional purpose. |
protected static java.lang.String |
templetsPath(TemplateEngine templateEngine,
MarkupLanguage markupLanguage)
|
protected static java.lang.String |
templetsTempletPath(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.String purpose,
java.lang.String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ClassNameTempletLoader getInstance()
protected static java.lang.String templetsPath(TemplateEngine templateEngine,
MarkupLanguage markupLanguage)
protected static java.lang.String templetsTempletPath(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.String purpose,
java.lang.String name)
protected static java.lang.String classpathTempletPath(java.lang.Class clazz,
TemplateEngine templateEngine)
public Template templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.String purpose,
java.lang.String name)
throws java.io.IOException,
NotFoundException
templet in interface TempletLoadertemplateEngine - the TemplateEngine in usemarkupLanguage - the markuplanguage the templet is inpurpose - what the templet is for eg errorname - the name of the templet
java.io.IOException - if TemplateEngine does
NotFoundException - if template not foundTempletLoader#templet(TemplateEngine, AbstractMarkupLanguage, String, String)
public Template templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.String name)
throws java.io.IOException,
NotFoundException
templet in interface TempletLoadertemplateEngine - the TemplateEngine in usemarkupLanguage - the markuplanguage the templet is inname - the name of the templet
java.io.IOException - if TemplateEngine does
NotFoundException - if template not foundTempletLoader.templet(TemplateEngine, MarkupLanguage, String)
public Template templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.String purpose,
java.lang.Class clazz)
throws TemplateEngineException,
java.io.IOException
templet in interface TempletLoadertemplateEngine - the TemplateEngine in usemarkupLanguage - the markuplanguage the templet is inpurpose - what the templet is for eg errorclazz - Class that templet renders
java.io.IOException - if TemplateEngine does
TemplateEngineExceptionTempletLoader.templet(TemplateEngine, MarkupLanguage,
String, Class)
public Template templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
java.lang.Class clazz)
throws java.io.IOException
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.
templet in interface TempletLoadertemplateEngine - the TemplateEngine in usemarkupLanguage - the markuplanguage the templet is inclazz - the class name to translate into a template name
java.io.IOException - if TemplateEngine doesTempletLoader.templet(TemplateEngine, MarkupLanguage, Class)
public Template templet(TemplateEngine templateEngine,
MarkupLanguage markupLanguage,
FieldAttributes attributes)
throws java.io.IOException
templet in interface TempletLoadertemplateEngine - the TemplateEngine in usemarkupLanguage - the markuplanguage the templet is inattributes - a FieldAttributes the templet is for eg a Field
java.io.IOException - if TemplateEngine doesTempletLoader.templet(TemplateEngine,MarkupLanguage,FieldAttributes)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||