@Test public void removeSource() { JdbcConnectionDefinition connectionDefinition = new JndiConnectionDefinition( "NAME", "JNDI_NAME", "DATABASE_TYPE", "USERNAME", "PASSWORD" ); manager.updateSourceList( connectionDefinition ); manager.removeSource( "NAME" ); JdbcConnectionDefinition[] actual = manager.getSources(); assertEquals( 0, actual.length ); }
public void removeSource( final String name ) { if ( StringUtils.isEmpty( name ) ) { throw new IllegalArgumentException( "The provided name is invalid" ); } connectionDefinitions.remove( name ); try { final Preferences node = userPreferences.node( name ); if ( node != null ) { node.removeNode(); userPreferences.flush(); } } catch ( BackingStoreException e ) { log.error( "Could not remove JNDI connection entry [" + name + ']', e ); } }
JdbcConnectionDefinitionManager { public void removeSource( final String name ) { if ( StringUtils.isEmpty( name ) ) { throw new IllegalArgumentException( "The provided name is invalid" ); } connectionDefinitions.remove( name ); try { final Preferences node = userPreferences.node( name ); if ( node != null ) { node.removeNode(); userPreferences.flush(); } } catch ( BackingStoreException e ) { log.error( "Could not remove JNDI connection entry [" + name + ']', e ); } } }
JdbcConnectionDefinitionManager { public void removeSource( final String name ) { if ( StringUtils.isEmpty( name ) ) { throw new IllegalArgumentException( "The provided name is invalid" ); } connectionDefinitions.remove( name ); try { final Preferences node = userPreferences.node( name ); if ( node != null ) { node.removeNode(); userPreferences.flush(); } } catch ( BackingStoreException e ) { log.error( "Could not remove JNDI connection entry [" + name + ']', e ); } } JdbcConnectionDefinitionManager();  JdbcConnectionDefinitionManager( final String node );   JdbcConnectionDefinitionManager( final Preferences externalPreferences, final String node ); }
JdbcConnectionDefinitionManager { public void removeSource( final String name ) { if ( StringUtils.isEmpty( name ) ) { throw new IllegalArgumentException( "The provided name is invalid" ); } connectionDefinitions.remove( name ); try { final Preferences node = userPreferences.node( name ); if ( node != null ) { node.removeNode(); userPreferences.flush(); } } catch ( BackingStoreException e ) { log.error( "Could not remove JNDI connection entry [" + name + ']', e ); } } JdbcConnectionDefinitionManager();  JdbcConnectionDefinitionManager( final String node );   JdbcConnectionDefinitionManager( final Preferences externalPreferences, final String node ); JdbcConnectionDefinition[] getSources(); void removeSource( final String name ); boolean updateSourceList( final JdbcConnectionDefinition source ); }
JdbcConnectionDefinitionManager { public void removeSource( final String name ) { if ( StringUtils.isEmpty( name ) ) { throw new IllegalArgumentException( "The provided name is invalid" ); } connectionDefinitions.remove( name ); try { final Preferences node = userPreferences.node( name ); if ( node != null ) { node.removeNode(); userPreferences.flush(); } } catch ( BackingStoreException e ) { log.error( "Could not remove JNDI connection entry [" + name + ']', e ); } } JdbcConnectionDefinitionManager();  JdbcConnectionDefinitionManager( final String node );   JdbcConnectionDefinitionManager( final Preferences externalPreferences, final String node ); JdbcConnectionDefinition[] getSources(); void removeSource( final String name ); boolean updateSourceList( final JdbcConnectionDefinition source );  }