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 void
cleanCxContainer(CxCmsActionModel cmsAction)
protected CatalogVersionService
getCatalogVersionService()
protected ConfigurationService
getConfigurationService()
protected java.util.List<CxCmsComponentContainerModel>
getContainers(CxCmsActionModel cmsAction)
protected java.util.Optional<CatalogVersionModel>
getContentCatalog(CxCmsActionModel action)
Method return content catalog for containerprotected CxConfigurationService
getCxConfigurationService()
protected FlexibleSearchService
getFlexibleSearchService()
protected ModelService
getModelService()
protected java.lang.Boolean
isCleanupEnabled()
Method checks if container cleanup was enabled in property configurationprotected boolean
isCleanupEnabled(CxCmsActionModel cmsAction)
Method checks if container cleanup was enabled in cx configurationprotected boolean
isLastCmsAction(CxCmsActionModel cmsAction)
void
onRemove(CxCmsActionModel cmsAction, InterceptorContext ctx)
Called in themodelService.removeAll()
method.protected void
removeContainer(CxCmsComponentContainerModel container)
void
setCatalogVersionService(CatalogVersionService catalogVersionService)
void
setConfigurationService(ConfigurationService configurationService)
void
setCxConfigurationService(CxConfigurationService cxConfigurationService)
void
setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
void
setModelService(ModelService modelService)
-
-
-
Method Detail
-
onRemove
public void onRemove(CxCmsActionModel cmsAction, InterceptorContext ctx) throws InterceptorException
Description copied from interface:RemoveInterceptor
Called in themodelService.removeAll()
method.- Specified by:
onRemove
in 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)
-
-