public UpdateAlteredPermissionsMigration(IRepository<ContentItem> repository, InstallationManager installer)
		{
			this.repository = repository;
			this.installer = installer;

			Title = "Update altered permissions information";
			Description = "In order to increase performance some information is now stored in the n2item table. Not running this migration on existing content will cause security protected content to become visible to anyone until it is re-saved.";
		}
        public UpdateTemplateKeyMigration(IRepository<ContentDetail> repository, InstallationManager installer)
        {
            this.repository = repository;
            this.installer = installer;

            Title = "Update template keys to v2.2 model";
            Description = "The information previously known as TemplateName detail is now stored as a TemplateKey property";
        }
		public InsertAncestralTrailMigration(IRepository<ContentItem> repository, InstallationManager installer)
		{
			this.repository = repository;
			this.installer = installer;

			Title = "Update ancestral trail information";
			Description = "This allows to query the database for all items in a hierarchy.";
		}
Beispiel #4
0
		public ConvertEnumsMigration(IRepository<ContentItem> repository, InstallationManager installer, IDefinitionManager definitions)
		{
			this.repository = repository;
			this.installer = installer;
			this.definitions = definitions;

			Title = "Convert enum detail types to new storage format";
			Description = "Enums values are stored as string (+ integer) in this version of N2. To support querying, previously stored enums must be converted.";
		}
        public UpdateTranslationKeyMigration(IRepository<int, ContentDetail> repository, IRepository<int, ContentItem> itemRepository, InstallationManager installer)
        {
            this.detailRepository = repository;
            this.itemRepository = itemRepository;
            this.installer = installer;

            Title = "Update translation keys to v2.2 model";
            Description = "The information previously known as LanguageKey detail is now stored as a TranslationKey property";
        }
 public InstallationChecker(IWebContext webContext, EventBroker broker, ConfigurationManagerWrapper configuration, InstallationManager installer)
 {
     if (configuration.Sections.Management.Installer.CheckInstallationStatus)
     {
         welcomeUrl = configuration.Sections.Management.Installer.WelcomeUrl;
         managementUrl = configuration.Sections.Management.ManagementInterfaceUrl;
         this.installer = installer;
         this.webContext = webContext;
         this.broker = broker;
         this.broker.BeginRequest += BeginRequest;
     }
 }
Beispiel #7
0
 public ErrorHandler(IWebContext context, ISecurityManager security, InstallationManager installer,
     EngineSection config, EditSection editConfig)
     : this(context, security, installer)
 {
     this.editConfig = editConfig;
     action = config.Errors.Action;
     mailTo = config.Errors.MailTo;
     mailFrom = config.Errors.MailFrom;
     maxErrorReportsPerHour = config.Errors.MaxErrorReportsPerHour;
     handleWrongClassException = config.Errors.HandleWrongClassException;
     mailSender = new SmtpMailSender();
 }
Beispiel #8
0
        public ErrorHandler(IErrorNotifier notifier, IWebContext context, InstallationManager installer, IMailSender mailSender, 
            ConfigurationManagerWrapper configuration)
        {
            this.notifier = notifier;
            this.context = context;
            this.installer = installer;
            this.mailSender = mailSender;

            beginUrl = configuration.Sections.Management.Installer.WelcomeUrl;
            action = configuration.Sections.Engine.Errors.Action;
            mailTo = configuration.Sections.Engine.Errors.MailTo;
            mailFrom = configuration.Sections.Engine.Errors.MailFrom;
            maxErrorReportsPerHour = configuration.Sections.Engine.Errors.MaxErrorReportsPerHour;
            handleWrongClassException = configuration.Sections.Engine.Errors.HandleWrongClassException;
            mailSender = new SmtpMailSender();
        }
 /// <summary>Creates a new instance of the RequestLifeCycleHandler class.</summary>
 /// <param name="webContext">The web context wrapper.</param>
 /// <param name="broker"></param>
 /// <param name="installer"></param>
 /// <param name="dispatcher"></param>
 /// <param name="adapters"></param>
 /// <param name="errors"></param>
 /// <param name="editConfig"></param>
 /// <param name="hostConfig"></param>
 /// <param name="managementUrls"></param>
 public RequestLifeCycleHandler(IWebContext webContext, EventBroker broker, InstallationManager installer,
     RequestPathProvider dispatcher, IContentAdapterProvider adapters, IErrorHandler errors,
     IEditUrlManager editUrlManager, EditSection editConfig, HostSection hostConfig)
 {
     checkInstallation = editConfig.Installer.CheckInstallationStatus;
     welcomeUrl = editConfig.Installer.WelcomeUrl;
     managementUrl = editConfig.ManagementInterfaceUrl;
     rewriteMethod = hostConfig.Web.Rewrite;
     this.webContext = webContext;
     this.broker = broker;
     this.adapters = adapters;
     this.errors = errors;
     this.editUrlManager = editUrlManager;
     this.installer = installer;
     this.dispatcher = dispatcher;
 }
