public static cmisPropertiesType ToCmisPropertiesType(TextContent textContent, IEnumerable<Category> categories) { var properties = new cmisPropertiesType(); var items = new List<cmisProperty>(); items.Add(new cmisPropertyId() { localName = CmisPropertyDefinitionId.BaseTypeId, propertyDefinitionId = CmisPropertyDefinitionId.BaseTypeId, value = new string[] { "cmis:document" } }); items.Add(new cmisPropertyId() { localName = "UserId", propertyDefinitionId = CmisPropertyDefinitionId.CreatedBy, value = new string[] { textContent.UserId } }); items.Add(new cmisPropertyDateTime() { localName = "UtcCreationDate", propertyDefinitionId = CmisPropertyDefinitionId.CreationDate, value = new[] { textContent.UtcCreationDate } }); items.Add(new cmisPropertyDateTime() { localName = "UtcLastModificationDate", propertyDefinitionId = CmisPropertyDefinitionId.LastModificationDate, value = new[] { textContent.UtcLastModificationDate } }); items.Add(new cmisPropertyString() { localName = "UserKey", propertyDefinitionId = CmisPropertyDefinitionId.Name, value = new[] { textContent.UserKey } }); items.Add(new cmisPropertyId() { localName = "IntegrateId", propertyDefinitionId = CmisPropertyDefinitionId.ObjectId, value = new[] { textContent.IntegrateId } }); items.Add(new cmisPropertyId() { localName = "SchemaName", propertyDefinitionId = CmisPropertyDefinitionId.ObjectTypeId, value = new[] { textContent.SchemaName } }); items.Add(new cmisPropertyString() { localName = "ParentUUID", propertyDefinitionId = CmisPropertyDefinitionId.ParentId, value = new[] { textContent.ParentUUID } }); var categoriesString = ToCategoriesString(categories); items.Add(new cmisPropertyString() { localName = "___Categories___", propertyDefinitionId = CmisPropertyDefinitionId.ParentId, value = new[] { categoriesString } }); var mediaValues = new List<string>(); var mediaPathField = Kooboo.CMS.Common.Runtime.EngineContext.Current.Resolve<IMediaPathField>(); foreach (var item in textContent) { if (!item.Key.StartsWith("__")) { items.Add(ToCmisProperty(item)); if (item.Value is string && mediaPathField.IsMediaPathField(item.Value.ToString())) { mediaValues.Add(item.Value.ToString()); } } } if (mediaValues.Count > 0) { var mediaBinaryString = mediaPathField.ToBinaryString(mediaValues.ToArray()); items.Add(new cmisPropertyString() { localName = "_____MediaBinaryString_____", propertyDefinitionId = "_____MediaBinaryString_____", value = new[] { mediaBinaryString } }); } properties.Items = items.ToArray(); return properties; }
public checkInRequest(string repositoryId, string objectId, System.Nullable<bool> major, cmisPropertiesType properties, cmisContentStreamType contentStream, string checkinComment, string[] policies, cmisAccessControlListType addACEs, cmisAccessControlListType removeACEs, cmisExtensionType extension) { this.repositoryId = repositoryId; this.objectId = objectId; this.major = major; this.properties = properties; this.contentStream = contentStream; this.checkinComment = checkinComment; this.policies = policies; this.addACEs = addACEs; this.removeACEs = removeACEs; this.extension = extension; }
public getPropertiesOfLatestVersionResponse(cmisPropertiesType properties) { this.properties = properties; }
public updatePropertiesRequest(string repositoryId, string objectId, string changeToken, cmisPropertiesType properties, cmisExtensionType extension) { this.repositoryId = repositoryId; this.objectId = objectId; this.changeToken = changeToken; this.properties = properties; this.extension = extension; }
public getPropertiesResponse(cmisPropertiesType properties) { this.properties = properties; }
public createPolicyRequest(string repositoryId, cmisPropertiesType properties, string folderId, string[] policies, cmisAccessControlListType addACEs, cmisAccessControlListType removeACEs, cmisExtensionType extension) { this.repositoryId = repositoryId; this.properties = properties; this.folderId = folderId; this.policies = policies; this.addACEs = addACEs; this.removeACEs = removeACEs; this.extension = extension; }
public createDocumentFromSourceRequest(string repositoryId, string sourceId, cmisPropertiesType properties, string folderId, System.Nullable<enumVersioningState> versioningState, string[] policies, cmisAccessControlListType addACEs, cmisAccessControlListType removeACEs, cmisExtensionType extension) { this.repositoryId = repositoryId; this.sourceId = sourceId; this.properties = properties; this.folderId = folderId; this.versioningState = versioningState; this.policies = policies; this.addACEs = addACEs; this.removeACEs = removeACEs; this.extension = extension; }
public static cmisPropertiesType ToCmisPropertiesType(TextContent textContent) { var properties = new cmisPropertiesType(); var items = new List<cmisProperty>(); items.Add(new cmisPropertyId() { localName = CmisPropertyDefinitionId.BaseTypeId, propertyDefinitionId = CmisPropertyDefinitionId.BaseTypeId, value = new string[] { "cmis:document" } }); items.Add(new cmisPropertyId() { localName = "UserId", propertyDefinitionId = CmisPropertyDefinitionId.CreatedBy, value = new string[] { textContent.UserId } }); items.Add(new cmisPropertyDateTime() { localName = "UtcCreationDate", propertyDefinitionId = CmisPropertyDefinitionId.CreationDate, value = new[] { textContent.UtcCreationDate } }); items.Add(new cmisPropertyDateTime() { localName = "UtcLastModificationDate", propertyDefinitionId = CmisPropertyDefinitionId.LastModificationDate, value = new[] { textContent.UtcLastModificationDate } }); items.Add(new cmisPropertyString() { localName = "UserKey", propertyDefinitionId = CmisPropertyDefinitionId.Name, value = new[] { textContent.UserKey } }); items.Add(new cmisPropertyId() { localName = "IntegrateId", propertyDefinitionId = CmisPropertyDefinitionId.ObjectId, value = new[] { textContent.IntegrateId } }); items.Add(new cmisPropertyId() { localName = "SchemaName", propertyDefinitionId = CmisPropertyDefinitionId.ObjectTypeId, value = new[] { textContent.SchemaName } }); items.Add(new cmisPropertyString() { localName = "ParentUUID", propertyDefinitionId = CmisPropertyDefinitionId.ParentId, value = new[] { textContent.ParentUUID } }); foreach (var item in textContent) { if (!item.Key.StartsWith("__")) { items.Add(ToCmisProperty(item)); } } properties.Items = items.ToArray(); return properties; }