Class JsonServiceRegistry

  • All Implemented Interfaces:
    org.apereo.cas.services.ResourceBasedServiceRegistry, org.apereo.cas.services.ServiceRegistry, org.springframework.beans.factory.DisposableBean

    public class JsonServiceRegistry
    extends org.apereo.cas.services.resource.AbstractResourceBasedServiceRegistry
    Implementation of ServiceRegistry that reads services definition from JSON configuration file at the Spring Application Context initialization time. JSON files are expected to be found inside a directory location and this registry will recursively look through the directory structure to find relevant JSON files. Files are expected to have the "json" extension.
    Since:
    4.1.0
    • Field Summary

      • Fields inherited from class org.apereo.cas.services.resource.AbstractResourceBasedServiceRegistry

        serviceRegistryDirectory, services
      • Fields inherited from interface org.apereo.cas.services.ServiceRegistry

        BEAN_NAME
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonServiceRegistry​(org.springframework.core.io.Resource configDirectory, org.apereo.cas.util.io.WatcherService serviceRegistryConfigWatcher, org.springframework.context.ConfigurableApplicationContext applicationContext, org.apereo.cas.services.replication.RegisteredServiceReplicationStrategy registeredServiceReplicationStrategy, org.apereo.cas.services.resource.RegisteredServiceResourceNamingStrategy resourceNamingStrategy, java.util.Collection<org.apereo.cas.services.ServiceRegistryListener> serviceRegistryListeners)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String[] getExtensions()  
      • Methods inherited from class org.apereo.cas.services.resource.AbstractResourceBasedServiceRegistry

        delete, deleteAll, destroy, enableDefaultWatcherService, findServiceById, getRegisteredServiceFileName, getRegisteredServiceFromFile, getServiceRegistryDirectory, getServices, getServicesStream, load, load, removeRegisteredService, save, setServiceRegistryWatcherService, size, toString, update
      • Methods inherited from class org.apereo.cas.services.AbstractServiceRegistry

        getApplicationContext, getServiceRegistryListeners, invokeServiceRegistryListenerPostLoad, invokeServiceRegistryListenerPreSave, publishEvent
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apereo.cas.services.ServiceRegistry

        findServiceBy, findServiceByExactServiceId, findServiceByExactServiceName, findServiceByExactServiceName, findServiceById, findServicePredicate, getName, save, save
    • Constructor Detail

      • JsonServiceRegistry

        public JsonServiceRegistry​(org.springframework.core.io.Resource configDirectory,
                                   org.apereo.cas.util.io.WatcherService serviceRegistryConfigWatcher,
                                   org.springframework.context.ConfigurableApplicationContext applicationContext,
                                   org.apereo.cas.services.replication.RegisteredServiceReplicationStrategy registeredServiceReplicationStrategy,
                                   org.apereo.cas.services.resource.RegisteredServiceResourceNamingStrategy resourceNamingStrategy,
                                   java.util.Collection<org.apereo.cas.services.ServiceRegistryListener> serviceRegistryListeners)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getExtensions

        protected java.lang.String[] getExtensions()
        Specified by:
        getExtensions in class org.apereo.cas.services.resource.AbstractResourceBasedServiceRegistry