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 Details

    • DEFAULT_TIME_SLOT_DURATION

      protected static final Long DEFAULT_TIME_SLOT_DURATION
    • LOG

      protected static final LogChannel LOG
  • Constructor Details

    • BTWSMethodImpl

      public BTWSMethodImpl()
  • Method Details

    • body

      protected void body(WSMethodImplEvent<I,O> event, PoolKit poolKit) throws DAException, DAValidateException
      Description copied from class: BusinessTask
      Implements this method to write the specific task logic to handle the input parameter.
      Specified by:
      body in class BusinessTask<WSMethodImplEvent<I,O extends IServiceResponse>>
      Parameters:
      event - the object upon which the task will works on
      poolKit - the poolkit containing the reference to the database connection that can be used
      Throws:
      DAException - in case of database error
      DAValidateException - in case of database validation error
    • inizializeIdentity

      protected void inizializeIdentity(IRequestHeader requestHeader)
    • getOneShotTimeSlots

      protected List<overit.geocallapp.wfm.util.OneShotTimeSlot> getOneShotTimeSlots(IRequestHeader header, I payload) throws DAValidateException, DAException
      Creates the OneShotTimeSlot list used by the method, empty list or null if the time slots are not needed.
      Parameters:
      header - service request header
      payload - service request payload
      Returns:
      the time slots used by the method
      Throws:
      DAValidateException - the DA validate exception
      DAException - the DA exception
    • getTimeSlotsKeys

      protected List<String> getTimeSlotsKeys(IRequestHeader header, I payload)
      Returns the lists of keys used to create the time slots, empty list or null if the time slots are not needed.
      Parameters:
      header - service request header
      payload - service request payload
      Returns:
      the lists of time slot keys
    • getOneShotTimeSlot

      protected overit.geocallapp.wfm.util.OneShotTimeSlot getOneShotTimeSlot(String key) throws DAException
      Creates a OneShotTimeSlot used by the method
      Parameters:
      key - time slot key
      Returns:
      a time slot used by the method
      Throws:
      DAException - the DA exception
    • getTimeSlotDuration

      protected Long 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 every OneShotTimeSlot of the list.
      Parameters:
      oneShotTimeSlots - a list of OneShotTimeSlot
      Throws:
      DAException - the DA exception
    • getTimeSlotCreationException

      protected DAValidateException getTimeSlotCreationException(String key, I serviceRequest)
      Returns the exception used if time slot creation fails.
      Parameters:
      key - time slot key
      serviceRequest - service request
      Returns:
      time slot creation exception
    • executeMethod

      protected abstract O executeMethod(WSMethodImplEvent<I,O> event, PoolKit poolKit) throws DAException, DAValidateException
      Throws:
      DAException
      DAValidateException