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 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
_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)
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.Set<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
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
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
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.
-
_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)
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 workflow
-
-
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
-
-