public getAllVersionsResponse(cmisObjectType[] objects) { this.objects = objects; }
public static cmisObjectType TocmisObjectType(TextContent textContent, IEnumerable<Category> categories) { cmisObjectType cmisObject = new cmisObjectType(); cmisObject.properties = ToCmisPropertiesType(textContent, categories); return cmisObject; }
public getAppliedPoliciesResponse(cmisObjectType[] objects) { this.objects = objects; }
public getObjectOfLatestVersionResponse(cmisObjectType @object) { this.@object = @object; }
public getObjectByPathResponse(cmisObjectType @object) { this.@object = @object; }
public getFolderParentResponse(cmisObjectType @object) { this.@object = @object; }
private static cmisObjectType ToCmisObject(Kooboo.CMS.Content.Models.TextFolder textFolder) { var hasSchema = !string.IsNullOrEmpty(textFolder.SchemaName); var cmisObject = new cmisObjectType(); cmisObject.allowableActions = new cmisAllowableActionsType() { canAddObjectToFolder = hasSchema, canApplyACL = false, canApplyPolicy = false, canCancelCheckOut = false, canCheckIn = false, canCheckOut = false, canCreateDocument = hasSchema, canCreateFolder = true, canCreateRelationship = hasSchema, canDeleteContentStream = true, canDeleteObject = hasSchema, canDeleteTree = false, canGetACL = false, canGetAllVersions = false, canGetAppliedPolicies = false, canGetChildren = true, canGetContentStream = false, canGetDescendants = false, canGetFolderParent = true, canGetFolderTree = true, canGetObjectParents = false, canGetObjectRelationships = false, canGetProperties = false, canGetRenditions = false, canMoveObject = false, canRemoveObjectFromFolder = false, canRemovePolicy = false, canSetContentStream = false, canUpdateProperties = false }; cmisObject.changeEventInfo = null; cmisObject.exactACL = false; cmisObject.policyIds = null; cmisObject.rendition = null; cmisObject.properties = new cmisPropertiesType(); var properties = new List<cmisProperty>(); properties.Add(new cmisPropertyId() { displayName = "Id", localName = "Id", propertyDefinitionId = CmisPropertyDefinitionId.ObjectId, queryName = "Id", value = new string[] { textFolder.FriendlyName } }); properties.Add(new cmisPropertyString() { displayName = "Name", localName = "Name", propertyDefinitionId = CmisPropertyDefinitionId.Name, queryName = "Name", value = new string[] { textFolder.FriendlyName } }); properties.Add(new cmisPropertyString() { displayName = "DisplayName", localName = "DisplayName", queryName = "DisplayName", value = new string[] { textFolder.DisplayName } }); properties.Add(new cmisPropertyDateTime() { displayName = "UtcCreationDate", localName = "UtcCreationDate", propertyDefinitionId = CmisPropertyDefinitionId.CreationDate, queryName = "UtcCreationDate", value = new DateTime[] { textFolder.UtcCreationDate } }); properties.Add(new cmisPropertyString() { displayName = "UserId", localName = "UserId", propertyDefinitionId = CmisPropertyDefinitionId.CreatedBy, queryName = "UserId", value = new string[] { textFolder.UserId } }); properties.Add(new cmisPropertyBoolean() { displayName = "EnablePaging", localName = "EnablePaging", queryName = "EnablePaging", value = new bool[] { textFolder.EnablePaging == null ? true : textFolder.EnablePaging.Value } }); properties.Add(new cmisPropertyBoolean() { displayName = "Sortable", localName = "Sortable", queryName = "Sortable", value = new bool[] { textFolder.Sortable == null ? true : textFolder.Sortable.Value } }); properties.Add(new cmisPropertyString() { displayName = "SchemaName", localName = "SchemaName", queryName = "SchemaName", value = new string[] { textFolder.SchemaName } }); properties.Add(new cmisPropertyBoolean() { displayName = "Hidden", localName = "Hidden", queryName = "Hidden", value = new bool[] { textFolder.Hidden == null ? false : textFolder.Hidden.Value } }); properties.Add(new cmisPropertyInteger() { displayName = "PageSize", localName = "PageSize", queryName = "PageSize", value = new string[] { textFolder.PageSize.ToString() } }); cmisObject.properties.Items = properties.ToArray(); return cmisObject; }
public getFolderParentResponse GetFolderParent(getFolderParentRequest request) { var textFolder = ModelHelper.GetTextFolder(request.repositoryId, request.folderId); if (textFolder.Parent != null) { return new getFolderParentResponse(ToCmisObject(((Kooboo.CMS.Content.Models.TextFolder)textFolder.Parent).AsActual())); } else { var cmisObject = new cmisObjectType(); cmisObject.properties = new cmisPropertiesType(); cmisObject.properties.Items = new cmisProperty[]{ new cmisPropertyId() { displayName = "Id", localName = "Id", propertyDefinitionId = CmisPropertyDefinitionId.ObjectId, queryName = "Id", value = new string[] { "/" } } }; return new getFolderParentResponse(cmisObject); } }
public static cmisObjectType TocmisObjectType(TextContent textContent) { cmisObjectType cmisObject = new cmisObjectType(); cmisObject.properties = ToCmisPropertiesType(textContent); return cmisObject; }