diff --git a/projects/samskivert/build.xml b/projects/samskivert/build.xml index 9556c4a5..b5141af0 100644 --- a/projects/samskivert/build.xml +++ b/projects/samskivert/build.xml @@ -1,40 +1,43 @@ - - - - - - - - + + + + + + + + + + + - + - - - - + + + + - + - @@ -43,8 +46,11 @@ + packagenames="${doc.packages}" + windowtitle="${app.name} API" + doctitle="${app.name} API" + bottom="Copyright © 2001 ${copyright.holder}. All Rights Reserved." + destdir="${javadoc.dir}"> @@ -55,8 +61,8 @@ - + diff --git a/projects/samskivert/src/java/com/samskivert/Log.java b/projects/samskivert/src/java/com/samskivert/Log.java index fb678441..43aa9f6b 100644 --- a/projects/samskivert/src/java/com/samskivert/Log.java +++ b/projects/samskivert/src/java/com/samskivert/Log.java @@ -1,5 +1,5 @@ // -// $Id: Log.java,v 1.2 2001/08/11 22:43:28 mdb Exp $ +// $Id: Log.java,v 1.3 2001/08/12 01:34:30 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -22,10 +22,26 @@ package com.samskivert; /** * A placeholder class that contains a reference to the log object used by - * the samskivert package. + * the samskivert package. This is a useful pattern to use when using the + * samskivert logging facilities. One creates a top-level class like this + * one that instantiates a log object with an name that identifies log + * messages from that package and then provides static methods that + * generate log messages using that instance. Then, classes in that + * package need only import the log wrapper class and can easily use it to + * generate log messages. For example: + * + *
+ * import com.samskivert.Log;
+ * // ...
+ * Log.warning("All hell is breaking loose!");
+ * // ...
+ * 
+ * + * @see com.samskivert.util.Log */ public class Log { + /** The static log instance configured for use by this package. */ public static com.samskivert.util.Log log = new com.samskivert.util.Log("samskivert"); diff --git a/projects/samskivert/src/java/com/samskivert/jdbc/jora/package.html b/projects/samskivert/src/java/com/samskivert/jdbc/jora/package.html new file mode 100644 index 00000000..50b281e7 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/jdbc/jora/package.html @@ -0,0 +1,58 @@ + + + + + + + + Provides a mapping between JDBC tables and Java objects. + +

This is a hacked version of JORA 2.06, a library for automatically + mapping RDBMS database rows to Java objects and vice versa. It's + simple, it uses reflection and doesn't require any classfile + post-processing or external configuration information. + +

"That's all great but why is it hacked?" wonders the astute + reader. Well, I couldn't quite cope with the error handling paradigm + that it used (catch all SQL exceptions internally and pass them to + an application-wide error handler method) and a few seconds thought + on the matter led me to believe that there is not a simple way to + allow a choice of error handling paradigms (the methods have to + throw SQLException or not). So I took the easy way out and forked + the codebase. + +

The code is pretty stable, so I don't expect to be merging in + updates with any frequency. I promise to be a good monkey and submit + any useful modifications that I make back to the original + maintainer. Fortunately the license was unrestrictive enough to + allow me to do this, otherwise I'd probably be stuck reinventing the + wheel or using something that does less of what I want. Three cheers + for free software. + +

The JORA package was written by Konstantin Knizhnik and the + original is available from + his web site. + + + diff --git a/projects/samskivert/src/java/com/samskivert/jdbc/package.html b/projects/samskivert/src/java/com/samskivert/jdbc/package.html new file mode 100644 index 00000000..89ab74a4 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/jdbc/package.html @@ -0,0 +1,33 @@ + + + + + + + + Provides support services to applications that access relational + databases via JDBC. + + + diff --git a/projects/samskivert/src/java/com/samskivert/net/cddb/CDDB.java b/projects/samskivert/src/java/com/samskivert/net/cddb/CDDB.java index ebf04a8e..1f09cad3 100644 --- a/projects/samskivert/src/java/com/samskivert/net/cddb/CDDB.java +++ b/projects/samskivert/src/java/com/samskivert/net/cddb/CDDB.java @@ -1,5 +1,5 @@ // -// $Id: CDDB.java,v 1.7 2001/08/11 22:43:28 mdb Exp $ +// $Id: CDDB.java,v 1.8 2001/08/12 01:34:31 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -50,6 +50,11 @@ public class CDDB */ public static String CLIENT_VERSION; // assigned during static init + /** + * This class encapsulates the information needed to look up a full + * CDDB record for a particular disc. An array of them are returned in + * response to a CDDB query. + */ public static class Entry { /** The category to which this entry belongs. */ @@ -500,7 +505,7 @@ public class CDDB */ static { - StringTokenizer tok = new StringTokenizer("$Revision: 1.7 $"); + StringTokenizer tok = new StringTokenizer("$Revision: 1.8 $"); tok.nextToken(); CLIENT_VERSION = tok.nextToken(); } diff --git a/projects/samskivert/src/java/com/samskivert/net/cddb/package.html b/projects/samskivert/src/java/com/samskivert/net/cddb/package.html new file mode 100644 index 00000000..2413df73 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/net/cddb/package.html @@ -0,0 +1,57 @@ + + + + + + + + Routines for accessing a CDDB server. + +

The {@link com.samskivert.net.cddb.CDDB} class provides the + primary interface to the CDDB services. This service does not + provide a means to obtain the CD identification information that + you'll need to perform a CDDB lookup. In the application that + motivated the creation of these services, a cdparanoia + process was spawned to read the disc info. Other mechanisms surely + exist. + +

Use of the CDDB class is fairly straightforward: + +

+      CDDB cddb = new CDDB();
+      cddb.connect("www.freedb.org");
+      CDDB.Entry[] entries = cddb.query(discid, frameOffsets, length);
+      for (int i = 0; i < entries.length; i++) {
+          CDDB.Detail detail = cddb.read(entries[i].category,
+                                         entries[i].discid);
+          // do your thang now...
+      }
+    
+ +

These services presently do not provide a mechanism for submitting + a CDDB entry (which involves sending an email). It surely will in + the future. + + + diff --git a/projects/samskivert/src/java/com/samskivert/net/package.html b/projects/samskivert/src/java/com/samskivert/net/package.html new file mode 100644 index 00000000..f24ca631 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/net/package.html @@ -0,0 +1,32 @@ + + + + + + + + Provides a network related services and patterns. + + + diff --git a/projects/samskivert/src/java/com/samskivert/package.html b/projects/samskivert/src/java/com/samskivert/package.html new file mode 100644 index 00000000..4a9c83a2 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/package.html @@ -0,0 +1,33 @@ + + + + + + + + Nothing lives here except the {@link com.samskivert.util.Log} wrapper + that is used by the samskivert services to generate log messages. + + + diff --git a/projects/samskivert/src/java/com/samskivert/servlet/package.html b/projects/samskivert/src/java/com/samskivert/servlet/package.html new file mode 100644 index 00000000..f6c073e5 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/servlet/package.html @@ -0,0 +1,33 @@ + + + + + + + + Provides services and patterns that are useful in developing web + applications. + + + diff --git a/projects/samskivert/src/java/com/samskivert/servlet/user/InvalidPasswordException.java b/projects/samskivert/src/java/com/samskivert/servlet/user/InvalidPasswordException.java index 03496dff..dac36025 100644 --- a/projects/samskivert/src/java/com/samskivert/servlet/user/InvalidPasswordException.java +++ b/projects/samskivert/src/java/com/samskivert/servlet/user/InvalidPasswordException.java @@ -1,5 +1,5 @@ // -// $Id: InvalidPasswordException.java,v 1.2 2001/08/11 22:43:28 mdb Exp $ +// $Id: InvalidPasswordException.java,v 1.3 2001/08/12 01:34:31 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -20,6 +20,9 @@ package com.samskivert.servlet.user; +/** + * Thrown during authentication when an invalid password is supplied. + */ public class InvalidPasswordException extends Exception { public InvalidPasswordException (String message) diff --git a/projects/samskivert/src/java/com/samskivert/servlet/user/InvalidUsernameException.java b/projects/samskivert/src/java/com/samskivert/servlet/user/InvalidUsernameException.java index 281a6a5b..0bd834c9 100644 --- a/projects/samskivert/src/java/com/samskivert/servlet/user/InvalidUsernameException.java +++ b/projects/samskivert/src/java/com/samskivert/servlet/user/InvalidUsernameException.java @@ -1,5 +1,5 @@ // -// $Id: InvalidUsernameException.java,v 1.2 2001/08/11 22:43:28 mdb Exp $ +// $Id: InvalidUsernameException.java,v 1.3 2001/08/12 01:34:31 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -20,6 +20,9 @@ package com.samskivert.servlet.user; +/** + * Thrown during user account creation if an invalid username is supplied. + */ public class InvalidUsernameException extends Exception { public InvalidUsernameException (String message) diff --git a/projects/samskivert/src/java/com/samskivert/servlet/user/NoSuchUserException.java b/projects/samskivert/src/java/com/samskivert/servlet/user/NoSuchUserException.java index 9710ba19..49750a59 100644 --- a/projects/samskivert/src/java/com/samskivert/servlet/user/NoSuchUserException.java +++ b/projects/samskivert/src/java/com/samskivert/servlet/user/NoSuchUserException.java @@ -1,5 +1,5 @@ // -// $Id: NoSuchUserException.java,v 1.2 2001/08/11 22:43:28 mdb Exp $ +// $Id: NoSuchUserException.java,v 1.3 2001/08/12 01:34:31 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -20,6 +20,9 @@ package com.samskivert.servlet.user; +/** + * Thrown when a user cannot be located in the user database. + */ public class NoSuchUserException extends Exception { public NoSuchUserException (String message) diff --git a/projects/samskivert/src/java/com/samskivert/servlet/user/UserExistsException.java b/projects/samskivert/src/java/com/samskivert/servlet/user/UserExistsException.java index d93f4fe1..c43e1e9c 100644 --- a/projects/samskivert/src/java/com/samskivert/servlet/user/UserExistsException.java +++ b/projects/samskivert/src/java/com/samskivert/servlet/user/UserExistsException.java @@ -1,5 +1,5 @@ // -// $Id: UserExistsException.java,v 1.2 2001/08/11 22:43:28 mdb Exp $ +// $Id: UserExistsException.java,v 1.3 2001/08/12 01:34:31 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -20,6 +20,10 @@ package com.samskivert.servlet.user; +/** + * Thrown during user account creation when a user with the requested + * username already exists. + */ public class UserExistsException extends Exception { public UserExistsException (String message) diff --git a/projects/samskivert/src/java/com/samskivert/servlet/user/UserRepository.java b/projects/samskivert/src/java/com/samskivert/servlet/user/UserRepository.java index 06c5ff51..7df78e9c 100644 --- a/projects/samskivert/src/java/com/samskivert/servlet/user/UserRepository.java +++ b/projects/samskivert/src/java/com/samskivert/servlet/user/UserRepository.java @@ -1,5 +1,5 @@ // -// $Id: UserRepository.java,v 1.14 2001/08/11 22:43:28 mdb Exp $ +// $Id: UserRepository.java,v 1.15 2001/08/12 01:34:31 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -33,6 +33,11 @@ import com.samskivert.jdbc.MySQLRepository; import com.samskivert.jdbc.jora.*; import com.samskivert.util.IntMap; +/** + * Interfaces with the RDBMS in which the user information is stored. The + * user repository encapsulates the creating, loading and management of + * users and sessions. + */ public class UserRepository extends MySQLRepository { /** diff --git a/projects/samskivert/src/java/com/samskivert/servlet/user/package.html b/projects/samskivert/src/java/com/samskivert/servlet/user/package.html new file mode 100644 index 00000000..08622f88 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/servlet/user/package.html @@ -0,0 +1,56 @@ + + + + + + + + Provides services for managing a database of users in a web + application or suite of web applications. + +

This is accomplished through the + {@link com.samskivert.servlet.user.UserManager} which can be used to + load user objects, create new users, update existing users and + generally all of the user-related things that you'd like to do. The + user manager manages cookies for persistent or session-only + authentication and provides support for requiring that a user be + authenticated in order to access a page. + +

The user manager stores user information in an SQL database which + is accomplished by the + {@link com.samskivert.servlet.user.UserRepository} class. Presently, + it assumes that it is making use of a MySQL database, but the + dependencies are minimal. Eventually I'll modify the repository + abstraction so that the database-specific support code can be chosen + at runtime rather than compile time. Why I designed it the way it is + in the first place, I can't imagine. I'm a bad monkey. + +

The user table (and associated + {@link com.samskivert.servlet.user.User} object) are inentionally + minimal. The expectation is that application specific data will be + stored and accessed via some other table that is keyed on the userid + provided by these services. + + + diff --git a/projects/samskivert/src/java/com/samskivert/servlet/util/package.html b/projects/samskivert/src/java/com/samskivert/servlet/util/package.html new file mode 100644 index 00000000..2a025480 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/servlet/util/package.html @@ -0,0 +1,32 @@ + + + + + + + + Provides servlet-related utilities. + + + diff --git a/projects/samskivert/src/java/com/samskivert/swing/package.html b/projects/samskivert/src/java/com/samskivert/swing/package.html new file mode 100644 index 00000000..8b107696 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/swing/package.html @@ -0,0 +1,33 @@ + + + + + + + + Provides extensions and patterns for building user interfaces with + Swing. + + + diff --git a/projects/samskivert/src/java/com/samskivert/swing/util/MenuUtil.java b/projects/samskivert/src/java/com/samskivert/swing/util/MenuUtil.java index bfd15bd3..3150b863 100644 --- a/projects/samskivert/src/java/com/samskivert/swing/util/MenuUtil.java +++ b/projects/samskivert/src/java/com/samskivert/swing/util/MenuUtil.java @@ -1,8 +1,8 @@ // -// $Id: MenuUtil.java,v 1.2 2001/08/11 22:43:29 mdb Exp $ +// $Id: MenuUtil.java,v 1.3 2001/08/12 01:34:31 mdb Exp $ // // samskivert library - useful routines for java programs -// Copyright (C) 2001 Michael Bayne +// Copyright (C) 2001 Walter Korman // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published @@ -31,10 +31,10 @@ import javax.swing.*; * menu in a frame that listens to its own menus (a common case) can * be simplified like so: * - * + *

  * accel = KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.ALT_MASK);
  * MenuUtil.addMenuItem(this, menuFile, "New", KeyEvent.VK_N, acc);
