Class ProductConfigurationRemoveInterceptor
java.lang.Object
de.hybris.platform.sap.productconfig.services.interceptor.ProductConfigurationRemoveInterceptor
- All Implemented Interfaces:
Interceptor,RemoveInterceptor<AbstractOrderEntryModel>
public class ProductConfigurationRemoveInterceptor
extends Object
implements RemoveInterceptor<AbstractOrderEntryModel>
This Interceptor ensures, that no orphaned product configurations exist after an abstract order entry gets deleted.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckBaseSiteAvailable(String configId) protected BaseSiteServiceprotected ConfigurationLifecycleStrategyprotected ProductConfigEventListenerUtilprotected ProductConfigurationPersistenceServicevoidonRemove(AbstractOrderEntryModel model, InterceptorContext ctx) Called in themodelService.removeAll()method.protected voidreleaseConfigIfOrphaned(String cartEntryKey, String configId) protected voidreleaseConfigIfPossible(AbstractOrderEntryModel model, ProductConfigurationModel productConfiguration, boolean ignoreProductRelation) voidsetBaseSiteService(BaseSiteService baseSiteService) voidsetConfigurationLifecycleStrategy(ConfigurationLifecycleStrategy configurationLifecycleStrategy) voidsetProductConfigEventListenerUtil(ProductConfigEventListenerUtil productConfigEventListenerUtil) voidsetProductConfigurationPersistenceService(ProductConfigurationPersistenceService productConfigurationPersistenceService)
-
Constructor Details
-
ProductConfigurationRemoveInterceptor
public ProductConfigurationRemoveInterceptor()
-
-
Method Details
-
onRemove
public void onRemove(AbstractOrderEntryModel model, InterceptorContext ctx) throws InterceptorException Description copied from interface:RemoveInterceptorCalled in themodelService.removeAll()method.- Specified by:
onRemovein interfaceRemoveInterceptor<AbstractOrderEntryModel>- Parameters:
model- the model which should be removedctx- theInterceptorContext- Throws:
InterceptorException- if the remove reports an error
-
releaseConfigIfPossible
protected void releaseConfigIfPossible(AbstractOrderEntryModel model, ProductConfigurationModel productConfiguration, boolean ignoreProductRelation) -
checkBaseSiteAvailable
-
releaseConfigIfOrphaned
-
getProductConfigurationPersistenceService
-
setProductConfigurationPersistenceService
public void setProductConfigurationPersistenceService(ProductConfigurationPersistenceService productConfigurationPersistenceService) -
getConfigurationLifecycleStrategy
-
setConfigurationLifecycleStrategy
public void setConfigurationLifecycleStrategy(ConfigurationLifecycleStrategy configurationLifecycleStrategy) -
getBaseSiteService
-
setBaseSiteService
-
getProductConfigEventListenerUtil
-
setProductConfigEventListenerUtil
public void setProductConfigEventListenerUtil(ProductConfigEventListenerUtil productConfigEventListenerUtil)
-