Exemple #1
0
        public override MultistepActionSettings Setup(int dbId, int siteId, bool?boundToExternal)
        {
            var site = GetSite(siteId);

            if (site.IsDotNet)
            {
                Commands.Add(new CreateFoldersCommand(siteId, site.Name));
                Commands.Add(new AssembleNotificationsCommand(siteId, site.Name, true));

                var pagesCommand = new AssemblePagesCommand(siteId, site.Name, true, true);
                pagesCommand.Setup();
                Commands.Add(pagesCommand);

                var templatesCommand = new AssembleTemplatesCommand(siteId, site.Name);
                templatesCommand.Setup();
                Commands.Add(templatesCommand);
            }
            else
            {
                var pagesCommand = new AssemblePagesCommand(siteId, site.Name, true, false);
                pagesCommand.Setup();
                Commands.Add(pagesCommand);
            }

            return(base.Setup(dbId, siteId, boundToExternal));
        }
        public override MultistepActionSettings Setup(int parentId, int templateId, bool?boundToExternal)
        {
            var site = SiteRepository.GetById(parentId);

            if (site == null)
            {
                throw new ApplicationException(string.Format(SiteStrings.SiteNotFound, parentId));
            }

            var template = PageTemplateRepository.GetPageTemplatePropertiesById(templateId);

            if (site.IsDotNet)
            {
                templateCommand = new AssembleTemplateCommand(templateId, template.Name);
                pagesCommand    = new AssemblePagesCommand(templateId, template.Name, false, true);
                pagesCommand.Setup();

                notificationsCommand = new AssembleNotificationsCommand(templateId, template.Name, false);
            }
            else
            {
                pagesCommand = new AssemblePagesCommand(templateId, template.Name, false, false);
                pagesCommand.Setup();
            }

            return(base.Setup(parentId, templateId, boundToExternal));
        }
Exemple #3
0
 public override void TearDown()
 {
     AssembleTemplatesCommand.TearDown();
     AssemblePagesCommand.TearDown();
     base.TearDown();
 }