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

org.objectweb.cjdbc.console.text.commands.dbadmin.Restore Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.text.commands.dbadmin.Restore:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Restore (VirtualDatabaseAdmin module)
void parse (String commandText) throws Exception
String getCommandName ()
String getCommandDescription ()
String getCommandParameters ()

Detailed Description

This class defines a Restore

Author:
Nicolas Modrzyk

Emmanuel Cecchet

Version:
1.0

Definition at line 41 of file Restore.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.text.commands.dbadmin.Restore.Restore VirtualDatabaseAdmin  module  ) 
 

Creates a new Restore.java object

Parameters:
module the command is attached to

Definition at line 49 of file Restore.java.

00050   {
00051     super(module);
00052   }


Member Function Documentation

String org.objectweb.cjdbc.console.text.commands.dbadmin.Restore.getCommandDescription  )  [virtual]
 

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

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

Definition at line 101 of file Restore.java.

00102   {
00103     return ConsoleTranslate.get("admin.command.restore");
00104   }

String org.objectweb.cjdbc.console.text.commands.dbadmin.Restore.getCommandName  )  [virtual]
 

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

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

Definition at line 92 of file Restore.java.

00093   {
00094 
00095     return "restore";
00096   }

String org.objectweb.cjdbc.console.text.commands.dbadmin.Restore.getCommandParameters  ) 
 

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

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

Definition at line 109 of file Restore.java.

00110   {
00111     return "<backendName> <dumpName>";
00112   }

void org.objectweb.cjdbc.console.text.commands.dbadmin.Restore.parse String  commandText  )  throws Exception [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 57 of file Restore.java.

References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getVirtualDatabaseProxy(), org.objectweb.cjdbc.console.text.Console.println(), and org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.restoreDumpOnBackend().

00058   {
00059     String dumpName = null;
00060     String backendName = null;
00061     StringTokenizer st = new StringTokenizer(commandText.trim());
00062 
00063     try
00064     {
00065       backendName = st.nextToken();
00066       dumpName = st.nextToken();
00067 
00068       console.println(ConsoleTranslate.get("admin.command.restore.echo",
00069           new String[]{backendName, dumpName}));
00070       VirtualDatabaseMBean vjdc = jmxClient.getVirtualDatabaseProxy(dbName,
00071           user, password);
00072       vjdc.restoreDumpOnBackend(backendName, dumpName);
00073     }
00074     catch (Exception e)
00075     {
00076       if (dumpName == null)
00077       {
00078         console.println(ConsoleTranslate
00079             .get("admin.command.restore.need.dump"));
00080       }
00081       if (backendName == null)
00082       {
00083         console.println(ConsoleTranslate
00084             .get("admin.command.restore.need.backend"));
00085       }
00086     }
00087   }


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