Class Form

java.lang.Object
org.ametys.plugins.forms.content.Form

public class Form extends Object
Class representing a form.
  • Field Details

  • 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 empty
      receiptFieldSubject - The receipt mail subject
      receiptFieldBody - The receipt mail body
      emails - 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 to
      workflowName - the name of the workflow
      limit - the limit of entries
      remainingPlaces - the remainingPlaces
      noRemainingPlaces - the noRemainingPlaces
  • Method Details

    • getId

      public String getId()
      Get the id.
      Returns:
      the id
    • setId

      public void setId(String id)
      Set the id.
      Parameters:
      id - the id to set
    • getLabel

      public String getLabel()
      Get the label.
      Returns:
      the label
    • setLabel

      public void setLabel(String label)
      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

      public void setReceiptFieldId(String receiptFieldId)
      Set the acknowledgement of receipt field ID.
      Parameters:
      receiptFieldId - the acknowledgement of receipt field ID.
    • getReceiptFieldFromAddress

      Get the receiptFieldFromAddress
      Returns:
      the receiptFieldFromAddress
    • setReceiptFieldFromAddress

      public void setReceiptFieldFromAddress(String receiptFieldFromAddress)
      Set the receiptFieldFromAddress
      Parameters:
      receiptFieldFromAddress - the receiptFieldFromAddress to set
    • getReceiptFieldBody

      Get the receiptFieldBody
      Returns:
      the receiptFieldBody
    • setReceiptFieldBody

      public void setReceiptFieldBody(String receiptFieldBody)
      Set the receiptFieldBody
      Parameters:
      receiptFieldBody - the receiptFieldBody to set
    • getReceiptFieldSubject

      Get the receiptFieldSubject
      Returns:
      the receiptFieldSubject
    • setReceiptFieldSubject

      public void setReceiptFieldSubject(String receiptFieldSubject)
      Set the receiptFieldSubject
      Parameters:
      receiptFieldSubject - the receiptFieldSubject to set
    • 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.
    • getFields

      public List<Field> getFields()
      Get the fields.
      Returns:
      the fields
    • setFields

      public void setFields(Collection<Field> fields)
      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

      public void setFieldsets(Collection<Fieldset> fieldsets)
      Set the fieldsets.
      Parameters:
      fieldsets - the fieldsets to set
    • getRedirectTo

      the redirectTo
      Returns:
      the redirectTo
    • setRedirectTo

      public void setRedirectTo(String redirectTo)
      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

      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
    • getLimit

      public String getLimit()
      the limit of entries in the form
      Returns:
      the limit of entries
    • setLimit

      public void setLimit(String limit)
      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

      public void setRemainingPlaces(String remainingPlaces)
      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

      public void setNoRemainingPlaces(String noRemainingPlaces)
      Set the message to display when they are no remaining places
      Parameters:
      noRemainingPlaces - the noRemainingPlaces to set