@Override public Object getData() { if ( !cancelPressed ) { return super.getData(); } else { return null; } }
@Override public void onOK() { super.onOK(); this.cancelPressed = false; }
public void setData( Object data ) { if ( data instanceof DatabaseMeta ) { databaseMeta = (DatabaseMeta) data; } setInfo( databaseMeta ); }
public void onOK() { DatabaseMeta database = new DatabaseMeta(); this.getInfo( database ); boolean passed = checkPoolingParameters(); if ( !passed ) { return; } String[] remarks = database.checkParameters(); String message = ""; if ( remarks.length != 0 ) { for ( int i = 0; i < remarks.length; i++ ) { message = message.concat( "* " ).concat( remarks[i] ).concat( System.getProperty( "line.separator" ) ); } showMessage( message, false ); } else { if ( databaseMeta == null ) { databaseMeta = new DatabaseMeta(); } this.getInfo( databaseMeta ); databaseMeta.setChanged(); close(); } }
public void setDeckChildIndex() { getControls(); // if pooling selected, check the parameter validity before allowing // a deck panel switch... int originalSelection = ( dialogDeck == null ? -1 : dialogDeck.getSelectedIndex() ); boolean passed = true; if ( originalSelection == 3 ) { passed = checkPoolingParameters(); } if ( passed ) { int selected = deckOptionsBox.getSelectedIndex(); if ( selected < 0 ) { selected = 0; deckOptionsBox.setSelectedIndex( 0 ); } dialogDeck.setSelectedIndex( selected ); } else { dialogDeck.setSelectedIndex( originalSelection ); deckOptionsBox.setSelectedIndex( originalSelection ); } }
public void clearOptionsData() { getControls(); if ( optionsParameterTree != null ) { optionsParameterTree.getRootChildren().removeAll(); } }
@Override public void pluginChanged( Object serviceObject ) { pluginRemoved( serviceObject ); pluginAdded( serviceObject ); }
public Object getData() { if ( databaseMeta == null ) { databaseMeta = new DatabaseMeta(); } if ( !windowClosed() ) { this.getInfo( databaseMeta ); } return databaseMeta; }
public void testDatabaseConnection() { DatabaseMeta database = new DatabaseMeta(); getInfo( database ); String[] remarks = database.checkParameters(); String message = ""; if ( remarks.length != 0 ) { for ( int i = 0; i < remarks.length; i++ ) { message = message.concat( "* " ).concat( remarks[i] ).concat( System.getProperty( "line.separator" ) ); } showMessage( message, message.length() > 300 ); } else { showMessage( database.testConnectionSuccess() ); } }
@Override public void databaseTypeAdded( String pluginName, DatabaseInterface databaseInterface ) { if ( keys.add( pluginName ) ) { update(); } }
@Override public void onCancel() { super.onCancel(); this.cancelPressed = true; }
public void popCache() { setConnectionSpecificInfo( cache ); }
public void onCancel() { close(); }
@Override public void propertyChange( PropertyChangeEvent evt ) { if ( "value".equals( evt.getPropertyName() ) ) { disablePortIfInstancePopulated(); } } } );
@Override public void pluginRemoved( Object serviceObject ) { PluginInterface plugin = (PluginInterface) serviceObject; String pluginName = plugin.getName(); databaseTypeRemoved( pluginName ); }
protected void showMessage( DatabaseTestResults databaseTestResults ) { // BACKLOG-23781 - provide a showMessage implementation for // those that don't override it (PRD case) String message = databaseTestResults.getMessage(); showMessage( message, message.length() > 300 ); }
public void pushCache() { // Database type: if ( connectionBox != null ) { Object connection = connectionBox.getSelectedItem(); if ( connection != null ) { cache.setDatabaseType( (String) connection ); } } getConnectionSpecificInfo( cache ); }
private void traverseDomSetReadOnly( XulComponent component, boolean readonly ) { component.setDisabled( readonly ); List<XulComponent> children = component.getChildNodes(); if ( children != null && children.size() > 0 ) { for ( XulComponent child : children ) { child.setDisabled( readonly ); traverseDomSetReadOnly( child, readonly ); } } }
@Override protected void getControls() { super.getControls(); XulTextbox[] boxes = new XulTextbox[] { hostNameBox, databaseNameBox, portNumberBox, userNameBox, passwordBox, customDriverClassBox, customUrlBox, dataTablespaceBox, indexTablespaceBox, poolSizeBox, maxPoolSizeBox, languageBox, systemNumberBox, clientBox, serverInstanceBox }; for ( int i = 0; i < boxes.length; i++ ) { XulTextbox xulTextbox = boxes[i]; if ( ( xulTextbox != null ) && ( xulTextbox instanceof ExtTextbox ) ) { ExtTextbox ext = (ExtTextbox) xulTextbox; ext.setVariableSpace( databaseMeta ); } } XulTree[] trees = new XulTree[] { poolParameterTree, clusterParameterTree, optionsParameterTree }; for ( int i = 0; i < trees.length; i++ ) { XulTree xulTree = trees[i]; if ( xulTree != null ) { xulTree.setData( databaseMeta ); } } }
@Override public void databaseTypeRemoved( String pluginName ) { if ( keys.remove( pluginName ) ) { update(); } }