public class ParserUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
APP_ID
站点编号
|
static freemarker.template.Configuration |
cfg |
static String |
COLUMN
栏目实体;
|
static String |
DO_SUFFIX
.do后缀
|
static freemarker.cache.FileTemplateLoader |
ftl |
static String |
HTM_SUFFIX
模版文件后缀名;例如:index.html
|
static String |
HTML
静态文件生成路径;例如:mcms/html/1
|
static String |
HTML_SUFFIX
文件夹路径名;例如:1/58/71.html
|
static String |
ID
文章编号
|
static String |
INDEX
index
|
static String |
IS_DO
是否是动态解析;true:动态、false:静态
|
static boolean |
IS_SINGLE
单站点
|
static String |
MOBILE
移动端生成的目录
|
static String |
MODEL_NAME
模块路径;
|
static String |
PAGE
分页,提供給解析传递给sql解析使用
|
static String |
PAGE_LIST
生成的静态列表页面名;例如:list1.html
|
static String |
PAGE_NO
当前页;
|
static String |
SIZE
显示的条数;文章列表属性
|
static String |
TABLE_NAME
自定义模型表名;
|
static String |
TEMPLATES
存放模版的文件夹
|
static String |
TYPE_ID
栏目编号;原标签没有使用驼峰命名
|
static String |
URL
当前系统访问路径
|
| 构造器和说明 |
|---|
ParserUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
buildHtmlPath(String path)
拼接生成后的路径地址
|
static String |
buildMobileHtmlPath(String path)
拼接移动端生成后的地址
|
static String |
buildTempletPath()
拼接模板文件路径
|
static String |
buildTempletPath(String path)
拼接模板文件路径
|
static String |
generate(String templatePath,
Map params,
boolean isMobile)
根据模板路径,参数生成,主要提供给动态解析模板内容
|
static boolean |
hasMobileFile(String path)
判断是否移动端模版文件
path 模版文件名
|
static String |
read(String templatePath,
boolean isMobile)
读取模板内容
|
public static boolean IS_SINGLE
public static freemarker.template.Configuration cfg
public static freemarker.cache.FileTemplateLoader ftl
public static String buildTempletPath()
public static boolean hasMobileFile(String path)
public static String generate(String templatePath, Map params, boolean isMobile) throws freemarker.template.TemplateNotFoundException, freemarker.template.MalformedTemplateNameException, freemarker.core.ParseException, IOException
templatePath - 模板路径params - 参数isMobile - 是否是移动端freemarker.template.TemplateNotFoundExceptionfreemarker.template.MalformedTemplateNameExceptionfreemarker.core.ParseExceptionIOExceptionpublic static String read(String templatePath, boolean isMobile) throws freemarker.template.TemplateNotFoundException, freemarker.template.MalformedTemplateNameException, freemarker.core.ParseException, IOException
templatePath - isMobile - freemarker.template.TemplateNotFoundExceptionfreemarker.template.MalformedTemplateNameExceptionfreemarker.core.ParseExceptionIOExceptionCopyright © 2019. All rights reserved.