|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.peaseplate.PeasePlateEngine
public class PeasePlateEngine
The default implementation of the Pease Plate engine.
| Constructor Summary | |
|---|---|
PeasePlateEngine(java.lang.ClassLoader... classLoaders)
|
|
| Method Summary | |
|---|---|
void |
addClassLoader(java.lang.ClassLoader... classLoaders)
Adds the specified class loaders to the facotry. |
Template |
compile(char[] source)
Compiles the template defined by the source. |
Template |
compile(java.lang.String source)
Compiles the template defined by the source. |
Template |
compile(TemplateLocator locator)
Compiles the template defined by the specified locator. |
CacheService |
getCacheService()
The default service is the DefaultCacheService |
java.util.Collection<java.lang.ClassLoader> |
getClassLoaders()
Returns all the class loaders in an unmodifiable collection. |
ConversionService |
getConversionService()
The default service is the DefaultConversionService. |
java.lang.String |
getDefaultEncoding()
The default value is the default encoding of your operating system, provided in Java by the system property "file.encoding" |
LineSeparator |
getDefaultLineSeparator()
Returns the default line separator |
java.util.Locale |
getDefaultLocale()
The default value is default locale of your operating systen, provided in Java by the Locale.getDefault() method |
DesignatorService |
getDesignatorService()
The default service is the DefaultDesignatorService |
MacroService |
getMacroService()
Returns the macro service used to resolve and handle predefined macros |
ResolverService |
getResolverService()
The default service is the DefaultResolverService |
TransformerService |
getTransformerService()
The default service is the DefaultTransformerService |
void |
render(java.io.Writer writer,
java.lang.Object workingObject,
ResourceKey key)
Renders the template specified by the descriptor The workingObject is just any object or bean, that contains the data that should be integrated in the template. |
void |
render(java.io.Writer writer,
java.lang.Object workingObject,
java.lang.String name)
Renders the template with the specified name to the specified writer. |
void |
render(java.io.Writer writer,
java.lang.Object workingObject,
java.lang.String name,
java.util.Locale locale)
Renders the template with the specified name to the specified writer. |
void |
render(java.io.Writer writer,
java.lang.Object workingObject,
java.lang.String name,
java.util.Locale locale,
java.lang.String encoding)
Renders the template with the specified name to the specified writer. |
void |
render(java.io.Writer writer,
java.lang.Object workingObject,
java.lang.String name,
java.lang.String encoding)
Renders the template with the specified name to the specified writer. |
void |
setCacheService(CacheService cacheService)
Sets the cache service used to cache templates and messages |
void |
setConversionService(ConversionService conversionService)
Sets the conversion service used to convert objects from one type to another |
void |
setDefaultEncoding(java.lang.String defaultEncoding)
Sets the default encoding used when no encoding is specified somewhere where needed |
void |
setDefaultLineSeparator(LineSeparator defaultLineSeparator)
Sets the default line separator |
void |
setDefaultLocale(java.util.Locale defaultLocale)
Sets the default locale used when no locale is specified somewhere where needed |
void |
setDesignatorService(DesignatorService designatorService)
Sets the designator service used to resolve and handle designators |
void |
setMacroService(MacroService macroService)
Sets the macro service used to resolve and handle predefined macros |
void |
setResolverService(ResolverService resolverService)
Sets the resolver service used to resolver templates and messages |
void |
setTransformerService(TransformerService transformerService)
Sets the transformer service used to resolve and handle transformers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PeasePlateEngine(java.lang.ClassLoader... classLoaders)
| Method Detail |
|---|
public void addClassLoader(java.lang.ClassLoader... classLoaders)
TemplateEngine
addClassLoader in interface TemplateEngineclassLoaders - the class loadersTemplateEngine.addClassLoader(java.lang.ClassLoader[])public java.util.Collection<java.lang.ClassLoader> getClassLoaders()
TemplateEngine
getClassLoaders in interface TemplateEngineTemplateEngine.getClassLoaders()public CacheService getCacheService()
DefaultCacheService
getCacheService in interface TemplateEngineTemplateEngine.getCacheService()public void setCacheService(CacheService cacheService)
IPeasePlateEngine
setCacheService in interface IPeasePlateEnginecacheService - the cache serviceorg.peaseplate.TemplateEngine#setCacheService(org.peaseplate.service.CacheService)public ResolverService getResolverService()
DefaultResolverService
getResolverService in interface TemplateEngineTemplateEngine.getResolverService()public void setResolverService(ResolverService resolverService)
IPeasePlateEngine
setResolverService in interface IPeasePlateEngineresolverService - the resolver serviceorg.peaseplate.TemplateEngine#setResolverService(org.peaseplate.service.ResolverService)public DesignatorService getDesignatorService()
DefaultDesignatorService
getDesignatorService in interface TemplateEngineTemplateEngine.getDesignatorService()public void setDesignatorService(DesignatorService designatorService)
IPeasePlateEngine
setDesignatorService in interface IPeasePlateEnginedesignatorService - the designator serviceorg.peaseplate.TemplateEngine#setDesignatorService(org.peaseplate.service.DesignatorService)public TransformerService getTransformerService()
DefaultTransformerService
getTransformerService in interface TemplateEngineTemplateEngine.getTransformerService()public void setTransformerService(TransformerService transformerService)
IPeasePlateEngine
setTransformerService in interface IPeasePlateEnginetransformerService - the transformer serviceorg.peaseplate.TemplateEngine#setTransformerService(org.peaseplate.service.TransformerService)public MacroService getMacroService()
TemplateEngine
getMacroService in interface TemplateEngineTemplateEngine.getMacroService()public void setMacroService(MacroService macroService)
IPeasePlateEngine
setMacroService in interface IPeasePlateEnginemacroService - the macro serviceorg.peaseplate.TemplateEngine#setMacroService(org.peaseplate.service.MacroService)public ConversionService getConversionService()
DefaultConversionService.
getConversionService in interface TemplateEngineTemplateEngine.getConversionService()public void setConversionService(ConversionService conversionService)
IPeasePlateEngine
setConversionService in interface IPeasePlateEngineconversionService - the conversion serviceorg.peaseplate.TemplateEngine#setConversionService(org.peaseplate.service.ConversionService)public java.util.Locale getDefaultLocale()
Locale.getDefault() method
getDefaultLocale in interface TemplateEngineTemplateEngine.getDefaultLocale()public void setDefaultLocale(java.util.Locale defaultLocale)
TemplateEngine
setDefaultLocale in interface TemplateEnginedefaultLocale - the default localeTemplateEngine.setDefaultLocale(java.util.Locale)public java.lang.String getDefaultEncoding()
getDefaultEncoding in interface TemplateEngineTemplateEngine.getDefaultEncoding()public void setDefaultEncoding(java.lang.String defaultEncoding)
TemplateEngine
setDefaultEncoding in interface TemplateEnginedefaultEncoding - the default encodingTemplateEngine.setDefaultEncoding(java.lang.String)public LineSeparator getDefaultLineSeparator()
TemplateEngine
getDefaultLineSeparator in interface TemplateEngineTemplateEngine.getDefaultLineSeparator()public void setDefaultLineSeparator(LineSeparator defaultLineSeparator)
TemplateEngine
setDefaultLineSeparator in interface TemplateEnginedefaultLineSeparator - the default line separatororg.peaseplate.TemplateEngine#setDefaultLineSeparator(java.lang.String)
public Template compile(TemplateLocator locator)
throws TemplateException
TemplateEngine
compile in interface TemplateEnginelocator - the locator
TemplateException - on occasionTemplateEngine.compile(org.peaseplate.locator.TemplateLocator)
public Template compile(java.lang.String source)
throws TemplateException
TemplateEngineInMemoryTemplateLocator,
which stores the source in memory.
compile in interface TemplateEnginesource - the source
TemplateExceptionTemplateEngine.compile(java.lang.String)
public Template compile(char[] source)
throws TemplateException
TemplateEngineInMemoryTemplateLocator,
which stores the source in memory.
compile in interface TemplateEnginesource - the source
TemplateExceptionTemplateEngine.compile(char[])
public void render(java.io.Writer writer,
java.lang.Object workingObject,
java.lang.String name)
throws TemplateException,
java.io.IOException
TemplateEngineResolver.
render in interface TemplateEnginewriter - the writerworkingObject - the working objectname - the name of the template
TemplateException - if anything goes wrong
java.io.IOException - if it cannot write to the writerTemplateEngine.render(java.io.Writer, java.lang.Object, java.lang.String)
public void render(java.io.Writer writer,
java.lang.Object workingObject,
java.lang.String name,
java.util.Locale locale)
throws TemplateException,
java.io.IOException
TemplateEngineResolver.
render in interface TemplateEnginewriter - the writerworkingObject - the working objectname - the name of the templatelocale - the locale; uses the default locale if null
TemplateException - if anything goes wrong
java.io.IOException - if it cannot write to the writerTemplateEngine.render(java.io.Writer, java.lang.Object, java.lang.String, java.util.Locale)
public void render(java.io.Writer writer,
java.lang.Object workingObject,
java.lang.String name,
java.lang.String encoding)
throws TemplateException,
java.io.IOException
TemplateEngineResolver.
render in interface TemplateEnginewriter - the writerworkingObject - the working objectname - the name of the templateencoding - the encoding; uses the default encoding if null
TemplateException - if anything goes wrong
java.io.IOException - if it cannot write to the writerTemplateEngine.render(java.io.Writer, java.lang.Object, java.lang.String, java.lang.String)
public void render(java.io.Writer writer,
java.lang.Object workingObject,
java.lang.String name,
java.util.Locale locale,
java.lang.String encoding)
throws TemplateException,
java.io.IOException
TemplateEngineResolver.
render in interface TemplateEnginewriter - the writerworkingObject - the working objectname - the name of the templatelocale - the locale; uses the default locale if nullencoding - the encoding; uses the default encoding if null
TemplateException - if anything goes wrong
java.io.IOException - if it cannot write to the writerTemplateEngine.render(java.io.Writer, java.lang.Object, java.lang.String, java.util.Locale, java.lang.String)
public void render(java.io.Writer writer,
java.lang.Object workingObject,
ResourceKey key)
throws TemplateException,
java.io.IOException
TemplateEngineResolver.
render in interface TemplateEnginewriter - the writerworkingObject - the working objectkey - the key
TemplateException - if anything goes wrong
java.io.IOException - if it cannot write to the writerTemplateEngine.render(java.io.Writer, java.lang.Object, org.peaseplate.internal.ResourceKey)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||