You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by gl...@locus.apache.org on 2000/11/06 02:20:15 UTC

cvs commit: jakarta-taglibs/datetime/src/org/apache/taglibs/datetime WeekdaysTag.java

glenn       00/11/05 17:20:14

  Modified:    datetime/src/org/apache/taglibs/datetime WeekdaysTag.java
  Log:
  Cleanup for release
  
  Revision  Changes    Path
  1.2       +18 -16    jakarta-taglibs/datetime/src/org/apache/taglibs/datetime/WeekdaysTag.java
  
  Index: WeekdaysTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/datetime/src/org/apache/taglibs/datetime/WeekdaysTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WeekdaysTag.java	2000/09/29 16:13:57	1.1
  +++ WeekdaysTag.java	2000/11/06 01:20:14	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-taglibs/datetime/src/org/apache/taglibs/datetime/WeekdaysTag.java,v 1.1 2000/09/29 16:13:57 glenn Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/09/29 16:13:57 $
  + * $Header: /home/cvs/jakarta-taglibs/datetime/src/org/apache/taglibs/datetime/WeekdaysTag.java,v 1.2 2000/11/06 01:20:14 glenn Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/11/06 01:20:14 $
    *
    * ====================================================================
    *
  @@ -87,7 +87,7 @@
    * <tagclass>org.apache.taglibs.datetime.WeekdaysTag</tagclass>
    * <teiclass>org.apache.taglibs.datetime.WeekdaysTEI</teiclass>
    * <bodycontent>JSP</bodycontent>
  - * <info>Used to loop through all the weekdays of the year.</info>
  + * <info>Loop through all the days of the week.</info>
    *   <attribute>
    *     <name>id</name>
    *     <sessuired>true</sessuired>
  @@ -116,7 +116,7 @@
        *
        * @return EVAL_BODY_TAG
        */
  -    public int doStartTag() throws JspException
  +    public final int doStartTag() throws JspException
       {
           SimpleDateFormat sdf;
   	String pattern = "yyyy";
  @@ -145,7 +145,7 @@
        *
        * @return EVAL_BODY_TAG if there is another weekday, or SKIP_BODY if there are no more weekdays
        */
  -    public int doAfterBody() throws JspException
  +    public final int doAfterBody() throws JspException
       {
   	// See if we are done looping through weekdays
   	day++;
  @@ -168,7 +168,7 @@
        * Method called at end of Tag
        * @return EVAL_PAGE
        */
  -    public int doEndTag() throws JspException
  +    public final int doEndTag() throws JspException
       {
   	try
   	{
  @@ -184,8 +184,10 @@
       /**
        * Locale flag, if set to true, use weekday names
        * for client's preferred locale if known.
  +     *
  +     * @param String either <b>true</b> or <b>false</b>
        */
  -    public void setLocale(String str)
  +    public final void setLocale(String str)
       {
   	if( str.equals("true") )
   	    locale = pageContext.getRequest().getLocale();
  @@ -196,9 +198,9 @@
        * <p>
        * &lt;jsp:getProperty name=<i>"id"</i> property="shortWeekday"/&gt;
        *
  -     * @return the short name of the weekday as a string
  +     * @return String - short name of the weekday
        */
  -    public String getShortWeekday()
  +    public final String getShortWeekday()
       {
   	return short_weekdays[day];
       }
  @@ -208,9 +210,9 @@
        * <p>
        * &lt;jsp:getProperty name=<i>"id"</i> property="weekday"/&gt;
        *
  -     * @return the long name of the weekday as a string
  +     * @return String - long name of the weekday
        */
  -    public String getWeekday()
  +    public final String getWeekday()
       {  
           return long_weekdays[day];
       }
  @@ -220,9 +222,9 @@
        * <p> 
        * &lt;jsp:getProperty name=<i>"id"</i> property="dayOfWeek"/&gt;
        *  
  -     * @return the number of the day of the week as a string
  +     * @return String - number of the day of the week
        */     
  -    public String getDayOfWeek()
  +    public final String getDayOfWeek()
       {   
           return "" + day_num;
       }
  @@ -230,9 +232,9 @@
       /**
        * Remove the script variable after weekdays tag closed out
        */
  -    public void release()
  +    public final void release()
       {
  -	if( id.length() > 0 )
  +	if( id != null && id.length() > 0 )
   	    pageContext.removeAttribute(id,PageContext.PAGE_SCOPE);
       }
   }