Example #1
0
        public IList <TriggerDetails> Get(string jobName, string jobGroup)
        {
            Logger.DebugFormat("Entered TriggersController.Get(). jobName = {0}, jobName = {1}", jobName, jobGroup);

            IEnumerable <ITrigger> quartzTriggers = _schedulerCore.GetTriggersOfJob(jobName, jobGroup);

            return(TriggerHelper.GetTriggerDetails(quartzTriggers));
        }
Example #2
0
        public IList <TriggerDetails> Get(Guid jobId)
        {
            Logger.DebugFormat("Entered TriggersController.Get(). jobId = {0}", jobId);

            IDictionary <ITrigger, Guid> quartzTriggers = _schedulerCore.GetTriggersOfJob(jobId);

            return(TriggerHelper.GetTriggerDetails(quartzTriggers));
        }
Example #3
0
        public IList <TriggerDetails> GetFiredTriggers()
        {
            Logger.Info("Entered AnalyticsController.GetFiredTriggers().");

            IEnumerable <ITrigger> quartzFiredTriggers = _analytics.GetFiredTriggers();

            return(TriggerHelper.GetTriggerDetails(quartzFiredTriggers));
        }
        public IList <TriggerDetails> Get(Guid jobId)
        {
            Logger.DebugFormat("Entered TriggersController.Get(). jobId = {0}", jobId);

            var        authorizedJobGroups = _permissionsHelper.GetAuthorizedJobGroups().ToList();
            IJobDetail jobDetail           = _schedulerCore.GetJobDetail(jobId);

            IDictionary <ITrigger, Guid> quartzTriggers = _schedulerCore.GetTriggersOfJob(jobId);

            if (jobDetail != null &&
                (authorizedJobGroups.Contains(jobDetail.Key.Group) || authorizedJobGroups.Contains("*")))
            {
                return(TriggerHelper.GetTriggerDetails(quartzTriggers));
            }
            if (jobDetail == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }
            throw new HttpResponseException(HttpStatusCode.Unauthorized);
        }