Class BTBundlingRuleSave
java.lang.Object
overit.geocall.bl.BusinessTask<BundlingRuleSaveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<BundlingRuleSaveEvent>
overit.geocallapp.wfm.bundler.bl.task.BTBundler<BundlingRuleSaveEvent>
overit.geocallapp.wfm.bundler.bl.configuration.bundling.rule.task.BTBundlingRuleSave
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(BundlingRuleSaveEvent.class)
public class BTBundlingRuleSave
extends BTBundler<BundlingRuleSaveEvent>
Business task in order to save a
The saving process is accomplished by different steps:
BundlingRule. The saving process is accomplished by different steps:
- firstly, the given
BOBundlingRuleHeaderis inserted/updated (depending on whether the rule is new or not) - secondly, all the
BOBundlingRuleFilterandBOBundlingRuleOrderingalready associated to the given rule are deleted - finally, all the new
BOBundlingRuleFilterandBOBundlingRuleOrderingfor the given rule are inserted.
BundlingRuleSaveEvent is launched
the BT notices the call and loads the active BundlingRule basing on the event's input. - Since:
- 10.1
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddeleteAssociatedFilters(BundlingRule rule, PoolKit poolKit) Deletes all theBOBundlingRuleFilters already associated to the givenBundlingRule.protected voiddeleteAssociatedOrderings(BundlingRule rule, PoolKit poolKit) Deletes all theBOBundlingRuleOrderingalready associated to the givenBundlingRule.protected voidexecute(BundlingRuleSaveEvent event, PoolKit poolKit) Saves theBundlingRulewith all its components.protected LonginsertBundlingRuleHeader(BOBundlingRuleHeader header, PoolKit poolKit) Inserts the givenBOBundlingRuleHeader.protected voidinsertFilters(BundlingRule rule, PoolKit poolKit) Inserts all the givenBOBundlingRuleFilterin order to associate them to the currentBundlingRule.protected voidinsertOrderings(BundlingRule rule, PoolKit poolKit) Inserts all the givenBOBundlingRuleOrderingin order to associate them to the currentBundlingRule.protected voidupdateBundlingRuleHeader(BOBundlingRuleHeader header, PoolKit poolKit) Updates theBOBundlingRuleHeader.Methods inherited from class overit.geocallapp.wfm.bundler.bl.task.BTBundler
getException, isValidExecution, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, checkValidExecution, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTBundlingRuleSave
public BTBundlingRuleSave()
-
-
Method Details
-
execute
protected void execute(BundlingRuleSaveEvent event, PoolKit poolKit) throws DAException, DAValidateException Saves theBundlingRulewith all its components.- Specified by:
executein classValidExecutionBusinessTask<BundlingRuleSaveEvent>- Parameters:
event- theBundlingRuleSaveEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
insertBundlingRuleHeader
protected Long insertBundlingRuleHeader(BOBundlingRuleHeader header, PoolKit poolKit) throws DAValidateException, DAException Inserts the givenBOBundlingRuleHeader.- Parameters:
header- the givenBOBundlingRuleHeader.poolKit- thePoolKit- Returns:
- the long
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
updateBundlingRuleHeader
protected void updateBundlingRuleHeader(BOBundlingRuleHeader header, PoolKit poolKit) throws DAValidateException, DAException Updates theBOBundlingRuleHeader.- Parameters:
header- the givenBOBundlingRuleHeaderpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
deleteAssociatedFilters
protected void deleteAssociatedFilters(BundlingRule rule, PoolKit poolKit) throws DAValidateException, DAException Deletes all theBOBundlingRuleFilters already associated to the givenBundlingRule.- Parameters:
rule- the rulepoolKit- the pool kit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
deleteAssociatedOrderings
protected void deleteAssociatedOrderings(BundlingRule rule, PoolKit poolKit) throws DAValidateException, DAException Deletes all theBOBundlingRuleOrderingalready associated to the givenBundlingRule.- Parameters:
rule- the rulepoolKit- the pool kit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
insertFilters
protected void insertFilters(BundlingRule rule, PoolKit poolKit) throws DAValidateException, DAException Inserts all the givenBOBundlingRuleFilterin order to associate them to the currentBundlingRule.- Parameters:
rule- theBundlingRulepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
insertOrderings
protected void insertOrderings(BundlingRule rule, PoolKit poolKit) throws DAValidateException, DAException Inserts all the givenBOBundlingRuleOrderingin order to associate them to the currentBundlingRule.- Parameters:
rule- theBundlingRulepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-