Class TemplateControlHome


  • public final class TemplateControlHome
    extends Object
    This class provides instances management methods (create, find, ...) for Control objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void create​(fr.paris.lutece.plugins.forms.business.Control control)
      Create an instance of the control class
      static void createMappingControl​(int nIdcontrol, int nIdQuestion, String strValue)  
      static fr.paris.lutece.plugins.forms.business.Control findByPrimaryKey​(int nKey)
      Returns an instance of a control whose identifier is specified in parameter
      static List<fr.paris.lutece.plugins.forms.business.Control> getControlByControlTargetAndType​(int nIdControlTarget, fr.paris.lutece.plugins.forms.business.ControlType controlType)
      Loads an existing control based on the display it is linked to (for conditional display)
      static List<fr.paris.lutece.plugins.forms.business.Control> getControlByQuestion​(int nIdQuestion)
      Loads control list based on its attached question and control type
      static List<fr.paris.lutece.plugins.forms.business.Control> getControlByQuestionAndType​(int nIdQuestion, String strControlType)
      Loads control list based on its attached question and control type
      static List<fr.paris.lutece.plugins.forms.business.ControlMapping> getControlMappingListByIdControl​(int nIdControl)
      Load the data of all the control objects and returns them as a list
      static void remove​(int nKey)
      Remove the control whose identifier is specified in parameter
      static void removeByControlTarget​(int nIdControlTarget, fr.paris.lutece.plugins.forms.business.ControlType controlType)
      Remove the control whose control target identifier is specified in parameter
      static void removeMappingControl​(int nKey)
      Remove the control mapping whose identifier control is specified in parameter
      static void update​(fr.paris.lutece.plugins.forms.business.Control control)
      Update of the control which is specified in parameter
    • Method Detail

      • create

        public static void create​(fr.paris.lutece.plugins.forms.business.Control control)
        Create an instance of the control class
        Parameters:
        control - The instance of the Control which contains the informations to store
      • createMappingControl

        public static void createMappingControl​(int nIdcontrol,
                                                int nIdQuestion,
                                                String strValue)
      • update

        public static void update​(fr.paris.lutece.plugins.forms.business.Control control)
        Update of the control which is specified in parameter
        Parameters:
        control - The instance of the Control which contains the data to store
      • remove

        public static void remove​(int nKey)
        Remove the control whose identifier is specified in parameter
        Parameters:
        nKey - The control Id
      • removeMappingControl

        public static void removeMappingControl​(int nKey)
        Remove the control mapping whose identifier control is specified in parameter
        Parameters:
        nKey - The control Id
      • removeByControlTarget

        public static void removeByControlTarget​(int nIdControlTarget,
                                                 fr.paris.lutece.plugins.forms.business.ControlType controlType)
        Remove the control whose control target identifier is specified in parameter
        Parameters:
        nIdControlTarget - The control target Id
        controlType - The control type
      • findByPrimaryKey

        public static fr.paris.lutece.plugins.forms.business.Control findByPrimaryKey​(int nKey)
        Returns an instance of a control whose identifier is specified in parameter
        Parameters:
        nKey - The control primary key
        Returns:
        an instance of Control
      • getControlByControlTargetAndType

        public static List<fr.paris.lutece.plugins.forms.business.Control> getControlByControlTargetAndType​(int nIdControlTarget,
                                                                                                            fr.paris.lutece.plugins.forms.business.ControlType controlType)
        Loads an existing control based on the display it is linked to (for conditional display)
        Parameters:
        nIdControlTarget - the Display
        controlType - the control type
        Returns:
        the requested Control
      • getControlByQuestionAndType

        public static List<fr.paris.lutece.plugins.forms.business.Control> getControlByQuestionAndType​(int nIdQuestion,
                                                                                                       String strControlType)
        Loads control list based on its attached question and control type
        Parameters:
        nIdQuestion - the question id
        strControlType - the control type
        Returns:
        the requested Control list
      • getControlByQuestion

        public static List<fr.paris.lutece.plugins.forms.business.Control> getControlByQuestion​(int nIdQuestion)
        Loads control list based on its attached question and control type
        Parameters:
        nIdQuestion - the question id
        Returns:
        the requested Control list
      • getControlMappingListByIdControl

        public static List<fr.paris.lutece.plugins.forms.business.ControlMapping> getControlMappingListByIdControl​(int nIdControl)
        Load the data of all the control objects and returns them as a list
        Parameters:
        nIdControl - the Control id
        Returns:
        the referenceList which contains the data of all the control objects