Class CmsItemWorkflowInterceptor
- java.lang.Object
-
- org.springframework.web.servlet.handler.HandlerInterceptorAdapter
-
- de.hybris.platform.cmswebservices.interceptor.CmsItemWorkflowInterceptor
-
- All Implemented Interfaces:
org.springframework.web.servlet.AsyncHandlerInterceptor,org.springframework.web.servlet.HandlerInterceptor
public class CmsItemWorkflowInterceptor extends org.springframework.web.servlet.handler.HandlerInterceptorAdapterDefault interceptor to run before the controller's execution to verify if the affected CMS item is already attached to a workflow. If the item is already a workflow attachment, users should not be able to modify it anymore in order to preserve a consistent state for the item. In such case, we return an error in the HTTP response using the status code 409 - Conflict.
-
-
Constructor Summary
Constructors Constructor Description CmsItemWorkflowInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CMSWorkflowAttachmentServicegetCmsWorkflowAttachmentService()protected UniqueItemIdentifierServicegetUniqueItemIdentifierService()booleanpreHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler)voidsetCmsWorkflowAttachmentService(CMSWorkflowAttachmentService cmsWorkflowAttachmentService)voidsetUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService)
-
-
-
Method Detail
-
preHandle
public boolean preHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler) throws java.lang.Exception- Specified by:
preHandlein interfaceorg.springframework.web.servlet.HandlerInterceptor- Overrides:
preHandlein classorg.springframework.web.servlet.handler.HandlerInterceptorAdapter- Throws:
java.lang.Exception
-
getUniqueItemIdentifierService
protected UniqueItemIdentifierService getUniqueItemIdentifierService()
-
setUniqueItemIdentifierService
public void setUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService)
-
getCmsWorkflowAttachmentService
protected CMSWorkflowAttachmentService getCmsWorkflowAttachmentService()
-
setCmsWorkflowAttachmentService
public void setCmsWorkflowAttachmentService(CMSWorkflowAttachmentService cmsWorkflowAttachmentService)
-
-