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

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

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Detailed Description

This class defines the Backup command for the text console. It backups a backend to a dump file.

Author:
Nicolas Modrzyk

Emmanuel Cecchet

Version:
1.0

Definition at line 44 of file Backup.java.


Constructor & Destructor Documentation

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

Creates a new Backup.java object

Parameters:
module the command is attached to

Definition at line 60 of file Backup.java.

00061   {
00062     super(module);
00063   }


Member Function Documentation

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

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

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

Definition at line 107 of file Backup.java.

00108   {
00109     return ConsoleTranslate.get("admin.command.backup");
00110   }

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

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

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

Definition at line 99 of file Backup.java.

00100   {
00101     return "backup";
00102   }

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

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

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

Definition at line 50 of file Backup.java.

00051   {
00052     return "<backendName> <dumpName> [<tables>]";
00053   }

void org.objectweb.cjdbc.console.text.commands.dbadmin.Backup.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 68 of file Backup.java.

References org.objectweb.cjdbc.console.text.Console.println().

00069   {
00070     StringTokenizer sb = new StringTokenizer(commandText.trim());
00071 
00072     if (sb == null || sb.countTokens() < 2)
00073       throw new ConsoleException(ConsoleTranslate
00074           .get("admin.command.backup.wrong.parameters"));
00075     String backendName = sb.nextToken();
00076     String checkpointName = sb.nextToken();
00077     ArrayList tables = null;
00078     if (sb.hasMoreTokens())
00079     {
00080       tables = new ArrayList();
00081       while (sb.hasMoreTokens())
00082       {
00083         tables.add(sb.nextToken());
00084       }
00085     }
00086     console.println(ConsoleTranslate.get("admin.command.backup.echo",
00087         new String[]{backendName, checkpointName}));
00088     if (tables != null)
00089       console.println(ConsoleTranslate.get("admin.command.backup.tables",
00090           tables));
00091     VirtualDatabaseMBean vdjc = jmxClient.getVirtualDatabaseProxy(dbName, user,
00092         password);
00093     vdjc.backupBackendWithCheckpoint(backendName, checkpointName, tables);
00094   }


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