コード例 #1
0
ファイル: GeneratedClasses.cs プロジェクト: Godoy/CMS
 public getChildrenResponse(cmisObjectInFolderListType objects)
 {
     this.objects = objects;
 }
コード例 #2
0
ファイル: NavigationService.cs プロジェクト: Godoy/CMS
        public getChildrenResponse GetChildren(getChildrenRequest request)
        {
            var resultList = new cmisObjectInFolderListType();

            var repository = ModelHelper.GetRepository(request.repositoryId);


            IEnumerable<Kooboo.CMS.Content.Models.TextFolder> childFolders = null;
            if (request.folderId == "/")
            {
                childFolders = _textFolderManager.All(repository, null);
            }
            else
            {
                var textFolder = ModelHelper.GetTextFolder(request.repositoryId, request.folderId);
                childFolders = _textFolderManager.ChildFolders(textFolder);
            }

            resultList.numItems = childFolders.Count().ToString();
            var skipCount = 0;
            if (!string.IsNullOrEmpty(request.skipCount))
            {
                skipCount = request.skipCount.As<int>();
            }
            childFolders = childFolders.Skip(skipCount);
            if (string.IsNullOrEmpty(request.maxItems))
            {
                var maxItems = request.maxItems.As<int>();
                childFolders = childFolders.Take(maxItems);
            }
            resultList.objects = childFolders.Select(it => ToPathedCmisObject(it)/*ToPathedCmisObject(it)*/).ToArray();
            return new getChildrenResponse(resultList);
        }