Esempio n. 1
0
        public void Handle(CommunicationHousekeepingRequest request)
        {
            if (request.CommunicationType == CommunicationTypes.ExpiringDraftApplicationAlert)
            {
                var housekeepingDateTime = GetHousekeepingDateTime();
                var expiringApprenticeshipApplicationDraft = _expiringApprenticeshipApplicationDraftRepository.Get(request.CommunicationId);

                if (expiringApprenticeshipApplicationDraft != null && expiringApprenticeshipApplicationDraft.DateCreated <= housekeepingDateTime)
                {
                    _expiringApprenticeshipApplicationDraftRepository.Delete(expiringApprenticeshipApplicationDraft);
                }
            }
            else if (Successor != null)
            {
                Successor.Handle(request);
            }
        }
        public void Handle(CommunicationHousekeepingRequest request)
        {
            if (request.CommunicationType == CommunicationTypes.ApplicationStatusAlert)
            {
                var housekeepingDateTime   = GetHousekeepingDateTime();
                var applicationStatusAlert = _applicationStatusAlertRepository.Get(request.CommunicationId);

                if (applicationStatusAlert != null && applicationStatusAlert.DateCreated <= housekeepingDateTime)
                {
                    _applicationStatusAlertRepository.Delete(applicationStatusAlert);
                }
            }
            else if (Successor != null)
            {
                Successor.Handle(request);
            }
        }
Esempio n. 3
0
        public void Handle(CommunicationHousekeepingRequest request)
        {
            if (request.CommunicationType == CommunicationTypes.SavedSearchAlert)
            {
                var housekeepingDateTime = GetHousekeepingDateTime();
                var savedSearchAlert     = _savedSearchAlertRepository.Get(request.CommunicationId);

                if (savedSearchAlert != null && savedSearchAlert.DateCreated <= housekeepingDateTime)
                {
                    _savedSearchAlertRepository.Delete(savedSearchAlert);
                }
            }
            else if (Successor != null)
            {
                Successor.Handle(request);
            }
        }
Esempio n. 4
0
 protected bool Equals(CommunicationHousekeepingRequest other)
 {
     return(CommunicationId.Equals(other.CommunicationId));
 }
 public void Handle(CommunicationHousekeepingRequest request)
 {
     _applicationStatusAlertCommunicationHousekeeper.Handle(request);
 }