Class Form

  • All Implemented Interfaces:
    fr.paris.lutece.portal.service.rbac.RBACResource, fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource, java.util.Comparator<Form>

    public class Form
    extends java.lang.Object
    implements fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource, fr.paris.lutece.portal.service.rbac.RBACResource, java.util.Comparator<Form>
    This is the business class for the object Form
    • Field Detail

      • RESOURCE_TYPE

        public static final java.lang.String RESOURCE_TYPE
        Form resource type
        See Also:
        Constant Field Values
      • STATE_ENABLE

        public static final int STATE_ENABLE
        State of forms that are enabled
        See Also:
        Constant Field Values
      • STATE_DISABLE

        public static final int STATE_DISABLE
        State of forms that are disabled
        See Also:
        Constant Field Values
    • Constructor Detail

      • Form

        public Form()
        Default constructor
    • Method Detail

      • getId

        public int getId()
        Returns the Id
        Returns:
        The Id
      • setId

        public void setId​(int nId)
        Sets the Id
        Parameters:
        nId - The Id
      • getTitle

        public java.lang.String getTitle()
        Returns the Title
        Returns:
        The Title
      • setTitle

        public void setTitle​(java.lang.String strTitle)
        Sets the Title
        Parameters:
        strTitle - The Title
      • getDescription

        public java.lang.String getDescription()
        Returns the Description
        Returns:
        The Description
      • setDescription

        public void setDescription​(java.lang.String strDescription)
        Sets the Description
        Parameters:
        strDescription - The Description
      • getCreationDate

        public java.sql.Timestamp getCreationDate()
        Returns the CreationDate
        Returns:
        The CreationDate
      • setCreationDate

        public void setCreationDate​(java.sql.Timestamp creationDate)
        Sets the CreationDate
        Parameters:
        creationDate - The CreationDate
      • getUpdateDate

        public java.sql.Timestamp getUpdateDate()
        Returns the UpdateDate
        Returns:
        The UpdateDate
      • setUpdateDate

        public void setUpdateDate​(java.sql.Timestamp dateUpdate)
        Sets the UpdateDate
        Parameters:
        dateUpdate - The UpdateDate
      • getAvailabilityStartDate

        public java.sql.Timestamp getAvailabilityStartDate()
        Returns the AvailabilityStartDate
        Returns:
        The AvailabilityStartDate
      • setAvailabilityStartDate

        public void setAvailabilityStartDate​(java.sql.Timestamp dateAvailabilityStartDate)
        Sets the AvailabilityStartDate
        Parameters:
        dateAvailabilityStartDate - The AvailabilityStartDate
      • getAvailabilityEndDate

        public java.sql.Timestamp getAvailabilityEndDate()
        Returns the AvailabilityEndDate
        Returns:
        The AvailabilityEndDate
      • setAvailabilityEndDate

        public void setAvailabilityEndDate​(java.sql.Timestamp dateAvailabilityEndDate)
        Sets the AvailabilityEndDate
        Parameters:
        dateAvailabilityEndDate - The AvailabilityEndDate
      • getResourceTypeCode

        public java.lang.String getResourceTypeCode()
        Specified by:
        getResourceTypeCode in interface fr.paris.lutece.portal.service.rbac.RBACResource
      • getResourceId

        public java.lang.String getResourceId()
        Specified by:
        getResourceId in interface fr.paris.lutece.portal.service.rbac.RBACResource
      • getWorkgroup

        public java.lang.String getWorkgroup()
        Specified by:
        getWorkgroup in interface fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource
      • setWorkgroup

        public void setWorkgroup​(java.lang.String workGroup)
        set the work group associate to the form
        Parameters:
        workGroup - the work group associate to the form
      • getActions

        public java.util.List<FormAction> getActions()
        Returns:
        a list of action can be use for the form
      • setActions

        public void setActions​(java.util.List<FormAction> formActions)
        set a list of action can be use for the form
        Parameters:
        formActions - a list of action must be use for the form
      • isActive

        public boolean isActive()
        Returns the active status of a form by checking if we are currently within its availability period
        Returns:
        true if the form is active
      • getIdWorkflow

        public int getIdWorkflow()
        Getter for id_workflow
        Returns:
        the _nIdWorkflow
      • setIdWorkflow

        public void setIdWorkflow​(int nIdWorkflow)
        setter for id_workflow
        Parameters:
        nIdWorkflow - the Id Workflow to set
      • isAuthentificationNeeded

        public boolean isAuthentificationNeeded()
        Returns:
        the _bAuthentificationNeeded
      • setAuthentificationNeeded

        public void setAuthentificationNeeded​(boolean bAuthentificationNeeded)
        Parameters:
        bAuthentificationNeeded - the bAuthentificationNeeded to set
      • getBreadcrumbName

        public java.lang.String getBreadcrumbName()
        Returns the BreadcrumbName
        Returns:
        The BreadcrumbName
      • setBreadcrumbName

        public void setBreadcrumbName​(java.lang.String strBreadcrumbName)
        Sets the Title
        Parameters:
        strBreadcrumbName - The breadcrumb bean name
      • getReturnUrl

        public java.lang.String getReturnUrl()
        Returns the return URL
        Returns:
        The return URL
      • setReturnUrl

        public void setReturnUrl​(java.lang.String strReturnUrl)
        Sets the return URL
        Parameters:
        strReturnUrl - The form return page URL
      • isDisplaySummary

        public boolean isDisplaySummary()
        Tells if the summary must be displayed
        Returns:
        true if the summary must be displayed, false otherwise
      • setDisplaySummary

        public void setDisplaySummary​(boolean bDisplaySummary)
        Sets if the summary must be displayed
        Parameters:
        bDisplaySummary - true if the summary must be displayed, false otherwise
      • getMaxNumberResponse

        public int getMaxNumberResponse()
        Returns the number Max of response form
        Returns:
        The number max of reponse for
      • setMaxNumberResponse

        public void setMaxNumberResponse​(int nMaxNumberResponse)
        Sets the number Max of response form
        Parameters:
        nMaxNumberResponse - The number max of reponse form
      • isOneResponseByUser

        public boolean isOneResponseByUser()
        Check the user can only submit one form.
        Returns:
        true if the user can submit just one form
      • setOneResponseByUser

        public void setOneResponseByUser​(boolean bOneResponseByUser)
        set true if the user can submit just once the form
        Parameters:
        bOneResponseByUser - true if the user can submit just one form
      • getCurrentNumberResponse

        public int getCurrentNumberResponse()
        Returns:
        the nCurrentNumberResponse
      • setCurrentNumberResponse

        public void setCurrentNumberResponse​(int nCurrentNumberResponse)
        Parameters:
        nCurrentNumberResponse - the nCurrentNumberResponse to set
      • isCaptchaStepInitial

        public boolean isCaptchaStepInitial()
        Returns:
        the bCaptchaStepInitial
      • setCaptchaStepInitial

        public void setCaptchaStepInitial​(boolean bCaptchaStepInitial)
        Parameters:
        bCaptchaStepInitial - the bCaptchaStepInitial to set
      • isCaptchaStepFinal

        public boolean isCaptchaStepFinal()
        Returns:
        the bCaptchaStepFinal
      • setCaptchaStepFinal

        public void setCaptchaStepFinal​(boolean bCaptchaStepFinal)
        Parameters:
        bCaptchaStepFinal - the bCaptchaStepFinel to set
      • isCaptchaRecap

        public boolean isCaptchaRecap()
        Returns:
        the bCaptchaRecap
      • setCaptchaRecap

        public void setCaptchaRecap​(boolean bCaptchaRecap)
        Parameters:
        bCaptchaRecap - the bCaptchaRecap to set
      • isCountResponses

        public boolean isCountResponses()
        Returns:
        the bCountResponse
      • setCountResponses

        public void setCountResponses​(boolean bCountResponse)
        Parameters:
        bCountResponse - the bCountResponse to set
      • getLabelFinalButton

        public java.lang.String getLabelFinalButton()
        Returns:
        the labelFinalButton
      • setLabelFinalButton

        public void setLabelFinalButton​(java.lang.String labelFinalButton)
        Parameters:
        labelFinalButton - the labelFinalButton to set
      • getUnavailableMessage

        public java.lang.String getUnavailableMessage()
        Returns:
        the strUnavailableMessage
      • setUnavailableMessage

        public void setUnavailableMessage​(java.lang.String strUnavailableMessage)
        Parameters:
        strUnavailableMessage - the strUnavailableMessage to set
      • getLogo

        public fr.paris.lutece.portal.business.file.File getLogo()
        Returns:
        the logo
      • setLogo

        public void setLogo​(fr.paris.lutece.portal.business.file.File logo)
        Parameters:
        logo - the logo to set
      • getLogoBase64

        public java.lang.String getLogoBase64()
        Get the content of the logo as base64
        Returns:
      • getIdCategory

        public int getIdCategory()
        Returns:
        the id of the category linked to the form
      • setIdCategory

        public void setIdCategory​(int nIdCategory)
        Parameters:
        _nIdCategory - the _nIdCategory to set
      • isBackupEnabled

        public boolean isBackupEnabled()
        Returns:
        the bBackupEnabled
      • setBackupEnabled

        public void setBackupEnabled​(boolean bBackupEnabled)
        Parameters:
        bBackupEnabled - the bBackupEnabled to set
      • getCategory

        public FormCategory getCategory()
        Returns:
        the id of the category linked to the form
      • isAccessToResponsesByRole

        public boolean isAccessToResponsesByRole()
        Returns true if the access to responses management on FO is based on the roles, false otherwise
        Returns:
        true if the access to responses management on FO is based on the roles, false otherwise
      • setAccessToResponsesByRole

        public void setAccessToResponsesByRole​(boolean bAccessToResponsesByRole)
        Sets the AccessToResponsesByRole
        Parameters:
        bAccessToResponsesByRole - The AccessToResponsesByRole
      • compare

        public int compare​(Form form1,
                           Form form2)
        Custom comparator for Availability Period sorting
        Specified by:
        compare in interface java.util.Comparator<Form>