Class BTOperationCenterFreezingDateCalculation
java.lang.Object
overit.geocall.bl.BusinessTask<OperationCenterFreezingDateCalculationEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<OperationCenterFreezingDateCalculationEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<OperationCenterFreezingDateCalculationEvent>
overit.geocallapp.wfm.orchestrator.scheduling.bl.freezingday.task.BTOperationCenterFreezingDateCalculation
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(OperationCenterFreezingDateCalculationEvent.class)
public class BTOperationCenterFreezingDateCalculation
extends ValidPermissionBusinessTask<OperationCenterFreezingDateCalculationEvent>
Business task in order to calculate the freezing date for an operation center.
More specifically, the event calculates the date before/after which is not possible to perform a scheduling action (paste/cut/etc.).
More specifically, the event calculates the date before/after which is not possible to perform a scheduling action (paste/cut/etc.).
- Since:
- 17.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DatecalculateFreezingDate(OperationCenterFreezingDateCalculationInput input, PoolKit poolKit) Performs the calculations to retrieve the freezing date.protected voidexecute(OperationCenterFreezingDateCalculationEvent event, PoolKit poolKit) Calculates the freezing date for the given operation center.protected DategetCurrentDay(Date startDate, Date localDate) Returns the current day.protected DategetCurrentTime(Date startTime, Date localDate) Returns the current time.protected LonggetFreezingDays(BOOperationCenterSchedulingConfiguration schedulingConfiguration) Returns the freezing days.protected DategetFreezingTime(BOOperationCenterSchedulingConfiguration schedulingConfiguration) Returns the freezing time.protected DategetLocalDate(BOOperationCenterSchedulingConfiguration schedulingConfiguration) Returns the local date.booleanDetermines whether the current state is valid for execution.protected DateskipStartHolidays(Date date, Boolean skipStartHolidays, BOOperationCenterSchedulingConfiguration schedulingConfiguration, PoolKit poolKit) Skips the holidays start date.protected voidValidates the input before the calculation.Methods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
checkValidExecution, getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
LOG
-
-
Constructor Details
-
BTOperationCenterFreezingDateCalculation
public BTOperationCenterFreezingDateCalculation()
-
-
Method Details
-
execute
protected void execute(OperationCenterFreezingDateCalculationEvent event, PoolKit poolKit) throws DAException, DAValidateException Calculates the freezing date for the given operation center.- Specified by:
executein classValidExecutionBusinessTask<OperationCenterFreezingDateCalculationEvent>- Parameters:
event- theOperationCenterFreezingDateCalculationEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Returns:
- true if execution is valid, false otherwise
-
validate
protected void validate(OperationCenterFreezingDateCalculationInput input) throws DAValidateException Validates the input before the calculation.- Parameters:
input- theOperationCenterFreezingDateCalculationInput- Throws:
DAValidateException- the DA validate exception
-
calculateFreezingDate
protected Date calculateFreezingDate(OperationCenterFreezingDateCalculationInput input, PoolKit poolKit) throws DAValidateException, DAException Performs the calculations to retrieve the freezing date.- Parameters:
input- theOperationCenterFreezingDateCalculationInputpoolKit- thePoolKit- Returns:
- the freezing date
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getFreezingTime
Returns the freezing time.- Parameters:
schedulingConfiguration- the scheduling configuration- Returns:
- the freezing time
-
getFreezingDays
Returns the freezing days.- Parameters:
schedulingConfiguration- the scheduling configuration- Returns:
- the freezing days
-
getLocalDate
Returns the local date.- Parameters:
schedulingConfiguration- the scheduling configuration- Returns:
- the local date
-
getCurrentDay
Returns the current day.- Parameters:
startDate- the start datelocalDate- the local date- Returns:
- the current day
-
getCurrentTime
Returns the current time.- Parameters:
startTime- the start timelocalDate- the local date- Returns:
- the current time
-
skipStartHolidays
protected Date skipStartHolidays(Date date, Boolean skipStartHolidays, BOOperationCenterSchedulingConfiguration schedulingConfiguration, PoolKit poolKit) throws DAException, DAValidateException Skips the holidays start date.- Parameters:
date- the dateskipStartHolidays- the skip start holidaysschedulingConfiguration- the scheduling configurationpoolKit- thePoolKit- Returns:
- the date
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-