Class FlowHandlerAbstract<D extends FlowData>

java.lang.Object
org.bardframework.flow.FlowHandlerAbstract<D>
All Implemented Interfaces:
FlowHandler
Direct Known Subclasses:
FlowHandlerImpl

public abstract class FlowHandlerAbstract<D extends FlowData> extends Object implements FlowHandler
  • Field Details

  • Constructor Details

  • Method Details

    • start

      public org.bardframework.flow.FlowResponse start(Map<String,String> initValues, Locale locale, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception
      Specified by:
      start in interface FlowHandler
      Throws:
      Exception
    • submit

      public org.bardframework.flow.FlowResponse submit(String flowToken, Map<String,String> formData, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception
      Specified by:
      submit in interface FlowHandler
      Throws:
      Exception
    • action

      public void action(String flowToken, String action, Map<String,String> formData, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception
      Specified by:
      action in interface FlowHandler
      Throws:
      Exception
    • getCurrent

      public org.bardframework.flow.FlowResponse getCurrent(String flowToken, Locale locale, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception
      این متد فقط فرم جاری را برمیگرداند و پیش پردازش های آن را اجرا نمی کند
      Specified by:
      getCurrent in interface FlowHandler
      Throws:
      Exception
    • processAction

      protected boolean processAction(String flowToken, String action, D flowData, Map<String,String> formData, FlowFormTemplate currentFormTemplate, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception
      Throws:
      Exception
    • fillFlowData

      protected void fillFlowData(Map<String,String> flowData, Map<String,String> formData, FlowFormTemplate currentFormTemplate)
      افزودن دیتاهای مورد نیاز در فرم به فلو دیتا
    • processNextForm

      protected org.bardframework.flow.FlowResponse processNextForm(String flowToken, D flowData, Map<String,String> formData, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception
      1. محاسبه فرم بعدی
      2. اجرای پیش پردازش های فرم
      3. ذخیره داده های فلو
      Throws:
      Exception
    • getCurrentFormTemplate

      protected FlowFormTemplate getCurrentFormTemplate(D flowData) throws Exception
      Throws:
      Exception
    • onFinished

      protected void onFinished(String flowToken, D flowData, Map<String,String> formData, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception
      Throws:
      Exception
    • updateFlowData

      protected void updateFlowData(String flowToken, D flowData)
    • invalidateFlow

      protected void invalidateFlow(InvalidateFlowException ex)
    • toResponse

      protected org.bardframework.flow.FlowResponse toResponse(String flowToken, FlowFormTemplate formTemplate, D flowData, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception
      تبدیل به فرم
      Throws:
      Exception
    • handleSubmitException

      protected org.bardframework.flow.FlowResponse handleSubmitException(String flowToken, D flowData, Map<String,String> formData, FlowFormTemplate currentFormTemplate, Exception ex) throws Exception
      Throws:
      Exception
    • handleException

      protected abstract org.bardframework.flow.FlowResponse handleException(String flowToken, D flowData, Map<String,String> formData, FlowFormTemplate currentFormTemplate, Exception ex) throws Exception
      Throws:
      Exception
    • getStepsCounts

      protected int getStepsCounts(D flowData)
    • cleanFlowData

      protected void cleanFlowData(String flowToken)
    • process

      protected boolean process(List<FormProcessor> processors, String flowToken, D flowData, Map<String,String> formData, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception
      Throws:
      Exception
    • getPreProcessors

      public List<FormProcessor> getPreProcessors(D flowData)
    • setPreProcessors

      public void setPreProcessors(List<FormProcessor> preProcessors)
    • getPostProcessors

      public List<FormProcessor> getPostProcessors(D flowData)
    • setPostProcessors

      public void setPostProcessors(List<FormProcessor> postProcessors)
    • getActionProcessors

      public Map<String,List<FormProcessor>> getActionProcessors(D flowData)
    • setActionProcessors

      public void setActionProcessors(Map<String,List<FormProcessor>> actionProcessors)