public IDomainRepositoryQueryContext <PageRenderDetails> AsRenderDetails(int pageVersionId)
        {
            var query = new GetPageRenderDetailsByIdQuery(_pageId, PublishStatusQuery.SpecificVersion);

            query.PageVersionId = pageVersionId;

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #2
0
        public IDomainRepositoryQueryContext <CustomEntityRenderSummary> AsRenderSummary(int customEntityVersionId)
        {
            var query = new GetCustomEntityRenderSummaryByIdQuery(_customEntityId, PublishStatusQuery.SpecificVersion);

            query.CustomEntityVersionId = customEntityVersionId;

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #3
0
        public IDomainRepositoryQueryContext <CustomEntityRenderSummary> AsRenderSummary()
        {
            var query = new GetCustomEntityRenderSummaryByIdQuery();

            query.CustomEntityId = _customEntityId;

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #4
0
        public IDomainRepositoryQueryContext <RewriteRuleSummary> AsSummary()
        {
            var query = new GetRewriteRuleSummaryByPathQuery()
            {
                Path = _path
            };

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
        public IDomainRepositoryQueryContext <CustomEntityDefinitionMicroSummary> AsMicroSummary()
        {
            var query = new GetCustomEntityDefinitionMicroSummaryByDisplayModelTypeQuery()
            {
                DisplayModelType = _displayModelType
            };

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #6
0
        public IDomainRepositoryQueryContext <ICollection <CustomEntityRenderSummary> > AsRenderSummaries()
        {
            var query = new GetCustomEntityRenderSummariesByUrlSlugQuery()
            {
                CustomEntityDefinitionCode = _customEntityDefinition.CustomEntityDefinitionCode,
                UrlSlug = _urlSlug
            };

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
        public IDomainRepositoryQueryContext <UserMicroSummary> AsMicroSummary()
        {
            var query = new GetUserMicroSummaryByEmailQuery()
            {
                UserAreaCode = _userAreaCode,
                Email        = _emailAddress
            };

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #8
0
        public IDomainRepositoryQueryContext <UserMicroSummary> AsMicroSummary()
        {
            var query = new GetUserMicroSummaryByUsernameQuery()
            {
                UserAreaCode = _userAreaCode,
                Username     = _username
            };

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
        public IDomainRepositoryQueryContext <ICollection <CustomEntityRenderSummary> > AsRenderSummary(PublishStatusQuery?publishStatusQuery = null)
        {
            var query = new GetCustomEntityRenderSummariesByDefinitionCodeQuery(_customEntityDefinitionCode);

            if (publishStatusQuery.HasValue)
            {
                query.PublishStatus = publishStatusQuery.Value;
            }

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #10
0
        public IDomainRepositoryQueryContext <IDictionary <int, CustomEntityRenderSummary> > AsRenderSummaries(PublishStatusQuery?publishStatus = null)
        {
            var query = new GetCustomEntityRenderSummariesByIdRangeQuery(_customEntityIds);

            if (publishStatus.HasValue)
            {
                query.PublishStatus = publishStatus.Value;
            }

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #11
0
        public IDomainRepositoryQueryContext <CustomEntityRenderDetails> AsRenderDetails(int pageId, int customEntityVersionId)
        {
            var query = new GetCustomEntityRenderDetailsByIdQuery()
            {
                CustomEntityId        = _customEntityId,
                PageId                = pageId,
                PublishStatus         = PublishStatusQuery.SpecificVersion,
                CustomEntityVersionId = customEntityVersionId
            };

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #12
0
        public IDomainRepositoryQueryContext <CustomEntityRenderDetails> AsRenderDetails(int pageId, PublishStatusQuery?publishStatus = null)
        {
            var query = new GetCustomEntityRenderDetailsByIdQuery()
            {
                CustomEntityId = _customEntityId,
                PageId         = pageId
            };

            if (publishStatus.HasValue)
            {
                query.PublishStatus = publishStatus.Value;
            }

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #13
0
        private IDomainRepositoryQueryMutator <ICollection <CustomEntityRenderSummary>, CustomEntityRenderSummary> AsRenderSummaryInternal(PublishStatusQuery?publishStatusQuery)
        {
            if (!_customEntityDefinition.ForceUrlSlugUniqueness)
            {
                throw new InvalidOperationException($"{nameof(AsRenderSummary)} cannot be used if the custom entity definition has {nameof(_customEntityDefinition.ForceUrlSlugUniqueness)} set to false.");
            }

            var query = new GetCustomEntityRenderSummariesByUrlSlugQuery()
            {
                CustomEntityDefinitionCode = _customEntityDefinition.CustomEntityDefinitionCode,
                UrlSlug = _urlSlug
            };

            if (publishStatusQuery.HasValue)
            {
                query.PublishStatus = publishStatusQuery.Value;
            }

            var mapped = DomainRepositoryQueryContextFactory
                         .Create(query, ExtendableContentRepository)
                         .Map(r => r.SingleOrDefault());

            return(mapped);
        }
Example #14
0
        public IDomainRepositoryQueryContext <ICollection <PageRoute> > AsRoutes()
        {
            var query = new GetPageRoutesByCustomEntityDefinitionCodeQuery(_customEntityDefinitionCode);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
 public IDomainRepositoryQueryContext <bool> IsPathUnique(IsPagePathUniqueQuery query)
 {
     return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
 }
Example #16
0
        public IDomainRepositoryQueryContext <bool> HasDraft(int pageId)
        {
            var query = new DoesPageHaveDraftVersionQuery(pageId);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #17
0
 public IDomainRepositoryQueryContext <bool> IsUrlSlugUnique(IsCustomEntityUrlSlugUniqueQuery query)
 {
     return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
 }
Example #18
0
        public IDomainRepositoryQueryContext <DocumentAssetRenderDetails> AsRenderDetails()
        {
            var query = new GetDocumentAssetRenderDetailsByIdQuery(_documentAssetId);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #19
0
        public IDomainRepositoryQueryContext <ICollection <CustomEntityDefinitionSummary> > AsSummaries()
        {
            var query = new GetAllCustomEntityDefinitionSummariesQuery();

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
        public IDomainRepositoryQueryContext <CustomEntityVersionPageBlockRenderDetails> AsRenderDetails(PublishStatusQuery?publishStatusQuery = null)
        {
            var query = new GetCustomEntityVersionPageBlockRenderDetailsByIdQuery(_customEntityBlockId, publishStatusQuery);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #21
0
        public IDomainRepositoryQueryContext <ICustomEntityRoutingRule> AsRoutingRule()
        {
            var query = new GetCustomEntityRoutingRuleByRouteFormatQuery(_routeFormat);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
        public IDomainRepositoryQueryContext <IDictionary <string, CustomEntityDataModelSchema> > AsDetails()
        {
            var query = new GetCustomEntityDataModelSchemaDetailsByDefinitionCodeRangeQuery(_customEntityDefinitionCodes);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #23
0
 public IDomainRepositoryQueryContext <PagedQueryResult <PageVersionSummary> > AsVersionSummaries(GetPageVersionSummariesByPageIdQuery query)
 {
     return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
 }
Example #24
0
        public IDomainRepositoryQueryContext <PageBlockTypeDetails> AsDetails()
        {
            var query = new GetPageBlockTypeDetailsByIdQuery(_pageBlockTypeId);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
        public IDomainRepositoryQueryContext <CustomEntityDefinitionSummary> AsSummary()
        {
            var query = new GetCustomEntityDefinitionSummaryByCodeQuery(_customEntityDefinitionCode);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
 public IDomainRepositoryQueryContext <PagedQueryResult <DocumentAssetSummary> > AsSummaries(SearchDocumentAssetSummariesQuery query)
 {
     return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
 }
Example #27
0
        public IDomainRepositoryQueryContext <IDictionary <int, CustomEntitySummary> > AsSummaries()
        {
            var query = new GetCustomEntitySummariesByIdRangeQuery(_customEntityIds);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #28
0
        public IDomainRepositoryQueryContext <ICollection <IPermission> > AsIPermission()
        {
            var query = new GetAllPermissionsQuery();

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #29
0
        public IDomainRepositoryQueryContext <PageDirectoryRoute> AsRoute()
        {
            var query = new GetPageDirectoryRouteByIdQuery(_pageDirectoryId);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Example #30
0
 public IDomainRepositoryQueryContext <UserCredentialsAuthenticationResult> AuthenticateCredentials(AuthenticateUserCredentialsQuery query)
 {
     return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
 }