Package com.github.jknack.handlebars.io
Class CompositeTemplateLoader
java.lang.Object
com.github.jknack.handlebars.io.CompositeTemplateLoader
- All Implemented Interfaces:
TemplateLoader
@Deprecated(since="2024-07-10")
public class CompositeTemplateLoader
extends Object
implements TemplateLoader
Deprecated.
com.github.jknack.handlebars.io package is deprecated and marked for removal in subsequent releases which will involve removal of the handlebars dependency in AEM.
Combine two or more TemplateLoader as a single TemplateLoader.
TemplateLoaders are executed in the order they are provided.
Execution is as follows:
- If a
TemplateLoaderis able to resolve aTemplateSource, thatTemplateSourceis considered the response. - If a
TemplateLoaderthrows aIOExceptionexception the nextTemplateLoaderin the chain will be used.
- Since:
- 1.0.0
-
Field Summary
Fields inherited from interface com.github.jknack.handlebars.io.TemplateLoader
DEFAULT_PREFIX, DEFAULT_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionCompositeTemplateLoader(TemplateLoader... loaders) Deprecated.Creates a newCompositeTemplateLoader. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.Returns the delegates template loaders.Deprecated.Deprecated.Deprecated.Resolve a relative location to an absolute location.voidsetCharset(Charset charset) Deprecated.Set the default charset.voidDeprecated.Set the prefix that gets prepended to view names when building a URI.voidDeprecated.Set the suffix that gets appended to view names when building a URI.Deprecated.Get a template source from location.
-
Constructor Details
-
CompositeTemplateLoader
Deprecated.Creates a newCompositeTemplateLoader.- Parameters:
loaders- The template loader chain. At least two loaders must be provided.
-
-
Method Details
-
sourceAt
Deprecated.Description copied from interface:TemplateLoaderGet a template source from location.- Specified by:
sourceAtin interfaceTemplateLoader- Parameters:
location- The location of the template source. Required.- Returns:
- A new template source.
- Throws:
IOException- If the template's source can't be resolved.
-
resolve
Deprecated.Description copied from interface:TemplateLoaderResolve a relative location to an absolute location.- Specified by:
resolvein interfaceTemplateLoader- Parameters:
location- The candidate location.- Returns:
- Resolve the uri to an absolute location.
-
getPrefix
Deprecated.- Specified by:
getPrefixin interfaceTemplateLoader- Returns:
- The prefix that gets prepended to view names when building a URI.
-
getSuffix
Deprecated.- Specified by:
getSuffixin interfaceTemplateLoader- Returns:
- The suffix that gets appended to view names when building a URI.
-
setPrefix
Deprecated.Description copied from interface:TemplateLoaderSet the prefix that gets prepended to view names when building a URI.- Specified by:
setPrefixin interfaceTemplateLoader- Parameters:
prefix- The prefix that gets prepended to view names when building a URI.
-
setSuffix
Deprecated.Description copied from interface:TemplateLoaderSet the suffix that gets appended to view names when building a URI.- Specified by:
setSuffixin interfaceTemplateLoader- Parameters:
suffix- The suffix that gets appended to view names when building a URI.
-
setCharset
Deprecated.Description copied from interface:TemplateLoaderSet the default charset.- Specified by:
setCharsetin interfaceTemplateLoader- Parameters:
charset- Charset.
-
getCharset
Deprecated.- Specified by:
getCharsetin interfaceTemplateLoader- Returns:
- Charset.
-
getDelegates
Deprecated.Returns the delegates template loaders.- Returns:
- The delegates template loaders.
-