Class Form
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.business.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 Summary
Fields Modifier and Type Field Description static java.lang.StringRESOURCE_TYPEForm resource typestatic intSTATE_DISABLEState of forms that are disabledstatic intSTATE_ENABLEState of forms that are enabled
-
Constructor Summary
Constructors Constructor Description Form()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Form form1, Form form2)Custom comparator for Availability Period sortingjava.util.List<FormAction>getActions()java.sql.TimestampgetAvailabilityEndDate()Returns the AvailabilityEndDatejava.sql.TimestampgetAvailabilityStartDate()Returns the AvailabilityStartDateintgetBackupStoragePeriod()java.lang.StringgetBreadcrumbName()Returns the BreadcrumbNameFormCategorygetCategory()java.sql.TimestampgetCreationDate()Returns the CreationDateintgetCurrentNumberResponse()java.lang.StringgetDescription()Returns the DescriptionintgetId()Returns the IdintgetIdCategory()intgetIdWorkflow()Getter for id_workflowjava.lang.StringgetLabelFinalButton()fr.paris.lutece.portal.business.file.FilegetLogo()java.lang.StringgetLogoBase64()Get the content of the logo as base64intgetMaxNumberResponse()Returns the number Max of response formjava.lang.StringgetResourceId()java.lang.StringgetResourceTypeCode()java.lang.StringgetReturnUrl()Returns the return URLjava.lang.StringgetTitle()Returns the Titlejava.lang.StringgetUnavailableMessage()java.sql.TimestampgetUpdateDate()Returns the UpdateDatejava.lang.StringgetWorkgroup()booleanisAccessToResponsesByRole()Returns true if the access to responses management on FO is based on the roles, false otherwisebooleanisActive()Returns the active status of a form by checking if we are currently within its availability periodbooleanisAuthentificationNeeded()booleanisBackupEnabled()booleanisCaptchaRecap()booleanisCaptchaStepFinal()booleanisCaptchaStepInitial()booleanisCountResponses()booleanisDisplaySummary()Tells if the summary must be displayedbooleanisOneResponseByUser()Check the user can only submit one form.voidsetAccessToResponsesByRole(boolean bAccessToResponsesByRole)Sets the AccessToResponsesByRolevoidsetActions(java.util.List<FormAction> formActions)set a list of action can be use for the formvoidsetAuthentificationNeeded(boolean bAuthentificationNeeded)voidsetAvailabilityEndDate(java.sql.Timestamp dateAvailabilityEndDate)Sets the AvailabilityEndDatevoidsetAvailabilityStartDate(java.sql.Timestamp dateAvailabilityStartDate)Sets the AvailabilityStartDatevoidsetBackupEnabled(boolean bBackupEnabled)voidsetBackupStoragePeriod(int backupStoragePeriod)voidsetBreadcrumbName(java.lang.String strBreadcrumbName)Sets the TitlevoidsetCaptchaRecap(boolean bCaptchaRecap)voidsetCaptchaStepFinal(boolean bCaptchaStepFinal)voidsetCaptchaStepInitial(boolean bCaptchaStepInitial)voidsetCountResponses(boolean bCountResponse)voidsetCreationDate(java.sql.Timestamp creationDate)Sets the CreationDatevoidsetCurrentNumberResponse(int nCurrentNumberResponse)voidsetDescription(java.lang.String strDescription)Sets the DescriptionvoidsetDisplaySummary(boolean bDisplaySummary)Sets if the summary must be displayedvoidsetId(int nId)Sets the IdvoidsetIdCategory(int nIdCategory)voidsetIdWorkflow(int nIdWorkflow)setter for id_workflowvoidsetLabelFinalButton(java.lang.String labelFinalButton)voidsetLogo(fr.paris.lutece.portal.business.file.File logo)voidsetMaxNumberResponse(int nMaxNumberResponse)Sets the number Max of response formvoidsetOneResponseByUser(boolean bOneResponseByUser)set true if the user can submit just once the formvoidsetReturnUrl(java.lang.String strReturnUrl)Sets the return URLvoidsetTitle(java.lang.String strTitle)Sets the TitlevoidsetUnavailableMessage(java.lang.String strUnavailableMessage)voidsetUpdateDate(java.sql.Timestamp dateUpdate)Sets the UpdateDatevoidsetWorkgroup(java.lang.String workGroup)set the work group associate to the 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
-
-
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:
getResourceTypeCodein interfacefr.paris.lutece.portal.service.rbac.RBACResource
-
getResourceId
public java.lang.String getResourceId()
- Specified by:
getResourceIdin interfacefr.paris.lutece.portal.service.rbac.RBACResource
-
getWorkgroup
public java.lang.String getWorkgroup()
- Specified by:
getWorkgroupin interfacefr.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:
trueif the summary must be displayed,falseotherwise
-
setDisplaySummary
public void setDisplaySummary(boolean bDisplaySummary)
Sets if the summary must be displayed- Parameters:
bDisplaySummary-trueif the summary must be displayed,falseotherwise
-
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
-
getBackupStoragePeriod
public int getBackupStoragePeriod()
- Returns:
- the nBackupStoragePeriod
-
setBackupStoragePeriod
public void setBackupStoragePeriod(int backupStoragePeriod)
- Parameters:
backupStoragePeriod- the backupStoragePeriod 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
-
-