Class LegacyModeChecker
- java.lang.Object
-
- de.hybris.platform.promotions.util.legacy.LegacyModeChecker
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class LegacyModeChecker extends java.lang.Object implements org.springframework.context.ApplicationContextAwareChecks whether legacy mode enablement flag for the promotions correlates with the bean version being used in runtime
-
-
Constructor Summary
Constructors Constructor Description LegacyModeChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck()Performs check whether legacy mode is enabledprotected voidcheckLegacyModeOnStartUp()protected org.springframework.context.ApplicationContextgetApplicationContext()protected PromotionsServicegetLegacyPromotionsService()protected PromotionsServicegetPromotionsService()protected voidinit()protected booleanisLegacyModeEnabled()protected voidlogErrorAndThrowException()protected voidlogWarning()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetLegacyModeEnabled(boolean legacyModeEnabled)voidsetLegacyPromotionsService(PromotionsService legacyPromotionsService)voidsetPromotionsService(PromotionsService promotionsService)
-
-
-
Method Detail
-
check
public void check()
Performs check whether legacy mode is enabled- Throws:
LegacyException- if legacy mode is disabled
-
checkLegacyModeOnStartUp
protected void checkLegacyModeOnStartUp()
-
init
@PostConstruct protected void init()
-
logWarning
protected void logWarning()
-
logErrorAndThrowException
protected void logErrorAndThrowException()
-
getPromotionsService
protected PromotionsService getPromotionsService()
-
setPromotionsService
public void setPromotionsService(PromotionsService promotionsService)
-
getLegacyPromotionsService
protected PromotionsService getLegacyPromotionsService()
-
setLegacyPromotionsService
public void setLegacyPromotionsService(PromotionsService legacyPromotionsService)
-
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext()
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
isLegacyModeEnabled
protected boolean isLegacyModeEnabled()
-
setLegacyModeEnabled
public void setLegacyModeEnabled(boolean legacyModeEnabled)
-
-