Class BTSystemSettingsTranslate
java.lang.Object
overit.geocall.bl.BusinessTask<SystemSettingsTranslateEvent>
overit.geocallapp.wfm.core.bl.systemsetting.task.BTSystemSettingsTranslate
- All Implemented Interfaces:
Serializable,Tool
@Event(SystemSettingsTranslateEvent.class)
public class BTSystemSettingsTranslate
extends BusinessTask<SystemSettingsTranslateEvent>
Business task in order to translate the deprecated
When the
BOSystemSettings to companuy properties. When the
SystemSettingsTranslateEvent is launched
the BT notices the call and translates the system settings from db table to company properties if not already done. - Since:
- 15.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(SystemSettingsTranslateEvent i, PoolKit poolKit) translates system settings to the new property based settings if not already translated.protected ObjectconvertPropertyValue(String key, Object value, PoolKit poolKit) Converts the property value for all the old system settings data that changed type when they were translated into properties.Gest SystemSettings values if an ASYSTEMSETTINGS record exists on DB otherwise returns null.protected voidSaves the company configuration.protected voidupdateSystemSettingsTranslated(BOSystemSettings systemSettings, PoolKit poolKit) Updates the system settings by setting them to translated.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
LOG
-
helper
-
-
Constructor Details
-
BTSystemSettingsTranslate
public BTSystemSettingsTranslate()
-
-
Method Details
-
body
protected void body(SystemSettingsTranslateEvent i, PoolKit poolKit) throws DAException, DAValidateException translates system settings to the new property based settings if not already translated.- Specified by:
bodyin classBusinessTask<SystemSettingsTranslateEvent>- Parameters:
i- theSystemSettingsTranslateEventinputpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
getSystemSettingsValues
Gest SystemSettings values if an ASYSTEMSETTINGS record exists on DB otherwise returns null. It's possible that ASYSTEMSETTINGS has no records if we are on the first creation of a company and this is the first login to the new company. In this case FSM Datasets are not yet applyed and no records are been yet inserted on ASYSTEMSETTINGS. -
saveConfiguration
protected void saveConfiguration(Map<String, Object> data, Long companyId, PoolKit poolKit) throws DAValidateException, DAExceptionSaves the company configuration.- Parameters:
data- the data that is going to be savedcompanyId- the company idpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
convertPropertyValue
protected Object convertPropertyValue(String key, Object value, PoolKit poolKit) throws DAException, DAValidateException Converts the property value for all the old system settings data that changed type when they were translated into properties.- Parameters:
key- the property keyvalue- the old system settings field valuepoolKit- thePoolKit- Returns:
- the new value for the property
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
updateSystemSettingsTranslated
protected void updateSystemSettingsTranslated(BOSystemSettings systemSettings, PoolKit poolKit) throws DAValidateException, DAException Updates the system settings by setting them to translated.- Parameters:
systemSettings- the system settingspoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-