Class SystemSettingsHelper
java.lang.Object
overit.geocallapp.wfm.systemsettings.bl.systemsetting.SystemSettingsHelper
- Direct Known Subclasses:
CoreSystemSettingsHelper
Helper for the system settings.
- Since:
- 17.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexistCompanySystemSettings(Long companyId) Checks if the company has system settings.<T extends Enum<T> & overit.geocallapp.wfm.base.systemsettings.SystemSettingsEnum>
TgetEnumById(Class<T> enumClazz, Long id) Returns the needed enum by the given id.getEnumCode(Class<T> enumClazz, Long id) Returns the enum code by the given id.getFieldValue(String field) getPropertyFromField(String field) Returns the property key starting from the system settings old field name.getPropertyValueFromField(String field) Returns the property value starting from the system settings old field name.Returns the map containing all the system settings loaded using a cache mechanism.org.apache.commons.configuration2.ConfigurationLoads the configuration that maps all the new properties with the old system setting database field names.translateSystemSettings(Map<String, Object> systemSettings) Translates the given map of system settings by replacing only the deprecated database fields name with the new corresponding property name.
-
Constructor Details
-
SystemSettingsHelper
public SystemSettingsHelper()
-
-
Method Details
-
getPropertyFromField
Returns the property key starting from the system settings old field name.- Parameters:
field- the old field name- Returns:
- the property key
-
getPropertyValueFromField
Returns the property value starting from the system settings old field name.- Parameters:
field- the old field name- Returns:
- the property value
-
loadPropertiesConfiguration
public org.apache.commons.configuration2.Configuration loadPropertiesConfiguration()Loads the configuration that maps all the new properties with the old system setting database field names.- Returns:
- the properties configuration
-
translateSystemSettings
Translates the given map of system settings by replacing only the deprecated database fields name with the new corresponding property name.- Parameters:
systemSettings- the system settings- Returns:
- a new map containing all the given system settings
-
loadRecord
protected Map<String,Object> loadRecord(Class<? extends DAO> daoClass, Map<String, Object> filter, PoolKit poolKit) throws DAException, DAValidateException- Throws:
DAExceptionDAValidateException
-
getEnumById
public <T extends Enum<T> & overit.geocallapp.wfm.base.systemsettings.SystemSettingsEnum> T getEnumById(Class<T> enumClazz, Long id) Returns the needed enum by the given id.- Type Parameters:
T- the generic type of the needed enum that extedsSystemSettingsEnum- Parameters:
enumClazz- the enum clazzid- the enum id- Returns:
- the T enum
-
getEnumCode
public <T extends Enum<T> & overit.geocallapp.wfm.base.systemsettings.SystemSettingsEnum> String getEnumCode(Class<T> enumClazz, Long id) Returns the enum code by the given id.- Type Parameters:
T- the generic type of the needed enum that extedsSystemSettingsEnum- Parameters:
enumClazz- the enum clazzid- the enum id- Returns:
- the enum code
-
getFieldValue
-
getValues
Returns the map containing all the system settings loaded using a cache mechanism.- Returns:
- system settings map
-
existCompanySystemSettings
Checks if the company has system settings.- Returns:
- true if the company has system settings, false otherwise
-