Class Form


  • public class Form
    extends Object
    Class representing a form.
    • 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 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 Detail

      • 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

        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.
      • setReceiptFieldFromAddress

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

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

        public void setReceiptFieldSubject​(String receiptFieldSubject)
        Set the receiptFieldSubject
        Parameters:
        receiptFieldSubject - the receiptFieldSubject 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,​FieldgetFieldMap()
        Get a copy of the form's fields, indexed by its ID.
        Returns:
        a copy of the form's fields, indexed by its ID.
      • 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
      • 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

        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