@Test public void testGetControls() throws Exception { dataHandler.getControls(); assertNotNull( dataHandler.hostNameBox ); assertNotNull( dataHandler.portNumberBox ); assertNotNull( dataHandler.userNameBox ); assertNotNull( dataHandler.passwordBox ); }
protected void getControls() { dialogDeck = (XulDeck) document.getElementById( "dialog-panel-deck" ); deckOptionsBox = (XulListbox) document.getElementById( "deck-options-list" ); connectionBox = (XulListbox) document.getElementById( "connection-type-list" ); accessBox = (XulListbox) document.getElementById( "access-type-list" ); connectionNameBox = (XulTextbox) document.getElementById( "connection-name-text" ); hostNameBox = (XulTextbox) document.getElementById( "server-host-name-text" ); databaseNameBox = (XulTextbox) document.getElementById( "database-name-text" ); portNumberBox = (XulTextbox) document.getElementById( "port-number-text" ); userNameBox = (XulTextbox) document.getElementById( "username-text" ); passwordBox = (XulTextbox) document.getElementById( "password-text" ); dataTablespaceBox = (XulTextbox) document.getElementById( "data-tablespace-text" ); indexTablespaceBox = (XulTextbox) document.getElementById( "index-tablespace-text" ); serverInstanceBox = (XulTextbox) document.getElementById( "instance-text" ); serverNameBox = (XulTextbox) document.getElementById( "server-name-text" ); customUrlBox = (XulTextbox) document.getElementById( "custom-url-text" ); customDriverClassBox = (XulTextbox) document.getElementById( "custom-driver-class-text" ); languageBox = (XulTextbox) document.getElementById( "language-text" ); systemNumberBox = (XulTextbox) document.getElementById( "system-number-text" ); clientBox = (XulTextbox) document.getElementById( "client-text" ); doubleDecimalSeparatorCheck = (XulCheckbox) document.getElementById( "decimal-separator-check" ); resultStreamingCursorCheck = (XulCheckbox) document.getElementById( "result-streaming-check" ); webAppName = (XulTextbox) document.getElementById( "web-application-name-text" ); poolingCheck = (XulCheckbox) document.getElementById( "use-pool-check" ); clusteringCheck = (XulCheckbox) document.getElementById( "use-cluster-check" ); clusterParameterDescriptionLabel = (XulLabel) document.getElementById( "cluster-parameter-description-label" ); poolSizeLabel = (XulLabel) document.getElementById( "pool-size-label" ); poolSizeBox = (XulTextbox) document.getElementById( "pool-size-text" ); maxPoolSizeLabel = (XulLabel) document.getElementById( "max-pool-size-label" ); maxPoolSizeBox = (XulTextbox) document.getElementById( "max-pool-size-text" ); poolParameterTree = (XulTree) document.getElementById( "pool-parameter-tree" ); clusterParameterTree = (XulTree) document.getElementById( "cluster-parameter-tree" ); optionsParameterTree = (XulTree) document.getElementById( "options-parameter-tree" ); poolingDescription = (XulTextbox) document.getElementById( "pooling-description" ); poolingParameterDescriptionLabel = (XulLabel) document.getElementById( "pool-parameter-description-label" ); poolingDescriptionLabel = (XulLabel) document.getElementById( "pooling-description-label" ); supportBooleanDataType = (XulCheckbox) document.getElementById( "supports-boolean-data-type" ); supportTimestampDataType = (XulCheckbox) document.getElementById( "supports-timestamp-data-type" ); quoteIdentifiersCheck = (XulCheckbox) document.getElementById( "quote-identifiers-check" ); lowerCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-lower-case-check" ); upperCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-upper-case-check" ); preserveReservedCaseCheck = (XulCheckbox) document.getElementById( "preserve-reserved-case" ); strictBigNumberInterpretaion = (XulCheckbox) document.getElementById( "strict-bignum-interpretation" ); preferredSchemaName = (XulTextbox) document.getElementById( "preferred-schema-name-text" ); sqlBox = (XulTextbox) document.getElementById( "sql-text" ); useIntegratedSecurityCheck = (XulCheckbox) document.getElementById( "use-integrated-security-check" ); acceptButton = (XulButton) document.getElementById( "general-datasource-window_accept" ); cancelButton = (XulButton) document.getElementById( "general-datasource-window_cancel" ); testButton = (XulButton) document.getElementById( "test-button" ); noticeLabel = (XulLabel) document.getElementById( "notice-label" ); if ( portNumberBox != null && serverInstanceBox != null ) { if ( Boolean.parseBoolean( serverInstanceBox.getAttributeValue( "shouldDisablePortIfPopulated" ) ) ) { serverInstanceBox.addPropertyChangeListener( new PropertyChangeListener() { @Override public void propertyChange( PropertyChangeEvent evt ) { if ( "value".equals( evt.getPropertyName() ) ) { disablePortIfInstancePopulated(); } } } ); } } }
DataHandler extends AbstractXulEventHandler { protected void getControls() { dialogDeck = (XulDeck) document.getElementById( "dialog-panel-deck" ); deckOptionsBox = (XulListbox) document.getElementById( "deck-options-list" ); connectionBox = (XulListbox) document.getElementById( "connection-type-list" ); accessBox = (XulListbox) document.getElementById( "access-type-list" ); connectionNameBox = (XulTextbox) document.getElementById( "connection-name-text" ); hostNameBox = (XulTextbox) document.getElementById( "server-host-name-text" ); databaseNameBox = (XulTextbox) document.getElementById( "database-name-text" ); portNumberBox = (XulTextbox) document.getElementById( "port-number-text" ); userNameBox = (XulTextbox) document.getElementById( "username-text" ); passwordBox = (XulTextbox) document.getElementById( "password-text" ); dataTablespaceBox = (XulTextbox) document.getElementById( "data-tablespace-text" ); indexTablespaceBox = (XulTextbox) document.getElementById( "index-tablespace-text" ); serverInstanceBox = (XulTextbox) document.getElementById( "instance-text" ); serverNameBox = (XulTextbox) document.getElementById( "server-name-text" ); customUrlBox = (XulTextbox) document.getElementById( "custom-url-text" ); customDriverClassBox = (XulTextbox) document.getElementById( "custom-driver-class-text" ); languageBox = (XulTextbox) document.getElementById( "language-text" ); systemNumberBox = (XulTextbox) document.getElementById( "system-number-text" ); clientBox = (XulTextbox) document.getElementById( "client-text" ); doubleDecimalSeparatorCheck = (XulCheckbox) document.getElementById( "decimal-separator-check" ); resultStreamingCursorCheck = (XulCheckbox) document.getElementById( "result-streaming-check" ); webAppName = (XulTextbox) document.getElementById( "web-application-name-text" ); poolingCheck = (XulCheckbox) document.getElementById( "use-pool-check" ); clusteringCheck = (XulCheckbox) document.getElementById( "use-cluster-check" ); clusterParameterDescriptionLabel = (XulLabel) document.getElementById( "cluster-parameter-description-label" ); poolSizeLabel = (XulLabel) document.getElementById( "pool-size-label" ); poolSizeBox = (XulTextbox) document.getElementById( "pool-size-text" ); maxPoolSizeLabel = (XulLabel) document.getElementById( "max-pool-size-label" ); maxPoolSizeBox = (XulTextbox) document.getElementById( "max-pool-size-text" ); poolParameterTree = (XulTree) document.getElementById( "pool-parameter-tree" ); clusterParameterTree = (XulTree) document.getElementById( "cluster-parameter-tree" ); optionsParameterTree = (XulTree) document.getElementById( "options-parameter-tree" ); poolingDescription = (XulTextbox) document.getElementById( "pooling-description" ); poolingParameterDescriptionLabel = (XulLabel) document.getElementById( "pool-parameter-description-label" ); poolingDescriptionLabel = (XulLabel) document.getElementById( "pooling-description-label" ); supportBooleanDataType = (XulCheckbox) document.getElementById( "supports-boolean-data-type" ); supportTimestampDataType = (XulCheckbox) document.getElementById( "supports-timestamp-data-type" ); quoteIdentifiersCheck = (XulCheckbox) document.getElementById( "quote-identifiers-check" ); lowerCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-lower-case-check" ); upperCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-upper-case-check" ); preserveReservedCaseCheck = (XulCheckbox) document.getElementById( "preserve-reserved-case" ); strictBigNumberInterpretaion = (XulCheckbox) document.getElementById( "strict-bignum-interpretation" ); preferredSchemaName = (XulTextbox) document.getElementById( "preferred-schema-name-text" ); sqlBox = (XulTextbox) document.getElementById( "sql-text" ); useIntegratedSecurityCheck = (XulCheckbox) document.getElementById( "use-integrated-security-check" ); acceptButton = (XulButton) document.getElementById( "general-datasource-window_accept" ); cancelButton = (XulButton) document.getElementById( "general-datasource-window_cancel" ); testButton = (XulButton) document.getElementById( "test-button" ); noticeLabel = (XulLabel) document.getElementById( "notice-label" ); if ( portNumberBox != null && serverInstanceBox != null ) { if ( Boolean.parseBoolean( serverInstanceBox.getAttributeValue( "shouldDisablePortIfPopulated" ) ) ) { serverInstanceBox.addPropertyChangeListener( new PropertyChangeListener() { @Override public void propertyChange( PropertyChangeEvent evt ) { if ( "value".equals( evt.getPropertyName() ) ) { disablePortIfInstancePopulated(); } } } ); } } } }
DataHandler extends AbstractXulEventHandler { protected void getControls() { dialogDeck = (XulDeck) document.getElementById( "dialog-panel-deck" ); deckOptionsBox = (XulListbox) document.getElementById( "deck-options-list" ); connectionBox = (XulListbox) document.getElementById( "connection-type-list" ); accessBox = (XulListbox) document.getElementById( "access-type-list" ); connectionNameBox = (XulTextbox) document.getElementById( "connection-name-text" ); hostNameBox = (XulTextbox) document.getElementById( "server-host-name-text" ); databaseNameBox = (XulTextbox) document.getElementById( "database-name-text" ); portNumberBox = (XulTextbox) document.getElementById( "port-number-text" ); userNameBox = (XulTextbox) document.getElementById( "username-text" ); passwordBox = (XulTextbox) document.getElementById( "password-text" ); dataTablespaceBox = (XulTextbox) document.getElementById( "data-tablespace-text" ); indexTablespaceBox = (XulTextbox) document.getElementById( "index-tablespace-text" ); serverInstanceBox = (XulTextbox) document.getElementById( "instance-text" ); serverNameBox = (XulTextbox) document.getElementById( "server-name-text" ); customUrlBox = (XulTextbox) document.getElementById( "custom-url-text" ); customDriverClassBox = (XulTextbox) document.getElementById( "custom-driver-class-text" ); languageBox = (XulTextbox) document.getElementById( "language-text" ); systemNumberBox = (XulTextbox) document.getElementById( "system-number-text" ); clientBox = (XulTextbox) document.getElementById( "client-text" ); doubleDecimalSeparatorCheck = (XulCheckbox) document.getElementById( "decimal-separator-check" ); resultStreamingCursorCheck = (XulCheckbox) document.getElementById( "result-streaming-check" ); webAppName = (XulTextbox) document.getElementById( "web-application-name-text" ); poolingCheck = (XulCheckbox) document.getElementById( "use-pool-check" ); clusteringCheck = (XulCheckbox) document.getElementById( "use-cluster-check" ); clusterParameterDescriptionLabel = (XulLabel) document.getElementById( "cluster-parameter-description-label" ); poolSizeLabel = (XulLabel) document.getElementById( "pool-size-label" ); poolSizeBox = (XulTextbox) document.getElementById( "pool-size-text" ); maxPoolSizeLabel = (XulLabel) document.getElementById( "max-pool-size-label" ); maxPoolSizeBox = (XulTextbox) document.getElementById( "max-pool-size-text" ); poolParameterTree = (XulTree) document.getElementById( "pool-parameter-tree" ); clusterParameterTree = (XulTree) document.getElementById( "cluster-parameter-tree" ); optionsParameterTree = (XulTree) document.getElementById( "options-parameter-tree" ); poolingDescription = (XulTextbox) document.getElementById( "pooling-description" ); poolingParameterDescriptionLabel = (XulLabel) document.getElementById( "pool-parameter-description-label" ); poolingDescriptionLabel = (XulLabel) document.getElementById( "pooling-description-label" ); supportBooleanDataType = (XulCheckbox) document.getElementById( "supports-boolean-data-type" ); supportTimestampDataType = (XulCheckbox) document.getElementById( "supports-timestamp-data-type" ); quoteIdentifiersCheck = (XulCheckbox) document.getElementById( "quote-identifiers-check" ); lowerCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-lower-case-check" ); upperCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-upper-case-check" ); preserveReservedCaseCheck = (XulCheckbox) document.getElementById( "preserve-reserved-case" ); strictBigNumberInterpretaion = (XulCheckbox) document.getElementById( "strict-bignum-interpretation" ); preferredSchemaName = (XulTextbox) document.getElementById( "preferred-schema-name-text" ); sqlBox = (XulTextbox) document.getElementById( "sql-text" ); useIntegratedSecurityCheck = (XulCheckbox) document.getElementById( "use-integrated-security-check" ); acceptButton = (XulButton) document.getElementById( "general-datasource-window_accept" ); cancelButton = (XulButton) document.getElementById( "general-datasource-window_cancel" ); testButton = (XulButton) document.getElementById( "test-button" ); noticeLabel = (XulLabel) document.getElementById( "notice-label" ); if ( portNumberBox != null && serverInstanceBox != null ) { if ( Boolean.parseBoolean( serverInstanceBox.getAttributeValue( "shouldDisablePortIfPopulated" ) ) ) { serverInstanceBox.addPropertyChangeListener( new PropertyChangeListener() { @Override public void propertyChange( PropertyChangeEvent evt ) { if ( "value".equals( evt.getPropertyName() ) ) { disablePortIfInstancePopulated(); } } } ); } } } DataHandler(); }
DataHandler extends AbstractXulEventHandler { protected void getControls() { dialogDeck = (XulDeck) document.getElementById( "dialog-panel-deck" ); deckOptionsBox = (XulListbox) document.getElementById( "deck-options-list" ); connectionBox = (XulListbox) document.getElementById( "connection-type-list" ); accessBox = (XulListbox) document.getElementById( "access-type-list" ); connectionNameBox = (XulTextbox) document.getElementById( "connection-name-text" ); hostNameBox = (XulTextbox) document.getElementById( "server-host-name-text" ); databaseNameBox = (XulTextbox) document.getElementById( "database-name-text" ); portNumberBox = (XulTextbox) document.getElementById( "port-number-text" ); userNameBox = (XulTextbox) document.getElementById( "username-text" ); passwordBox = (XulTextbox) document.getElementById( "password-text" ); dataTablespaceBox = (XulTextbox) document.getElementById( "data-tablespace-text" ); indexTablespaceBox = (XulTextbox) document.getElementById( "index-tablespace-text" ); serverInstanceBox = (XulTextbox) document.getElementById( "instance-text" ); serverNameBox = (XulTextbox) document.getElementById( "server-name-text" ); customUrlBox = (XulTextbox) document.getElementById( "custom-url-text" ); customDriverClassBox = (XulTextbox) document.getElementById( "custom-driver-class-text" ); languageBox = (XulTextbox) document.getElementById( "language-text" ); systemNumberBox = (XulTextbox) document.getElementById( "system-number-text" ); clientBox = (XulTextbox) document.getElementById( "client-text" ); doubleDecimalSeparatorCheck = (XulCheckbox) document.getElementById( "decimal-separator-check" ); resultStreamingCursorCheck = (XulCheckbox) document.getElementById( "result-streaming-check" ); webAppName = (XulTextbox) document.getElementById( "web-application-name-text" ); poolingCheck = (XulCheckbox) document.getElementById( "use-pool-check" ); clusteringCheck = (XulCheckbox) document.getElementById( "use-cluster-check" ); clusterParameterDescriptionLabel = (XulLabel) document.getElementById( "cluster-parameter-description-label" ); poolSizeLabel = (XulLabel) document.getElementById( "pool-size-label" ); poolSizeBox = (XulTextbox) document.getElementById( "pool-size-text" ); maxPoolSizeLabel = (XulLabel) document.getElementById( "max-pool-size-label" ); maxPoolSizeBox = (XulTextbox) document.getElementById( "max-pool-size-text" ); poolParameterTree = (XulTree) document.getElementById( "pool-parameter-tree" ); clusterParameterTree = (XulTree) document.getElementById( "cluster-parameter-tree" ); optionsParameterTree = (XulTree) document.getElementById( "options-parameter-tree" ); poolingDescription = (XulTextbox) document.getElementById( "pooling-description" ); poolingParameterDescriptionLabel = (XulLabel) document.getElementById( "pool-parameter-description-label" ); poolingDescriptionLabel = (XulLabel) document.getElementById( "pooling-description-label" ); supportBooleanDataType = (XulCheckbox) document.getElementById( "supports-boolean-data-type" ); supportTimestampDataType = (XulCheckbox) document.getElementById( "supports-timestamp-data-type" ); quoteIdentifiersCheck = (XulCheckbox) document.getElementById( "quote-identifiers-check" ); lowerCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-lower-case-check" ); upperCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-upper-case-check" ); preserveReservedCaseCheck = (XulCheckbox) document.getElementById( "preserve-reserved-case" ); strictBigNumberInterpretaion = (XulCheckbox) document.getElementById( "strict-bignum-interpretation" ); preferredSchemaName = (XulTextbox) document.getElementById( "preferred-schema-name-text" ); sqlBox = (XulTextbox) document.getElementById( "sql-text" ); useIntegratedSecurityCheck = (XulCheckbox) document.getElementById( "use-integrated-security-check" ); acceptButton = (XulButton) document.getElementById( "general-datasource-window_accept" ); cancelButton = (XulButton) document.getElementById( "general-datasource-window_cancel" ); testButton = (XulButton) document.getElementById( "test-button" ); noticeLabel = (XulLabel) document.getElementById( "notice-label" ); if ( portNumberBox != null && serverInstanceBox != null ) { if ( Boolean.parseBoolean( serverInstanceBox.getAttributeValue( "shouldDisablePortIfPopulated" ) ) ) { serverInstanceBox.addPropertyChangeListener( new PropertyChangeListener() { @Override public void propertyChange( PropertyChangeEvent evt ) { if ( "value".equals( evt.getPropertyName() ) ) { disablePortIfInstancePopulated(); } } } ); } } } DataHandler(); void loadConnectionData(); void loadAccessData(); void editOptions( int index ); void clearOptionsData(); void getOptionHelp(); void setDeckChildIndex(); void onPoolingCheck(); void onClusterCheck(); Object getData(); void setData( Object data ); void pushCache(); void popCache(); void onCancel(); void onOK(); void testDatabaseConnection(); void restoreDefaults(); void poolingRowChange( int idx ); void disablePortIfInstancePopulated(); void handleUseSecurityCheckbox(); }
DataHandler extends AbstractXulEventHandler { protected void getControls() { dialogDeck = (XulDeck) document.getElementById( "dialog-panel-deck" ); deckOptionsBox = (XulListbox) document.getElementById( "deck-options-list" ); connectionBox = (XulListbox) document.getElementById( "connection-type-list" ); accessBox = (XulListbox) document.getElementById( "access-type-list" ); connectionNameBox = (XulTextbox) document.getElementById( "connection-name-text" ); hostNameBox = (XulTextbox) document.getElementById( "server-host-name-text" ); databaseNameBox = (XulTextbox) document.getElementById( "database-name-text" ); portNumberBox = (XulTextbox) document.getElementById( "port-number-text" ); userNameBox = (XulTextbox) document.getElementById( "username-text" ); passwordBox = (XulTextbox) document.getElementById( "password-text" ); dataTablespaceBox = (XulTextbox) document.getElementById( "data-tablespace-text" ); indexTablespaceBox = (XulTextbox) document.getElementById( "index-tablespace-text" ); serverInstanceBox = (XulTextbox) document.getElementById( "instance-text" ); serverNameBox = (XulTextbox) document.getElementById( "server-name-text" ); customUrlBox = (XulTextbox) document.getElementById( "custom-url-text" ); customDriverClassBox = (XulTextbox) document.getElementById( "custom-driver-class-text" ); languageBox = (XulTextbox) document.getElementById( "language-text" ); systemNumberBox = (XulTextbox) document.getElementById( "system-number-text" ); clientBox = (XulTextbox) document.getElementById( "client-text" ); doubleDecimalSeparatorCheck = (XulCheckbox) document.getElementById( "decimal-separator-check" ); resultStreamingCursorCheck = (XulCheckbox) document.getElementById( "result-streaming-check" ); webAppName = (XulTextbox) document.getElementById( "web-application-name-text" ); poolingCheck = (XulCheckbox) document.getElementById( "use-pool-check" ); clusteringCheck = (XulCheckbox) document.getElementById( "use-cluster-check" ); clusterParameterDescriptionLabel = (XulLabel) document.getElementById( "cluster-parameter-description-label" ); poolSizeLabel = (XulLabel) document.getElementById( "pool-size-label" ); poolSizeBox = (XulTextbox) document.getElementById( "pool-size-text" ); maxPoolSizeLabel = (XulLabel) document.getElementById( "max-pool-size-label" ); maxPoolSizeBox = (XulTextbox) document.getElementById( "max-pool-size-text" ); poolParameterTree = (XulTree) document.getElementById( "pool-parameter-tree" ); clusterParameterTree = (XulTree) document.getElementById( "cluster-parameter-tree" ); optionsParameterTree = (XulTree) document.getElementById( "options-parameter-tree" ); poolingDescription = (XulTextbox) document.getElementById( "pooling-description" ); poolingParameterDescriptionLabel = (XulLabel) document.getElementById( "pool-parameter-description-label" ); poolingDescriptionLabel = (XulLabel) document.getElementById( "pooling-description-label" ); supportBooleanDataType = (XulCheckbox) document.getElementById( "supports-boolean-data-type" ); supportTimestampDataType = (XulCheckbox) document.getElementById( "supports-timestamp-data-type" ); quoteIdentifiersCheck = (XulCheckbox) document.getElementById( "quote-identifiers-check" ); lowerCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-lower-case-check" ); upperCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-upper-case-check" ); preserveReservedCaseCheck = (XulCheckbox) document.getElementById( "preserve-reserved-case" ); strictBigNumberInterpretaion = (XulCheckbox) document.getElementById( "strict-bignum-interpretation" ); preferredSchemaName = (XulTextbox) document.getElementById( "preferred-schema-name-text" ); sqlBox = (XulTextbox) document.getElementById( "sql-text" ); useIntegratedSecurityCheck = (XulCheckbox) document.getElementById( "use-integrated-security-check" ); acceptButton = (XulButton) document.getElementById( "general-datasource-window_accept" ); cancelButton = (XulButton) document.getElementById( "general-datasource-window_cancel" ); testButton = (XulButton) document.getElementById( "test-button" ); noticeLabel = (XulLabel) document.getElementById( "notice-label" ); if ( portNumberBox != null && serverInstanceBox != null ) { if ( Boolean.parseBoolean( serverInstanceBox.getAttributeValue( "shouldDisablePortIfPopulated" ) ) ) { serverInstanceBox.addPropertyChangeListener( new PropertyChangeListener() { @Override public void propertyChange( PropertyChangeEvent evt ) { if ( "value".equals( evt.getPropertyName() ) ) { disablePortIfInstancePopulated(); } } } ); } } } DataHandler(); void loadConnectionData(); void loadAccessData(); void editOptions( int index ); void clearOptionsData(); void getOptionHelp(); void setDeckChildIndex(); void onPoolingCheck(); void onClusterCheck(); Object getData(); void setData( Object data ); void pushCache(); void popCache(); void onCancel(); void onOK(); void testDatabaseConnection(); void restoreDefaults(); void poolingRowChange( int idx ); void disablePortIfInstancePopulated(); void handleUseSecurityCheckbox(); static final SortedMap<String, DatabaseInterface> connectionMap; static final Map<String, String> connectionNametoID; }