Package com.avoka.fc.core.dao
Class PropertyValueDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.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:
- Form Version Property Value (Form Scope)
- Form Version Property Value (Client Scope)
- Client Property Value
- Portal Property Value
- Deployment Property Value
- Classpath Property Value
- Since:
- 3.6.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADDITIONAL_SERVICES
The "Additional Services" form propertystatic String
CLIENT_NAME
The "Client Name" client propertystatic String
EMAIL_2FA_MESSAGE
The "Email 2FA Message" propertystatic String
EMAIL_2FA_SUBJECT
The "Email 2FA Subject" propertystatic String
EMAIL_DUPLICATE_PAYMENT_MESSAGE
The "Email Duplicate Payment Message" propertystatic String
EMAIL_DUPLICATE_PAYMENT_SUBJECT
The "Email Duplicate Payment Subject" propertystatic String
EMAIL_FORM_RECEIPT_MESSAGE
The "Email Form Receipt Message" propertystatic String
EMAIL_FORM_RECEIPT_SUBJECT
The "Email Form Receipt Subject" propertystatic String
EMAIL_FRAUD_PAYMENT_MESSAGE
The "Email Fraud Payment Message" propertystatic String
EMAIL_FRAUD_PAYMENT_SUBJECT
The "Email Fraud Payment Subject" propertystatic String
EMAIL_LICENSING_ERROR_MESSAGE
The "Email Licensing Error Message" propertystatic String
EMAIL_LOST_PASSWORD_MESSAGE
The "Email Lost Password Message" propertystatic String
EMAIL_LOST_PASSWORD_SUBJECT
The "Email Lost Password Subject" propertystatic String
EMAIL_PROMOTION_MESSAGE
The "Email Promotion Message" propertystatic String
EMAIL_SAVED_FORM_MESSAGE
The "Email Saved Form Message" propertystatic String
EMAIL_SAVED_FORM_SUBJECT
The "Email Saved Form Subject" propertystatic String
EMAIL_SENDER_ADDRESS
The "Email Sender Address" propertystatic String
EMAIL_SHARE_FORM_MESSAGE
The "Email Share Form Message" propertystatic String
EMAIL_SHARE_FORM_SUBJECT
The "Email Share Form Subject" propertystatic String
EMAIL_SUBMISSION_STATUS_MESSAGE
The "Email Submission Status Message" propertystatic String
EMAIL_SUBMISSION_STATUS_SUBJECT
The "Email Submission Status Subject" propertystatic String
EMAIL_SYSTEM_ALERT_MESSAGE
The "Email System Alert Message" propertystatic String
EMAIL_TASK_NOTIFICATION_MESSAGE
The "Email Task Notification Message" propertystatic String
EMAIL_TASK_NOTIFICATION_SUBJECT
The "Email Task Notification Subject" propertystatic String
EMAIL_TEMPLATE_HTML
The "Email Template Mode" propertystatic String
EMAIL_TEMPLATE_MODE
The "Email Template Mode" propertystatic String
EMAIL_TEST_SUITE_MESSAGE
The "EmailTestSuiteMessage" propertystatic String
EMAIL_WELCOME_USER_MESSAGE
The "Email Welcome User Message" propertystatic String
EMAIL_WELCOME_USER_SUBJECT
The "Email Welcome User Subject" propertystatic String
EXTERNAL_ANALYTICS_ID
The "External Analytics ID" propertystatic String
FORGET_PASSWORD_MESSAGE
The "Forget Password Message" property.static String
FORM_DESCRIPTION
The "Form Description" propertystatic String
FORM_ELIGIBILITY
The "Form Eligibility" propertystatic String
FORM_EXPIRED_MESSAGE
The "Form Expired Message" propertystatic String
FORM_NAME
The "Form Name" propertystatic String
FORM_REQUIREMENTS
The "Form Requirements" propertystatic String
FORM_TERMS_AND_CONDITIONS
The "Form Terms And Conditions" propertystatic String
HTML_CONFIRMATION_PAGE
The "HTML Confirmation Page" propertystatic String
HTML_LANDING_PAGE
The "HTML Landing Page" propertystatic String
HTML_SAVED_PAGE
The "HTML Saved Page" propertystatic String
HTML_TERMS_AND_CONDITIONS_PAGE
The "HTML Terms And Conditions Page" propertystatic String
JOB_DESCRIPTION
The "Job Description" propertystatic String
JOB_NAME
The "Job Name" propertystatic String
LOGO
The "Logo" client propertystatic String
MAESTRO_SCE_MODE
The "Maestro SCE Mode" form propertystatic String
MAX_SAVE_CHALLENGE_REQUESTS
The property value "Max Save Challenge Requests".static String
OFFLINE_STATUS_MESSAGE
The "Offline Status Message" propertystatic String
OFFLINE_STATUS_TITLE
The "Offline Status Message" propertystatic String
PAYMENT_CERTIFICATE_FILE
The "Payment Certificate File" propertystatic String
PORTAL_CSS_URL
The "Portal CSS URL" propertystatic String[]
PROPERTY_NAMES
The list of property names.static String
RECEIPT_PROPERTIES
The property value "Receipt Properties".static String
SAVE_CHALLENGE_LOCKOUT_MINUTES
The "Save Challenge Lockout Minutes" property for Work Spaces.static String
SAVE_CHALLENGE_QUESTION
The "Save Challenge Question" propertystatic String
SAVED_MESSAGE
The "Saved Message" propertystatic String
SERVERS_BUSY_MESSAGE
The "Servers Busy Message" propertystatic String
SIGNATURE_HELP_TEXT
The "Signature Help Text" propertystatic String
SUBMISSION_DUPLICATE_MESSAGE
The "Submission Duplicate Message" propertystatic String
SUBMISSION_MESSAGE
The "Submission Message" propertystatic String
URL
The "URL" client property-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description PropertyValueDao()
Create a PropertyValueDao with 30 second property value caching enabled.PropertyValueDao(boolean enableCaching)
Create a PropertyValueDao.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClasspathProperty(String propertyName)
Return the classpath property for the given nameString
getPropertyValue(String propertyName, Client client)
Return the named property value searching for: Client Property > Portal Property > Deployment Property.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.String
getPropertyValue(String propertyName, Form form)
Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.String
getPropertyValue(String propertyName, Portal portal)
Return the named property value searching for: Portal Property > Deployment Property.String
getPropertyValue(String propertyName, Submission submission)
Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.String
getPropertyValue(String propertyName, Submission submission, Portal portal)
Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.String
getPropertyValue(String propertyName, TemplateVersion version)
Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.String
getPropertyValue(String propertyName, TemplateVersion version, Portal portal)
Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.static void
invalidateCache()
Invalidate the property value cache.String
renderEmailStringTemplate(String templateValue, Map model, Client client, TemplateVersion version, Portal portal)
Render the template string value with the model using the Velocity engine.-
Methods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
-
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
-
-
-
Field Detail
-
ADDITIONAL_SERVICES
public static final String ADDITIONAL_SERVICES
The "Additional Services" form property- See Also:
- Constant Field Values
-
CLIENT_NAME
public static final String CLIENT_NAME
The "Client Name" client property- See Also:
- Constant Field Values
-
EMAIL_2FA_MESSAGE
public static final String EMAIL_2FA_MESSAGE
The "Email 2FA Message" property- See Also:
- Constant Field Values
-
EMAIL_2FA_SUBJECT
public static final String EMAIL_2FA_SUBJECT
The "Email 2FA Subject" 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_DESCRIPTION
public static final String FORM_DESCRIPTION
The "Form Description" property- See Also:
- Constant Field Values
-
FORM_ELIGIBILITY
public static final String FORM_ELIGIBILITY
The "Form Eligibility" 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_NAME
public static final String FORM_NAME
The "Form Name" property- See Also:
- Constant Field Values
-
FORM_REQUIREMENTS
public static final String FORM_REQUIREMENTS
The "Form Requirements" 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_LANDING_PAGE
public static final String HTML_LANDING_PAGE
The "HTML Landing Page" property- See Also:
- Constant Field Values
-
HTML_SAVED_PAGE
public static final String HTML_SAVED_PAGE
The "HTML Saved 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
-
JOB_NAME
public static final String JOB_NAME
The "Job Name" property- See Also:
- Constant Field Values
-
JOB_DESCRIPTION
public static final String JOB_DESCRIPTION
The "Job Description" property- See Also:
- Constant Field Values
-
LOGO
public static final String LOGO
The "Logo" client property- See Also:
- Constant Field Values
-
MAESTRO_SCE_MODE
public static final String MAESTRO_SCE_MODE
The "Maestro SCE Mode" form 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
-
PORTAL_CSS_URL
public static final String PORTAL_CSS_URL
The "Portal CSS URL" 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
-
SAVED_MESSAGE
public static final String SAVED_MESSAGE
The "Saved Message" 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
-
SUBMISSION_MESSAGE
public static final String SUBMISSION_MESSAGE
The "Submission Message" property- See Also:
- Constant Field Values
-
URL
public static final String URL
The "URL" client 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 propertyPortalProperty.ADMIN_ENVIRONMENT_NAME
in the admin portal key: supportEmail, value: value of propertyEMAIL_SENDER_ADDRESS
, resolved via form version/client/portal and falling back toDeploymentProperty.PROPERTY_Email_Default_Sender
- Parameters:
templateValue
- the template valuemodel
- the model to renderclient
- 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
-
-