public void deleteRepository(final String repName) throws FisheyeAccessorException { AppConfig.getsConfig().getRepositoryManager().getRepository(repName).stop(); final int id = getRepositoryId(repName); try { AppConfig.getsConfig().getConfig().removeRepository(id); AppConfig.getsConfig().saveConfig(); AppConfig.getsConfig().getRepositoryManager().reloadList(); } catch (final IndexOutOfBoundsException e) { throw new FisheyeAccessorException( "Error retrieving repository '" + repName + "' for id '" + id + "'. Unable to delete.", e); } catch (final IOException e) { throw new FisheyeAccessorException( "Error saving fisheye config when deleting repository '" + repName + "'."); } catch (final ConfigException e) { throw new FisheyeAccessorException( "Error reloading fisheye config when deleting repository '" + repName + "'."); } }