public abstract class TemplateConfigurationFactory
extends java.lang.Object
TemplateConfiguration-s for template sources.| Constructor and Description |
|---|
TemplateConfigurationFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract TemplateConfiguration |
get(java.lang.String sourceName,
java.lang.Object templateSource)
Returns (maybe creates) the
TemplateConfiguration for the given template source. |
Configuration |
getConfiguration()
Returns the configuration this object belongs to, or
null if it isn't yet bound to a
Configuration. |
void |
setConfiguration(Configuration cfg)
Binds this
TemplateConfigurationFactory to a Configuration. |
protected abstract void |
setConfigurationOfChildren(Configuration cfg)
Calls
TemplateConfiguration.setParentConfiguration(Configuration) on each enclosed
TemplateConfiguration and setConfiguration(Configuration)
on each enclosed TemplateConfigurationFactory objects. |
public abstract TemplateConfiguration get(java.lang.String sourceName, java.lang.Object templateSource) throws java.io.IOException, TemplateConfigurationFactoryException
TemplateConfiguration for the given template source.sourceName - The name (path) that was used for TemplateLoader.findTemplateSource(String). See
Template.getSourceName() for details.templateSource - The object returned by TemplateLoader.findTemplateSource(String).TemplateConfiguration to apply, or null if the there's no TemplateConfiguration for
this template source.java.io.IOException - Typically, if there factory needs further I/O to find out more about the template source, but that
fails.TemplateConfigurationFactoryException - If there's a problem that's specific to the factory logic.public final void setConfiguration(Configuration cfg)
TemplateConfigurationFactory to a Configuration. Once it's bound, it can't be bound to
another Configuration any more. This is automatically called by
Configuration.setTemplateConfigurations(TemplateConfigurationFactory).public Configuration getConfiguration()
null if it isn't yet bound to a
Configuration.protected abstract void setConfigurationOfChildren(Configuration cfg)
TemplateConfiguration.setParentConfiguration(Configuration) on each enclosed
TemplateConfiguration and setConfiguration(Configuration)
on each enclosed TemplateConfigurationFactory objects. It only supposed to call these on the direct
"children" of this object, not on the children of the children.