Class BTProfileLoadByUserEvent
java.lang.Object
overit.geocall.bl.BusinessTask<ProfileLoadByUserEvent>
overit.geocallapp.wfm.core.bl.timesheet.configuration.profile.task.BTProfileLoadByUserEvent
- All Implemented Interfaces:
Serializable,Tool
@Event(ProfileLoadByUserEvent.class)
public class BTProfileLoadByUserEvent
extends BusinessTask<ProfileLoadByUserEvent>
Business task in order to load the
When the
BOProfile associated to the
BOSchedulingUser id. When the
ProfileLoadByUserEvent is launched the BT notices the call
and loads the BOProfile basing on the event's input, i.e. the id of a
BOSchedulingUser. Required fields:
- user id
Error Code:
Codes.Timesheet.Validation.INACTIVE_TIMESHEET: Inactive timesheet management
- Since:
- 9.2
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(ProfileLoadByUserEvent event, PoolKit poolKit) Writes the loaded time sheet profile into the event journal.protected voidprotected BOProfilegetDefaultProfile(PoolKit poolKit) Returns the defaultBOProfile.protected LonggetOperationCenterProfile(Long operationCenterId, PoolKit poolKit) Returns the profile id associated to the given operation center.protected LonggetUserProfile(ProfileLoadByUserEvent event, PoolKit poolKit) Returns either the profile associated directly to the user or (whether that was null) the profile associated to the user's operation center.protected BOSchedulingUserLoads theBOSchedulingUserassociated to the given id.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTProfileLoadByUserEvent
public BTProfileLoadByUserEvent()
-
-
Method Details
-
body
protected void body(ProfileLoadByUserEvent event, PoolKit poolKit) throws DAException, DAValidateException Writes the loaded time sheet profile into the event journal.- Specified by:
bodyin classBusinessTask<ProfileLoadByUserEvent>- Parameters:
event- theProfileLoadByUserEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
checkTimesheetActivation
- Throws:
DAValidateException
-
getUserProfile
protected Long getUserProfile(ProfileLoadByUserEvent event, PoolKit poolKit) throws DAValidateException, DAException Returns either the profile associated directly to the user or (whether that was null) the profile associated to the user's operation center.- Parameters:
event- the eventpoolKit- the pool kit- Returns:
- the user
BOProfile - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadUser
protected BOSchedulingUser loadUser(Long userId, PoolKit poolKit) throws DAValidateException, DAException Loads theBOSchedulingUserassociated to the given id.- Parameters:
userId- the scheduling user idpoolKit- the pool kit- Returns:
- the
BOSchedulingUser - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getOperationCenterProfile
protected Long getOperationCenterProfile(Long operationCenterId, PoolKit poolKit) throws DAValidateException, DAException Returns the profile id associated to the given operation center.- Parameters:
operationCenterId- the operation center idpoolKit- the pool kit- Returns:
- the operation center profile id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getDefaultProfile
Returns the defaultBOProfile.- Parameters:
poolKit- the pool kit- Returns:
- the
BOProfilethat was set as the default one - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-