Beispiel #10
0
 public InstallationChecker(IWebContext webContext, EventBroker broker, ConfigurationManagerWrapper configuration, InstallationManager installer)
 {
     this.installer = installer;
     if (configuration.Sections.Management.Installer.CheckInstallationStatus)
     {
         welcomeUrl = configuration.Sections.Management.Installer.WelcomeUrl;
         managementUrl = configuration.Sections.Management.Paths.ManagementInterfaceUrl;
         this.webContext = webContext;
         this.broker = broker;
         this.broker.BeginRequest += BeginRequest;
         this.status = installer.GetStatus();
     }
     else
     {
         installer.UpdateStatus(SystemStatusLevel.Unconfirmed);
     }
 }
Beispiel #11
0
		public ErrorHandler(IErrorNotifier notifier, IWebContext context, InstallationManager installer, IExceptionFilter exceptionFilter, IMailSender mailSender, 
			ConfigurationManagerWrapper configuration)
		{
			this.notifier = notifier;
			this.context = context;
			this.installer = installer;
			this.exceptionFilter = exceptionFilter;
			this.mailSender = mailSender;

			beginUrl = configuration.Sections.Management.Installer.WelcomeUrl;
			action = configuration.Sections.Engine.Errors.Action;
			mailTo = configuration.Sections.Engine.Errors.MailTo;
			mailFrom = configuration.Sections.Engine.Errors.MailFrom;
			maxErrorReportsPerHour = configuration.Sections.Engine.Errors.MaxErrorReportsPerHour;
			handleWrongClassException = configuration.Sections.Engine.Errors.HandleWrongClassException;
			handleSqlException = configuration.Sections.Engine.Errors.SqlExceptionHandling == ExceptionResolutionMode.RefreshGet;
		}
Beispiel #12
0
        public InstallationChecker(IWebContext webContext, EventBroker broker, ConfigurationManagerWrapper configuration, InstallationManager installer)
        {
            this.installer = installer;
            if (configuration.Sections.Management.Installer.CheckInstallationStatus)
            {
                welcomeUrl      = configuration.Sections.Management.Installer.WelcomeUrl;
                managementUrl   = configuration.Sections.Management.Paths.ManagementInterfaceUrl;
                this.webContext = webContext;
                this.broker     = broker;
                this.Status     = installer.GetStatus();

                installer.UpdateStatus(Status.Level);

                if (Status.Level != SystemStatusLevel.UpAndRunning)
                {
                    this.broker.BeginRequest += BeginRequest;
                }
            }
            else
            {
                installer.UpdateStatus(SystemStatusLevel.Unconfirmed);
            }
        }
Beispiel #13
0
 public ErrorHandler(IWebContext context, ISecurityManager security, InstallationManager installer)
 {
     this.context = context;
     this.security = security;
     this.installer = installer;
 }
Beispiel #14
0
 public DatabaseStatusCache(InstallationManager installer)
 {
     this.installer = installer;
 }
Beispiel #15
0
 public InstallationChecker(IWebContext webContext, EventBroker broker, ConfigurationManagerWrapper configuration, InstallationManager installer)
 {
     if (configuration.Sections.Management.Installer.CheckInstallationStatus)
     {
         welcomeUrl                = configuration.Sections.Management.Installer.WelcomeUrl;
         managementUrl             = configuration.Sections.Management.ManagementInterfaceUrl;
         this.installer            = installer;
         this.webContext           = webContext;
         this.broker               = broker;
         this.broker.BeginRequest += BeginRequest;
     }
 }
 public FakeRequestLifeCycleHandler(IWebContext webContext, InstallationManager installer, RequestPathProvider dispatcher, IContentAdapterProvider adapters, IErrorHandler errors, IEditUrlManager editUrlManager, EditSection editConfig, HostSection hostConfig)
     : base(webContext, EventBroker.Instance, installer, dispatcher, adapters, errors, editUrlManager, editConfig, hostConfig)
 {
     initialized = true;
 }
Beispiel #17
0
 public MigrationEngine(IServiceContainer container, InstallationManager installer)
 {
     this.container = container;
     this.installer = installer;
 }
Beispiel #18
0
 public DatabaseStatusCache(InstallationManager installer)
 {
     this.installer = installer;
 }
Beispiel #19
0
 public MigrationEngine(IServiceContainer container, InstallationManager installer)
 {
     this.container = container;
     this.installer = installer;
 }
Beispiel #20
0
 public ErrorHandler(IWebContext context, ISecurityManager security, InstallationManager installer,
     IMailSender mailSender, EngineSection config, EditSection editConfig)
     : this(context, security, installer, config, editConfig)
 {
     this.mailSender = mailSender;
 }
 public FakeDatabaseStatusCache(InstallationManager installer)
     : base(installer)
 {
 }