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,Comparator<Form>
public class Form extends Object implements fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource, fr.paris.lutece.portal.service.rbac.RBACResource, Comparator<Form>
This is the business class for the object Form
-
-
Field Summary
Fields Modifier and Type Field Description static 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 sortingList<FormAction>getActions()TimestampgetAvailabilityEndDate()Returns the AvailabilityEndDateTimestampgetAvailabilityStartDate()Returns the AvailabilityStartDateStringgetBreadcrumbName()Returns the BreadcrumbNameFormCategorygetCategory()TimestampgetCreationDate()Returns the CreationDateintgetCurrentNumberResponse()StringgetDescription()Returns the DescriptionintgetId()Returns the IdintgetIdCategory()intgetIdWorkflow()Getter for id_workflowStringgetLabelFinalButton()fr.paris.lutece.portal.business.file.FilegetLogo()StringgetLogoBase64()Get the content of the logo as base64intgetMaxNumberResponse()Returns the number Max of response formStringgetResourceId()StringgetResourceTypeCode()StringgetReturnUrl()Returns the return URLStringgetTitle()Returns the TitleStringgetUnavailableMessage()TimestampgetUpdateDate()Returns the UpdateDateStringgetWorkgroup()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(List<FormAction> formActions)set a list of action can be use for the formvoidsetAuthentificationNeeded(boolean bAuthentificationNeeded)voidsetAvailabilityEndDate(Timestamp dateAvailabilityEndDate)Sets the AvailabilityEndDatevoidsetAvailabilityStartDate(Timestamp dateAvailabilityStartDate)Sets the AvailabilityStartDatevoidsetBackupEnabled(boolean bBackupEnabled)voidsetBreadcrumbName(String strBreadcrumbName)Sets the TitlevoidsetCaptchaRecap(boolean bCaptchaRecap)voidsetCaptchaStepFinal(boolean bCaptchaStepFinal)voidsetCaptchaStepInitial(boolean bCaptchaStepInitial)voidsetCountResponses(boolean bCountResponse)voidsetCreationDate(Timestamp creationDate)Sets the CreationDatevoidsetCurrentNumberResponse(int nCurrentNumberResponse)voidsetDescription(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(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(String strReturnUrl)Sets the return URLvoidsetTitle(String strTitle)Sets the TitlevoidsetUnavailableMessage(String strUnavailableMessage)voidsetUpdateDate(Timestamp dateUpdate)Sets the UpdateDatevoidsetWorkgroup(String workGroup)set the work group associate to the form-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
RESOURCE_TYPE
public static final 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 String getTitle()
Returns the Title- Returns:
- The Title
-
setTitle
public void setTitle(String strTitle)
Sets the Title- Parameters:
strTitle- The Title
-
getDescription
public String getDescription()
Returns the Description- Returns:
- The Description
-
setDescription
public void setDescription(String strDescription)
Sets the Description- Parameters:
strDescription- The Description
-
getCreationDate
public Timestamp getCreationDate()
Returns the CreationDate- Returns:
- The CreationDate
-
setCreationDate
public void setCreationDate(Timestamp creationDate)
Sets the CreationDate- Parameters:
creationDate- The CreationDate
-
getUpdateDate
public Timestamp getUpdateDate()
Returns the UpdateDate- Returns:
- The UpdateDate
-
setUpdateDate
public void setUpdateDate(Timestamp dateUpdate)
Sets the UpdateDate- Parameters:
dateUpdate- The UpdateDate
-
getAvailabilityStartDate
public Timestamp getAvailabilityStartDate()
Returns the AvailabilityStartDate- Returns:
- The AvailabilityStartDate
-
setAvailabilityStartDate
public void setAvailabilityStartDate(Timestamp dateAvailabilityStartDate)
Sets the AvailabilityStartDate- Parameters:
dateAvailabilityStartDate- The AvailabilityStartDate
-
getAvailabilityEndDate
public Timestamp getAvailabilityEndDate()
Returns the AvailabilityEndDate- Returns:
- The AvailabilityEndDate
-
setAvailabilityEndDate
public void setAvailabilityEndDate(Timestamp dateAvailabilityEndDate)
Sets the AvailabilityEndDate- Parameters:
dateAvailabilityEndDate- The AvailabilityEndDate
-
getResourceTypeCode
public String getResourceTypeCode()
- Specified by:
getResourceTypeCodein interfacefr.paris.lutece.portal.service.rbac.RBACResource
-
getResourceId
public String getResourceId()
- Specified by:
getResourceIdin interfacefr.paris.lutece.portal.service.rbac.RBACResource
-
getWorkgroup
public String getWorkgroup()
- Specified by:
getWorkgroupin interfacefr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource
-
setWorkgroup
public void setWorkgroup(String workGroup)
set the work group associate to the form- Parameters:
workGroup- the work group associate to the form
-
getActions
public List<FormAction> getActions()
- Returns:
- a list of action can be use for the form
-
setActions
public void setActions(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 String getBreadcrumbName()
Returns the BreadcrumbName- Returns:
- The BreadcrumbName
-
setBreadcrumbName
public void setBreadcrumbName(String strBreadcrumbName)
Sets the Title- Parameters:
strBreadcrumbName- The breadcrumb bean name
-
getReturnUrl
public String getReturnUrl()
Returns the return URL- Returns:
- The return URL
-
setReturnUrl
public void setReturnUrl(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 String getLabelFinalButton()
- Returns:
- the labelFinalButton
-
setLabelFinalButton
public void setLabelFinalButton(String labelFinalButton)
- Parameters:
labelFinalButton- the labelFinalButton to set
-
getUnavailableMessage
public String getUnavailableMessage()
- Returns:
- the strUnavailableMessage
-
setUnavailableMessage
public void setUnavailableMessage(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 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:
comparein interfaceComparator<Form>
-
-