Class BTProcessSchedulingProposals
java.lang.Object
overit.geocall.bl.BusinessTask<ProcessSchedulingProposalsEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<ProcessSchedulingProposalsEvent>
overit.geocallapp.wfm.core.bl.schedulingproposal.task.BTSchedulingProposal<ProcessSchedulingProposalsEvent>
overit.geocallapp.wfm.core.bl.schedulingproposal.task.BTProcessSchedulingProposals
- All Implemented Interfaces:
Serializable,Interruptable,Tool,ValidExecution
@Event(ProcessSchedulingProposalsEvent.class)
public class BTProcessSchedulingProposals
extends BTSchedulingProposal<ProcessSchedulingProposalsEvent>
implements Interruptable
Generic business task for the scheduling proposal process.
- Since:
- 14.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(ProcessSchedulingProposalsEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.protected intprotected LocalizedStringgetExceptionError(Exception exception) protected LonggetIncreasedCounter(Long counter) protected List<BOSchedulingProposal> getToBeProcess(PoolKit poolKit) booleanDetermines whether the current state is valid for execution.protected ProcessSchedulingProposalOutputmanageCreation(BOSchedulingProposal bo, PoolKit poolKit) protected ProcessSchedulingProposalOutputmanageRemoval(BOSchedulingProposal bo, PoolKit poolKit) voidbooleanControls whether an exception should be thrown when execution is invalid.protected voidupdateProcessKo(BOSchedulingProposal boSchedulingProposal, Exception exception, TimeSlot timeSlot, PoolKit pk) protected voidupdateProcessOk(BOSchedulingProposal boSchedulingProposal, TimeSlot timeSlot, PoolKit poolKit) Methods inherited from class overit.geocallapp.wfm.core.bl.schedulingproposal.task.BTSchedulingProposal
getExceptionMethods 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
-
Field Details
-
interrupt
protected volatile boolean interrupt
-
-
Constructor Details
-
BTProcessSchedulingProposals
public BTProcessSchedulingProposals()
-
-
Method Details
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Specified by:
isValidExecutionin interfaceValidExecution- Overrides:
isValidExecutionin classBTSchedulingProposal<ProcessSchedulingProposalsEvent>- Returns:
- true if execution is valid, false otherwise
-
throwExceptionIfInvalid
public boolean throwExceptionIfInvalid()Description copied from interface:ValidExecutionControls whether an exception should be thrown when execution is invalid. This method allows implementing classes to specify their exception-throwing behavior whenValidExecution.isValidExecution()returns false. If this method returns true, callers should throw the exception returned byValidExecution.getException().- Specified by:
throwExceptionIfInvalidin interfaceValidExecution- Overrides:
throwExceptionIfInvalidin classBTSchedulingProposal<ProcessSchedulingProposalsEvent>- Returns:
- true if an exception should be thrown for invalid execution, false otherwise
-
execute
protected void execute(ProcessSchedulingProposalsEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<ProcessSchedulingProposalsEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
manageRemoval
protected ProcessSchedulingProposalOutput manageRemoval(BOSchedulingProposal bo, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
manageCreation
protected ProcessSchedulingProposalOutput manageCreation(BOSchedulingProposal bo, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
getToBeProcess
protected List<BOSchedulingProposal> getToBeProcess(PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
updateProcessKo
protected void updateProcessKo(BOSchedulingProposal boSchedulingProposal, Exception exception, TimeSlot timeSlot, PoolKit pk) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
updateProcessOk
protected void updateProcessOk(BOSchedulingProposal boSchedulingProposal, TimeSlot timeSlot, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
getExceptionError
-
getIncreasedCounter
-
getAttempts
protected int getAttempts() -
pleaseInterrupt
public void pleaseInterrupt()- Specified by:
pleaseInterruptin interfaceInterruptable
-