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 StringADDITIONAL_SERVICESThe "Additional Services" form propertystatic StringCLIENT_NAMEThe "Client Name" client propertystatic StringEMAIL_2FA_MESSAGEThe "Email 2FA Message" propertystatic StringEMAIL_2FA_SUBJECTThe "Email 2FA Subject" propertystatic StringEMAIL_DUPLICATE_PAYMENT_MESSAGEThe "Email Duplicate Payment Message" propertystatic StringEMAIL_DUPLICATE_PAYMENT_SUBJECTThe "Email Duplicate Payment Subject" propertystatic StringEMAIL_FORM_RECEIPT_MESSAGEThe "Email Form Receipt Message" propertystatic StringEMAIL_FORM_RECEIPT_SUBJECTThe "Email Form Receipt Subject" propertystatic StringEMAIL_FRAUD_PAYMENT_MESSAGEThe "Email Fraud Payment Message" propertystatic StringEMAIL_FRAUD_PAYMENT_SUBJECTThe "Email Fraud Payment Subject" propertystatic StringEMAIL_LICENSING_ERROR_MESSAGEThe "Email Licensing Error Message" propertystatic StringEMAIL_LOST_PASSWORD_MESSAGEThe "Email Lost Password Message" propertystatic StringEMAIL_LOST_PASSWORD_SUBJECTThe "Email Lost Password Subject" propertystatic StringEMAIL_PROMOTION_MESSAGEThe "Email Promotion Message" propertystatic StringEMAIL_SAVED_FORM_MESSAGEThe "Email Saved Form Message" propertystatic StringEMAIL_SAVED_FORM_SUBJECTThe "Email Saved Form Subject" propertystatic StringEMAIL_SENDER_ADDRESSThe "Email Sender Address" propertystatic StringEMAIL_SHARE_FORM_MESSAGEThe "Email Share Form Message" propertystatic StringEMAIL_SHARE_FORM_SUBJECTThe "Email Share Form Subject" propertystatic StringEMAIL_SUBMISSION_STATUS_MESSAGEThe "Email Submission Status Message" propertystatic StringEMAIL_SUBMISSION_STATUS_SUBJECTThe "Email Submission Status Subject" propertystatic StringEMAIL_SYSTEM_ALERT_MESSAGEThe "Email System Alert Message" propertystatic StringEMAIL_TASK_NOTIFICATION_MESSAGEThe "Email Task Notification Message" propertystatic StringEMAIL_TASK_NOTIFICATION_SUBJECTThe "Email Task Notification Subject" propertystatic StringEMAIL_TEMPLATE_HTMLThe "Email Template Mode" propertystatic StringEMAIL_TEMPLATE_MODEThe "Email Template Mode" propertystatic StringEMAIL_TEST_SUITE_MESSAGEThe "EmailTestSuiteMessage" propertystatic StringEMAIL_WELCOME_USER_MESSAGEThe "Email Welcome User Message" propertystatic StringEMAIL_WELCOME_USER_SUBJECTThe "Email Welcome User Subject" propertystatic StringEXTERNAL_ANALYTICS_IDThe "External Analytics ID" propertystatic StringFORGET_PASSWORD_MESSAGEThe "Forget Password Message" property.static StringFORM_DESCRIPTIONThe "Form Description" propertystatic StringFORM_ELIGIBILITYThe "Form Eligibility" propertystatic StringFORM_EXPIRED_MESSAGEThe "Form Expired Message" propertystatic StringFORM_NAMEThe "Form Name" propertystatic StringFORM_REQUIREMENTSThe "Form Requirements" propertystatic StringFORM_TERMS_AND_CONDITIONSThe "Form Terms And Conditions" propertystatic StringHTML_CONFIRMATION_PAGEThe "HTML Confirmation Page" propertystatic StringHTML_LANDING_PAGEThe "HTML Landing Page" propertystatic StringHTML_SAVED_PAGEThe "HTML Saved Page" propertystatic StringHTML_TERMS_AND_CONDITIONS_PAGEThe "HTML Terms And Conditions Page" propertystatic StringJOB_DESCRIPTIONThe "Job Description" propertystatic StringJOB_NAMEThe "Job Name" propertystatic StringLOGOThe "Logo" client propertystatic StringMAESTRO_SCE_MODEThe "Maestro SCE Mode" form propertystatic StringMAX_SAVE_CHALLENGE_REQUESTSThe property value "Max Save Challenge Requests".static StringOFFLINE_STATUS_MESSAGEThe "Offline Status Message" propertystatic StringPAYMENT_CERTIFICATE_FILEThe "Payment Certificate File" propertystatic StringPORTAL_CSS_URLThe "Portal CSS URL" propertystatic String[]PROPERTY_NAMESThe list of property names.static StringRECEIPT_PROPERTIESThe property value "Receipt Properties".static StringSAVE_CHALLENGE_LOCKOUT_MINUTESThe "Save Challenge Lockout Minutes" property for Work Spaces.static StringSAVE_CHALLENGE_QUESTIONThe "Save Challenge Question" propertystatic StringSAVED_MESSAGEThe "Saved Message" propertystatic StringSERVERS_BUSY_MESSAGEThe "Servers Busy Message" propertystatic StringSIGNATURE_HELP_TEXTThe "Signature Help Text" propertystatic StringSUBMISSION_DUPLICATE_MESSAGEThe "Submission Duplicate Message" propertystatic StringSUBMISSION_MESSAGEThe "Submission Message" propertystatic StringURLThe "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 StringgetClasspathProperty(String propertyName)Return the classpath property for the given nameStringgetPropertyValue(String propertyName, Client client)Return the named property value searching for: Client Property > Portal Property > Deployment Property.StringgetPropertyValue(String propertyName, Client client, TemplateVersion version, Portal portal)Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.StringgetPropertyValue(String propertyName, Form form)Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.StringgetPropertyValue(String propertyName, Portal portal)Return the named property value searching for: Portal Property > Deployment Property.StringgetPropertyValue(String propertyName, Submission submission)Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.StringgetPropertyValue(String propertyName, Submission submission, Portal portal)Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.StringgetPropertyValue(String propertyName, TemplateVersion version)Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.StringgetPropertyValue(String propertyName, TemplateVersion version, Portal portal)Return the named property value searching for: Form Property > Client Property > Portal Property > Deployment Property.static voidinvalidateCache()Invalidate the property value cache.StringrenderEmailStringTemplate(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
-
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_NAMEin 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
-
-