Class ControlHome
java.lang.Object
fr.paris.lutece.plugins.forms.business.ControlHome
This class provides instances management methods (create, find, ...) for Control objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic ControlCreate an instance of the control classstatic voidcreateMappingControl(int nIdcontrol, int nIdQuestion, String strValue) static ControlfindByPrimaryKey(int nKey) Returns an instance of a control whose identifier is specified in parametergetControlByControlTargetAndType(int nIdControlTarget, ControlType controlType) Loads an existing control based on the display it is linked to (for conditional display)getControlByQuestion(int nIdQuestion) Loads control list based on its attached question and control typegetControlByQuestionAndType(int nIdQuestion, String strControlType) Loads control list based on its attached question and control typestatic intgetControlCountByControlTargetAndType(int nIdControlTarget, ControlType controlType) Return the number of controls linked to the displaystatic List<ControlMapping>getControlMappingListByIdControl(int nIdControl) Load the data of all the control objects and returns them as a listLoad the data of all the control objects and returns them as a liststatic fr.paris.lutece.util.ReferenceListLoad the data of all the control objects and returns them as a referenceListstatic fr.paris.lutece.util.ReferenceListgetCtrlMappingListByIdControl(int nIdControl) Load the data of all the control objects and returns them as a referenceListLoad the id of all the control objects and returns them as a liststatic voidremove(int nKey) Remove the control whose identifier is specified in parameterstatic voidremoveByControlTarget(int nIdControlTarget, ControlType controlType) Remove the control whose control target identifier is specified in parameterstatic voidremoveMappingControl(int nKey) Remove the control mapping whose identifier control is specified in parameterstatic ControlUpdate of the control which is specified in parameter
-
Method Details
-
create
Create an instance of the control class- Parameters:
control- The instance of the Control which contains the informations to store- Returns:
- The instance of control which has been created with its primary key.
-
createMappingControl
-
update
Update of the control which is specified in parameter- Parameters:
control- The instance of the Control which contains the data to store- Returns:
- The instance of the control which has been updated
-
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
Remove the control whose control target identifier is specified in parameter- Parameters:
nIdControlTarget- The control target IdcontrolType- The control type
-
findByPrimaryKey
Returns an instance of a control whose identifier is specified in parameter- Parameters:
nKey- The control primary key- Returns:
- an instance of Control
-
getControlsList
Load the data of all the control objects and returns them as a list- Returns:
- the list which contains the data of all the control objects
-
getIdControlsList
Load the id of all the control objects and returns them as a list- Returns:
- the list which contains the id of all the control objects
-
getControlsReferenceList
public static fr.paris.lutece.util.ReferenceList getControlsReferenceList()Load the data of all the control objects and returns them as a referenceList- Returns:
- the referenceList which contains the data of all the control objects
-
getControlByControlTargetAndType
public static List<Control> getControlByControlTargetAndType(int nIdControlTarget, ControlType controlType) Loads an existing control based on the display it is linked to (for conditional display)- Parameters:
nIdControlTarget- the DisplaycontrolType- the control type- Returns:
- the requested Control
-
getControlCountByControlTargetAndType
public static int getControlCountByControlTargetAndType(int nIdControlTarget, ControlType controlType) Return the number of controls linked to the display- Parameters:
nIdControlTarget-controlType-- Returns:
-
getControlByQuestionAndType
Loads control list based on its attached question and control type- Parameters:
nIdQuestion- the question idstrControlType- the control type- Returns:
- the requested Control list
-
getControlByQuestion
Loads control list based on its attached question and control type- Parameters:
nIdQuestion- the question id- Returns:
- the requested Control list
-
getCtrlMappingListByIdControl
public static fr.paris.lutece.util.ReferenceList getCtrlMappingListByIdControl(int nIdControl) Load the data of all the control objects and returns them as a referenceList- Parameters:
nIdControl- the Control id- Returns:
- the referenceList which contains the data of all the control objects
-
getControlMappingListByIdControl
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
-