public class AnalyseHtmlHelper extends BaseAnalyseHtmlHelper
AnalyseHtmlHelper
功能描述: 解析html帮助方法
创建人: 陈伟
创建日期: 2013-12-9 下午03:00:48
开发环境: JDK6.0| Constructor and Description |
|---|
AnalyseHtmlHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
disableElement(org.jsoup.nodes.Element e)
功能描述:根据控件的类型将控件设置为无效(用于解决原来调用readOnlyElement方法时,控件虽然readlony无法编辑,单验证框架要求填写值,导致页面无法提交)
|
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 org.jsoup.nodes.Document |
processDocumentByRight(org.jsoup.nodes.Document htmlDoc,
java.lang.String widgetGroupCode,
Staff staff,
java.lang.Integer userType)
功能描述:根据控件权限处理html
|
static org.jsoup.nodes.Document |
readOnlyElement(org.jsoup.nodes.Document htmlDoc,
Widget widget)
对原始html内容做控件权限过滤
|
static org.jsoup.nodes.Document |
readOnlyElementByAttr(org.jsoup.nodes.Document htmlDoc,
java.lang.String attr,
java.lang.String attrValue)
根据html原始的属性,删除该原始
|
static org.jsoup.nodes.Document |
readOnlyElementByClass(org.jsoup.nodes.Document htmlDoc,
java.lang.String className)
根据html原始的属性,删除该原始
|
static org.jsoup.nodes.Document |
readOnlyElementByName(org.jsoup.nodes.Document htmlDoc,
java.lang.String name)
功能描述:根据name将html设置为只读
|
static org.jsoup.nodes.Document |
removeElement(org.jsoup.nodes.Document htmlDoc,
Widget widget)
对原始html内容做控件权限过滤
|
static org.jsoup.nodes.Document |
removeElementByAttr(org.jsoup.nodes.Document htmlDoc,
java.lang.String attr,
java.lang.String attrValue)
根据html原始的属性,删除该原始
|
static org.jsoup.nodes.Document |
removeElementByClass(org.jsoup.nodes.Document htmlDoc,
java.lang.String className)
根据html原始的属性,删除该原始
|
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 processDocumentByRight(org.jsoup.nodes.Document htmlDoc,
java.lang.String widgetGroupCode,
Staff staff,
java.lang.Integer userType)
htmlDoc - 原始页面内容widgetGroupCode - 控件分组唯一编码staff - 当前用户public static org.jsoup.nodes.Document removeElement(org.jsoup.nodes.Document htmlDoc,
Widget widget)
htmlDoc - 原始htmlwidget - 控件public static org.jsoup.nodes.Document readOnlyElement(org.jsoup.nodes.Document htmlDoc,
Widget widget)
htmlDoc - 原始htmlwidget - 控件public static org.jsoup.nodes.Document removeElementByName(org.jsoup.nodes.Document htmlDoc,
java.lang.String name)
htmlDoc - name - public static org.jsoup.nodes.Document removeElementByAttr(org.jsoup.nodes.Document htmlDoc,
java.lang.String attr,
java.lang.String attrValue)
htmlDoc - 原htmlattr - 属性名attrValue - 属性值public static org.jsoup.nodes.Document removeElementByClass(org.jsoup.nodes.Document htmlDoc,
java.lang.String className)
htmlDoc - 原htmlclassName - 类名public static org.jsoup.nodes.Document readOnlyElementByName(org.jsoup.nodes.Document htmlDoc,
java.lang.String name)
htmlDoc - 原htmlname - 控件namepublic static org.jsoup.nodes.Document readOnlyElementByAttr(org.jsoup.nodes.Document htmlDoc,
java.lang.String attr,
java.lang.String attrValue)
htmlDoc - 原htmlattr - 属性名attrValue - 属性值public static org.jsoup.nodes.Document readOnlyElementByClass(org.jsoup.nodes.Document htmlDoc,
java.lang.String className)
htmlDoc - 原htmlclassName - 类名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 disableElement(org.jsoup.nodes.Element e)
e -