cn.gtmap.estateplat.core.support.freemarker
类 FmUtils

java.lang.Object
  继承者 cn.gtmap.estateplat.core.support.freemarker.FmUtils

public final class FmUtils
extends Object

.

版本:
V1.0, 14-6-25
作者:
yangxin

构造方法摘要
FmUtils()
           
 
方法摘要
static void append(StringBuilder sb, String key, Object value)
           
static void appendE(StringBuilder sb, String key, Object value)
           
static void appendUE(StringBuilder sb, String key, Object value)
           
static void delVar(freemarker.core.Environment env, String... keys)
           
static Boolean getBoolean(Map params, String key)
           
static boolean getBoolean(Map params, String key, boolean def)
           
static Integer getInteger(Map params, String key)
           
static
<T> T
getParam(Map params, String key)
           
static String getString(Map params, String key)
           
static String getString(Map params, String key, String def)
           
static
<T> T
getVar(freemarker.core.Environment env, String key)
           
static
<T> T
getVar(freemarker.core.Environment env, String key, T def)
           
static void includeTpl(String tplName, Map<String,Object> params, freemarker.core.Environment env)
           
static String renderBody(freemarker.template.TemplateDirectiveBody body)
           
static void setVar(freemarker.core.Environment env, String key, Object value)
           
static
<T> T
unwrap(Object obj)
           
static freemarker.template.TemplateModel wrap(Object obj)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

FmUtils

public FmUtils()
方法详细信息

unwrap

public static <T> T unwrap(Object obj)
                throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

wrap

public static freemarker.template.TemplateModel wrap(Object obj)
                                              throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

getVar

public static <T> T getVar(freemarker.core.Environment env,
                           String key)
                throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

getVar

public static <T> T getVar(freemarker.core.Environment env,
                           String key,
                           T def)
                throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

setVar

public static void setVar(freemarker.core.Environment env,
                          String key,
                          Object value)
                   throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

delVar

public static void delVar(freemarker.core.Environment env,
                          String... keys)
                   throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

getParam

public static <T> T getParam(Map params,
                             String key)
                  throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

getString

public static String getString(Map params,
                               String key)
                        throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

getInteger

public static Integer getInteger(Map params,
                                 String key)
                          throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

getBoolean

public static Boolean getBoolean(Map params,
                                 String key)
                          throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

getBoolean

public static boolean getBoolean(Map params,
                                 String key,
                                 boolean def)
                          throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

getString

public static String getString(Map params,
                               String key,
                               String def)
                        throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException

includeTpl

public static void includeTpl(String tplName,
                              Map<String,Object> params,
                              freemarker.core.Environment env)
                       throws IOException,
                              freemarker.template.TemplateException
抛出:
IOException
freemarker.template.TemplateException

renderBody

public static String renderBody(freemarker.template.TemplateDirectiveBody body)
                         throws IOException,
                                freemarker.template.TemplateException
抛出:
IOException
freemarker.template.TemplateException

append

public static void append(StringBuilder sb,
                          String key,
                          Object value)

appendE

public static void appendE(StringBuilder sb,
                           String key,
                           Object value)

appendUE

public static void appendUE(StringBuilder sb,
                            String key,
                            Object value)
                     throws freemarker.template.TemplateModelException
抛出:
freemarker.template.TemplateModelException


Copyright © 2015–2016 cn.gtmap. All rights reserved.