private void InitializeEventListenerProcesser(IJobExecutionContext context) { if (eventListenerProcessor == null) { eventListenerProcessor = (EventListenerProcessor)context.JobDetail.JobDataMap[JOB_DATA_EVENT_LISTENER_PROCESSER]; } if (eventListenerProcessor == null) { var attributeLoader = new ADAttributeLoader(); var adUtils = new ADUtils(attributeLoader); var eventEnricher = new EventEnricher(attributeLoader, adUtils); var eventMapper = new EventMapper(); var eventBuilder = new ADEventBuilder(); var orgUnitDao = new Organisation.SchedulingLayer.OrgUnitDao(); var userDao = new Organisation.SchedulingLayer.UserDao(); var filter = new Filter(adUtils); eventListenerProcessor = new EventListenerProcessor(eventEnricher, eventMapper, eventBuilder, orgUnitDao, userDao, filter, adUtils); context.JobDetail.JobDataMap.Put(JOB_DATA_EVENT_LISTENER_PROCESSER, eventListenerProcessor); } }
public EventEnricher(ADAttributeLoader attributeLoader, ADUtils adUtils) { this.attributeLoader = attributeLoader; this.adUtils = adUtils; }