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 Details

    • ADDITIONAL_SERVICES

      public static final String ADDITIONAL_SERVICES
      The "Additional Services" form property
      See Also:
    • CLIENT_NAME

      public static final String CLIENT_NAME
      The "Client Name" client property
      See Also:
    • EMAIL_2FA_MESSAGE

      public static final String EMAIL_2FA_MESSAGE
      The "Email 2FA Message" property
      See Also:
    • EMAIL_2FA_SUBJECT

      public static final String EMAIL_2FA_SUBJECT
      The "Email 2FA Subject" property
      See Also:
    • EMAIL_FORM_RECEIPT_MESSAGE

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static final String FORGET_PASSWORD_MESSAGE
      The "Forget Password Message" property.
      See Also:
    • FORM_DESCRIPTION

      public static final String FORM_DESCRIPTION
      The "Form Description" property
      See Also:
    • FORM_ELIGIBILITY

      public static final String FORM_ELIGIBILITY
      The "Form Eligibility" property
      See Also:
    • FORM_EXPIRED_MESSAGE

      public static final String FORM_EXPIRED_MESSAGE
      The "Form Expired Message" property
      See Also:
    • FORM_NAME

      public static final String FORM_NAME
      The "Form Name" property
      See Also:
    • FORM_REQUIREMENTS

      public static final String FORM_REQUIREMENTS
      The "Form Requirements" property
      See Also:
    • HTML_CONFIRMATION_PAGE

      public static final String HTML_CONFIRMATION_PAGE
      The "HTML Confirmation Page" property
      See Also:
    • HTML_SAVED_PAGE

      public static final String HTML_SAVED_PAGE
      The "HTML Saved Page" property
      See Also:
    • JOB_NAME

      public static final String JOB_NAME
      The "Job Name" property
      See Also:
    • JOB_DESCRIPTION

      public static final String JOB_DESCRIPTION
      The "Job Description" property
      See Also:
    • MAESTRO_SCE_MODE

      public static final String MAESTRO_SCE_MODE
      The "Maestro SCE Mode" form property
      See Also:
    • MAX_SAVE_CHALLENGE_REQUESTS

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

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

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

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

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

      public static final String PAYMENT_CERTIFICATE_FILE
      The "Payment Certificate File" property
      See Also:
    • PORTAL_CSS_URL

      public static final String PORTAL_CSS_URL
      The "Portal CSS URL" property
      See Also:
    • SAVE_CHALLENGE_QUESTION

      public static final String SAVE_CHALLENGE_QUESTION
      The "Save Challenge Question" property
      See Also:
    • SAVED_MESSAGE

      public static final String SAVED_MESSAGE
      The "Saved Message" property
      See Also:
    • SERVERS_BUSY_MESSAGE

      public static final String SERVERS_BUSY_MESSAGE
      The "Servers Busy Message" property
      See Also:
    • SUBMISSION_DUPLICATE_MESSAGE

      public static final String SUBMISSION_DUPLICATE_MESSAGE
      The "Submission Duplicate Message" property
      See Also:
    • SUBMISSION_MESSAGE

      public static final String SUBMISSION_MESSAGE
      The "Submission Message" property
      See Also:
    • URL

      public static final String URL
      The "URL" client property
      See Also:
    • PROPERTY_NAMES

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

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

    • 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