<?xml version="1.0" encoding="UTF-8" ?>

<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
  version="2.0">
    
  <description>JSTL 1.1 functions library</description>
  <display-name>JSTL functions sys</display-name>
  <tlib-version>1.1</tlib-version>
  <short-name>fns</short-name>
  <uri>http://java.sun.com/jsp/jstl/functionss</uri>

  <function>
    <description>获取管理路径</description>
    <name>getAdminPath</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.config.Global</function-class>
    <function-signature>java.lang.String getAdminPath()</function-signature>
    <example>${fns:getAdminPath()}</example>
  </function>
  <function>
    <description>获取网站路径</description>
    <name>getFrontPath</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.config.Global</function-class>
    <function-signature>java.lang.String getFrontPath()</function-signature>
    <example>${fns:getFrontPath()}</example>
  </function>
  <function>
    <description>获取网站URL后缀</description>
    <name>getUrlSuffix</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.config.Global</function-class>
    <function-signature>java.lang.String getUrlSuffix()</function-signature>
    <example>${fns:getUrlSuffix()}</example>
  </function>
  <function>
    <description>获取配置</description>
    <name>getConfig</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.config.Global</function-class>
    <function-signature>java.lang.String getConfig(java.lang.String)</function-signature>
    <example>${fns:getConfig(key)}</example>
  </function>
  <function>
    <description>获取常量</description>
    <name>getConst</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.config.Global</function-class>
    <function-signature>java.lang.Object getConst(java.lang.String)</function-signature>
    <example>${fns:getConst(key)}</example>
  </function>
  
  
  <!-- Encodes -->
  <function>
    <description>URL编码</description>
    <name>urlEncode</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.util.Encodes</function-class>
    <function-signature>java.lang.String urlEncode(java.lang.String)</function-signature>
    <example>${fns:urlEncode(part)}</example>  
  </function>
  <function>
    <description>URL解码</description>
    <name>urlDecode</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.util.Encodes</function-class>
    <function-signature>java.lang.String urlDecode(java.lang.String)</function-signature>
    <example>${fns:urlDecode(part)}</example>  
  </function>
  <function>
    <description>HTML编码</description>
    <name>escapeHtml</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.util.Encodes</function-class>
    <function-signature>java.lang.String escapeHtml(java.lang.String)</function-signature>
    <example>${fns:escapeHtml(html)}</example>  
  </function>
  <function>
    <description>HTML解码</description>
    <name>unescapeHtml</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.util.Encodes</function-class>
    <function-signature>java.lang.String unescapeHtml(java.lang.String)</function-signature>
    <example>${fns:unescapeHtml(html)}</example>  
  </function>
  
  <!-- StringUtils -->
  <function>
    <description>从后边开始截取字符串</description>
    <name>substringAfterLast</name>
    <function-class>org.apache.commons.lang3.StringUtils</function-class>
    <function-signature>java.lang.String substringAfterLast(java.lang.String, java.lang.String)</function-signature>
    <example>${fns:substringAfterLast(str,separator)}</example>  
  </function>
  <function>
    <description>判断字符串是否以某某开头</description>
    <name>startsWith</name>
    <function-class>org.apache.commons.lang3.StringUtils</function-class>
    <function-signature>boolean startsWith(java.lang.CharSequence, java.lang.CharSequence)</function-signature>
    <example>${fns:startsWith(str,prefix)}</example> 
  </function>
  <function>
    <description>判断字符串是否以某某结尾</description>
    <name>endsWith</name>
    <function-class>org.apache.commons.lang3.StringUtils</function-class>
    <function-signature>boolean endsWith(java.lang.CharSequence, java.lang.CharSequence)</function-signature>
    <example>${fns:endsWith(str,suffix)}</example> 
  </function>
  <function>
    <description>缩写字符串，超过最大宽度用“...”表示</description>
    <name>abbr</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.util.StringUtils</function-class>
    <function-signature>java.lang.String abbr(java.lang.String, int)</function-signature>
    <example>${fns:abbr(str,length)}</example>  
  </function>
  <function>
    <description>替换掉HTML标签</description>
    <name>replaceHtml</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.util.StringUtils</function-class>
    <function-signature>java.lang.String replaceHtml(java.lang.String)</function-signature>
    <example>${fns:replaceHtml(html)}</example>  
  </function>
  <function>
    <description>转换为JS获取对象值，生成三目运算返回结果。</description>
    <name>jsGetVal</name>
    <function-class>cn.com.liandisys.ycjt.ggcx.common.util.StringUtils</function-class>
    <function-signature>java.lang.String jsGetVal(java.lang.String)</function-signature>
    <example>${fns:jsGetVal('row.user.id')}  返回：!row?'':!row.user?'':!row.user.id?'':row.user.id</example>  
  </function>
  
</taglib>
