|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TemplateSource
Implementations are responsible for providing compiled templates to an ApplicationDepot. The context to compile against must be provided by the TemplateSourceConfig and a subset of available template sources may be provided to reduce the number of compilation issues. Template classes from either a precompiled library or earlier dynamic compilations may also be provided.
| Method Summary | |
|---|---|
TemplateCompilationResults |
compileTemplates(ClassInjector injector,
boolean all)
Compile templates recursively |
TemplateCompilationResults |
compileTemplates(ClassInjector injector,
boolean all,
boolean recurse)
Compile templates |
TemplateCompilationResults |
compileTemplates(ClassInjector injector,
boolean all,
boolean recurse,
StatusListener listener)
Compile templates |
TemplateCompilationResults |
compileTemplates(ClassInjector injector,
boolean all,
StatusListener listener)
Compile templates recursively using the specified status listener. |
TemplateCompilationResults |
compileTemplates(ClassInjector injector,
StatusListener listener,
String[] selectedTemplates)
Compile selected templates |
TemplateCompilationResults |
compileTemplates(ClassInjector injector,
String[] selectedTemplates)
Compile selected templates |
ContextSource |
getContextSource()
|
int |
getKnownTemplateCount()
Returns number of all templates that are compiled (failed or succeed) |
String[] |
getKnownTemplateNames()
Returns names of all templates that are compiled (failed or succeed) |
Template[] |
getLoadedTemplates()
Returns the list of loaded templates |
Template |
getTemplate(String name)
Returns the template object of the given template name |
TemplateLoader |
getTemplateLoader()
|
Date |
getTimeOfLastReload()
Returns the time the templates are last reloaded |
void |
init(TemplateSourceConfig config)
|
boolean |
isExceptionGuardianEnabled()
|
Map<String,Boolean> |
listTouchedTemplates()
Returns a Map of templates that need reloading - the entry key is the String name of the template - the entry value is a Boolean indicating if the template signature has changed. |
| Method Detail |
|---|
void init(TemplateSourceConfig config)
throws Exception
Exception
TemplateCompilationResults compileTemplates(ClassInjector injector,
boolean all)
throws Exception
injector - Class injector used for template compilation and
template loadingall - When true, compile all source, even if up-to-date
Exception
TemplateCompilationResults compileTemplates(ClassInjector injector,
boolean all,
StatusListener listener)
throws Exception
injector - Class injector used for template compilation and
template loadingall - When true, compile all source, even if up-to-datelistener - The status listener to callback
Exception
TemplateCompilationResults compileTemplates(ClassInjector injector,
boolean all,
boolean recurse)
throws Exception
injector - Class injector used for template compilation and
template loadingall - When true, compile all source, even if up-to-daterecurse - When true, recurse and compile through all
subdirectories
Exception
TemplateCompilationResults compileTemplates(ClassInjector injector,
boolean all,
boolean recurse,
StatusListener listener)
throws Exception
injector - Class injector used for template compilation and
template loadingall - When true, compile all source, even if up-to-daterecurse - When true, recurse and compile through all
subdirectorieslistener - The status listener to callback
Exception
TemplateCompilationResults compileTemplates(ClassInjector injector,
String[] selectedTemplates)
throws Exception
injector - Class injector used for template compilation and
template loadingselectedTemplates - an array of template names to compile
Exception
TemplateCompilationResults compileTemplates(ClassInjector injector,
StatusListener listener,
String[] selectedTemplates)
throws Exception
injector - Class injector used for template compilation and
template loadinglistener - The status listener to callbackselectedTemplates - an array of template names to compile
Exception
Map<String,Boolean> listTouchedTemplates()
throws Exception
Exceptionint getKnownTemplateCount()
String[] getKnownTemplateNames()
Date getTimeOfLastReload()
boolean isExceptionGuardianEnabled()
Template[] getLoadedTemplates()
Template getTemplate(String name)
throws ClassNotFoundException,
NoSuchMethodException
ClassNotFoundException
NoSuchMethodExceptionContextSource getContextSource()
TemplateLoader getTemplateLoader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||