Class StepDisplayTree


  • public class StepDisplayTree
    extends java.lang.Object
    Management class for the display tree of a Step
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addModel​(java.util.Map<java.lang.String,​java.lang.Object> model)
      Adds the specified model in the model of this instance
      java.lang.String getCompositeHtml​(javax.servlet.http.HttpServletRequest request, java.util.List<FormQuestionResponse> listFormQuestionResponse, java.util.Locale locale, DisplayType displayType)
      Build and return the html template of the tree
      java.util.List<ICompositeDisplay> getCompositeList()
      Build and return all the composite display of the tree as a flat List
      java.util.List<Control> getListDisplayControls()  
      java.util.List<Question> getQuestions()
      Gives all the questions
      java.util.Map<java.lang.Integer,​java.util.List<fr.paris.lutece.plugins.genericattributes.business.Response>> getResponses()  
      Step getStep()  
      void initStepTree​(int nIdStep)
      Initialize the composite tree
      void iterate​(int nIdFormDisplay)
      Iterates the specified form display
      void removeIteration​(javax.servlet.http.HttpServletRequest request, int nIdGroupParent, int nIndexIterationToRemove)
      Remove the specified iteration of group
      void setStep​(Step step)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StepDisplayTree

        public StepDisplayTree​(int nIdStep)
        Constructor
        Parameters:
        nIdStep - the step identifier
      • StepDisplayTree

        public StepDisplayTree​(int nIdStep,
                               FormResponse formResponse)
        Constructor
        Parameters:
        nIdStep - the step identifier
        formResponse - the form response containing the responses
      • StepDisplayTree

        public StepDisplayTree​(int nIdStep,
                               FormResponse formResponse,
                               java.util.List<java.lang.Integer> listQuestionId)
        Constructor
        Parameters:
        nIdStep - the step identifier
        formResponse - the form response containing the responses
        listQuestionId - questions to display
    • Method Detail

      • initStepTree

        public void initStepTree​(int nIdStep)
        Initialize the composite tree
        Parameters:
        nIdStep - The step primary key
      • iterate

        public void iterate​(int nIdFormDisplay)
        Iterates the specified form display
        Parameters:
        nIdFormDisplay - the id of the form display to iterate
      • removeIteration

        public void removeIteration​(javax.servlet.http.HttpServletRequest request,
                                    int nIdGroupParent,
                                    int nIndexIterationToRemove)
        Remove the specified iteration of group
        Parameters:
        request - the request
        nIdGroupParent - the id of the parent group
        nIndexIterationToRemove - the index of the iteration to remove in group
      • getCompositeHtml

        public java.lang.String getCompositeHtml​(javax.servlet.http.HttpServletRequest request,
                                                 java.util.List<FormQuestionResponse> listFormQuestionResponse,
                                                 java.util.Locale locale,
                                                 DisplayType displayType)
        Build and return the html template of the tree
        Parameters:
        request - the request
        listFormQuestionResponse - the list of form question responses
        locale - the locale
        displayType - The display type
        Returns:
        the html template of the tree as a String
      • getCompositeList

        public java.util.List<ICompositeDisplay> getCompositeList()
        Build and return all the composite display of the tree as a flat List
        Returns:
        the list of composite display
      • getStep

        public Step getStep()
        Returns:
        the _step
      • setStep

        public void setStep​(Step step)
        Parameters:
        step - the step to set
      • getResponses

        public java.util.Map<java.lang.Integer,​java.util.List<fr.paris.lutece.plugins.genericattributes.business.Response>> getResponses()
        Returns:
        mapStepResponses The map containing question responses and potential errors
      • getListDisplayControls

        public java.util.List<Control> getListDisplayControls()
        Returns:
        the list of display controls for this display tree
      • getQuestions

        public java.util.List<Question> getQuestions()
        Gives all the questions
        Returns:
        the questions
      • addModel

        public void addModel​(java.util.Map<java.lang.String,​java.lang.Object> model)
        Adds the specified model in the model of this instance
        Parameters:
        model - the model to add