Package org.ametys.plugins.forms.content
Class Form
java.lang.Object
org.ametys.plugins.forms.content.Form
Class representing a form.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe content idThe form fields.The form fieldsets.protected StringThe form id.protected StringThe form label.protected StringThe limit of entriesprotected StringThe message to display when they are no remaining placesThe form emails.protected StringThe body of the email.protected StringThe email address of the sender.protected StringThe field which indicates the email to send an acknowledgement of receipt.protected StringThe subject og the email.protected StringThe id of the page where to redirect to.protected StringThe message to display when they are remaining placesprotected StringThe name of the form's workflow -
Constructor Summary
ConstructorsConstructorDescriptionForm()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
Modifier and TypeMethodDescriptionGet the content ID.Get a copy of the form's fields, indexed by its ID.Get the fields.Get the fieldsets.getId()Get the id.getLabel()Get the label.getLimit()the limit of entries in the formGet the message to display when they are no remaining placesGet the emails.Get the receiptFieldBodyGet the receiptFieldFromAddressGet the acknowledgement of receipt field ID.Get the receiptFieldSubjectthe redirectToGet the message to display when they are remaining placesRetrieve 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.voidSet the id.voidSet the label.voidSet 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 Details
-
_id
The form id. -
_label
The form label. -
_receiptFieldId
The field which indicates the email to send an acknowledgement of receipt. -
_receiptFieldFromAddress
The email address of the sender. Can be empty to use default one. -
_receiptFieldSubject
The subject og the email. Cannot be empty -
_receiptFieldBody
The body of the email. Cannot be empty -
_redirectTo
The id of the page where to redirect to. Can be empty -
_notificationEmails
The form emails. -
_limit
The limit of entries -
_remainingPlaces
The message to display when they are remaining places -
_noRemainingPlaces
The message to display when they are no remaining places -
_fields
The form fields. -
_fieldsets
The form fieldsets. -
_workflowName
The name of the form's workflow -
_contentId
The content id
-
-
Constructor Details
-
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 Details
-
getId
Get the id.- Returns:
- the id
-
setId
Set the id.- Parameters:
id- the id to set
-
getLabel
Get the label.- Returns:
- the label
-
setLabel
Set the label.- Parameters:
label- the label to set
-
getReceiptFieldId
Get the acknowledgement of receipt field ID.- Returns:
- the acknowledgement of receipt field ID.
-
setReceiptFieldId
Set the acknowledgement of receipt field ID.- Parameters:
receiptFieldId- the acknowledgement of receipt field ID.
-
getReceiptFieldFromAddress
Get the receiptFieldFromAddress- Returns:
- the receiptFieldFromAddress
-
setReceiptFieldFromAddress
Set the receiptFieldFromAddress- Parameters:
receiptFieldFromAddress- the receiptFieldFromAddress to set
-
getReceiptFieldBody
Get the receiptFieldBody- Returns:
- the receiptFieldBody
-
setReceiptFieldBody
Set the receiptFieldBody- Parameters:
receiptFieldBody- the receiptFieldBody to set
-
getReceiptFieldSubject
Get the receiptFieldSubject- Returns:
- the receiptFieldSubject
-
setReceiptFieldSubject
Set the receiptFieldSubject- Parameters:
receiptFieldSubject- the receiptFieldSubject to set
-
getNotificationEmails
Get the emails.- Returns:
- the emails
-
setNotificationEmails
Set the emails.- Parameters:
emails- the emails to set
-
getContentId
Get the content ID.- Returns:
- the content ID.
-
setContentId
Set the content ID.- Parameters:
contentId- the content ID to set.
-
getFields
Get the fields.- Returns:
- the fields
-
setFields
Set the fields.- Parameters:
fields- the fields to set
-
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
Get the fieldsets.- Returns:
- the fieldsets
-
setFieldsets
Set the fieldsets.- Parameters:
fieldsets- the fieldsets to set
-
getRedirectTo
the redirectTo- Returns:
- the redirectTo
-
setRedirectTo
the redirectTo- Parameters:
redirectTo- the redirectTo to set
-
getWorkflowName
Retrieve the name of the workflow of this form's entries- Returns:
- the name of the workflow used
-
setWorkflowName
Set the name of the workflow of this form's entries- Parameters:
workflowName- the name of the workflow to use
-
getLimit
the limit of entries in the form- Returns:
- the limit of entries
-
setLimit
Set the limit of entries in the form- Parameters:
limit- the limit of entries
-
getRemainingPlaces
Get the message to display when they are remaining places- Returns:
- the remainingPlaces
-
setRemainingPlaces
Set the message to display when they are remaining places- Parameters:
remainingPlaces- the remainingPlaces to set
-
getNoRemainingPlaces
Get the message to display when they are no remaining places- Returns:
- the remainingPlaces
-
setNoRemainingPlaces
Set the message to display when they are no remaining places- Parameters:
noRemainingPlaces- the noRemainingPlaces to set
-