Class CxActionRemoveInterceptor
- java.lang.Object
-
- de.hybris.platform.personalizationcms.action.interceptor.CxActionRemoveInterceptor
-
- All Implemented Interfaces:
Interceptor,RemoveInterceptor<CxCmsActionModel>
public class CxActionRemoveInterceptor extends java.lang.Object implements RemoveInterceptor<CxCmsActionModel>
-
-
Constructor Summary
Constructors Constructor Description CxActionRemoveInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanCxContainer(CxCmsActionModel cmsAction)protected CatalogVersionServicegetCatalogVersionService()protected ConfigurationServicegetConfigurationService()protected java.util.List<CxCmsComponentContainerModel>getContainers(CxCmsActionModel cmsAction)protected java.util.Optional<CatalogVersionModel>getContentCatalog(CxCmsActionModel action)Method return content catalog for containerprotected CxConfigurationServicegetCxConfigurationService()protected FlexibleSearchServicegetFlexibleSearchService()protected ModelServicegetModelService()protected java.lang.BooleanisCleanupEnabled()Method 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)
-
-
-
Method Detail
-
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
protected boolean isCleanupEnabled(CxCmsActionModel cmsAction)
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
protected java.lang.Boolean 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
protected void cleanCxContainer(CxCmsActionModel cmsAction)
-
getContainers
protected java.util.List<CxCmsComponentContainerModel> getContainers(CxCmsActionModel cmsAction)
-
removeContainer
protected void removeContainer(CxCmsComponentContainerModel container)
-
getContentCatalog
protected java.util.Optional<CatalogVersionModel> getContentCatalog(CxCmsActionModel action)
Method return content catalog for container- Parameters:
action- Action object- Returns:
- content catalog
-
isLastCmsAction
protected boolean isLastCmsAction(CxCmsActionModel cmsAction)
-
getModelService
protected ModelService getModelService()
-
getFlexibleSearchService
protected FlexibleSearchService getFlexibleSearchService()
-
getConfigurationService
protected ConfigurationService getConfigurationService()
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setModelService
public void setModelService(ModelService modelService)
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
getCxConfigurationService
protected CxConfigurationService getCxConfigurationService()
-
setCxConfigurationService
public void setCxConfigurationService(CxConfigurationService cxConfigurationService)
-
-