1 24 25 package org.objectweb.cjdbc.console.wizard; 26 27 import java.util.ArrayList ; 28 29 import javax.swing.JComboBox ; 30 31 37 public final class WizardConstants 38 { 39 40 public static final int FRAME_WIDTH = 750; 41 42 public static final int FRAME_HEIGHT = 500; 43 44 public static final int VALIDATOR_HEIGHT = 300; 45 46 public static final int VALIDATOR_WIDTH = 400; 47 48 public static final int BACKEND_FRAME_WIDTH = 300; 49 50 public static final int BACKEND_FRAME_HEIGHT = 250; 51 52 public static final int CONNECTION_FRAME_WIDTH = 400; 53 54 public static final int CONNECTION_FRAME_HEIGHT = 200; 55 56 57 public static final String COMMAND_QUIT = "command.quit"; 58 59 public static final String COMMAND_ADD_USER = "command.add.user"; 60 61 public static final String COMMAND_REMOVE_USER = "command.remove.user"; 62 63 public static final String COMMAND_ADD_BACKEND = "command.add.backend"; 64 65 public static final String COMMAND_REMOVE_BACKEND = "command.remove.backend"; 66 67 public static final String COMMAND_EXPORT_XML = "command.export.xml"; 68 69 public static final String COMMAND_IMPORT_XML = "command.import.xml"; 70 71 public static final String COMMAND_EDIT_CONNECTION_PARAM = "command.edit.connection.parameters"; 72 73 public static final String COMMAND_CHECK_WIZARD = "command.check.wizard"; 74 75 public static final String COMMAND_VALIDATE_XML = "command.validate.xml"; 76 77 78 public static final String [] BLOB = {"none", "hexa", 79 "escaped" }; 80 81 public static final String [] MACRO_CLOCK = {"none", "local"}; 82 83 public static final String [] DYNAMIC_PRECISION = {"static", 84 "table", "column", "procedures", "all" }; 85 86 public static final String [] RESULT_CACHE_GRANULARITY = {"database", 87 "table", "column", "columnUnique" }; 88 89 public static final String [] CONNECTION_MANAGERS = { 90 "SimpleConnectionManager", "FailFastPoolConnectionManager", 91 "RandomWaitPoolConnectionManager", "VariablePoolConnectionManager"}; 92 93 public static final String [] WAIT_POLICIES = {"first", 94 "majority", "all" }; 95 96 public static final String [] SCHEDULERS_STANDARD = { 97 "SingleDBScheduler", "RAIDb-0Scheduler", "RAIDb-1Scheduler", 98 "RAIDb-2Scheduler" }; 99 100 public static final String [] SCHEDULERS_DISTRIBUTED = { 101 "RAIDb-1Scheduler", "RAIDb-2Scheduler" }; 102 103 public static final String [] SCHEDULER_SINGLEDB_LEVELS = {"query", 104 "optimisticTransaction", "pessimisticTransaction" }; 105 106 public static final String [] SCHEDULER_RAIDB0_LEVELS = {"query", 107 "pessimisticTransaction" }; 108 109 public static final String [] SCHEDULER_RAIDB1_LEVELS = {"query", 110 "optimisticQuery", "optimisticTransaction", "pessimisticTransaction"}; 111 112 public static final String [] SCHEDULER_RAIDB2_LEVELS = {"query", 113 "pessimisticTransaction" }; 114 115 116 public static final String [] LOAD_BALANCER_SINGLEDB = new String []{"SingleDB"}; 117 118 public static final String [] LOAD_BALANCER_RAIDB0 = new String []{"RAIDb-0"}; 119 120 public static final String [] LOAD_BALANCER_RAIDB1 = new String []{ 121 "RAIDb-1-RoundRobin", "RAIDb-1-LeastPendingRequestsFirst", 122 "ParallelDB-RoundRobin", "ParallelDB-LeastPendingRequestsFirst"}; 123 124 public static final String [] LOAD_BALANCER_RAIDB2 = new String []{ 125 "RAIDb-2-RoundRobin", "RAIDb-2-LeastPendingRequestsFirst", 126 "ParallelDB-RoundRobin", "ParallelDB-LeastPendingRequestsFirst"}; 127 128 129 public static final String DEFAULT_DYNAMIC_PRECISION = DYNAMIC_PRECISION[4]; 130 131 132 public static final String TAB_VIRTUAL_DATABASE = "tab.virtualdatabase"; 133 134 public static final String TAB_DISTRIBUTION = "tab.distribution"; 135 136 137 public static final String TAB_AUTHENTICATION = "tab.authentication"; 138 139 public static final String TAB_BACKENDS = "tab.backends"; 140 141 public static final String TAB_REQUEST_MANAGER = "tab.requestmanager"; 142 143 public static final String TAB_CACHING = "tab.caching"; 144 145 public static final String TAB_RECOVERY = "tab.recovery"; 146 147 153 public static ArrayList getItemsFromCombo(JComboBox usersBox) 154 { 155 if (usersBox == null) 156 return new ArrayList (0); 157 int count = usersBox.getItemCount(); 158 ArrayList list = new ArrayList (count); 159 for (int i = 0; i < count; i++) 160 list.add(usersBox.getItemAt(i)); 161 return list; 162 } 163 164 } | Popular Tags |