⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultvalidator.html

📁 turbine教程
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#getRequiredMessage()">getRequiredMessage</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the value of requiredMessage.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#init(java.util.Map)">init</A></B>(java.util.Map&nbsp;paramMap)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extract the relevant parameters from the constraints listed in <rule> tags within the intake.xml file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#isRequired()">isRequired</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the value of required.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#isValid(java.lang.String)">isValid</A></B>(java.lang.String&nbsp;testValue)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine whether a testValue meets the criteria specified in the constraints defined for this validator</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#setMask(java.lang.String)">setMask</A></B>(java.lang.String&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of mask.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#setMaskMessage(java.lang.String)">setMaskMessage</A></B>(java.lang.String&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of maskMessage.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#setMaxLength(int)">setMaxLength</A></B>(int&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of maxLength.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#setMaxLengthMessage(java.lang.String)">setMaxLengthMessage</A></B>(java.lang.String&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of maxLengthMessage.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#setMinLength(int)">setMinLength</A></B>(int&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of minLength.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#setMinLengthMessage(java.lang.String)">setMinLengthMessage</A></B>(java.lang.String&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of minLengthMessage.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#setRequired(boolean)">setRequired</A></B>(boolean&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of required.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#setRequiredMessage(java.lang.String)">setRequiredMessage</A></B>(java.lang.String&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of requiredMessage.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="required"><!-- --></A><H3>required</H3><PRE>protected boolean <B>required</B></PRE><DL></DL><HR><A NAME="requiredMessage"><!-- --></A><H3>requiredMessage</H3><PRE>protected java.lang.String <B>requiredMessage</B></PRE><DL></DL><HR><A NAME="mask"><!-- --></A><H3>mask</H3><PRE>protected org.apache.regexp.RE <B>mask</B></PRE><DL></DL><HR><A NAME="maskMessage"><!-- --></A><H3>maskMessage</H3><PRE>protected java.lang.String <B>maskMessage</B></PRE><DL></DL><HR><A NAME="minLength"><!-- --></A><H3>minLength</H3><PRE>protected int <B>minLength</B></PRE><DL></DL><HR><A NAME="minLengthMessage"><!-- --></A><H3>minLengthMessage</H3><PRE>protected java.lang.String <B>minLengthMessage</B></PRE><DL></DL><HR><A NAME="maxLength"><!-- --></A><H3>maxLength</H3><PRE>protected int <B>maxLength</B></PRE><DL></DL><HR><A NAME="maxLengthMessage"><!-- --></A><H3>maxLengthMessage</H3><PRE>protected java.lang.String <B>maxLengthMessage</B></PRE><DL></DL><HR><A NAME="message"><!-- --></A><H3>message</H3><PRE>protected java.lang.String <B>message</B></PRE><DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="DefaultValidator(java.util.Map)"><!-- --></A><H3>DefaultValidator</H3><PRE>public <B>DefaultValidator</B>(java.util.Map&nbsp;paramMap)                 throws <A HREF="../../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></PRE><DL></DL><HR><A NAME="DefaultValidator()"><!-- --></A><H3>DefaultValidator</H3><PRE>public <B>DefaultValidator</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="init(java.util.Map)"><!-- --></A><H3>init</H3><PRE>public void <B>init</B>(java.util.Map&nbsp;paramMap)          throws <A HREF="../../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></PRE><DL><DD>Extract the relevant parameters from the constraints listed in <rule> tags within the intake.xml file.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/InitableByConstraintMap.html#init(java.util.Map)">init</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/InitableByConstraintMap.html">InitableByConstraintMap</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>paramMap</CODE> - a <code>Map</code> of <code>Rule</code>'s containing constraints on the input.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></CODE> - if an error occurs</DL></DD></DL><HR><A NAME="isValid(java.lang.String)"><!-- --></A><H3>isValid</H3><PRE>public boolean <B>isValid</B>(java.lang.String&nbsp;testValue)</PRE><DL><DD>Determine whether a testValue meets the criteria specified in the constraints defined for this validator<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/Validator.html#isValid(java.lang.String)">isValid</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/Validator.html">Validator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>testValue</CODE> - a <code>String</code> to be tested<DT><B>Returns:</B><DD>true if valid, false otherwise</DL></DD></DL><HR><A NAME="assertValidity(java.lang.String)"><!-- --></A><H3>assertValidity</H3><PRE>public void <B>assertValidity</B>(java.lang.String&nbsp;testValue)                    throws <A HREF="../../../../../../org/apache/turbine/services/intake/validator/ValidationException.html">ValidationException</A></PRE><DL><DD>Determine whether a testValue meets the criteria specified in the constraints defined for this validator<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/Validator.html#assertValidity(java.lang.String)">assertValidity</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/Validator.html">Validator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>testValue</CODE> - a <code>String</code> to be tested<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/ValidationException.html">ValidationException</A></CODE> - containing an error message if the testValue did not pass the validation tests.</DL></DD></DL><HR><A NAME="getMessage()"><!-- --></A><H3>getMessage</H3><PRE>public java.lang.String <B>getMessage</B>()</PRE><DL><DD>Get the last error message resulting from invalid input.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/Validator.html#getMessage()">getMessage</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/Validator.html">Validator</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>String</code> message, or the empty String "".</DL></DD></DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -