Package org.ametys.plugins.forms
Class Form
- java.lang.Object
-
- org.ametys.plugins.forms.Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String_contentIdThe content idprotected List<Field>_fieldsThe form fields.protected List<Fieldset>_fieldsetsThe form fieldsets.protected String_idThe form id.protected String_labelThe form label.protected String_limitThe limit of entriesprotected String_noRemainingPlacesThe message to display when they are no remaining placesprotected Set<String>_notificationEmailsThe form emails.protected String_receiptFieldBodyThe body of the email.protected String_receiptFieldFromAddressThe email address of the sender.protected String_receiptFieldIdThe field which indicates the email to send an acknowledgement of receipt.protected String_receiptFieldSubjectThe subject og the email.protected String_redirectToThe id of the page where to redirect to.protected String_remainingPlacesThe message to display when they are remaining placesprotected String_workflowNameThe name of the form's workflow
-
Constructor Summary
Constructors Constructor Description Form()Default constructor.Form(String id, String label, String receiptFieldId, String receiptFieldFromAddress, String receiptFieldSubject, String receiptFieldBody, Set<String> emails, String contentId, Collection<Field> fields, Collection<Fieldset> fieldsets, String redirectTo, String workflowName, String limit, String remainingPlaces, String noRemainingPlaces)Constructor with parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentId()Get the content ID.Map<String,Field>getFieldMap()Get a copy of the form's fields, indexed by its ID.List<Field>getFields()Get the fields.List<Fieldset>getFieldsets()Get the fieldsets.StringgetId()Get the id.StringgetLabel()Get the label.StringgetLimit()the limit of entries in the formStringgetNoRemainingPlaces()Get the message to display when they are no remaining placesSet<String>getNotificationEmails()Get the emails.StringgetReceiptFieldBody()Get the receiptFieldBodyStringgetReceiptFieldFromAddress()Get the receiptFieldFromAddressStringgetReceiptFieldId()Get the acknowledgement of receipt field ID.StringgetReceiptFieldSubject()Get the receiptFieldSubjectStringgetRedirectTo()the redirectToStringgetRemainingPlaces()Get the message to display when they are remaining placesStringgetWorkflowName()Retrieve the name of the workflow of this form's entriesvoidsetContentId(String contentId)Set the content ID.voidsetFields(Collection<Field> fields)Set the fields.voidsetFieldsets(Collection<Fieldset> fieldsets)Set the fieldsets.voidsetId(String id)Set the id.voidsetLabel(String label)Set the label.voidsetLimit(String limit)Set the limit of entries in the formvoidsetNoRemainingPlaces(String noRemainingPlaces)Set the message to display when they are no remaining placesvoidsetNotificationEmails(Set<String> emails)Set the emails.voidsetReceiptFieldBody(String receiptFieldBody)Set the receiptFieldBodyvoidsetReceiptFieldFromAddress(String receiptFieldFromAddress)Set the receiptFieldFromAddressvoidsetReceiptFieldId(String receiptFieldId)Set the acknowledgement of receipt field ID.voidsetReceiptFieldSubject(String receiptFieldSubject)Set the receiptFieldSubjectvoidsetRedirectTo(String redirectTo)the redirectTovoidsetRemainingPlaces(String remainingPlaces)Set the message to display when they are remaining placesvoidsetWorkflowName(String workflowName)Set the name of the workflow of this form's entries
-
-
-
Field Detail
-
_receiptFieldId
protected String _receiptFieldId
The field which indicates the email to send an acknowledgement of receipt.
-
_receiptFieldFromAddress
protected String _receiptFieldFromAddress
The email address of the sender. Can be empty to use default one.
-
_receiptFieldSubject
protected String _receiptFieldSubject
The subject og the email. Cannot be empty
-
_receiptFieldBody
protected String _receiptFieldBody
The body of the email. Cannot be empty
-
_redirectTo
protected String _redirectTo
The id of the page where to redirect to. Can be empty
-
_notificationEmails
protected Set<String> _notificationEmails
The form emails.
-
_remainingPlaces
protected String _remainingPlaces
The message to display when they are remaining places
-
_noRemainingPlaces
protected String _noRemainingPlaces
The message to display when they are no remaining places
-
_fieldsets
protected List<Fieldset> _fieldsets
The form fieldsets.
-
_workflowName
protected String _workflowName
The name of the form's workflow
-
_contentId
protected String _contentId
The content id
-
-
Constructor Detail
-
Form
public Form()
Default constructor.
-
Form
public Form(String id, String label, String receiptFieldId, String receiptFieldFromAddress, String receiptFieldSubject, String receiptFieldBody, Set<String> emails, String contentId, Collection<Field> fields, Collection<Fieldset> fieldsets, String redirectTo, String workflowName, String limit, String remainingPlaces, String noRemainingPlaces)
Constructor with parameters.- Parameters:
id- the form ID.label- the form label.receiptFieldId- the acknowledgement of receipt field ID.receiptFieldFromAddress- The sender address for the receipt mail. Can be emptyreceiptFieldSubject- The receipt mail subjectreceiptFieldBody- The receipt mail bodyemails- the form emails.contentId- the form content ID.fields- the form fields.fieldsets- the form fieldsets.redirectTo- the id of the page where to redirect toworkflowName- the name of the workflowlimit- the limit of entriesremainingPlaces- the remainingPlacesnoRemainingPlaces- the noRemainingPlaces
-
-
Method Detail
-
getReceiptFieldId
public String getReceiptFieldId()
Get the acknowledgement of receipt field ID.- Returns:
- the acknowledgement of receipt field ID.
-
setReceiptFieldId
public void setReceiptFieldId(String receiptFieldId)
Set the acknowledgement of receipt field ID.- Parameters:
receiptFieldId- the acknowledgement of receipt field ID.
-
getReceiptFieldFromAddress
public String getReceiptFieldFromAddress()
Get the receiptFieldFromAddress- Returns:
- the receiptFieldFromAddress
-
setReceiptFieldFromAddress
public void setReceiptFieldFromAddress(String receiptFieldFromAddress)
Set the receiptFieldFromAddress- Parameters:
receiptFieldFromAddress- the receiptFieldFromAddress to set
-
getReceiptFieldBody
public String getReceiptFieldBody()
Get the receiptFieldBody- Returns:
- the receiptFieldBody
-
setReceiptFieldBody
public void setReceiptFieldBody(String receiptFieldBody)
Set the receiptFieldBody- Parameters:
receiptFieldBody- the receiptFieldBody to set
-
getReceiptFieldSubject
public String getReceiptFieldSubject()
Get the receiptFieldSubject- Returns:
- the receiptFieldSubject
-
setReceiptFieldSubject
public void setReceiptFieldSubject(String receiptFieldSubject)
Set the receiptFieldSubject- Parameters:
receiptFieldSubject- the receiptFieldSubject to set
-
getNotificationEmails
public Set<String> getNotificationEmails()
Get the emails.- Returns:
- the emails
-
setNotificationEmails
public void setNotificationEmails(Set<String> emails)
Set the emails.- Parameters:
emails- the emails to set
-
getContentId
public String getContentId()
Get the content ID.- Returns:
- the content ID.
-
setContentId
public void setContentId(String contentId)
Set the content ID.- Parameters:
contentId- the content ID to set.
-
setFields
public void setFields(Collection<Field> fields)
Set the fields.- Parameters:
fields- the fields to set
-
getFieldMap
public Map<String,Field> getFieldMap()
Get a copy of the form's fields, indexed by its ID.- Returns:
- a copy of the form's fields, indexed by its ID.
-
getFieldsets
public List<Fieldset> getFieldsets()
Get the fieldsets.- Returns:
- the fieldsets
-
setFieldsets
public void setFieldsets(Collection<Fieldset> fieldsets)
Set the fieldsets.- Parameters:
fieldsets- the fieldsets to set
-
getRedirectTo
public String getRedirectTo()
the redirectTo- Returns:
- the redirectTo
-
setRedirectTo
public void setRedirectTo(String redirectTo)
the redirectTo- Parameters:
redirectTo- the redirectTo to set
-
getWorkflowName
public String getWorkflowName()
Retrieve the name of the workflow of this form's entries- Returns:
- the name of the workflow used
-
setWorkflowName
public void setWorkflowName(String workflowName)
Set the name of the workflow of this form's entries- Parameters:
workflowName- the name of the workflow to use
-
setLimit
public void setLimit(String limit)
Set the limit of entries in the form- Parameters:
limit- the limit of entries
-
getRemainingPlaces
public String getRemainingPlaces()
Get the message to display when they are remaining places- Returns:
- the remainingPlaces
-
setRemainingPlaces
public void setRemainingPlaces(String remainingPlaces)
Set the message to display when they are remaining places- Parameters:
remainingPlaces- the remainingPlaces to set
-
getNoRemainingPlaces
public String getNoRemainingPlaces()
Get the message to display when they are no remaining places- Returns:
- the remainingPlaces
-
setNoRemainingPlaces
public void setNoRemainingPlaces(String noRemainingPlaces)
Set the message to display when they are no remaining places- Parameters:
noRemainingPlaces- the noRemainingPlaces to set
-
-