限定符和类型 | 字段和说明 |
---|---|
private freemarker.template.Configuration |
adminConfiguration |
private CmsCategoryAttributeService |
categoryAttributeService |
private CmsCategoryModelService |
categoryModelService |
private CmsCategoryService |
categoryService |
private CmsContentAttributeService |
contentAttributeService |
private CmsContentService |
contentService |
static java.lang.String |
CONTEXT_ADMIN_CONTEXT_PATH
管理后台上下文路径 Context Management Context Path Context
|
static java.lang.String |
INCLUDE_DIRECTORY
包含目录 include directory
|
protected org.apache.commons.logging.Log |
log |
private MetadataComponent |
metadataComponent |
private ModelComponent |
modelComponent |
private CmsPlaceService |
placeService |
private static java.util.concurrent.ExecutorService |
pool |
private SiteComponent |
siteComponent |
private StatisticsComponent |
statisticsComponent |
private freemarker.template.Configuration |
taskConfiguration |
private freemarker.template.Configuration |
webConfiguration |
构造器和说明 |
---|
TemplateComponent() |
限定符和类型 | 方法和说明 |
---|---|
void |
clear() |
void |
clearTaskTemplateCache()
清理任务计划模板缓存
Clear Template Cache
|
void |
clearTemplateCache()
清理模板缓存
Clear Template Cache
|
boolean |
createCategoryFile(SysSite site,
CmsCategory entity,
java.lang.Integer pageIndex,
java.lang.Integer totalPage)
分类页面静态化
|
java.lang.String |
createCategoryFile(SysSite site,
CmsCategory entity,
java.lang.String templatePath,
java.lang.String filepath,
java.lang.Integer pageIndex,
java.lang.Integer totalPage)
分类页面静态化
|
java.lang.String |
createContentFile(SysSite site,
CmsContent entity,
CmsCategory category,
boolean createMultiContentPage,
java.lang.String templatePath,
java.lang.String filepath,
java.lang.Integer pageIndex)
内容页面静态化
|
boolean |
createContentFile(SysSite site,
CmsContent entity,
CmsCategory category,
CmsCategoryModel categoryModel)
内容页面静态化
|
void |
createContentFile(SysSite site,
java.util.List<java.io.Serializable> idList,
CmsCategory category,
CmsCategoryModel categoryModel)
内容页面静态化
|
java.lang.String |
createStaticFile(SysSite site,
java.lang.String fullTemplatePath,
java.lang.String filepath,
java.lang.Integer pageIndex,
java.util.Map<java.lang.String,java.lang.Object> metadataMap,
java.util.Map<java.lang.String,java.lang.Object> model,
java.util.function.Consumer<java.lang.String> urlConsumer)
创建静态化页面
|
void |
destroy() |
private void |
exposePlace(SysSite site,
java.lang.String templatePath,
CmsPlaceMetadata metadata,
CmsPageData data,
java.util.Map<java.lang.String,java.lang.Object> model) |
java.lang.String |
generatePlaceFilePath(java.lang.String filepath,
CmsCategory category,
java.util.Map<java.lang.String,java.lang.Object> model)
生成页面片段路径
|
freemarker.template.Configuration |
getAdminConfiguration()
获取FreeMarker管理后台配置
|
freemarker.template.Configuration |
getTaskConfiguration()
获取FreeMarker任务计划配置
|
static java.lang.String |
getUrl(java.lang.String sitePath,
java.lang.String url) |
static java.lang.String |
getUrl(SysSite site,
boolean hasStatic,
java.lang.String url) |
freemarker.template.Configuration |
getWebConfiguration()
获取FreeMarker前台配置
|
static void |
initCategoryUrl(SysSite site,
CmsCategory entity) |
static void |
initContentCover(SysSite site,
CmsContent entity) |
static void |
initContentUrl(SysSite site,
CmsContent entity) |
void |
initPlaceUrl(SysSite site,
CmsPlace entity) |
java.lang.String |
printPlace(SysSite site,
java.lang.String templatePath,
CmsPlaceMetadata metadata,
CmsPageData data)
输出页面片段
|
void |
printPlace(java.io.Writer writer,
SysSite site,
java.lang.String templatePath,
CmsPlaceMetadata metadata,
CmsPageData data)
输出页面片段
|
void |
setAdminConfiguration(freemarker.template.Configuration adminConfiguration) |
void |
setAdminContextPath(java.lang.String adminContextPath) |
void |
setTaskConfiguration(freemarker.template.Configuration taskConfiguration) |
void |
setWebConfiguration(freemarker.template.Configuration webConfiguration) |
void |
staticPlace(SysSite site,
java.lang.String templatePath,
CmsPlaceMetadata metadata,
CmsPageData data)
静态化页面片段
|
protected final org.apache.commons.logging.Log log
public static final java.lang.String INCLUDE_DIRECTORY
public static final java.lang.String CONTEXT_ADMIN_CONTEXT_PATH
private freemarker.template.Configuration adminConfiguration
private freemarker.template.Configuration webConfiguration
private freemarker.template.Configuration taskConfiguration
private CmsContentAttributeService contentAttributeService
private CmsCategoryAttributeService categoryAttributeService
private CmsContentService contentService
private CmsCategoryModelService categoryModelService
private CmsCategoryService categoryService
private SiteComponent siteComponent
private MetadataComponent metadataComponent
private ModelComponent modelComponent
private CmsPlaceService placeService
private StatisticsComponent statisticsComponent
private static java.util.concurrent.ExecutorService pool
public java.lang.String createCategoryFile(SysSite site, CmsCategory entity, java.lang.String templatePath, java.lang.String filepath, java.lang.Integer pageIndex, java.lang.Integer totalPage) throws java.io.IOException, freemarker.template.TemplateException
site
- entity
- templatePath
- filepath
- pageIndex
- totalPage
- java.io.IOException
freemarker.template.TemplateException
public java.lang.String createContentFile(SysSite site, CmsContent entity, CmsCategory category, boolean createMultiContentPage, java.lang.String templatePath, java.lang.String filepath, java.lang.Integer pageIndex) throws java.io.IOException, freemarker.template.TemplateException
site
- entity
- category
- createMultiContentPage
- templatePath
- filepath
- pageIndex
- java.io.IOException
freemarker.template.TemplateException
public boolean createContentFile(SysSite site, CmsContent entity, CmsCategory category, CmsCategoryModel categoryModel) throws java.io.IOException, freemarker.template.TemplateException
site
- entity
- category
- categoryModel
- freemarker.template.TemplateException
java.io.IOException
public boolean createCategoryFile(SysSite site, CmsCategory entity, java.lang.Integer pageIndex, java.lang.Integer totalPage) throws java.io.IOException, freemarker.template.TemplateException
site
- entity
- pageIndex
- totalPage
- java.io.IOException
freemarker.template.TemplateException
public void createContentFile(SysSite site, java.util.List<java.io.Serializable> idList, CmsCategory category, CmsCategoryModel categoryModel)
site
- idList
- category
- categoryModel
- public java.lang.String generatePlaceFilePath(java.lang.String filepath, CmsCategory category, java.util.Map<java.lang.String,java.lang.Object> model) throws java.io.IOException, freemarker.template.TemplateException
filepath
- category
- model
- java.io.IOException
freemarker.template.TemplateException
public void staticPlace(SysSite site, java.lang.String templatePath, CmsPlaceMetadata metadata, CmsPageData data) throws java.io.IOException, freemarker.template.TemplateException
site
- templatePath
- metadata
- data
- java.io.IOException
freemarker.template.TemplateException
public java.lang.String printPlace(SysSite site, java.lang.String templatePath, CmsPlaceMetadata metadata, CmsPageData data) throws java.io.IOException, freemarker.template.TemplateException
site
- templatePath
- metadata
- data
- java.io.IOException
freemarker.template.TemplateException
public void printPlace(java.io.Writer writer, SysSite site, java.lang.String templatePath, CmsPlaceMetadata metadata, CmsPageData data) throws java.io.IOException, freemarker.template.TemplateException
writer
- site
- templatePath
- metadata
- data
- java.io.IOException
freemarker.template.TemplateException
public java.lang.String createStaticFile(SysSite site, java.lang.String fullTemplatePath, java.lang.String filepath, java.lang.Integer pageIndex, java.util.Map<java.lang.String,java.lang.Object> metadataMap, java.util.Map<java.lang.String,java.lang.Object> model, java.util.function.Consumer<java.lang.String> urlConsumer) throws java.io.IOException, freemarker.template.TemplateException
site
- fullTemplatePath
- filepath
- pageIndex
- metadataMap
- model
- urlConsumer
- java.io.IOException
freemarker.template.TemplateException
public static void initContentUrl(SysSite site, CmsContent entity)
site
- entity
- public static void initContentCover(SysSite site, CmsContent entity)
site
- entity
- public static java.lang.String getUrl(SysSite site, boolean hasStatic, java.lang.String url)
site
- hasStatic
- url
- public static java.lang.String getUrl(java.lang.String sitePath, java.lang.String url)
sitePath
- url
- public static void initCategoryUrl(SysSite site, CmsCategory entity)
site
- entity
- private void exposePlace(SysSite site, java.lang.String templatePath, CmsPlaceMetadata metadata, CmsPageData data, java.util.Map<java.lang.String,java.lang.Object> model)
public void setAdminContextPath(java.lang.String adminContextPath)
@PreDestroy public void destroy()
public void clearTemplateCache()
public void clearTaskTemplateCache()
public void setAdminConfiguration(freemarker.template.Configuration adminConfiguration)
adminConfiguration
- the adminConfiguration to setpublic void setWebConfiguration(freemarker.template.Configuration webConfiguration)
webConfiguration
- the webConfiguration to setpublic void setTaskConfiguration(freemarker.template.Configuration taskConfiguration)
taskConfiguration
- the taskConfiguration to setpublic freemarker.template.Configuration getAdminConfiguration()
public freemarker.template.Configuration getWebConfiguration()
public freemarker.template.Configuration getTaskConfiguration()