Esempio n. 1
0
        protected virtual Task BuildViews(List <IModule> activeModules, int pageIndex, int pageSize, FolderModel folder, PathIdentifier identifier, string userTimeZone)
        {
            var views = new List <IViewModel>();

            if ((identifier.LeafName == null || identifier.LeafName == string.Empty) && BuildDataView)
            {
                var schema = DataViewBuilder.BuildDataViewModel(state.Folder);
                if (schema != null)
                {
                    views.Add(schema);
                }
            }

            var gridTitle = identifier.PathKey;

            if (String.IsNullOrEmpty(gridTitle))
            {
                gridTitle = "Case Files";
            }

            foreach (var module in activeModules)
            {
                module.AlterGridTitle(gridTitle, identifier);
            }


            // In this case we're going to have files/folders.  so we build up the columns accordingly.
            views.Add(GridViewBuilder.BuildGridView(pageIndex, pageSize, filteredFiles, allRows, GridColumnSpecification.GetStandarSetOfColumns(), gridTitle));

            page.Views = views;

            return(Task.FromResult(0));
        }
        protected override Task BuildViews(List <IModule> activeModules, int pageIndex, int pageSize, FolderModel folder, PathIdentifier identifier, string userTimeZone)
        {
            // We need to take a list of manager path models, and convert them to a list of item query response object
            var managerPathModels = this.eDiscovery.BuildDatedPackagesDynamicFolder(folder);

            // Now we need to convert these manager path models into something that's a list of
            var dynamicPaths = new List <IItemQueryResponse>();

            dynamicPaths.AddRange(managerPathModels);

            this.page.Views = new List <IViewModel>();
            if (identifier.PathKey == EDiscoveryUtility.E_DISCOVERY_PATH_KEY)
            {
                this.page.Views.Add(GridViewBuilder.BuildGridView(pageIndex, pageSize, dynamicPaths, new List <AllowedOperation>(), new List <GridColumnSpecification>()
                {
                    GridColumnSpecification.GetNameColumn(), GridColumnSpecification.GetCustomNameColumn()
                }, GridViewModel.GRID_TITLES_EDISOVERY_PACKAGES));
            }

            if (identifier.PathKey != null &&
                (identifier.PathKey.StartsWith(EDiscoveryUtility.E_DISCOVERY_DATED_PACKAGE_PATH_KEY) ||
                 identifier.PathKey.StartsWith(EDiscoveryUtility.E_DISCOVERY_ALL_PACKAGE_PATH_KEY)))
            {
                this.page.Views.Add(GridViewBuilder.BuildGridView(pageIndex, pageSize, filteredFiles, allRows, GridColumnSpecification.GetStandarSetOfColumns(), GridViewModel.GRID_TITLE_FILES));
            }

            return(Task.FromResult(0));
        }