Class PropertyValueDao


  • public class PropertyValueDao
    extends AbstractDao
    Provides property value lookup support Data Access Object (DAO).

    This DAO will resolve property values in the following order:

    1. Form Version Property Value (Form Scope)
    2. Form Version Property Value (Client Scope)
    3. Client Property Value
    4. Portal Property Value
    5. Deployment Property Value
    6. Classpath Property Value
    Since:
    3.6.0
    • Field Detail

      • ADDITIONAL_SERVICES

        public static final String ADDITIONAL_SERVICES
        The "Additional Services" form property
        See Also:
        Constant Field Values
      • EMAIL_FORM_RECEIPT_MESSAGE

        public static final String EMAIL_FORM_RECEIPT_MESSAGE
        The "Email Form Receipt Message" property
        See Also:
        Constant Field Values
      • EMAIL_FORM_RECEIPT_SUBJECT

        public static final String EMAIL_FORM_RECEIPT_SUBJECT
        The "Email Form Receipt Subject" property
        See Also:
        Constant Field Values
      • EMAIL_LOST_PASSWORD_MESSAGE

        public static final String EMAIL_LOST_PASSWORD_MESSAGE
        The "Email Lost Password Message" property
        See Also:
        Constant Field Values
      • EMAIL_LOST_PASSWORD_SUBJECT

        public static final String EMAIL_LOST_PASSWORD_SUBJECT
        The "Email Lost Password Subject" property
        See Also:
        Constant Field Values
      • EMAIL_PROMOTION_MESSAGE

        public static final String EMAIL_PROMOTION_MESSAGE
        The "Email Promotion Message" property
        See Also:
        Constant Field Values
      • EMAIL_SAVED_FORM_MESSAGE

        public static final String EMAIL_SAVED_FORM_MESSAGE
        The "Email Saved Form Message" property
        See Also:
        Constant Field Values
      • EMAIL_SAVED_FORM_SUBJECT

        public static final String EMAIL_SAVED_FORM_SUBJECT
        The "Email Saved Form Subject" property
        See Also:
        Constant Field Values
      • EMAIL_SENDER_ADDRESS

        public static final String EMAIL_SENDER_ADDRESS
        The "Email Sender Address" property
        See Also:
        Constant Field Values
      • EMAIL_SHARE_FORM_MESSAGE

        public static final String EMAIL_SHARE_FORM_MESSAGE
        The "Email Share Form Message" property
        See Also:
        Constant Field Values
      • EMAIL_SHARE_FORM_SUBJECT

        public static final String EMAIL_SHARE_FORM_SUBJECT
        The "Email Share Form Subject" property
        See Also:
        Constant Field Values
      • EMAIL_SUBMISSION_STATUS_MESSAGE

        public static final String EMAIL_SUBMISSION_STATUS_MESSAGE
        The "Email Submission Status Message" property
        See Also:
        Constant Field Values
      • EMAIL_SUBMISSION_STATUS_SUBJECT

        public static final String EMAIL_SUBMISSION_STATUS_SUBJECT
        The "Email Submission Status Subject" property
        See Also:
        Constant Field Values
      • EMAIL_SYSTEM_ALERT_MESSAGE

        public static final String EMAIL_SYSTEM_ALERT_MESSAGE
        The "Email System Alert Message" property
        See Also:
        Constant Field Values
      • EMAIL_TEST_SUITE_MESSAGE

        public static final String EMAIL_TEST_SUITE_MESSAGE
        The "EmailTestSuiteMessage" property
        See Also:
        Constant Field Values
      • EMAIL_TASK_NOTIFICATION_MESSAGE

        public static final String EMAIL_TASK_NOTIFICATION_MESSAGE
        The "Email Task Notification Message" property
        See Also:
        Constant Field Values
      • EMAIL_TASK_NOTIFICATION_SUBJECT

        public static final String EMAIL_TASK_NOTIFICATION_SUBJECT
        The "Email Task Notification Subject" property
        See Also:
        Constant Field Values
      • EMAIL_DUPLICATE_PAYMENT_MESSAGE

        public static final String EMAIL_DUPLICATE_PAYMENT_MESSAGE
        The "Email Duplicate Payment Message" property
        See Also:
        Constant Field Values
      • EMAIL_DUPLICATE_PAYMENT_SUBJECT

        public static final String EMAIL_DUPLICATE_PAYMENT_SUBJECT
        The "Email Duplicate Payment Subject" property
        See Also:
        Constant Field Values
      • EMAIL_FRAUD_PAYMENT_MESSAGE

        public static final String EMAIL_FRAUD_PAYMENT_MESSAGE
        The "Email Fraud Payment Message" property
        See Also:
        Constant Field Values
      • EMAIL_FRAUD_PAYMENT_SUBJECT

        public static final String EMAIL_FRAUD_PAYMENT_SUBJECT
        The "Email Fraud Payment Subject" property
        See Also:
        Constant Field Values
      • EMAIL_LICENSING_ERROR_MESSAGE

        public static final String EMAIL_LICENSING_ERROR_MESSAGE
        The "Email Licensing Error Message" property
        See Also:
        Constant Field Values
      • EMAIL_WELCOME_USER_MESSAGE

        public static final String EMAIL_WELCOME_USER_MESSAGE
        The "Email Welcome User Message" property
        See Also:
        Constant Field Values
      • EMAIL_WELCOME_USER_SUBJECT

        public static final String EMAIL_WELCOME_USER_SUBJECT
        The "Email Welcome User Subject" property
        See Also:
        Constant Field Values
      • EMAIL_TEMPLATE_MODE

        public static final String EMAIL_TEMPLATE_MODE
        The "Email Template Mode" property
        See Also:
        Constant Field Values
      • EMAIL_TEMPLATE_HTML

        public static final String EMAIL_TEMPLATE_HTML
        The "Email Template Mode" property
        See Also:
        Constant Field Values
      • EXTERNAL_ANALYTICS_ID

        public static final String EXTERNAL_ANALYTICS_ID
        The "External Analytics ID" property
        See Also:
        Constant Field Values
      • FORGET_PASSWORD_MESSAGE

        public static final String FORGET_PASSWORD_MESSAGE
        The "Forget Password Message" property.
        See Also:
        Constant Field Values
      • FORM_EXPIRED_MESSAGE

        public static final String FORM_EXPIRED_MESSAGE
        The "Form Expired Message" property
        See Also:
        Constant Field Values
      • FORM_TERMS_AND_CONDITIONS

        public static final String FORM_TERMS_AND_CONDITIONS
        The "Form Terms And Conditions" property
        See Also:
        Constant Field Values
      • HTML_CONFIRMATION_PAGE

        public static final String HTML_CONFIRMATION_PAGE
        The "HTML Confirmation Page" property
        See Also:
        Constant Field Values
      • HTML_TERMS_AND_CONDITIONS_PAGE

        public static final String HTML_TERMS_AND_CONDITIONS_PAGE
        The "HTML Terms And Conditions Page" property
        See Also:
        Constant Field Values
      • MAX_SAVE_CHALLENGE_REQUESTS

        public static final String MAX_SAVE_CHALLENGE_REQUESTS
        The property value "Max Save Challenge Requests".
        See Also:
        Constant Field Values
      • RECEIPT_PROPERTIES

        public static final String RECEIPT_PROPERTIES
        The property value "Receipt Properties".
        See Also:
        Constant Field Values
      • SAVE_CHALLENGE_LOCKOUT_MINUTES

        public static final String SAVE_CHALLENGE_LOCKOUT_MINUTES
        The "Save Challenge Lockout Minutes" property for Work Spaces.
        See Also:
        Constant Field Values
      • OFFLINE_STATUS_MESSAGE

        public static final String OFFLINE_STATUS_MESSAGE
        The "Offline Status Message" property
        See Also:
        Constant Field Values
      • OFFLINE_STATUS_TITLE

        public static final String OFFLINE_STATUS_TITLE
        The "Offline Status Message" property
        See Also:
        Constant Field Values
      • PAYMENT_CERTIFICATE_FILE

        public static final String PAYMENT_CERTIFICATE_FILE
        The "Payment Certificate File" property
        See Also:
        Constant Field Values
      • SAVE_CHALLENGE_QUESTION

        public static final String SAVE_CHALLENGE_QUESTION
        The "Save Challenge Question" property
        See Also:
        Constant Field Values
      • SERVERS_BUSY_MESSAGE

        public static final String SERVERS_BUSY_MESSAGE
        The "Servers Busy Message" property
        See Also:
        Constant Field Values
      • SIGNATURE_HELP_TEXT

        public static final String SIGNATURE_HELP_TEXT
        The "Signature Help Text" property
        See Also:
        Constant Field Values
      • SUBMISSION_DUPLICATE_MESSAGE

        public static final String SUBMISSION_DUPLICATE_MESSAGE
        The "Submission Duplicate Message" property
        See Also:
        Constant Field Values
      • PROPERTY_NAMES

        public static final String[] PROPERTY_NAMES
        The list of property names.
    • Constructor Detail

      • PropertyValueDao

        public PropertyValueDao()
        Create a PropertyValueDao with 30 second property value caching enabled.
        Since:
        5.0.0
      • PropertyValueDao

        public PropertyValueDao​(boolean enableCaching)
        Create a PropertyValueDao.
        Parameters:
        enableCaching - specify whether 30 second property value caching is enabled
        Since:
        5.0.0
    • Method Detail

      • invalidateCache

        public static void invalidateCache()
        Invalidate the property value cache.
        Since:
        4.3.3
      • getClasspathProperty

        public String getClasspathProperty​(String propertyName)
        Return the classpath property for the given name
        Parameters:
        propertyName - the name of the property
        Returns:
        the classpath base property value or null if not found
      • getPropertyValue

        public String getPropertyValue​(String propertyName,
                                       Client client,
                                       TemplateVersion version,
                                       Portal portal)
        Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.
        Parameters:
        propertyName - the name of the property (required)
        client - the client (optional, may be resolved via version if not specified)
        version - the form template version (optional)
        portal - the portal (optional)
        Returns:
        the property value or null if not found
        Since:
        19.11.2
      • getPropertyValue

        public String getPropertyValue​(String propertyName,
                                       Submission submission,
                                       Portal portal)
        Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property. The submission will be used to resolve the client and form version.
        Parameters:
        propertyName - the name of the property (required)
        submission - the submission (optional)
        portal - the portal (optional)
        Returns:
        the property value or null if not found
        Since:
        19.11.2
      • getPropertyValue

        public String getPropertyValue​(String propertyName,
                                       TemplateVersion version,
                                       Portal portal)
        Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.
        Parameters:
        propertyName - the name of the property (required)
        version - the form template version (required)
        portal - the portal (required)
        Returns:
        the property value or null if not found
      • getPropertyValue

        public String getPropertyValue​(String propertyName,
                                       Submission submission)
        Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.
        Parameters:
        propertyName - the name of the property (required)
        submission - the form submission (optional)
        Returns:
        the property value or null if not found
      • getPropertyValue

        public String getPropertyValue​(String propertyName,
                                       TemplateVersion version)
        Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.
        Parameters:
        propertyName - the name of the property (required)
        version - the form template version (required)
        Returns:
        the property value or null if not found
      • getPropertyValue

        public String getPropertyValue​(String propertyName,
                                       Form form)
        Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.
        Parameters:
        propertyName - the name of the property (required)
        form - the form (required)
        Returns:
        the property value or null if not found
      • getPropertyValue

        public String getPropertyValue​(String propertyName,
                                       Client client)
        Return the named property value searching for: Client Property > Portal Property > Deployment Property.
        Parameters:
        propertyName - the name of the property (required)
        client - the client (required)
        Returns:
        the property value or null if not found
        Since:
        3.6.4
      • getPropertyValue

        public String getPropertyValue​(String propertyName,
                                       Portal portal)
        Return the named property value searching for: Portal Property > Deployment Property.
        Parameters:
        propertyName - the name of the property (required)
        portal - the portal (required)
        Returns:
        the property value or null if not found
      • renderEmailStringTemplate

        public String renderEmailStringTemplate​(String templateValue,
                                                Map model,
                                                Client client,
                                                TemplateVersion version,
                                                Portal portal)
        Render the template string value with the model using the Velocity engine. This method is used for various email subject and message templates and will augment the model map as follows: key: environmentName, value: value of portal property PortalProperty.ADMIN_ENVIRONMENT_NAME in the admin portal key: supportEmail, value: value of property EMAIL_SENDER_ADDRESS, resolved via form version/client/portal and falling back to DeploymentProperty.PROPERTY_Email_Default_Sender
        Parameters:
        templateValue - the template value
        model - the model to render
        client - the client to use for resolving the sender address (optional)
        version - the form version to use for resolving the sender address (optional)
        portal - the portal to use for resolving the sender address (optional)
        Returns:
        the rendered template
        Since:
        19.11.2