00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 package org.objectweb.cjdbc.console.wizard;
00026
00027 import java.util.ArrayList;
00028
00029 import javax.swing.JComboBox;
00030
00031
00032
00033
00034
00035
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 }