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.HandlerInterceptorAdapter
Default 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected CMSWorkflowAttachmentServiceprotected UniqueItemIdentifierServicebooleanpreHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler) voidsetCmsWorkflowAttachmentService(CMSWorkflowAttachmentService cmsWorkflowAttachmentService) voidsetUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.AsyncHandlerInterceptor
afterConcurrentHandlingStartedMethods inherited from interface org.springframework.web.servlet.HandlerInterceptor
afterCompletion, postHandle
-
Constructor Details
-
CmsItemWorkflowInterceptor
public CmsItemWorkflowInterceptor()
-
-
Method Details
-
preHandle
public boolean preHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler) throws Exception - Throws:
Exception
-
getUniqueItemIdentifierService
-
setUniqueItemIdentifierService
-
getCmsWorkflowAttachmentService
-
setCmsWorkflowAttachmentService
public void setCmsWorkflowAttachmentService(CMSWorkflowAttachmentService cmsWorkflowAttachmentService)
-