📄 datestringvalidator.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Dec 06 19:57:08 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Class DateStringValidator</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DateStringValidator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="DateStringValidator.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_org.apache.turbine.services.intake.validator.DefaultValidator">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.turbine.services.intake.validator</FONT><BR>Class DateStringValidator</H2><PRE>java.lang.Object | +--<A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html">org.apache.turbine.services.intake.validator.DefaultValidator</A> | +--<B>org.apache.turbine.services.intake.validator.DateStringValidator</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../../org/apache/turbine/services/intake/validator/InitableByConstraintMap.html">InitableByConstraintMap</A>, <A HREF="../../../../../../org/apache/turbine/services/intake/validator/Validator.html">Validator</A></DD></DL><HR><DL><DT>public class <B>DateStringValidator</B><DT>extends <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html">DefaultValidator</A></DL><P>Validates numbers with the following constraints in addition to those listed in DefaultValidator. <table> <tr><th>Name</th><th>Valid Values</th><th>Default Value</th></tr> <tr><td>format</td><td>see SimpleDateFormat javadoc</td> <td> </td></tr> <tr><td>formatx</td><td>see SimpleDateFormat javadoc</td> <td> </td></tr> <tr><td colspan=3>where x is >= 0 to specify multiple date formats. Only one format rule should have a message</td></tr> <tr><td>flexible</td><td>true, as long as DateFormat can parse the date, allow it, and false</td> <td>false</td></tr> </table><P><DL><DT><B>Version: </B><DD>$Id: DateStringValidator.java,v 1.1 2002/07/11 13:21:40 mpoeschl Exp $</DD><DT><B>Author: </B><DD><a href="mailto:jmcnally@collab.net>John McNally</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_org.apache.turbine.services.intake.validator.DefaultValidator"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class org.apache.turbine.services.intake.validator.<A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html">DefaultValidator</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#mask">mask</A>, <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#maskMessage">maskMessage</A>, <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#maxLength">maxLength</A>, <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#maxLengthMessage">maxLengthMessage</A>, <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#message">message</A>, <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#minLength">minLength</A>, <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#minLengthMessage">minLengthMessage</A>, <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#required">required</A>, <A HREF="../../../../../../org/apache/turbine/services/intake/validator/DefaultValidator.html#requiredMessage">requiredMessage</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#DateStringValidator()">DateStringValidator</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#DateStringValidator(java.util.Map)">DateStringValidator</A></B>(java.util.Map paramMap)</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#doAssertValidity(java.lang.String)">doAssertValidity</A></B>(java.lang.String testValue)</CODE><BR> 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> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#getDateFormatMessage()">getDateFormatMessage</A></B>()</CODE><BR> Get the value of minLengthMessage.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.List</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#getDateFormats()">getDateFormats</A></B>()</CODE><BR> Get the value of dateFormats.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#init(java.util.Map)">init</A></B>(java.util.Map paramMap)</CODE><BR> 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> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#isFlexible()">isFlexible</A></B>()</CODE><BR> Get the value of flexible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Date</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#parse(java.lang.String)">parse</A></B>(java.lang.String s)</CODE><BR> Parses the String s according to the rules/formats for this validator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#setDateFormatMessage(java.lang.String)">setDateFormatMessage</A></B>(java.lang.String v)</CODE><BR> Only sets the message if the new message has some information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#setDateFormats(java.util.List)">setDateFormats</A></B>(java.util.List v)</CODE><BR> Set the value of dateFormats.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/intake/validator/DateStringValidator.html#setFlexible(boolean)">setFlexible</A></B>(boolean v)</CODE><BR> Set the value of flexible.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.apache.turbine.services.intake.validator.DefaultValidator"><!-- --></A>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -