Class TestingBackofficeCockpitConfigurationService
- java.lang.Object
-
- com.hybris.cockpitng.core.config.impl.DefaultCockpitConfigurationService
-
- com.hybris.cockpitng.modules.config.impl.ModuleAwareCockpitConfigurationService
-
- com.hybris.backoffice.config.impl.BackofficeCockpitConfigurationService
-
- com.hybris.backoffice.config.impl.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.
-
-
Field Summary
-
Fields inherited from class com.hybris.backoffice.config.impl.BackofficeCockpitConfigurationService
COCKPITNG_CONFIG, MIME_TYPE
-
-
Constructor Summary
Constructors Constructor Description TestingBackofficeCockpitConfigurationService()
-
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 configurationvoid
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 configurationvoid
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.backoffice.config.impl.BackofficeCockpitConfigurationService
createConfigFile, getBackofficeConfigurationMediaHelper, getCockpitNGConfig, getConfigFileOutputStream, getCurrentTimeInMillis, getDefaultCockpitConfigAsStream, getDefaultConfigFile, getInputStreamForMedia, getMediaService, getModelService, getSessionService, getTimeService, getTypeService, getUserService, putConfigToCache, resetToDefaults, setBackofficeConfigurationMediaHelper, setDefaultConfigFile, setMediaService, setModelService, setSessionService, setTimeService, setTypeService, setUserService
-
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
-
-
-
-
Method Detail
-
cacheRootConfiguration
protected void cacheRootConfiguration(com.hybris.cockpitng.core.config.impl.jaxb.Config rootConfig, long cacheTimestamp)
- Overrides:
cacheRootConfiguration
in classcom.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 appendedsource
- 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 applysource
- 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)
-
-