Class CxActionRemoveInterceptor
java.lang.Object
de.hybris.platform.personalizationcms.action.interceptor.CxActionRemoveInterceptor
- All Implemented Interfaces:
Interceptor,RemoveInterceptor<CxCmsActionModel>
public class CxActionRemoveInterceptor
extends Object
implements RemoveInterceptor<CxCmsActionModel>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanCxContainer(CxCmsActionModel cmsAction) protected CatalogVersionServiceprotected ConfigurationServiceprotected List<CxCmsComponentContainerModel>getContainers(CxCmsActionModel cmsAction) protected Optional<CatalogVersionModel>getContentCatalog(CxCmsActionModel action) Method return content catalog for containerprotected CxConfigurationServiceprotected FlexibleSearchServiceprotected ModelServiceprotected BooleanMethod checks if container cleanup was enabled in property configurationprotected booleanisCleanupEnabled(CxCmsActionModel cmsAction) Method checks if container cleanup was enabled in cx configurationprotected booleanisLastCmsAction(CxCmsActionModel cmsAction) voidonRemove(CxCmsActionModel cmsAction, InterceptorContext ctx) Called in themodelService.removeAll()method.protected voidremoveContainer(CxCmsComponentContainerModel container) voidsetCatalogVersionService(CatalogVersionService catalogVersionService) voidsetConfigurationService(ConfigurationService configurationService) voidsetCxConfigurationService(CxConfigurationService cxConfigurationService) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) voidsetModelService(ModelService modelService)
-
Constructor Details
-
CxActionRemoveInterceptor
public CxActionRemoveInterceptor()
-
-
Method Details
-
onRemove
public void onRemove(CxCmsActionModel cmsAction, InterceptorContext ctx) throws InterceptorException Description copied from interface:RemoveInterceptorCalled in themodelService.removeAll()method.- Specified by:
onRemovein interfaceRemoveInterceptor<CxCmsActionModel>- Parameters:
cmsAction- the model which should be removedctx- theInterceptorContext- Throws:
InterceptorException- if the remove reports an error
-
isCleanupEnabled
Method checks if container cleanup was enabled in cx configuration- Parameters:
cmsAction- Action object- Returns:
- true - if configuration was enabled
false - if content catalog for action could not be found or container cleanup is disabled
-
isCleanupEnabled
Method checks if container cleanup was enabled in property configuration- Returns:
- true - if personalizationcms.containers.cleanup.enabled=true
false - if personalizationcms.containers.cleanup.enabled=false or property was not found
-
cleanCxContainer
-
getContainers
-
removeContainer
-
getContentCatalog
Method return content catalog for container- Parameters:
action- Action object- Returns:
- content catalog
-
isLastCmsAction
-
getModelService
-
getFlexibleSearchService
-
getConfigurationService
-
getCatalogVersionService
-
setModelService
-
setFlexibleSearchService
-
setCatalogVersionService
-
setConfigurationService
-
getCxConfigurationService
-
setCxConfigurationService
-