Class Form

  • All Implemented Interfaces:
    IEntity, Auditable, Serializable, org.apache.cayenne.DataObject, org.apache.cayenne.Persistent, org.apache.cayenne.Validating

    @CacheGroups("CONFIG")
    public class Form
    extends _Form
    implements Auditable
    Provides a form entity encompassing a form template as well as configuration. This is one of the key entities in SmartForm Manager.
    See Also:
    Serialized Form
    • Field Detail

      • FORM_DISPLAY_MODE_DIRECT_RENDER

        public static final String FORM_DISPLAY_MODE_DIRECT_RENDER
        The 'Direct Render' form display mode.
        See Also:
        Constant Field Values
      • FORM_DISPLAY_MODE_EMBED_WITH_DIV

        public static final String FORM_DISPLAY_MODE_EMBED_WITH_DIV
        The 'Embed with Div' form display mode.
        See Also:
        Constant Field Values
      • FORM_DISPLAY_MODE_EMBED_WITH_IFRAME

        public static final String FORM_DISPLAY_MODE_EMBED_WITH_IFRAME
        The 'Embed with IFrame' form display mode.
        See Also:
        Constant Field Values
      • FORM_DISPLAY_MODES

        public static final String[] FORM_DISPLAY_MODES
        The form display mode options.
      • ONLINE_SAVE_MODES

        public static final String[] ONLINE_SAVE_MODES
        The set of online save modes
      • MODE_ALL_SUBMISSIONS

        public static final String MODE_ALL_SUBMISSIONS
        The All mode (e.g. a setting applying to all submissions).
        See Also:
        Constant Field Values
      • AUTHENTICATION_MODES

        public static final String[] AUTHENTICATION_MODES
        The user form authentication requirements.
      • EMAIL_VERIFICATION_MODES

        public static final String[] EMAIL_VERIFICATION_MODES
        The user form authentication requirements.
      • DEFAULT_RECEIPT_NUMBER_PATTERN

        public static final String DEFAULT_RECEIPT_NUMBER_PATTERN
        The default pattern used for generating receipt numbers
        See Also:
        Constant Field Values
      • EMAIL_USER_RECEIPT_MODE_NONE

        public static final String EMAIL_USER_RECEIPT_MODE_NONE
        The user receipt email mode that indicates that no automated receipt emails will be sent.
        See Also:
        Constant Field Values
      • EMAIL_USER_RECEIPT_MODE_CONFIRMATION_ONLY

        public static final String EMAIL_USER_RECEIPT_MODE_CONFIRMATION_ONLY
        The user receipt email mode that indicates that a confirmation email NOT including a PDF receipt will be sent.
        See Also:
        Constant Field Values
      • EMAIL_USER_RECEIPT_MODE_FULL

        public static final String EMAIL_USER_RECEIPT_MODE_FULL
        The user receipt email mode that indicates that a confirmation email including a PDF receipt will be sent.
        See Also:
        Constant Field Values
      • EMAIL_USER_RECEIPT_MODE_RECEIPT_LINK

        public static final String EMAIL_USER_RECEIPT_MODE_RECEIPT_LINK
        The user receipt email mode that indicates that a confirmation email including a link to the PDF receipt will be sent.
        See Also:
        Constant Field Values
      • EMAIL_USER_RECEIPT_MODES

        public static final String[] EMAIL_USER_RECEIPT_MODES
        The options for automatically sending receipt emails to users.
      • PAGE_TRACKING_POSTION_INSIDE_HEAD

        public static final String PAGE_TRACKING_POSTION_INSIDE_HEAD
        The page tracking include position: "Inside Head".
        See Also:
        Constant Field Values
      • PAGE_TRACKING_POSTION_AFTER_HTML

        public static final String PAGE_TRACKING_POSTION_AFTER_HTML
        The page tracking include position: "After Body".
        See Also:
        Constant Field Values
      • TR_NO_MODE_TRACKING_CODE_ONLY

        public static final String TR_NO_MODE_TRACKING_CODE_ONLY
        The Tracking Receipt Number Mode - use only Tracking Code.
        See Also:
        Constant Field Values
      • TR_NO_MODE_RECEIPT_NUMBER_ONLY

        public static final String TR_NO_MODE_RECEIPT_NUMBER_ONLY
        The Tracking Receipt Number Mode - use only Receipt Number.
        See Also:
        Constant Field Values
      • TR_NO_MODES

        public static final String[] TR_NO_MODES
        The Tracking Receipt Number Mode Values.
    • Constructor Detail

      • Form

        public Form()
    • Method Detail

      • isAuthenticationRequired

        public boolean isAuthenticationRequired()
        Deprecated.
        Return true if the form requires the user to be authenticated.
        Returns:
        true if the form requires the user to be authenticated.
      • isAuthenticationRequired

        public boolean isAuthenticationRequired​(Portal portal)
        Return true if the form requires the user to be authenticated.
        Parameters:
        portal - the portal (required)
        Returns:
        true if the form requires the user to be authenticated.
        Since:
        5.1.0
      • isAnonymousRequired

        public boolean isAnonymousRequired()
        Deprecated.
        Return true if the form only support anonymous access.
        Returns:
        true if the form only support anonymous access otherwise false
      • isAnonymousRequired

        public boolean isAnonymousRequired​(Portal portal)
        Return true if the form only support anonymous access.
        Parameters:
        portal - the portal (required)
        Returns:
        true if the form only support anonymous access otherwise false
        Since:
        5.1.0
      • isAnonymousOnlineSaveEnabled

        public boolean isAnonymousOnlineSaveEnabled()
        Return whether the form is configured to allow online saving by anonymous users
        Returns:
        true if the form is configured to allow online saving by anonymous users
      • isAuthenticatedOnlineSaveEnabled

        public boolean isAuthenticatedOnlineSaveEnabled()
        Return whether the form is configured to allow online saving by authenticated users
        Returns:
        true if the form is configured to allow online saving by authenticated users
      • setAuthenticationMode

        public void setAuthenticationMode​(String authenticationMode)
        Deprecated.
        Set the authenticationMode value.
        Parameters:
        authenticationMode - the authenticationMode value to set
      • getAuthenticationMode

        public String getAuthenticationMode()
        Deprecated.
        Return the authenticationMode value.
        Returns:
        authenticationMode the authenticationMode value
      • isOnlineSaveDisabled

        public boolean isOnlineSaveDisabled()
        Returns:
        true if online save is disabled
        Since:
        4.0.0
      • isActive

        public boolean isActive()
        Return whether the form is active
        Returns:
        true if the form has active status
      • isFormEnabled

        public boolean isFormEnabled()
        Return true if the form is enabled, submission expiry date is not before current time, and form template version available.
        Returns:
        true if the form is enabled, submission expiry date is not before current time, and form template version available.
        Since:
        4.0.0
      • isESignatureRequired

        @Deprecated
        public boolean isESignatureRequired()
        Deprecated.
        Returns:
        false
      • isWetSignatureRequired

        public boolean isWetSignatureRequired()
        Return whether the form requires wet signatures
        Returns:
        true if the form requires wet signatures
      • isEmailVerificationEnabled

        public boolean isEmailVerificationEnabled()
        Return whether the form is configured for submission email verification
        Returns:
        true if the form is configured for submission email verification
      • requiresEmailVerificationForAnonymousUsers

        public boolean requiresEmailVerificationForAnonymousUsers()
        Return whether the form requires email verification of anonymous users
        Returns:
        true if the email verification mode is Form#MODE_ALL or MODE_ANONYMOUS_ONLY
      • requiresEmailVerificationForAuthenticatedUsers

        public boolean requiresEmailVerificationForAuthenticatedUsers()
        Return whether the form requires email verification of authenticated users
        Returns:
        true if the email verification mode is Form#MODE_ALL
      • getFormDescription

        public String getFormDescription()
        Returns the form description. This is defined as the value of the property PropertyValueDao.FORM_DESCRIPTION for the form's current template version.
        Returns:
        the form description
      • isFormDisplayDirectRender

        public boolean isFormDisplayDirectRender()
        Return true if the form display mode is 'Direct Render'.
        Returns:
        true if the form display mode is 'Direct Render'
      • isFormDisplayEmbedDiv

        public boolean isFormDisplayEmbedDiv()
        Return true if the form display mode is 'Embed with Div'.
        Returns:
        true if the form display mode is 'Embed with Div'
      • isFormDisplayEmbedIFrame

        public boolean isFormDisplayEmbedIFrame()
        Return true if the form display mode is 'Embed with IFrame'.
        Returns:
        true if the form display mode is 'Embed with IFrame'
      • getFormGroupNames

        public Set<String> getFormGroupNames()
        Return the set of group names the form belongs to.
        Returns:
        the set of group names the form belongs to.
        Since:
        3.6.0
      • isAssociatedWithPortal

        public boolean isAssociatedWithPortal​(Portal portal)
        Return whether the form is associated with the given portal
        Parameters:
        portal - the portal (required)
        Returns:
        true if the form has been assigned the given portal
      • getFormPortal

        public FormPortal getFormPortal​(Portal portal)
        Returns the FormPortal associated with the given portal, if the portal is not associated with this form it returns null
        Parameters:
        portal - the portal (required)
        Returns:
        the FormPortal associated with the given portal
        Since:
        5.1.0
      • getPortals

        public List<Portal> getPortals()
        Return the set of portals this form is associated with
        Returns:
        a collection containing all portals this form is associated with, sorted by name
      • getFormCode

        public String getFormCode()
        Return globally unique the client form code.
        Returns:
        globally unique the client form code
        Since:
        3.6.0
      • getUrlSafeFormCode

        public String getUrlSafeFormCode()
        Return globally unique the client form code.
        Returns:
        url encoded globally unique client form code
        Since:
        18.11.0
      • setTrackingNoUseReceiptFlag

        @Deprecated
        public void setTrackingNoUseReceiptFlag​(boolean trackingNoUseReceiptFlag)
        Deprecated.
        Set the trackingNoUseReceiptFlag value.
        Parameters:
        trackingNoUseReceiptFlag - the trackingNoUseReceiptFlag value to set
      • isTrackingNoUseReceiptFlag

        @Deprecated
        public boolean isTrackingNoUseReceiptFlag()
        Deprecated.
        Return the trackingNoUseReceiptFlag value.
        Returns:
        trackingNoUseReceiptFlag the trackingNoUseReceiptFlag value