Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.console.text.commands.controller.AddDriver Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.text.commands.controller.AddDriver:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.cjdbc.console.text.commands.controller.AddDriver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AddDriver (AbstractConsoleModule module)
void parse (String commandText) throws IOException, ConsoleException
String getCommandName ()
String getCommandDescription ()
String getCommandParameters ()

Detailed Description

This class defines a AddDriver

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 43 of file AddDriver.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.text.commands.controller.AddDriver.AddDriver AbstractConsoleModule  module  ) 
 

Creates a new AddDriver.java object

Parameters:
module the command is attached to

Definition at line 51 of file AddDriver.java.

00052   {
00053     super(module);
00054   }


Member Function Documentation

String org.objectweb.cjdbc.console.text.commands.controller.AddDriver.getCommandDescription  )  [virtual]
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandDescription()

Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 133 of file AddDriver.java.

00134   {
00135     return ConsoleTranslate.get("controller.command.adddriver");
00136   }

String org.objectweb.cjdbc.console.text.commands.controller.AddDriver.getCommandName  )  [virtual]
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandName()

Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 125 of file AddDriver.java.

00126   {
00127     return "addDriver";
00128   }

String org.objectweb.cjdbc.console.text.commands.controller.AddDriver.getCommandParameters  ) 
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandParameters()

Reimplemented from org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 141 of file AddDriver.java.

00142   {
00143     return "<driverPathName>";
00144   }

void org.objectweb.cjdbc.console.text.commands.controller.AddDriver.parse String  commandText  )  throws IOException, ConsoleException [virtual]
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.parse(java.lang.String)

Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 59 of file AddDriver.java.

References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getControllerProxy(), org.objectweb.cjdbc.console.text.Console.println(), and org.objectweb.cjdbc.console.text.Console.readLine().

00060   {
00061     String filename = null;
00062     //  Get the file name if needed
00063     if (commandText == null || commandText.trim().equals(""))
00064     {
00065       try
00066       {
00067         filename = console.readLine(ConsoleTranslate
00068             .get("controller.command.adddriver.input.filename"));
00069       }
00070       catch (Exception che)
00071       {
00072       }
00073     }
00074     else
00075       filename = commandText.trim();
00076 
00077     if (filename == null || filename.equals(""))
00078       throw new ConsoleException(ConsoleTranslate
00079           .get("controller.command.adddriver.null.filename"));
00080 
00081     try
00082     {
00083       // Send the file contents to the controller
00084       jmxClient.getControllerProxy().addDriver(readDriver(filename));
00085       console.println(ConsoleTranslate.get(
00086           "controller.command.adddriver.file.sent", filename));
00087     }
00088     catch (FileNotFoundException fnf)
00089     {
00090       throw new ConsoleException(ConsoleTranslate.get(
00091           "controller.command.adddriver.file.not.found", filename));
00092     }
00093     catch (Exception ioe)
00094     {
00095       throw new ConsoleException(ConsoleTranslate.get(
00096           "controller.command.adddriver.sent.failed", ioe));
00097     }
00098   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:02:44 2005 for C-JDBC by  doxygen 1.3.9.1