protected RegisteredService invokeServiceRegistryListenerPreSave(final RegisteredService registeredService) {
        if (serviceRegistryListeners != null) {
            serviceRegistryListeners.forEach(listener -> listener.preSave(registeredService));
        }
        return registeredService;
    }
Publish event.

@param event the event
core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/AbstractServiceRegistry.java