public string AddPage(Site site, Page page, string vendor) { IncomingQueue incomeQueue = new IncomingQueue() { Message = null, Object = page, ObjectUUID = page.FullName, ObjectTitle = page.FullName, Vendor = vendor, PublishingObject = PublishingObject.Page, Action = PublishingAction.Publish, SiteName = site.FullName, Status = QueueStatus.Pending, UtcCreationDate = DateTime.UtcNow, UtcProcessedTime = null, UUID = Kooboo.UniqueIdGenerator.GetInstance().GetBase32UniqueId(10) }; _incomeQueueProvider.Add(incomeQueue); return page.FullName; }
public string AddTextContent(Site site, TextFolder textFolder, System.Collections.Specialized.NameValueCollection values, [System.Runtime.InteropServices.OptionalAttribute][System.Runtime.InteropServices.DefaultParameterValueAttribute("")]string userid, string vendor) { var schema = textFolder.GetSchema(); var textContent = new TextContent(); foreach (string key in values) { textContent[key] = values[key]; } textContent.Repository = textFolder.Repository.Name; textContent.SchemaName = textFolder.SchemaName; textContent.FolderName = textFolder.FullName; if (!string.IsNullOrEmpty(values["UUID"])) { textContent.UUID = values["UUID"]; } textContent = _textContentBinder.Bind(schema, textContent, values, true, false); IncomingQueue incomeQueue = new IncomingQueue() { Message = null, Object = new Dictionary<string, object>(textContent), ObjectUUID = textContent.IntegrateId, ObjectTitle = textContent.GetSummary(), Vendor = vendor, PublishingObject = PublishingObject.TextContent, Action = PublishingAction.Publish, SiteName = site.FullName, Status = QueueStatus.Pending, UtcCreationDate = DateTime.UtcNow, UtcProcessedTime = null, UUID = Kooboo.UniqueIdGenerator.GetInstance().GetBase32UniqueId(10) }; _incomeQueueProvider.Add(incomeQueue); return textContent.IntegrateId; }
public void DeleteTextContent(Site site, TextFolder textFolder, string uuid, string vendor) { var integrateId = new ContentIntegrateId(uuid); var content = textFolder.CreateQuery().WhereEquals("UUID", integrateId.ContentUUID).FirstOrDefault(); if (content != null) { IncomingQueue incomeQueue = new IncomingQueue() { Message = null, Object = null, ObjectUUID = uuid, ObjectTitle = content.GetSummary(), Vendor = vendor, PublishingObject = PublishingObject.TextContent, Action = PublishingAction.Unbpulish, SiteName = site.FullName, Status = QueueStatus.Pending, UtcCreationDate = DateTime.UtcNow, UtcProcessedTime = null, UUID = Kooboo.UniqueIdGenerator.GetInstance().GetBase32UniqueId(10) }; _incomeQueueProvider.Add(incomeQueue); } }
public string UpdateTextContent(Site site, TextFolder textFolder, string uuid, System.Collections.Specialized.NameValueCollection values, [System.Runtime.InteropServices.OptionalAttribute][System.Runtime.InteropServices.DefaultParameterValueAttribute("")]string userid, string vendor) { var schema = textFolder.GetSchema(); var textContent = new TextContent(textFolder.Repository.Name, textFolder.SchemaName, textFolder.FullName); textContent = _textContentBinder.Bind(schema, textContent, values); IncomingQueue incomeQueue = new IncomingQueue(site, Kooboo.UniqueIdGenerator.GetInstance().GetBase32UniqueId(10)) { Message = null, Object = new Dictionary<string, object>(textContent), ObjectUUID = textContent.IntegrateId, ObjectTitle = textContent.GetSummary(), Vendor = vendor, PublishingObject = PublishingObject.TextContent, Action = PublishingAction.Publish, Status = QueueStatus.Pending, UtcCreationDate = DateTime.UtcNow, UtcProcessedTime = null }; _incomeQueueProvider.Add(incomeQueue); return textContent.IntegrateId; }
public void DeletePage(Site site, string pageId, string vendor) { IncomingQueue incomeQueue = new IncomingQueue(site, Kooboo.UniqueIdGenerator.GetInstance().GetBase32UniqueId(10)) { Message = null, Object = null, ObjectUUID = pageId, ObjectTitle = pageId, Vendor = vendor, PublishingObject = PublishingObject.Page, Action = PublishingAction.Unbpulish, Status = QueueStatus.Pending, UtcCreationDate = DateTime.UtcNow, UtcProcessedTime = null }; _incomeQueueProvider.Add(incomeQueue); }