private List <FolderData> GetFolders(List <long> folderIds) { List <FolderData> folderList = new List <FolderData>(); if (folderIds.Any()) { FolderCriteria criteria = GetFolderCriteria(folderIds); folderList = FolderCRUD.GetList(criteria); if (criteria.PagingInfo.TotalPages > 1) { for (int i = 2; i <= criteria.PagingInfo.TotalPages; i++) { criteria.PagingInfo.CurrentPage = i; folderList.AddRange(FolderCRUD.GetList(criteria)); } } } return(folderList); }
public FolderData GetFolderData(string folderPath) { Log.InfoFormat("Getting folder with path '{0}'", folderPath); FolderManager fm = new FolderManager(); FolderCriteria folderCrit = new FolderCriteria(); folderCrit.AddFilter( FolderProperty.FolderPath, CriteriaFilterOperator.EqualTo, folderPath); FolderData folder = fm.GetList(folderCrit).FirstOrDefault(); return folder; }
public static Expression Create(FolderManager folderManager, params long[] folderIds) { Expression expression = null; // Get folders with a single call to Ektron: var folderCriteria = new FolderCriteria(); foreach (long folderId in folderIds) { folderCriteria.AddFilter(FolderProperty.Id, CriteriaFilterOperator.EqualTo, folderId); } var folderDataList = folderManager.GetList(folderCriteria); // Build folder expression for search criteria: foreach (var folderData in folderDataList) { var rightExpression = SearchContentProperty.FolderIdPath.Contains(folderData.FolderIdWithPath); expression = expression == null ? rightExpression : expression.Or(rightExpression); } return(expression); }
internal static FolderData GetFolderData(string folderPath) { FolderManager fm = new FolderManager(); FolderCriteria folderCrit = new FolderCriteria(); folderCrit.AddFilter( FolderProperty.FolderPath, CriteriaFilterOperator.EqualTo, folderPath); FolderData folder = fm.GetList(folderCrit).FirstOrDefault(); return folder; }