- * 
+ * 
*/ public class MenuUtil { diff --git a/projects/samskivert/src/java/com/samskivert/swing/util/package.html b/projects/samskivert/src/java/com/samskivert/swing/util/package.html new file mode 100644 index 00000000..66a675e8 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/swing/util/package.html @@ -0,0 +1,32 @@ + + + + + + + + Provides Swing-related utility services. + + + diff --git a/projects/samskivert/src/java/com/samskivert/util/Log.java b/projects/samskivert/src/java/com/samskivert/util/Log.java index a1218f27..f4234e62 100644 --- a/projects/samskivert/src/java/com/samskivert/util/Log.java +++ b/projects/samskivert/src/java/com/samskivert/util/Log.java @@ -1,5 +1,5 @@ // -// $Id: Log.java,v 1.4 2001/08/11 22:43:29 mdb Exp $ +// $Id: Log.java,v 1.5 2001/08/12 01:34:31 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -24,7 +24,7 @@ package com.samskivert.util; * The log services provide debug, info and warning message logging * capabilities for a set of modules. These log services are designed to * provide the basic functionality needed by the samskivert codebase. It - * is expected that the LogProvider interface will be used to + * is expected that the {@link LogProvider} interface will be used to * map these log services onto whatever more general purpose logging * framework is in use by the user of the samskivert codebase. */ diff --git a/projects/samskivert/src/java/com/samskivert/util/package.html b/projects/samskivert/src/java/com/samskivert/util/package.html new file mode 100644 index 00000000..50ad99b7 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/util/package.html @@ -0,0 +1,33 @@ + + + + + + + + Provides a variety of utility services including data structures, + synchronization support, text processing and more. + + + diff --git a/projects/samskivert/src/java/com/samskivert/webmacro/package.html b/projects/samskivert/src/java/com/samskivert/webmacro/package.html new file mode 100644 index 00000000..4a7aa823 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/webmacro/package.html @@ -0,0 +1,54 @@ + + + + + + + + Provides parts of a simple web application framework built around the + WebMacro template engine. + +

The web application framework provided by this package is simple + and intended for use in small projects with limited scope. It is not + intended to be all things, nor to evolve into something that makes + toast. It builds upon WebMacro, a template engine whose + philosophies + about the separation of markup and code I agree with. + +

WebMacro is designed to be used explicitly by servlets in + applications where the design is structured around the servlets + rather than the pages generated by the servlets. This is in contrast + to the JSP approach where the pages themselves dictate the structure + of the application and the servlets are automatically generated to + conform to that structure. This package provides a means by which to + automatically map serlvet-like units of code to templates in a way + akin to JSP's approach but without the combination of code and + markup. + +

I'd document this more, but I'm probably going to start using + Turbine and abandon + this framework next time I get around to working on web + applications. + + diff --git a/projects/samskivert/src/java/com/samskivert/xml/package.html b/projects/samskivert/src/java/com/samskivert/xml/package.html new file mode 100644 index 00000000..a4dc55a6 --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/xml/package.html @@ -0,0 +1,32 @@ + + + + + + + + Provides XML related services. + + +