public class AnalyseHtmlHelper extends BaseAnalyseHtmlHelper
AnalyseHtmlHelper
功能描述: 解析html帮助方法
创建人: 陈伟
创建日期: 2013-12-9 下午03:00:48
开发环境: JDK6.0fieldNameSet, replaceText| Constructor and Description |
|---|
AnalyseHtmlHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
disableElement(org.jsoup.nodes.Element e)
功能描述:根据控件的类型将控件设置为无效(用于解决原来调用readOnlyElement方法时,控件虽然readlony无法编辑,单验证框架要求填写值,导致页面无法提交)
|
static org.jsoup.nodes.Document |
filterHtml(org.jsoup.nodes.Document htmlDoc,
java.util.List<AccessWidget> accessList) |
static void |
filterHtmlElement(org.jsoup.nodes.Element e,
java.lang.String filterType) |
static void |
filterHtmlElements(org.jsoup.select.Elements eles,
java.lang.String filterType)
功能描述:过滤元素
|
static void |
main(java.lang.String[] args) |
static org.jsoup.nodes.Document |
processDocument(org.jsoup.nodes.Document htmlDoc,
java.util.List<Widget> widgetList,
java.util.List<java.lang.String> removedIdList,
java.util.List<java.lang.String> readOnlyIdList) |
static org.jsoup.nodes.Document |
processDocument(org.jsoup.nodes.Document htmlDoc,
java.util.List<Widget> widgetList,
java.util.List<java.lang.String> removedIdList,
java.util.List<java.lang.String> readOnlyIdList,
java.util.List<Widget> allWdigesInGroup)
功能描述: 对某个控件组中的控件根据权限进行分别处理
|
static org.jsoup.nodes.Document |
processDocumentByRight(org.jsoup.nodes.Document htmlDoc,
java.util.List<Widget> widgetList,
java.util.List<java.lang.String> readOnlyIdList,
java.util.List<java.lang.String> removedIdList,
java.util.List<java.lang.String> editIdList)
功能描述:根据最大最小权限处理html
|
static void |
readOnlyElement(org.jsoup.nodes.Element e)
功能描述:根据控件的类型将控件设置为只读
|
static org.jsoup.nodes.Document |
readOnlyElementById(org.jsoup.nodes.Document htmlDoc,
java.lang.String id)
功能描述:根据id将html设置为只读
|
static org.jsoup.nodes.Document |
readOnlyElementByName(org.jsoup.nodes.Document htmlDoc,
java.lang.String name)
功能描述:根据name将html设置为只读
|
static org.jsoup.nodes.Document |
removeElementById(org.jsoup.nodes.Document htmlDoc,
java.lang.String id)
功能描述:根据html元素的id删除该元素
|
static org.jsoup.nodes.Document |
removeElementByName(org.jsoup.nodes.Document htmlDoc,
java.lang.String name)
功能描述:根据html元素的name删除该元素
|
static void |
replaceElement(org.jsoup.nodes.Element e) |
getReplaceText, isButtonOrFieldpublic static org.jsoup.nodes.Document processDocument(org.jsoup.nodes.Document htmlDoc,
java.util.List<Widget> widgetList,
java.util.List<java.lang.String> removedIdList,
java.util.List<java.lang.String> readOnlyIdList)
public static org.jsoup.nodes.Document processDocument(org.jsoup.nodes.Document htmlDoc,
java.util.List<Widget> widgetList,
java.util.List<java.lang.String> removedIdList,
java.util.List<java.lang.String> readOnlyIdList,
java.util.List<Widget> allWdigesInGroup)
htmlDoc - 原有页面内容widgetList - 需处理的控件对象集合removedIdList - 不可见权限的控件id集合readOnlyIdList - 只读权限的控件id集合allWdigesInGroup - 当前控件组中的所有的控件public static org.jsoup.nodes.Document processDocumentByRight(org.jsoup.nodes.Document htmlDoc,
java.util.List<Widget> widgetList,
java.util.List<java.lang.String> readOnlyIdList,
java.util.List<java.lang.String> removedIdList,
java.util.List<java.lang.String> editIdList)
htmlDoc - 原始页面内容widgetList - 要过滤的控件对象readOnlyIdList - 只读权限控件wd - 控件组对象public static org.jsoup.nodes.Document removeElementByName(org.jsoup.nodes.Document htmlDoc,
java.lang.String name)
htmlDoc - name - public static org.jsoup.nodes.Document removeElementById(org.jsoup.nodes.Document htmlDoc,
java.lang.String id)
htmlDoc - id - public static org.jsoup.nodes.Document readOnlyElementByName(org.jsoup.nodes.Document htmlDoc,
java.lang.String name)
htmlDoc - name - public static org.jsoup.nodes.Document readOnlyElementById(org.jsoup.nodes.Document htmlDoc,
java.lang.String id)
htmlDoc - id - public static void filterHtmlElements(org.jsoup.select.Elements eles,
java.lang.String filterType)
eles - 待过滤元素filterType - 过滤类型public static void filterHtmlElement(org.jsoup.nodes.Element e,
java.lang.String filterType)
public static void replaceElement(org.jsoup.nodes.Element e)
public static void readOnlyElement(org.jsoup.nodes.Element e)
e - public static void disableElement(org.jsoup.nodes.Element e)
e - public static org.jsoup.nodes.Document filterHtml(org.jsoup.nodes.Document htmlDoc,
java.util.List<AccessWidget> accessList)
public static void main(java.lang.String[] args)