Пример #1
0
 public string UpdateTextContent(Site site, TextFolder textFolder, string integrateId, NameValueCollection values, string userid, string vendor)
 {
     var integrate = new ContentIntegrateId(integrateId);
     var files = values.GetFilesFromValues();
     var textContent = _textContentManager.Update(textFolder.Repository, textFolder, integrate.ContentUUID, values, files, DateTime.UtcNow, null, null, userid, true);
     return textContent.IntegrateId;
 }
Пример #2
0
        public deleteObjectResponse DeleteObject(deleteObjectRequest request)
        {
            var integrateId = new Kooboo.CMS.Content.Models.ContentIntegrateId(request.objectId);
            var site = ModelHelper.GetSite(request.repositoryId);
            var textFolder = ModelHelper.GetTextFolder(request.repositoryId, integrateId.FolderName);
            _incomeDataManager.DeleteTextContent(site, textFolder, integrateId.Id, ContextHelper.GetVendor());

            return new deleteObjectResponse();
        }
Пример #3
0
        public deleteObjectResponse DeleteObject(deleteObjectRequest request)
        {
            var integrateId = new Kooboo.CMS.Content.Models.ContentIntegrateId(request.objectId);
            var site        = ModelHelper.GetSite(request.repositoryId);
            var textFolder  = ModelHelper.GetTextFolder(request.repositoryId, integrateId.FolderName);

            _incomeDataManager.DeleteTextContent(site, textFolder, integrateId.Id, ContextHelper.GetVendor());

            return(new deleteObjectResponse());
        }
Пример #4
0
        public updatePropertiesResponse UpdateProperties(updatePropertiesRequest request)
        {
            var site        = ModelHelper.GetSite(request.repositoryId);
            var integrateId = new Kooboo.CMS.Content.Models.ContentIntegrateId(request.objectId);

            var textFolder          = ModelHelper.GetTextFolder(request.repositoryId, integrateId.FolderName);
            var nameValueCollection = request.properties.ToNameValueCollection();
            var integrateUUID       = _incomeDataManager.UpdateTextContent(site, textFolder, integrateId.Id, nameValueCollection, "", ContextHelper.GetVendor());

            return(new updatePropertiesResponse(integrateUUID, null, null));
        }
Пример #5
0
 public void DeleteTextContent(Site site, TextFolder textFolder, string integrateId, string vendor)
 {
     var integrate = new ContentIntegrateId(integrateId);
     _textContentManager.Delete(textFolder.Repository, textFolder, integrate.ContentUUID);
 }
Пример #6
0
 public string UpdateTextContent(Site site, TextFolder textFolder, string integrateId, NameValueCollection values, string userid, string vendor)
 {
     var integrate = new ContentIntegrateId(integrateId);
     var textContent = _textContentManager.Update(textFolder.Repository, textFolder, integrate.ContentUUID, values, "");
     return textContent.IntegrateId;
 }
Пример #7
0
        public getObjectResponse GetObject(getObjectRequest request)
        {
            var response = new getObjectResponse();
            var integrateId = new ContentIntegrateId(request.objectId);

            var repository = ModelHelper.GetRepository(request.repositoryId);
            var folder = ModelHelper.GetTextFolder(request.repositoryId, integrateId.FolderName);
            var uuid = integrateId.ContentUUID;

            var content = folder.CreateQuery().WhereEquals("UUID", uuid).FirstOrDefault();

            if (content != null)
            {
                var categories = _textContentProvider.QueryCategories(content);
                response.@object = ModelHelper.TocmisObjectType(content, categories);
            }
            return response;
        }
Пример #8
0
        public updatePropertiesResponse UpdateProperties(updatePropertiesRequest request)
        {
            var site = ModelHelper.GetSite(request.repositoryId);
            var integrateId = new Kooboo.CMS.Content.Models.ContentIntegrateId(request.objectId);

            var textFolder = ModelHelper.GetTextFolder(request.repositoryId, integrateId.FolderName);
            var nameValueCollection = request.properties.ToNameValueCollection();
            var integrateUUID = _incomeDataManager.UpdateTextContent(site, textFolder, integrateId.Id, nameValueCollection, "", ContextHelper.GetVendor());
            return new updatePropertiesResponse(integrateUUID, null, null);
        }
 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);
     }
 }