//#region .ctor //TextContentManager _textContentManager; //public ObjectService(TextContentManager textContentManager) //{ // _textContentManager = textContentManager; //} //#endregion #region CreateDocument public createDocumentResponse CreateDocument(createDocumentRequest request) { var site = ModelHelper.GetSite(request.repositoryId); var textFolder = ModelHelper.GetTextFolder(request.repositoryId, request.folderId); var nameValueCollection = request.properties.ToNameValueCollection(); var inegrateId = _incomeDataManager.AddTextContent(site, textFolder, nameValueCollection, null, null, "", ContextHelper.GetVendor()); return(new createDocumentResponse(inegrateId, null)); }
public string AddTextContent(string repositoryId, string folderId, TextContent textContent, IEnumerable <Category> categories) { var cmisProperties = Kooboo.CMS.Modules.CMIS.Services.Implementation.ModelHelper.ToCmisPropertiesType(textContent, categories); var service = GetService(); var createDocumentRequest = new createDocumentRequest(repositoryId, cmisProperties, folderId, null, null, null, null, null, GetcmisExtensionType()); return(service.CreateDocument(createDocumentRequest).objectId); }
//#region .ctor //TextContentManager _textContentManager; //public ObjectService(TextContentManager textContentManager) //{ // _textContentManager = textContentManager; //} //#endregion #region CreateDocument public createDocumentResponse CreateDocument(createDocumentRequest request) { try { var site = ModelHelper.GetSite(request.repositoryId); var textFolder = ModelHelper.GetTextFolder(request.repositoryId, request.folderId); var nameValueCollection = request.properties.ToNameValueCollection(); var inegrateId = _incomeDataManager.AddTextContent(site, textFolder, nameValueCollection, "", ContextHelper.GetVendor()); return(new createDocumentResponse(inegrateId, null)); } catch (Exception e) { throw new FaultException(string.Format(@" Exception message:{0} Stack trace:{1}", e.Message, e.StackTrace)); } }