Ejemplo n.º 1
0
		public void SaveJob(TemplateNodeUpdateJob job)
		{
			ScheduleSettingsManager scheduleManager = new ScheduleSettingsManager(
				this._model.DefaultVaultProcessor.CurrentStorage
			);

			scheduleManager.SaveScheduleSettings(this.TemplateNodeId.GetValueOrDefault(), job);

			if (this.Connection.RootOfStaticTree.Search(this) == null)
			{
				this.Connection.ResetStaticTreeRoot();
			}
		}
Ejemplo n.º 2
0
		public List<TemplateNodeUpdateJob> GetRefreshJob(bool fromCache)
		{
			ScheduleSettingsManager scheduleManager = new ScheduleSettingsManager(
				this._model.DefaultVaultProcessor.CurrentStorage
			);

			List<TemplateNodeUpdateJob> resultList = scheduleManager.LoadScheduleSettings(this, fromCache);

			if (resultList.IsNullOrEmpty() && !RefreshSchedules.IsNullOrEmpty())
			{
				foreach (RefreshSchedule sset in RefreshSchedules)
				{
					TemplateNodeUpdateJob result = new TemplateNodeUpdateJob();

					if (sset != null)
					{
						result.Settings = sset.Clone();

						AssignRefreshJob(result);

						resultList.Add(result);
					}
				}
			}

			return resultList;
		}