Index: trunk/Nebulous/lib/Nebulous/Server.pm
===================================================================
--- trunk/Nebulous/lib/Nebulous/Server.pm	(revision 5489)
+++ trunk/Nebulous/lib/Nebulous/Server.pm	(revision 5490)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.12 2005-11-09 00:48:24 jhoblitt Exp $
+# $Id: Server.pm,v 1.13 2005-11-09 01:31:07 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -17,8 +17,4 @@
 use Log::Log4perl;
 use Params::Validate qw( validate_pos SCALAR );
-
-my %class = (
-    raw => 1,
-);
 
 my $log;
@@ -99,6 +95,25 @@
 
     # check that the comment isn't too long
+    # check that the volume requested is valid
+
     # check that the class requested is valid
-    # check that the volume requested is valid
+    if ( $class ) {
+        my $class_id;
+        eval {
+            my $query = $db->prepare_cached( $sql->get_class ); 
+            $query->execute( $class );
+            ( $class_id ) = $query->fetchrow_array;
+
+            $query->finish;
+        };
+        if ( $@ ) {
+            $db->rollback;
+            $log->logdie( "database error: $@" );
+        }
+
+        unless ( $class_id ) {
+            $log->logdie( "Invalid class ID: $class" );
+        }
+    }
 
     my $uri;
Index: trunk/Nebulous/lib/Nebulous/Server/SQL.pm
===================================================================
--- trunk/Nebulous/lib/Nebulous/Server/SQL.pm	(revision 5489)
+++ trunk/Nebulous/lib/Nebulous/Server/SQL.pm	(revision 5490)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: SQL.pm,v 1.13 2005-11-09 00:59:20 jhoblitt Exp $
+# $Id: SQL.pm,v 1.14 2005-11-09 01:31:07 jhoblitt Exp $
 
 package Nebulous::Server::SQL;
@@ -123,4 +123,9 @@
         INSERT INTO volume (name, uri)
         VALUES (?, ?)
+    },
+    get_class => qq{
+        SELECT class_id, priority, comment
+        FROM class
+        WHERE class_id = ?
     },
 );
