Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_ADMIN_CONTEXT_PATH
管理后台上下文路径 Context Management Context Path Context
|
static String |
INCLUDE_DIRECTORY
包含目录 include directory
|
protected org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
TemplateComponent() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
clearTaskTemplateCache()
清理任务计划模板缓存
Clear Template Cache
|
void |
clearTemplateCache()
清理模板缓存
Clear Template Cache
|
boolean |
createCategoryFile(SysSite site,
CmsCategory entity,
Integer pageIndex,
Integer totalPage)
分类页面静态化
|
String |
createCategoryFile(SysSite site,
CmsCategory entity,
String templatePath,
String filePath,
Integer pageIndex,
Integer totalPage)
分类页面静态化
|
String |
createContentFile(SysSite site,
CmsContent entity,
CmsCategory category,
boolean createMultiContentPage,
String templatePath,
String filePath,
Integer pageIndex)
内容页面静态化
|
boolean |
createContentFile(SysSite site,
CmsContent entity,
CmsCategory category,
CmsCategoryModel categoryModel)
内容页面静态化
|
String |
createStaticFile(SysSite site,
String templatePath,
String filePath,
Integer pageIndex,
CmsPageMetadata metadata,
Map<String,Object> model)
创建静态化页面
|
freemarker.template.Configuration |
getAdminConfiguration()
获取FreeMarker管理后台配置
|
freemarker.template.Configuration |
getTaskConfiguration()
获取FreeMarker任务计划配置
|
freemarker.template.Configuration |
getWebConfiguration()
获取FreeMarker前台配置
|
String |
printPlace(SysSite site,
String templatePath,
CmsPlaceMetadata metadata)
输出页面片段
|
void |
printPlace(Writer writer,
SysSite site,
String templatePath,
CmsPlaceMetadata metadata)
输出页面片段
|
void |
setAdminContextPath(String adminContextPath) |
void |
setDirectivePrefix(String directivePrefix)
设置指令前缀
|
void |
staticPlace(SysSite site,
String templatePath,
CmsPlaceMetadata metadata)
静态化页面片段
|
protected final org.apache.commons.logging.Log log
public static String INCLUDE_DIRECTORY
public static final String CONTEXT_ADMIN_CONTEXT_PATH
public String createStaticFile(SysSite site, String templatePath, String filePath, Integer pageIndex, CmsPageMetadata metadata, Map<String,Object> model) throws IOException, freemarker.template.TemplateException
site
- templatePath
- filePath
- pageIndex
- metadata
- model
- IOException
freemarker.template.TemplateException
public boolean createContentFile(SysSite site, CmsContent entity, CmsCategory category, CmsCategoryModel categoryModel)
site
- entity
- category
- categoryModel
- public String createContentFile(SysSite site, CmsContent entity, CmsCategory category, boolean createMultiContentPage, String templatePath, String filePath, Integer pageIndex) throws IOException, freemarker.template.TemplateException
site
- entity
- category
- createMultiContentPage
- templatePath
- filePath
- pageIndex
- IOException
freemarker.template.TemplateException
public boolean createCategoryFile(SysSite site, CmsCategory entity, Integer pageIndex, Integer totalPage)
site
- entity
- pageIndex
- totalPage
- public String createCategoryFile(SysSite site, CmsCategory entity, String templatePath, String filePath, Integer pageIndex, Integer totalPage) throws IOException, freemarker.template.TemplateException
site
- entity
- templatePath
- filePath
- pageIndex
- totalPage
- IOException
freemarker.template.TemplateException
public void staticPlace(SysSite site, String templatePath, CmsPlaceMetadata metadata) throws IOException, freemarker.template.TemplateException
site
- templatePath
- metadata
- IOException
freemarker.template.TemplateException
public String printPlace(SysSite site, String templatePath, CmsPlaceMetadata metadata) throws IOException, freemarker.template.TemplateException
site
- templatePath
- metadata
- IOException
freemarker.template.TemplateException
public void printPlace(Writer writer, SysSite site, String templatePath, CmsPlaceMetadata metadata) throws IOException, freemarker.template.TemplateException
writer
- site
- templatePath
- metadata
- IOException
freemarker.template.TemplateException
public void setAdminContextPath(String adminContextPath)
public void clearTemplateCache()
public void clearTaskTemplateCache()
public freemarker.template.Configuration getWebConfiguration()
public freemarker.template.Configuration getTaskConfiguration()
public freemarker.template.Configuration getAdminConfiguration()
public void setDirectivePrefix(String directivePrefix)
directivePrefix
- Set Directive PrefixCopyright © 2018. All rights reserved.