Package org.ametys.plugins.forms.content
Class Form
java.lang.Object
org.ametys.plugins.forms.content.Form
Class representing a form.
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The content idThe form fields.The form fieldsets.protected String
The form id.protected String
The form label.protected String
The limit of entriesprotected String
The message to display when they are no remaining placesThe form emails.protected String
The body of the email.protected String
The email address of the sender.protected String
The field which indicates the email to send an acknowledgement of receipt.protected String
The subject og the email.protected String
The id of the page where to redirect to.protected String
The message to display when they are remaining placesprotected String
The name of the form's workflow -
Constructor Summary
ConstructorDescriptionForm()
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 entriesvoid
setContentId
(String contentId) Set the content ID.void
setFields
(Collection<Field> fields) Set the fields.void
setFieldsets
(Collection<Fieldset> fieldsets) Set the fieldsets.void
Set the id.void
Set the label.void
Set the limit of entries in the formvoid
setNoRemainingPlaces
(String noRemainingPlaces) Set the message to display when they are no remaining placesvoid
setNotificationEmails
(Set<String> emails) Set the emails.void
setReceiptFieldBody
(String receiptFieldBody) Set the receiptFieldBodyvoid
setReceiptFieldFromAddress
(String receiptFieldFromAddress) Set the receiptFieldFromAddressvoid
setReceiptFieldId
(String receiptFieldId) Set the acknowledgement of receipt field ID.void
setReceiptFieldSubject
(String receiptFieldSubject) Set the receiptFieldSubjectvoid
setRedirectTo
(String redirectTo) the redirectTovoid
setRemainingPlaces
(String remainingPlaces) Set the message to display when they are remaining placesvoid
setWorkflowName
(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
-