Class BTVCAppointmentActivation
java.lang.Object
overit.geocall.bl.BusinessTask<VCAppointmentActivationEvent>
overit.geocallapp.wfm.core.bl.common.validexecution.ValidExecutionBusinessTask<VCAppointmentActivationEvent>
overit.geocallapp.wfm.core.bl.common.validexecution.ValidPermissionBusinessTask<VCAppointmentActivationEvent>
overit.geocallapp.wfm.cee.bl.task.BTCeeManagement<VCAppointmentActivationEvent>
overit.geocallapp.wfm.cee.bl.intervention.task.BTVCAppointmentActivation
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(VCAppointmentActivationEvent.class)
public class BTVCAppointmentActivation
extends BTCeeManagement<VCAppointmentActivationEvent>
VC appointment activation notification
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CeeHelperprotected RestClientHelperprotected overit.geocallapp.wfm.spaceone.configuration.VCConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected overit.geocallapp.wfm.spaceone.rest.auth.VCRESTAuthenticationBuilderauthBuilder(overit.geocallapp.wfm.spaceone.configuration.VCConfiguration configuration) protected DTOVCAppointmentActivationRequestbuildRequestDTO(HashGetter vcAppointment, List<DTOMessage> messages) overit.geocallapp.wfm.spaceone.rest.users.UsersStatusRequestbuildUsersStatusRequest(overit.geocallapp.wfm.spaceone.configuration.VCConfiguration configuration) protected voidexecute(VCAppointmentActivationEvent event, PoolKit poolKit) protected LonggetCeeInterventionId(HashGetter vcAppointment) protected StringgetCustomerAccessToken(HashGetter vcAppointment, PoolKit pk) Obtains a valid Access Token for the customer Identity that will be sent to CEE mobile application for virtual collaboration call startupprotected HashGettergetCustomerUser(Long customerId, PoolKit pk) Loads the user associated with the specified customerprotected StringgetTechnicianUserId(HashGetter vcAppointment, PoolKit pk) Obtains the SpaceOne userId for the technician useroverit.geocallapp.wfm.spaceone.VCUsergetTechnicianVCUser(String techicianUsername) Obtains a VCUser instance by querying the SpaceOne user status serviceoverit.geocallapp.wfm.spaceone.VCUserObtains a VCUser instance by authenticating the specified identity in SpaceOneprotected voidprotected IdentityloadIdentity(String username) Loads an Identity instance from the specified usernameprotected voidprotected voidnotifyVCAppointmentActivation(HashGetter vcAppointment, InterventionApi api, PoolKit pk) Methods inherited from class overit.geocallapp.wfm.cee.bl.task.BTCeeManagement
checkValidExecution, isValidExecution, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.wfm.core.bl.common.validexecution.ValidPermissionBusinessTask
getExceptionMethods inherited from class overit.geocallapp.wfm.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
vcConfiguration
protected overit.geocallapp.wfm.spaceone.configuration.VCConfiguration vcConfiguration -
ceeHelper
-
helper
-
-
Constructor Details
-
BTVCAppointmentActivation
public BTVCAppointmentActivation()
-
-
Method Details
-
execute
protected void execute(VCAppointmentActivationEvent event, PoolKit poolKit) throws DAException, DAValidateException - Specified by:
executein classValidExecutionBusinessTask<VCAppointmentActivationEvent>- Throws:
DAExceptionDAValidateException
-
initialize
protected void initialize() -
loadVCConfiguration
- Throws:
DAValidateException
-
getCustomerAccessToken
protected String getCustomerAccessToken(HashGetter vcAppointment, PoolKit pk) throws DAException, DAValidateException Obtains a valid Access Token for the customer Identity that will be sent to CEE mobile application for virtual collaboration call startup- Parameters:
vcAppointment- virtual collaboration appointment datapk- the poolkit- Returns:
- the access token
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getCustomerUser
protected HashGetter getCustomerUser(Long customerId, PoolKit pk) throws DAValidateException, DAException Loads the user associated with the specified customer- Parameters:
customerId- the id of the customerpk- the poolkit- Returns:
- the user data
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadIdentity
Loads an Identity instance from the specified username- Parameters:
username- a username- Returns:
- a
Identity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getVCUser
public overit.geocallapp.wfm.spaceone.VCUser getVCUser(Identity identity) throws DAValidateException, DAException Obtains a VCUser instance by authenticating the specified identity in SpaceOne- Parameters:
identity- anIdentityobject- Returns:
- a
VCUser - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getTechnicianUserId
protected String getTechnicianUserId(HashGetter vcAppointment, PoolKit pk) throws DAException, DAValidateException Obtains the SpaceOne userId for the technician user- Parameters:
vcAppointment- the virtual collaboration appointment datapk- the poolkit- Returns:
- the SpaceOne user id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getTechnicianVCUser
public overit.geocallapp.wfm.spaceone.VCUser getTechnicianVCUser(String techicianUsername) throws DAValidateException, DAException Obtains a VCUser instance by querying the SpaceOne user status service- Parameters:
techicianUsername- a technician username- Returns:
- a
VCUser - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
buildUsersStatusRequest
public overit.geocallapp.wfm.spaceone.rest.users.UsersStatusRequest buildUsersStatusRequest(overit.geocallapp.wfm.spaceone.configuration.VCConfiguration configuration) -
authBuilder
protected overit.geocallapp.wfm.spaceone.rest.auth.VCRESTAuthenticationBuilder authBuilder(overit.geocallapp.wfm.spaceone.configuration.VCConfiguration configuration) -
notifyVCAppointmentActivation
protected void notifyVCAppointmentActivation(HashGetter vcAppointment, InterventionApi api, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
buildRequestDTO
protected DTOVCAppointmentActivationRequest buildRequestDTO(HashGetter vcAppointment, List<DTOMessage> messages) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
getCeeInterventionId
- Throws:
NumberFormatException
-