Class CockpitConfigurationServiceExtender


  • public class CockpitConfigurationServiceExtender
    extends java.lang.Object
    Allows for extending cockpit configuration service functionality by adding additional strategies and adapters. Should be used as a spring bean to add additional properties to existing cockpit configuration service without creating a new cockpit configuration service bean. It adds the specified properties to the injected configuration service after the application context was initialized. It removes these properties before the application context is destroyed.
    • Constructor Detail

      • CockpitConfigurationServiceExtender

        public CockpitConfigurationServiceExtender()
    • Method Detail

      • addAll

        @PostConstruct
        public void addAll()
        Executed after application context was initialized. Adds specified properties to the cockpit configuration service.
      • removeAll

        @PreDestroy
        public void removeAll()
        Executed before application context is destroyed. Removes specified properties from the cockpit configuration service.
      • getContextStrategies

        public java.util.Map<java.lang.String,​CockpitConfigurationContextStrategy> getContextStrategies()
        Context strategies to be added.
        Returns:
        context strategies to be added
      • setContextStrategies

        public void setContextStrategies​(java.util.Map<java.lang.String,​CockpitConfigurationContextStrategy> contextStrategies)
        Sets context strategies to be added.
        Parameters:
        contextStrategies - context strategies to be added
      • getFallbackStrategies

        public java.util.Map<java.lang.String,​java.util.List<CockpitConfigurationFallbackStrategy>> getFallbackStrategies()
        Fallback strategies to be added.
        Returns:
        fallback strategies to be added
      • setFallbackStrategies

        public void setFallbackStrategies​(java.util.Map<java.lang.String,​java.util.List<CockpitConfigurationFallbackStrategy>> fallbackStrategies)
        Sets fallback strategies to be added.
        Parameters:
        fallbackStrategies - fallback strategies to be added
      • getAdapters

        public java.util.Map<java.util.Map<java.lang.String,​java.lang.String>,​CockpitConfigurationAdapter<?>> getAdapters()
        Adapters to be added.
        Returns:
        adapters to be added
      • setAdapters

        public void setAdapters​(java.util.Map<java.util.Map<java.lang.String,​java.lang.String>,​CockpitConfigurationAdapter<?>> adapters)
        Sets adapters to be added.
        Parameters:
        adapters - adapters to be added
      • getContextDecorators

        public java.util.List<WidgetConfigurationContextDecorator> getContextDecorators()
        Context decorators to be added.
        Returns:
        contextDecorators to be added
      • setContextDecorators

        public void setContextDecorators​(java.util.List<WidgetConfigurationContextDecorator> contextDecorators)
        Set context decorators to be added.
        Parameters:
        contextDecorators - context decorators to be added
      • getConfigurationService

        public DefaultCockpitConfigurationService getConfigurationService()
        Configuration service to add additional properties to.
        Returns:
        configuration service to extend
      • setConfigurationService

        public void setConfigurationService​(DefaultCockpitConfigurationService configurationService)
        Sets configuration service to add additional properties to.
        Parameters:
        configurationService - configuration service to extend
      • setWidgetConfigurationContextDecoratorList

        public void setWidgetConfigurationContextDecoratorList​(java.util.List<WidgetConfigurationContextDecorator> configContextDecoratorList)
        Sets context decorator list to extend.
        Parameters:
        configContextDecoratorList - context decorator list to be extended
      • getConfigTypesAdapters

        public java.util.Map<java.lang.String,​CockpitConfigurationAdapter<?>> getConfigTypesAdapters()
        Gets config adapters per config type to be added to the service.
        Returns:
        config to be added.
      • setConfigTypesAdapters

        public void setConfigTypesAdapters​(java.util.Map<java.lang.String,​CockpitConfigurationAdapter<?>> configTypesAdapters)
        Sets config adapters per config type
        Parameters:
        configTypesAdapters - adapters per config type.