Class BTWSMethodImpl<I,O extends IServiceResponse>
java.lang.Object
overit.geocall.bl.BusinessTask<WSMethodImplEvent<I,O>>
overit.geocallapp.wfm.core.soap.commons.task.BTWSMethodImpl<I,O>
- All Implemented Interfaces:
Serializable,Tool
- Direct Known Subclasses:
BTWSMultistageGroupInsert,BTWSTechnicalObjectDelete,BTWSTechnicalObjectInsert,BTWSTechnicalObjectUpdate,BTWSTechnicalObjectUpsert,BTWSWorkOrderAppointmentUpdate,BTWSWorkOrderInsert,BTWSWorkOrderInsert,BTWSWorkOrderInsert,BTWSWorkOrderOperationDelete,BTWSWorkOrderOperationDelete,BTWSWorkOrderStateUpdate
public abstract class BTWSMethodImpl<I,O extends IServiceResponse>
extends BusinessTask<WSMethodImplEvent<I,O>>
- Since:
- 9.2
- See Also:
- GCApi:
- task
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(WSMethodImplEvent<I, O> event, PoolKit poolKit) Implements this method to write the specific task logic to handle the input parameter.protected abstract OexecuteMethod(WSMethodImplEvent<I, O> event, PoolKit poolKit) protected voidfreeOneShotTimeSlots(List<overit.geocallapp.wfm.util.OneShotTimeSlot> oneShotTimeSlots) Frees everyOneShotTimeSlotof the list.protected overit.geocallapp.wfm.util.OneShotTimeSlotgetOneShotTimeSlot(String key) Creates aOneShotTimeSlotused by the methodprotected List<overit.geocallapp.wfm.util.OneShotTimeSlot> getOneShotTimeSlots(IRequestHeader header, I payload) Creates theOneShotTimeSlotlist used by the method, empty list ornullif the time slots are not needed.protected DAValidateExceptiongetTimeSlotCreationException(String key, I serviceRequest) Returns the exception used if time slot creation fails.protected LongReturns the maximum duration (in seconds) for time slot.getTimeSlotsKeys(IRequestHeader header, I payload) Returns the lists of keys used to create the time slots, empty list ornullif the time slots are not needed.protected voidinizializeIdentity(IRequestHeader requestHeader) Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
DEFAULT_TIME_SLOT_DURATION
-
LOG
-
-
Constructor Details
-
BTWSMethodImpl
public BTWSMethodImpl()
-
-
Method Details
-
body
protected void body(WSMethodImplEvent<I, O> event, PoolKit poolKit) throws DAException, DAValidateExceptionDescription copied from class:BusinessTaskImplements this method to write the specific task logic to handle the input parameter.- Specified by:
bodyin classBusinessTask<WSMethodImplEvent<I,O extends IServiceResponse>> - Parameters:
event- the object upon which the task will works onpoolKit- the poolkit containing the reference to the database connection that can be used- Throws:
DAException- in case of database errorDAValidateException- in case of database validation error
-
inizializeIdentity
-
getOneShotTimeSlots
protected List<overit.geocallapp.wfm.util.OneShotTimeSlot> getOneShotTimeSlots(IRequestHeader header, I payload) throws DAValidateException, DAException Creates theOneShotTimeSlotlist used by the method, empty list ornullif the time slots are not needed.- Parameters:
header- service request headerpayload- service request payload- Returns:
- the time slots used by the method
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getTimeSlotsKeys
Returns the lists of keys used to create the time slots, empty list ornullif the time slots are not needed.- Parameters:
header- service request headerpayload- service request payload- Returns:
- the lists of time slot keys
-
getOneShotTimeSlot
protected overit.geocallapp.wfm.util.OneShotTimeSlot getOneShotTimeSlot(String key) throws DAException Creates aOneShotTimeSlotused by the method- Parameters:
key- time slot key- Returns:
- a time slot used by the method
- Throws:
DAException- the DA exception
-
getTimeSlotDuration
Returns the maximum duration (in seconds) for time slot.- Returns:
- the time slot duration
-
freeOneShotTimeSlots
protected void freeOneShotTimeSlots(List<overit.geocallapp.wfm.util.OneShotTimeSlot> oneShotTimeSlots) throws DAException Frees everyOneShotTimeSlotof the list.- Parameters:
oneShotTimeSlots- a list ofOneShotTimeSlot- Throws:
DAException- the DA exception
-
getTimeSlotCreationException
Returns the exception used if time slot creation fails.- Parameters:
key- time slot keyserviceRequest- service request- Returns:
- time slot creation exception
-
executeMethod
protected abstract O executeMethod(WSMethodImplEvent<I, O> event, PoolKit poolKit) throws DAException, DAValidateException- Throws:
DAExceptionDAValidateException
-