class DataSourceManager implements Managed {

	public void remove(DataSource source) {
		Assert.assertNotNull(source);

		// delete source
		dataSourceRepository.remove(source);

		// delete source db
		dataRepositoryCache.remove(source.getId());
		processorChainManager.removeAll(source);
		dataViewManager.removeAll(source);
		notificationManager.removeAll(source);
		dbConnectorFactory.deleteDatabase(source.getId());
	}

	@Inject public  DataSourceManager(
			DataSourceRepository dataSourceRepository,
			Cache<DataRepository> dataRepositoryCache,
			DbConnectorFactory dbConnectorFactory,
			RepositoryFactory repositoryFactory,
			ProcessorChainManager processorChainManager,
			DataViewManager dataViewManager,
			NotificationManager notificationManager);

}