java.lang.Object
overit.geocall.bl.BusinessTask<SkillCacheLoadEvent>
overit.geocallapp.wfm.core.bl.schedule.cache.skill.task.BTSkillCacheLoad
All Implemented Interfaces:
Serializable, Tool

@Event(SkillCacheLoadEvent.class) public class BTSkillCacheLoad extends BusinessTask<SkillCacheLoadEvent>
Business task to load a SkillCacheLoadEvent object.
When the SkillCacheLoadEvent event is launched the BT notices the call and load the BTSkillCacheLoad object basing on the event's input.
Since:
18.0
See Also:
GCApi:
task
  • Constructor Details

    • BTSkillCacheLoad

      public BTSkillCacheLoad()
  • Method Details

    • body

      protected void body(SkillCacheLoadEvent skillCacheLoadEvent, 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<SkillCacheLoadEvent>
      Parameters:
      skillCacheLoadEvent - 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
    • getCrewShellDummyUsers

      protected Set<Long> getCrewShellDummyUsers(Collection<BOWorkShift> workshifts, PoolKit poolKit) throws DAException, DAValidateException
      Throws:
      DAException
      DAValidateException
    • buildSkillCacheByTeamShiftComposition

      protected SkillCache buildSkillCacheByTeamShiftComposition(SkillCacheLoadInput input, Set<Long> crewShellDummyUsers, PoolKit poolKit) throws DAException, DAValidateException
      Throws:
      DAException
      DAValidateException
    • getTeamComposition

      protected Map<String,Set<Long>> getTeamComposition(Collection<Long> users, Date startDate, Date endDate, PoolKit poolKit) throws DAException, DAValidateException
      Retrieves team composition data for the specified users within the given date range. Creates a mapping of user+day keys to sets of team member IDs.
      Parameters:
      users - the collection of user IDs to get team composition for
      startDate - the start date for the search period
      endDate - the end date for the search period
      poolKit - the pool kit for database operations
      Returns:
      a map where keys are "userId|date" strings and values are sets of team member IDs
      Throws:
      DAException - if a database access error occurs
      DAValidateException - if validation fails
    • getSkillsByUser

      protected Map<Long,DBView> getSkillsByUser(Collection<Long> resources, PoolKit poolKit) throws DAException
      Retrieves skills data for the specified user resources. Queries the database for user skills and organizes them by user ID.
      Parameters:
      resources - the collection of user resource IDs to get skills for
      poolKit - the pool kit for database operations
      Returns:
      a map where keys are user IDs and values are DBView objects containing skill data
      Throws:
      DAException - if a database access error occurs
    • buildTeamSkillsByWorkshift

      protected Map<Long,overit.geocallapp.wfm.scheduler.skills.TeamSkills> buildTeamSkillsByWorkshift(SkillCacheLoadInput input, Map<String,Set<Long>> teamCompositions, Map<Long,DBView> skillsByUser, Set<Long> crewShellDummyUsers)
      Builds team skills mapping for each workshift based on team compositions and user skills. Combines team composition data with individual user skills to create TeamSkills objects for each workshift.
      Parameters:
      input - the skill cache load input containing workshift information
      teamCompositions - the map of team compositions by user+date keys
      skillsByUser - the map of skills data by user ID
      crewShellDummyUsers - the set of crew shell dummy user IDs
      Returns:
      a map where keys are workshift IDs and values are TeamSkills objects