Class TestingBackofficeCockpitConfigurationService

  • All Implemented Interfaces:
    com.hybris.cockpitng.core.config.CockpitConfigurationService, com.hybris.cockpitng.core.util.Resettable, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class TestingBackofficeCockpitConfigurationService
    extends BackofficeCockpitConfigurationService
    Configuration service used for testing purposes. Allows injection of custom configuration snippets.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void cacheRootConfiguration​(com.hybris.cockpitng.core.config.impl.jaxb.Config rootConfig, long cacheTimestamp)  
      void clearCustomConfiguration()
      Removes any customization to configuration that has been applied earlier.
      java.util.Optional<com.hybris.cockpitng.core.config.impl.jaxb.Config> getCustomConfiguration()  
      protected org.springframework.core.io.ResourceLoader getResourceLoader()  
      void setCustomConfiguration​(com.hybris.cockpitng.core.config.impl.jaxb.Config customConfiguration, java.lang.String source)
      Sets additional custom configuration that should be appended to the one loaded from system configuration
      void setCustomConfiguration​(java.lang.String customConfiguration, java.lang.String source)
      Sets additional custom configuration that should be appended to the one loaded from system configuration @param customConfiguration configuration XML to be parsed and appended @param source name of a source for applied custom configuration
      void setResourceLoader​(org.springframework.core.io.ResourceLoader resourceLoader)  
      protected void updateMainConfig​(com.hybris.cockpitng.core.config.impl.jaxb.Config mainRootConfig, com.hybris.cockpitng.core.config.impl.jaxb.Config rootConfig)  
      protected void updateMainConfig​(com.hybris.cockpitng.core.config.impl.jaxb.Config mainRootConfig, com.hybris.cockpitng.core.config.impl.jaxb.Context context)  
      • Methods inherited from class com.hybris.cockpitng.modules.config.impl.ModuleAwareCockpitConfigurationService

        getApplicationContext, getCockpitModuleConnector, getLOG, setApplicationContext, setCockpitModuleConnector, setWidgetLibUtils
      • Methods inherited from class com.hybris.cockpitng.core.config.impl.DefaultCockpitConfigurationService

        adaptConfigAfterLoad, adaptConfigBeforeMerge, buildConfigurationContext, cacheMustBeInvalidated, convertAttributes, convertConfigToString, createContextSearchTerms, createHighestRelevance, createMergeRelevance, createParentRestriction, createSearchProgress, createSearchRequest, createSearchTerms, createUpdatedSearchTerms, findContext, findContext, getAdapters, getCockpitProperties, getConfigAsString, getConfigFileInputStream, getConfigFromCache, getConfigTypesAdapters, getConfigurationCache, getContext, getContextStrategies, getFallbackStrategies, getLastModification, getMergeUtils, getMutex, getPersistenceStrategy, getRelevanceZones, getRootConfig, getRootDir, getWidgetConfigurationContextDecoratorList, invalidateAttributesCache, invalidateConfigurationCache, invalidateRootConfigurationCache, isRootConfigurationCacheValid, loadConfiguration, loadConfiguration, loadConfiguration, loadConfigurationImmediately, loadRootConfiguration, loadRootConfiguration, mergeContexts, onCacheInvalidation, onStoreConfiguration, reset, setAdapters, setCockpitConfigValidator, setCockpitProperties, setConfigAsString, setConfigTypesAdapters, setConfigurationCache, setContext, setContextImmediately, setContextStrategies, setFallbackStrategies, setJaxbContextFactory, setMergeUtils, setObligatoryMergeAttributes, setPersistenceStrategy, setWidgetConfigurationContextDecoratorList, storeConfigElement, storeConfiguration, storeRootConfig, validate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.hybris.cockpitng.core.config.CockpitConfigurationService

        getChangesAsConfig, getConfigAsString
    • Constructor Detail

      • TestingBackofficeCockpitConfigurationService

        public TestingBackofficeCockpitConfigurationService()
    • Method Detail

      • cacheRootConfiguration

        protected void cacheRootConfiguration​(com.hybris.cockpitng.core.config.impl.jaxb.Config rootConfig,
                                              long cacheTimestamp)
        Overrides:
        cacheRootConfiguration in class com.hybris.cockpitng.core.config.impl.DefaultCockpitConfigurationService
      • updateMainConfig

        protected void updateMainConfig​(com.hybris.cockpitng.core.config.impl.jaxb.Config mainRootConfig,
                                        com.hybris.cockpitng.core.config.impl.jaxb.Config rootConfig)
      • updateMainConfig

        protected void updateMainConfig​(com.hybris.cockpitng.core.config.impl.jaxb.Config mainRootConfig,
                                        com.hybris.cockpitng.core.config.impl.jaxb.Context context)
      • getCustomConfiguration

        public java.util.Optional<com.hybris.cockpitng.core.config.impl.jaxb.Config> getCustomConfiguration()
      • clearCustomConfiguration

        public void clearCustomConfiguration()
        Removes any customization to configuration that has been applied earlier.
        See Also:
        setCustomConfiguration(Config, String)
      • setCustomConfiguration

        public void setCustomConfiguration​(com.hybris.cockpitng.core.config.impl.jaxb.Config customConfiguration,
                                           java.lang.String source)
        Sets additional custom configuration that should be appended to the one loaded from system configuration
        Parameters:
        customConfiguration - configuration to be appended
        source - name of a source for applied custom configuration
      • setCustomConfiguration

        public void setCustomConfiguration​(java.lang.String customConfiguration,
                                           java.lang.String source)
                                    throws com.hybris.cockpitng.core.config.CockpitConfigurationException
        Sets additional custom configuration that should be appended to the one loaded from system configuration @param customConfiguration configuration XML to be parsed and appended @param source name of a source for applied custom configuration
        Parameters:
        customConfiguration - custom configuration snippet to apply
        source - source of snippet
        Throws:
        com.hybris.cockpitng.core.config.CockpitConfigurationException - - when cockpit configuration cannot be loaded
      • getResourceLoader

        protected org.springframework.core.io.ResourceLoader getResourceLoader()
      • setResourceLoader

        public void setResourceLoader​(org.springframework.core.io.ResourceLoader resourceLoader)