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

WizardConstants.java

00001 /**
00002  * C-JDBC: Clustered JDBC.
00003  * Copyright (C) 2002-2004 French National Institute For Research In Computer
00004  * Science And Control (INRIA).
00005  * Contact: c-jdbc@objectweb.org
00006  * 
00007  * This library is free software; you can redistribute it and/or modify it
00008  * under the terms of the GNU Lesser General Public License as published by the
00009  * Free Software Foundation; either version 2.1 of the License, or any later
00010  * version.
00011  * 
00012  * This library is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
00015  * for more details.
00016  * 
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this library; if not, write to the Free Software Foundation,
00019  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00020  *
00021  * Initial developer(s): Nicolas Modrzyk.
00022  * Contributor(s): ______________________.
00023  */
00024 
00025 package org.objectweb.cjdbc.console.wizard;
00026 
00027 import java.util.ArrayList;
00028 
00029 import javax.swing.JComboBox;
00030 
00031 /**
00032  * The constants used throughout the <code>XmlWizard</code>
00033  * 
00034  * @author <a href="mailto:Nicolas.Modrzyk@inria.fr">Nicolas Modrzyk </a>
00035  * @version 1.0
00036  */
00037 public final class WizardConstants
00038 {
00039   public static int      FRAME_WIDTH                   = 750;
00040   public static int      FRAME_HEIGHT                  = 500;
00041   public static int      VALIDATOR_HEIGHT              = 300;
00042   public static int      VALIDATOR_WIDTH               = 400;
00043   public static int      BACKEND_FRAME_WIDTH           = 300;
00044   public static int      BACKEND_FRAME_HEIGHT          = 250;
00045   public static int      CONNECTION_FRAME_WIDTH        = 400;
00046   public static int      CONNECTION_FRAME_HEIGHT       = 200;
00047 
00048   public static String   COMMAND_QUIT                  = "command.quit";
00049   public static String   COMMAND_ADD_USER              = "command.add.user";
00050   public static String   COMMAND_REMOVE_USER           = "command.remove.user";
00051   public static String   COMMAND_ADD_BACKEND           = "command.add.backend";
00052   public static String   COMMAND_REMOVE_BACKEND        = "command.remove.backend";
00053   public static String   COMMAND_EXPORT_XML            = "command.export.xml";
00054   public static String   COMMAND_IMPORT_XML            = "command.import.xml";
00055   public static String   COMMAND_EDIT_CONNECTION_PARAM = "command.edit.connection.parameters";
00056   public static String   COMMAND_CHECK_WIZARD          = "command.check.wizard";
00057   public static String   COMMAND_VALIDATE_XML          = "command.validate.xml";
00058 
00059   public static String[] BLOB                          = {"none", "hexa",
00060       "escaped"                                        };
00061   public static String[] MACRO_CLOCK                   = {"none", "local"};
00062   public static String[] DYNAMIC_PRECISION             = {"static", "table",
00063       "column", "procedures", "all"                    };
00064   public static String[] RESULT_CACHE_GRANULARITY      = {"database", "table",
00065       "column", "columnUnique"                         };
00066   public static String[] CONNECTION_MANAGERS           = {
00067       "SimpleConnectionManager", "FailFastPoolConnectionManager",
00068       "RandomWaitPoolConnectionManager", "VariablePoolConnectionManager"};
00069   public static String[] WAIT_POLICIES                 = {"first", "majority",
00070       "all"                                            };
00071 
00072   public static String[] SCHEDULERS_STANDARD           = {"SingleDBScheduler",
00073       "RAIDb-0Scheduler", "RAIDb-1Scheduler", "RAIDb-2Scheduler"};
00074   public static String[] SCHEDULERS_DISTRIBUTED        = {"RAIDb-1Scheduler",
00075       "RAIDb-2Scheduler"                               };
00076 
00077   public static String[] SCHEDULER_SINGLEDB_LEVELS     = {"query",
00078       "optimisticTransaction", "pessimisticTransaction"};
00079   public static String[] SCHEDULER_RAIDB0_LEVELS       = {"query",
00080       "pessimisticTransaction"                         };
00081   public static String[] SCHEDULER_RAIDB1_LEVELS       = {"query",
00082       "optimisticQuery", "optimisticTransaction", "pessimisticTransaction"};
00083   public static String[] SCHEDULER_RAIDB2_LEVELS       = {"query",
00084       "pessimisticTransaction"                         };
00085 
00086   public static String[] LOAD_BALANCER_SINGLEDB        = new String[]{"SingleDB"};
00087   public static String[] LOAD_BALANCER_RAIDB0          = new String[]{"RAIDb-0"};
00088   public static String[] LOAD_BALANCER_RAIDB1          = new String[]{
00089       "RAIDb-1-RoundRobin", "RAIDb-1-LeastPendingRequestsFirst",
00090       "ParallelDB-RoundRobin", "ParallelDB-LeastPendingRequestsFirst"};
00091   public static String[] LOAD_BALANCER_RAIDB2          = new String[]{
00092       "RAIDb-2-RoundRobin", "RAIDb-2-LeastPendingRequestsFirst",
00093       "ParallelDB-RoundRobin", "ParallelDB-LeastPendingRequestsFirst"};
00094 
00095   public static String   DEFAULT_DYNAMIC_PRECISION     = DYNAMIC_PRECISION[4];
00096 
00097   public static String   TAB_VIRTUAL_DATABASE          = "tab.virtualdatabase";
00098   public static String   TAB_DISTRIBUTION              = "tab.distribution";
00099 
00100   public static String   TAB_AUTHENTICATION            = "tab.authentication";
00101   public static String   TAB_BACKENDS                  = "tab.backends";
00102   public static String   TAB_REQUEST_MANAGER           = "tab.requestmanager";
00103   public static String   TAB_CACHING                   = "tab.caching";
00104 
00105   public static String   TAB_RECOVERY                  = "tab.recovery";
00106 
00107   public static ArrayList getItemsFromCombo(JComboBox usersBox)
00108   {
00109     if (usersBox == null)
00110       return new ArrayList(0);
00111     int count = usersBox.getItemCount();
00112     ArrayList list = new ArrayList(count);
00113     for (int i = 0; i < count; i++)
00114       list.add(usersBox.getItemAt(i));
00115     return list;
00116   }
00117 
00118 }

Generated on Mon Apr 11 22:01:35 2005 for C-JDBC by  doxygen 1.3.9.1