Class SwitchableProviderFactoryImpl
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.services.impl.SwitchableProviderFactoryImpl
-
- All Implemented Interfaces:
ProviderFactory,SwitchableProviderFactory
public class SwitchableProviderFactoryImpl extends java.lang.Object implements SwitchableProviderFactory
Default implementation forSwitchableProviderFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringSESSION_ATTR_ACTIVE_PROVIDER_NAME
-
Constructor Summary
Constructors Constructor Description SwitchableProviderFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ProviderFactorygetActiveProviderFactory()protected java.lang.StringgetActiveProviderFactoryBeanName()AnalyticsProvidergetAnalyticsProvider()Retrieves an instance of the analytics providerprotected org.springframework.context.ApplicationContextgetApplicationContext()ConfigurationProvidergetConfigurationProvider()Retrieves an instance of the configuration provider according to the hybris application configuration.PricingConfigurationParametergetPricingParameter()Retrieve an instance of the pricing parametersPricingProvidergetPricingProvider()Retrieves an instance of the pricing provider according to the hybris application configuration.ProductCsticAndValueParameterProvidergetProductCsticAndValueParameterProvider()Retrieve an instance of the cstic value provider, needed for the backoffice rule editorProviderFactorygetProviderFactoryInstance(java.lang.String providerFactoryBeanName)protected java.util.Map<java.lang.String,ProviderFactory>getProviderFactoryInstances()protected java.util.List<java.lang.String>getRegisteredProviderFactories()protected SessionServicegetSessionService()booleanisProviderFactoryAvailable(java.lang.String providerFactoryBeanName)protected booleanisProviderFactorySwitchAllowed()protected voidreset()resets the current session provider, so enable provider switch in sessionprotected voidsetActiveProviderFactoryBeanName(java.lang.String activeProviderFactoryBeanName)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)protected voidsetDefaultProviderFactoryActive()voidsetRegisteredProviderFactories(java.util.List<java.lang.String> registeredProviderFactories)voidsetSessionService(SessionService sessionService)voidswitchProviderFactory(java.lang.String providerFactoryBeanName)Activates the specified provider factory.
-
-
-
Field Detail
-
SESSION_ATTR_ACTIVE_PROVIDER_NAME
protected static final java.lang.String SESSION_ATTR_ACTIVE_PROVIDER_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getActiveProviderFactory
protected ProviderFactory getActiveProviderFactory()
-
setDefaultProviderFactoryActive
protected void setDefaultProviderFactoryActive()
-
getConfigurationProvider
public ConfigurationProvider getConfigurationProvider()
Description copied from interface:ProviderFactoryRetrieves an instance of the configuration provider according to the hybris application configuration.- Specified by:
getConfigurationProviderin interfaceProviderFactory- Returns:
- instance of the configuration provider
-
getPricingProvider
public PricingProvider getPricingProvider()
Description copied from interface:ProviderFactoryRetrieves an instance of the pricing provider according to the hybris application configuration.- Specified by:
getPricingProviderin interfaceProviderFactory- Returns:
- instance of the pricing provider
-
getAnalyticsProvider
public AnalyticsProvider getAnalyticsProvider()
Description copied from interface:ProviderFactoryRetrieves an instance of the analytics provider- Specified by:
getAnalyticsProviderin interfaceProviderFactory- Returns:
- instance of the analytics provider
-
getProductCsticAndValueParameterProvider
public ProductCsticAndValueParameterProvider getProductCsticAndValueParameterProvider()
Description copied from interface:ProviderFactoryRetrieve an instance of the cstic value provider, needed for the backoffice rule editor- Specified by:
getProductCsticAndValueParameterProviderin interfaceProviderFactory- Returns:
- instance of the cstic value parameter provider
-
getPricingParameter
public PricingConfigurationParameter getPricingParameter()
Description copied from interface:ProviderFactoryRetrieve an instance of the pricing parameters- Specified by:
getPricingParameterin interfaceProviderFactory- Returns:
- instance of the pricing parameters
-
switchProviderFactory
public void switchProviderFactory(java.lang.String providerFactoryBeanName)
Description copied from interface:SwitchableProviderFactoryActivates the specified provider factory. After calling this method all provider requests will be processed by the specified factory.- Specified by:
switchProviderFactoryin interfaceSwitchableProviderFactory- Parameters:
providerFactoryBeanName- provider factory to activate
-
getProviderFactoryInstance
public ProviderFactory getProviderFactoryInstance(java.lang.String providerFactoryBeanName)
-
reset
protected void reset()
resets the current session provider, so enable provider switch in session
-
setRegisteredProviderFactories
public void setRegisteredProviderFactories(java.util.List<java.lang.String> registeredProviderFactories)
-
isProviderFactoryAvailable
public boolean isProviderFactoryAvailable(java.lang.String providerFactoryBeanName)
- Specified by:
isProviderFactoryAvailablein interfaceSwitchableProviderFactory- Parameters:
providerFactoryBeanName- bean name to check- Returns:
true, only if the given provider factory is available
-
getRegisteredProviderFactories
protected java.util.List<java.lang.String> getRegisteredProviderFactories()
-
getProviderFactoryInstances
protected java.util.Map<java.lang.String,ProviderFactory> getProviderFactoryInstances()
-
getActiveProviderFactoryBeanName
protected java.lang.String getActiveProviderFactoryBeanName()
-
setActiveProviderFactoryBeanName
protected void setActiveProviderFactoryBeanName(java.lang.String activeProviderFactoryBeanName)
-
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext()
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
isProviderFactorySwitchAllowed
protected boolean isProviderFactorySwitchAllowed()
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
-