class DataSourceStateChangedListener extends PostGovernanceRepositoryEventListener {

    @Override
    protected Optional<GovernanceEvent> createGovernanceEvent(final DataChangedEvent event) {
        return registryCenterNode.getGovernanceSchema(event.getKey()).map(schema -> new DisabledStateChangedEvent(schema, isDataSourceDisabled(event)));
    }

    public  DataSourceStateChangedListener(final RegistryRepository registryRepository, final Collection<String> schemaNames);

}