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
_contentId
The content idprotected List<Field>
_fields
The form fields.protected List<Fieldset>
_fieldsets
The form fieldsets.protected String
_id
The form id.protected String
_label
The form label.protected String
_limit
The limit of entriesprotected String
_noRemainingPlaces
The message to display when they are no remaining placesprotected Set<String>
_notificationEmails
The form emails.protected String
_receiptFieldBody
The body of the email.protected String
_receiptFieldFromAddress
The email address of the sender.protected String
_receiptFieldId
The field which indicates the email to send an acknowledgement of receipt.protected String
_receiptFieldSubject
The subject og the email.protected String
_redirectTo
The id of the page where to redirect to.protected String
_remainingPlaces
The message to display when they are remaining placesprotected String
_workflowName
The 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 String
getContentId()
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.String
getId()
Get the id.String
getLabel()
Get the label.String
getLimit()
the limit of entries in the formString
getNoRemainingPlaces()
Get the message to display when they are no remaining placesSet<String>
getNotificationEmails()
Get the emails.String
getReceiptFieldBody()
Get the receiptFieldBodyString
getReceiptFieldFromAddress()
Get the receiptFieldFromAddressString
getReceiptFieldId()
Get the acknowledgement of receipt field ID.String
getReceiptFieldSubject()
Get the receiptFieldSubjectString
getRedirectTo()
the redirectToString
getRemainingPlaces()
Get the message to display when they are remaining placesString
getWorkflowName()
Retrieve 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
setId(String id)
Set the id.void
setLabel(String label)
Set the label.void
setLimit(String limit)
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 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
-
-