private IsPagePathUniqueQuery GetUniquenessQuery(UpdatePageUrlCommand command, Page page)
        {
            var query = new IsPagePathUniqueQuery();

            query.PageId   = page.PageId;
            query.LocaleId = command.LocaleId;

            query.UrlPath         = GetUrlPath(command, page);
            query.PageDirectoryId = command.PageDirectoryId;

            return(query);
        }
Esempio n. 2
0
        private IsPagePathUniqueQuery CreateUniquenessQuery(AddPageCommand command)
        {
            var query = new IsPagePathUniqueQuery();

            query.LocaleId        = command.LocaleId;
            query.PageDirectoryId = command.PageDirectoryId;

            if (command.PageType == PageType.CustomEntityDetails)
            {
                query.UrlPath = command.CustomEntityRoutingRule;
            }
            else
            {
                query.UrlPath = command.UrlPath;
            }

            return(query);
        }
 public IDomainRepositoryQueryContext <bool> IsPathUnique(IsPagePathUniqueQuery query)
 {
     return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
 }