try
{
if(command == CmdType.BACKUP)
{
BackupManager mgr = new BackupManager(request);
CLILogger.getInstance().printMessage(mgr.backup());
}
else if(command == CmdType.RESTORE)
{
RestoreManager mgr = new RestoreManager(request);
CLILogger.getInstance().printMessage(mgr.restore());
}
else if(command == CmdType.LIST)
{
ListManager mgr = new ListManager(request);
CLILogger.getInstance().printMessage(mgr.list());
}
else
{
// IMPOSSIBLE!!!
throw new CommandException("Internal Error");