Package io.bootique.mvc.resolver
Class DefaultTemplate
- java.lang.Object
-
- io.bootique.mvc.resolver.DefaultTemplate
-
- All Implemented Interfaces:
Template
public class DefaultTemplate extends Object implements Template
A template implementation that resolves template resources relative the template base. The root URL as well as URLs of relative resource names are first prepended with the specified path before resolving against the base.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description DefaultTemplate(io.bootique.resource.FolderResourceFactory base, String path, String name, Charset sourceEncoding)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidcheckPathWithinBounds(String resourcePath)CharsetgetEncoding()StringgetName()URLgetUrl()Returns a URL of this templateURLgetUrl(String resourceName)Returns a URL of a related resource (such as sub-template).protected StringresourcePath(String resource)
-
-
-
Method Detail
-
getUrl
public URL getUrl()
Description copied from interface:TemplateReturns a URL of this template
-
getUrl
public URL getUrl(String resourceName)
Description copied from interface:TemplateReturns a URL of a related resource (such as sub-template).
-
getEncoding
public Charset getEncoding()
- Specified by:
getEncodingin interfaceTemplate
-
checkPathWithinBounds
protected static void checkPathWithinBounds(String resourcePath)
-
-