Vanilla Development Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: web/servlets



Date:	Tuesday March 9, 1999 @ 0:24
Author:	tanner

Update of /home/netrek/cvsroot/web/servlets
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv7690

Modified Files:
	MailingList.java 
Log Message:
More documentation changes. Does anyone else hate documenting? Does anyone 
read these entries. :-)



****************************************

Index: web/servlets/MailingList.java
diff -u web/servlets/MailingList.java:1.3 web/servlets/MailingList.java:1.4
--- web/servlets/MailingList.java:1.3	Mon Mar  8 19:34:57 1999
+++ web/servlets/MailingList.java	Tue Mar  9 00:24:26 1999
@@ -24,11 +24,20 @@
 import java.io.*;
 import java.util.Vector;
 
-/*
- * 
+/**
+ * Class that encapsulates a directory hierarchy in the format of YYYY/mmm to
+ * allow easy publishing mailing lists to the web.<p>
+ *
+ * One of the most annoying taskings of maintaining a mailing list archive on
+ * the web is the "index" page. This page typically shows the year and the
+ * months for that year as links to the actual archive. New month or new year,
+ * use to mean a manual fixes to the index page. This code eliminates that
+ * problem by automatically traversing a parent directory looking for child that
+ * match the YYYY/mmm format and saving them to a list so the programmer can
+ * manipulate and display the information in a programtic fashion.
+ *
  * @author      Bob Tanner
- * @version     $Revision: 1.3 $ $Date: 1999/03/09 01:34:57 $
- * @since       MailingList1.0
+ * @version     $Revision: 1.4 $ $Date: 1999/03/09 06:24:26 $
  */
 
 public class MailingList {
@@ -51,11 +60,23 @@
     }
   }
 
+ /**
+  * Construct a MailingList object.
+  *
+  * @param archive the array used to start each directory entry matching
+  *                YYYY/mmm 
+  */
   public MailingList(Vector archive) {
     numbers = new MonthToNumber();
     list = archive;
   }
   
+  /**
+   * Tranverses the pathname looking for directory-children that fix the
+   * YYYY/mmm profile saving them to the linked list for later retrieval.
+   *
+   * @param pathname the directory to traverse looking for YYYY/mmm pairs
+   */
   public void DirectoryToLinkedList(String pathname) {
 
     setParent(pathname);
@@ -79,6 +100,10 @@
 	list.insertElementAt(node, year);
 	break;
       }
+
+      // Get all the months for each directory that represents a year, sort
+      // those months and save the months for each year in a colaterally
+      // crossreferenced array.
       
       String[] months = years[year].list();
       sorted_months = sortMonths(months);