Beispiel #1
0
    public void Run(ITaskOutput output, NameValueCollection metaData)
    {
      var getPostStepActionList = metaData["Attributes"].Split(new[] {'|'}, StringSplitOptions.RemoveEmptyEntries).OrderBy(x => x).Select(x => x.Substring(x.IndexOf('=') + 1));

      foreach (var postStepAction in getPostStepActionList)
      {
        try
        {
          var postStepActionType = Type.GetType(postStepAction);
          if (postStepActionType == null)
          {
            throw new Exception($"Can't find specified type with name {postStepAction}");
          }

          Log.Info(postStepAction + " post step action was started", this);

          var activator = (IPostStepAction)Activator.CreateInstance(postStepActionType);
          activator.Run(metaData);
        }
        catch (Exception ex)
        {
          Log.Error(postStepAction + " post step action has failed", ex, this);
        }
      }
    }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            string packageName = ResourceManager.Localize("DemoPackageName");
             if (StaticSettings.IsStarterKit)
             {
            if (!string.IsNullOrEmpty(packageName) &&
                 File.Exists(AppDomain.CurrentDomain.BaseDirectory + Path.Combine(Settings.TempFolderPath, packageName)))
            {
               string res = JobContext.Confirm(ResourceManager.Localize("INSTALL_CALENDAR_DEMO_ITEMS"));

               if (res == "yes")
               {

                  Installer installer = new Installer();
                  installer.InstallPackage(AppDomain.CurrentDomain.BaseDirectory +
                                           Path.Combine(Settings.TempFolderPath, packageName));

                  DemoItems.CreateEvents();
               }
            }
            else
            {
               DemoItems.CreateDefaultCalendarsList();
            }
             }
             else
             {
            if (!string.IsNullOrEmpty(packageName))
            {
               File.Delete(Path.Combine(ApplicationContext.PackagePath, packageName));
            }
            DemoItems.CreateDefaultCalendarsList();
             }
        }
        /// <summary>
        /// Migrates the current IDTable data to the new IDTable ID scheme.
        /// </summary>
        /// <remarks>
        /// Runs through all the uCommerce entries in the IDTable.
        /// Each entry is examined to determine what action to perform.
        ///
        /// If the entry corresponds to a uCommerce entity, that entity's Guid is updated.
        /// If the corresponging entry cannot be updated, then instead we:
        ///  1. Migrate the standard values to the new ID.
        ///  2. Delte the IDTable entry to get it to be recreated with the new ID.
        /// </remarks>
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            if (DataIsAlreadyMigrated())
            {
                return;
            }

            var watch = new Stopwatch();

            watch.Start();

            var entries = GetAllUCommerceIdTableEntries();

            foreach (var entry in entries)
            {
                // This also populates the dictionaries with the data used by the Migrate...() methods called below.
                PrepareMigrationOfEntry(entry);
            }

            MigrateVariantTemplateIds();
            MigrateStandardValueItemIds();

            DeleteEntriesToBeRegeneratedWithNewId();

            _log.Log <MigrateIdTableValues>("Combined sql statement for migration of IDTable data: " + CombineStatementsToSingleStatement());
            RunAllSqlStatementsAgainstDatabase();

            MarkDataAsMigrated();

            watch.Stop();
            _log.Log <MigrateIdTableValues>(string.Format("Migration of IDTable entries took {0} ms", watch.ElapsedMilliseconds));
        }
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     new DirectoryMoverIfTargetExist(
         new DirectoryInfo(HostingEnvironment.MapPath(_sourceDirectory)),
         new DirectoryInfo(HostingEnvironment.MapPath(_targetDirectory)))
     .Move(ex => new SitecoreInstallerLoggingService().Error <int>(ex));
 }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            var assemblyVersion = _runtimeVersion.GetUcommerceRuntimeAssemblyVersion().ToString();

            _installerLoggingService.Information <UpdateUCommerceAssemblyVersionInDatabase>("New uCommerce version: " + assemblyVersion);
            _updateService.UpdateAssemblyVersion(assemblyVersion);
        }
        /// <summary>
        /// Runs this post step.
        /// </summary>
        /// <param name="output">The output.</param>
        /// <param name="metaData">The meta data.</param>
        public virtual void Run(ITaskOutput output, NameValueCollection metaData)
        {
            Item detailListTemplate = Database.GetDatabase("master").GetItem(OrderListTemplateItemID);

            foreach (Item column in detailListTemplate.Children)
            {
                foreach (Item columnClone in Globals.LinkDatabase.GetReferrers(column).Select(link => link.GetSourceItem()))
                {
                    if (columnClone.TemplateID != ColumnFieldTemplateID)
                    {
                        continue;
                    }

                    string expectedHeader = column.Fields[HeaderName].Value;
                    string clonnedHeader  = columnClone.Fields[HeaderName].Value;
                    if (clonnedHeader == expectedHeader)
                    {
                        continue;
                    }

                    using (new EditContext(columnClone))
                    {
                        columnClone.Fields[HeaderName].Reset();
                        Log.Info("Resetting detail list header for \"{0}\" column.".FormatWith(columnClone.Paths.FullPath), this);
                    }
                }
            }
        }
    /// <summary>
    /// The run.
    /// </summary>
    /// <param name="output">
    /// The output. 
    /// </param>
    /// <param name="metaData">
    /// The meta data. 
    /// </param>
    public void Run(ITaskOutput output, NameValueCollection metaData)
    {
      Log.Info("Installing Order Manager roles.", this);

      this.CreateRoles();
      this.AddRolesToRoles();
    }
Beispiel #8
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            string _virtualPathToAppsFolder = "~/sitecore modules/shell/ucommerce/apps";

            if (_sitecoreVersionChecker.IsEqualOrGreaterThan(new Version(9, 2)))
            {
                new DirectoryMover(
                    new DirectoryInfo(
                        HostingEnvironment.MapPath($"{_virtualPathToAppsFolder}/Sitecore92compatibility.disabled")),
                    new DirectoryInfo(
                        HostingEnvironment.MapPath($"{_virtualPathToAppsFolder}/Sitecore92compatibility")),
                    true).Move(ex => _sitecoreInstallerLoggingService.Log <Exception>(ex));
            }


            if (_sitecoreVersionChecker.IsEqualOrGreaterThan(new Version(9, 3)))
            {
                new DirectoryMover(
                    new DirectoryInfo(
                        HostingEnvironment.MapPath($"{_virtualPathToAppsFolder}/Sitecore93compatibility.disabled")),
                    new DirectoryInfo(
                        HostingEnvironment.MapPath($"{_virtualPathToAppsFolder}/Sitecore93compatibility")),
                    true).Move(ex => _sitecoreInstallerLoggingService.Log <Exception>(ex));
            }
        }
        /// <summary>
        /// Runs this post step.
        /// </summary>
        /// <param name="output">The output.</param>
        /// <param name="metaData">The meta data.</param>
        public virtual void Run(ITaskOutput output, NameValueCollection metaData)
        {
            Item detailListTemplate = Database.GetDatabase("master").GetItem(OrderListTemplateItemID);

              foreach (Item column in detailListTemplate.Children)
              {
            foreach (Item columnClone in Globals.LinkDatabase.GetReferrers(column).Select(link => link.GetSourceItem()))
            {
              if (columnClone.TemplateID != ColumnFieldTemplateID)
              {
            continue;
              }

              string expectedHeader = column.Fields[HeaderName].Value;
              string clonnedHeader = columnClone.Fields[HeaderName].Value;
              if (clonnedHeader == expectedHeader)
              {
            continue;
              }

              using (new EditContext(columnClone))
              {
            columnClone.Fields[HeaderName].Reset();
            Log.Info("Resetting detail list header for \"{0}\" column.".FormatWith(columnClone.Paths.FullPath), this);
              }
            }
              }
        }
Beispiel #10
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            Assert.ArgumentNotNull(output, "output");
            Assert.ArgumentNotNull(metaData, "metaData");

            ConfigureShellWax(output, "master");
            ConfigureShellWax(output, "core");
        }
Beispiel #11
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            Assert.ArgumentNotNull(output, "output");
            Assert.ArgumentNotNull(metaData, "metaData");

            ConfigureShellWax(output, "master");
            ConfigureShellWax(output, "core");
        }
Beispiel #12
0
 /// <summary>
 /// Runs this post step
 /// </summary>
 /// <param name="output">The output.</param><param name="metaData">The meta data.</param>
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     using (new SecurityDisabler())
     {
         this.PublishItem("{FB814ADD-C821-4326-A024-851AADEC3284}");
         this.PublishItem("{0A702337-81CD-45B9-8A72-EC15D2BE1635}");
     }
 }
 /// <summary>
 /// Runs this post step
 /// </summary>
 /// <param name="output">The output.</param><param name="metaData">The meta data.</param>
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     using (new SecurityDisabler())
     {
         this.RebuildLinkDatabase("master");
         this.RebuildLinkDatabase(Constants.CoreDatabaseName);
     }
 }
 /// <summary>
 /// Runs this post step
 /// </summary>
 /// <param name="output">The output.</param><param name="metaData">The meta data.</param>
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
   using (new SecurityDisabler())
   {
     this.RebuildLinkDatabase("master");
     this.RebuildLinkDatabase(Constants.CoreDatabaseName);
   }
 }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            AttributesContainer attributeses = new AttributesContainer(metaData["Attributes"]);
            object serializedSources = attributeses.GetAttribute("nonexistingsources");
            AntidotePackageDefinition antidotePackageDefinition = JsonConvert.DeserializeObject<AntidotePackageDefinition>(serializedSources as string);

            RemoveSources(antidotePackageDefinition);
        }
 /// <summary>
 /// Runs this post step
 /// </summary>
 /// <param name="output">The output.</param><param name="metaData">The meta data.</param>
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
   using (new SecurityDisabler())
   {
     this.PublishItem("{FB814ADD-C821-4326-A024-851AADEC3284}");
     this.PublishItem("{0A702337-81CD-45B9-8A72-EC15D2BE1635}");
   }
 }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            // Create the standard users
              LaunchSitecore.Configuration.Administration.Security.CreateSecurityAccounts.CreateAccounts();

              // Rebuild the core and master indexes
              IndexCustodian.FullRebuild(ContentSearchManager.GetIndex("sitecore_core_index"), true);
              IndexCustodian.FullRebuild(ContentSearchManager.GetIndex("sitecore_master_index"), true);
        }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            Item item = Factory.GetDatabase("core").GetItem("/sitecore/client/Applications/Launchpad/PageSettings/Buttons/ContentEditing/uCommerce");

            if (item != null)
            {
                item.Delete();
            }
        }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            // Create the standard users
            CreateSecurityAccounts.CreateAccounts();

            // Rebuild the core and master indexes
            IndexCustodian.FullRebuild(ContentSearchManager.GetIndex("sitecore_core_index"), true);
            IndexCustodian.FullRebuild(ContentSearchManager.GetIndex("sitecore_master_index"), true);
        }
Beispiel #20
0
        private void ConfigureShellWax(ITaskOutput output, string database)
        {
            using (new SecurityDisabler())
            {
                var currentdb = Factory.GetDatabase(database, false);
                if (currentdb == null)
                {
                    output.Alert(string.Format("Database '{0}' not found. ShellWax auto-configuration will not be executed.", database));
                }
                else
                {
                    //Configuring the "Task Schedule Field Editor":
                    //1. Change the field type of the "Schedule" field on the template "/sitecore/templates/System/Tasks/Schedule" from "text" to "IFrame"
                    //2. In the field source enter: "/sitecore modules/shell/editors/TaskSchedule/TaskSchedule.aspx?field=Schedule"
                    //3. On the /sitecore/templates/System/Tasks/Schedule/Data/Schedule item, select View-->Standard Fields
                    //4. Goto the "Style" field in the "Appearance" section and add this value: "height:250px"
                    var scheduleTemplate = currentdb.GetTemplate("System/Tasks/Schedule");
                    var scheduleField    = scheduleTemplate.GetField("Schedule");

                    scheduleField.BeginEdit();
                    try
                    {
                        scheduleField.Type   = "IFrame";
                        scheduleField.Source = "/sitecore modules/shell/editors/TaskSchedule/TaskSchedule.aspx?field=Schedule";
                        scheduleField.Style  = "height:300px";
                        scheduleField.EndEdit();
                        output.Alert("'Task Schedule Field Editor' configured successfully.");
                    }
                    catch (Exception exception)
                    {
                        scheduleField.InnerItem.Editing.CancelEdit();
                        output.Alert(string.Format("'Task Schedule Field Editor' configuration failed. Exception details: {0}", exception.ToString()));
                    }



                    //Configuring the "Execute Now!" ribbon:
                    //1. Goto the "/sitecore/templates/System/Tasks/Schedule" template in Content Editor
                    //2. In the "Configure" tab, click the "Contextual Tab" button in the "Appearance" chunk
                    //3. Choose: /content/Applications/Content Editor/Ribbons/Contextual Ribbons/Schedules

                    scheduleTemplate.BeginEdit();
                    try
                    {
                        scheduleTemplate.InnerItem.Appearance.Ribbon = "{DE9038AE-568B-4ED0-A4DF-D80BD867AD27}";
                        scheduleTemplate.EndEdit();
                        output.Alert("Task 'Execute Now!' configured successfully.");
                    }
                    catch (Exception exception)
                    {
                        scheduleTemplate.InnerItem.Editing.CancelEdit();
                        output.Alert(string.Format("Task 'Execute Now!' configuration failed. Exception details: {0}", exception.ToString()));
                    }
                }
            }
        }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            IInstallerLoggingService logging = new SitecoreInstallerLoggingService();

            logging.Log <CreateSpeakApplications>("AddTitleToCommerceSpeakAppsSection started.");

            Parse(new DirectoryInfo(GetRootFolder()));

            logging.Log <CreateSpeakApplications>("AddTitleToCommerceSpeakAppsSection finished.");
        }
Beispiel #22
0
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     //if (_indexNamesToRebuild.Any())
     //{
     //    foreach (string indexName in _indexNamesToRebuild)
     //    {
     //        //RebuildIndex(indexName);
     //    }
     //}
 }
        /// <summary>
        /// Runs the specified output.
        /// </summary>
        /// <param name="output">the output</param>
        /// <param name="metadata">the metadata</param>
        public void Run(ITaskOutput output, NameValueCollection metadata)
        {
            var postStep = new Sitecore.Commerce.Connect.CommerceServer.InstallPostStep(DefaultLocalizationFolder);

            postStep.OutputMessage(Translate.Text(CommonTexts.CreateDeployEngagementPlans));
            this.CreateEaPlans();
            this.DeployEaPlans();
            postStep.OutputMessage(Translate.Text(CommonTexts.CreateDeployEngagementPlansComplete));

            postStep.Run(output, metadata);
        }
Beispiel #24
0
        private void ConfigureShellWax(ITaskOutput output, string database)
        {
            using (new SecurityDisabler())
            {
                var currentdb = Factory.GetDatabase(database, false);
                if (currentdb == null)
                {
                    output.Alert(string.Format("Database '{0}' not found. ShellWax auto-configuration will not be executed.", database));
                }
                else
                {
                    //Configuring the "Task Schedule Field Editor":
                    //1. Change the field type of the "Schedule" field on the template "/sitecore/templates/System/Tasks/Schedule" from "text" to "IFrame"
                    //2. In the field source enter: "/sitecore modules/shell/editors/TaskSchedule/TaskSchedule.aspx?field=Schedule"
                    //3. On the /sitecore/templates/System/Tasks/Schedule/Data/Schedule item, select View-->Standard Fields
                    //4. Goto the "Style" field in the "Appearance" section and add this value: "height:250px"
                    var scheduleTemplate = currentdb.GetTemplate("System/Tasks/Schedule");
                    var scheduleField = scheduleTemplate.GetField("Schedule");

                    scheduleField.BeginEdit();
                    try
                    {
                        scheduleField.Type = "IFrame";
                        scheduleField.Source = "/sitecore modules/shell/editors/TaskSchedule/TaskSchedule.aspx?field=Schedule";
                        scheduleField.Style = "height:300px";
                        scheduleField.EndEdit();
                        output.Alert("'Task Schedule Field Editor' configured successfully.");
                    }
                    catch (Exception exception)
                    {
                        scheduleField.InnerItem.Editing.CancelEdit();
                        output.Alert(string.Format("'Task Schedule Field Editor' configuration failed. Exception details: {0}", exception.ToString()));
                    }

                    //Configuring the "Execute Now!" ribbon:
                    //1. Goto the "/sitecore/templates/System/Tasks/Schedule" template in Content Editor
                    //2. In the "Configure" tab, click the "Contextual Tab" button in the "Appearance" chunk
                    //3. Choose: /content/Applications/Content Editor/Ribbons/Contextual Ribbons/Schedules

                    scheduleTemplate.BeginEdit();
                    try
                    {
                        scheduleTemplate.InnerItem.Appearance.Ribbon = "{DE9038AE-568B-4ED0-A4DF-D80BD867AD27}";
                        scheduleTemplate.EndEdit();
                        output.Alert("Task 'Execute Now!' configured successfully.");
                    }
                    catch (Exception exception)
                    {
                        scheduleTemplate.InnerItem.Editing.CancelEdit();
                        output.Alert(string.Format("Task 'Execute Now!' configuration failed. Exception details: {0}", exception.ToString()));
                    }
                }
            }
        }
        /// <summary>
        /// Runs the specified output.
        /// </summary>
        /// <param name="output">the output</param>
        /// <param name="metadata">the metadata</param>
        public void Run(ITaskOutput output, NameValueCollection metadata)
        {
            var postStep = new Sitecore.Commerce.Connect.CommerceServer.InstallPostStep(DefaultLocalizationFolder);

            postStep.OutputMessage(Translate.Text(CommonTexts.CreateDeployEngagementPlans));
            this.CreateEaPlans();
            this.DeployEaPlans();
            postStep.OutputMessage(Translate.Text(CommonTexts.CreateDeployEngagementPlansComplete));

            postStep.Run(output, metadata);
        }
Beispiel #26
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            var webConfig = this.filePathResolver.MapPath("~/web.config");
              var webConfigTransform = this.filePathResolver.MapPath("~/web.config.transform");
              if (webConfigTransform == null)
              {
            return;
              }

              this.xdtTransformEngine.ApplyConfigTransformation(webConfig, webConfigTransform, webConfig);
        }
Beispiel #27
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            var webConfig          = this.filePathResolver.MapPath("~/web.config");
            var webConfigTransform = this.filePathResolver.MapPath("~/web.config.transform");

            if (webConfigTransform == null)
            {
                return;
            }

            this.xdtTransformEngine.ApplyConfigTransformation(webConfig, webConfigTransform, webConfig);
        }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            //IServiceProvider provider = ServiceLocator.ServiceProvider.GetService<IServiceProvider>();
            //DefinitionManagerFactory factory = provider.GetDefinitionManagerFactory();
            //DeploymentManager manager = new DeploymentManager(factory);

            //CultureInfo culture = CultureInfo.CurrentCulture;
            //Task deploymentTask = manager.DeployAllAsync<IMarketingAssetDefinition>(culture);
            //deploymentTask.Wait();

            //Diagnostics.Log.Info("Deploying Marketing Definitions", this);
        }
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     Assert.ArgumentNotNull(output, "output");
       Assert.ArgumentNotNull(metaData, "metaData");
       try
       {
     ChangeWebConfig();
       }
       catch (Exception ex)
       {
     Log.Error("Sitecore Feedback Module Install:", ex, this);
       }
 }
        /// <summary>
        /// Runs this post step
        /// </summary>
        /// <param name="output">The output.</param>
        /// <param name="metaData">The meta data.</param>
        public virtual void Run(ITaskOutput output, NameValueCollection metaData)
        {
            Assert.ArgumentNotNull(output, "output");
            Assert.ArgumentNotNull(metaData, "metaData");

            foreach (string path in this.GetFilesPathes(metaData))
            {
                foreach (string databaseName in this.databaseNames)
                {
                    this.Installer.Install(databaseName, path);
                }
            }
        }
        public virtual void Run(ITaskOutput output, NameValueCollection metaData)
        {
            this.AddBaseTemplate();

            string translationFolder = FileUtil.MapPath("temp");

            translationFolder = StringUtil.Combine(translationFolder, "SPIF translations", "\\");
            Log.Debug("The following folder is to be used to search translations: " + translationFolder);
            foreach (string file in Directory.GetFiles(translationFolder))
            {
                this.ImportTranslation(file);
            }
        }
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     Assert.ArgumentNotNull(output, "output");
     Assert.ArgumentNotNull(metaData, "metaData");
     try
     {
         ChangeWebConfig();
     }
     catch (Exception ex)
     {
         Log.Error("Sitecore Feedback Module Install:", ex, this);
     }
 }
Beispiel #33
0
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
   foreach (var transformsLayer in transformsOrder)
   {
     var transforms = this.transformProvider.GetTransformsByLayer(transformsLayer);
     foreach (var transform in transforms)
     {
       var fileToTransformPath = Regex.Replace(transform, "^.*\\\\code", "~").Replace(".transform", "");
       Diagnostics.Log.Warn($"{transform} - {fileToTransformPath}", this);
       var fileToTransform = this.filePathResolver.MapPath(fileToTransformPath);
       this.ApplyTransform(fileToTransform, transform, fileToTransform);
     }
   }
 }
Beispiel #34
0
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     foreach (var transformsLayer in transformsOrder)
     {
         var transforms = this.transformProvider.GetTransformsByLayer(transformsLayer);
         foreach (var transform in transforms)
         {
             var fileToTransformPath = Regex.Replace(transform, "^.*\\\\code", "~").Replace(".transform", "");
             Diagnostics.Log.Warn($"{transform} - {fileToTransformPath}", this);
             var fileToTransform = this.filePathResolver.MapPath(fileToTransformPath);
             this.ApplyTransform(fileToTransform, transform, fileToTransform);
         }
     }
 }
Beispiel #35
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            var metaDataString = new StringBuilder();

            if (metaData != null)
            {
                foreach (var key in metaData.AllKeys)
                {
                    metaDataString.AppendFormat("key : {0}, value : {1} \n", key, metaData[key]);
                }
            }

            output.Alert(string.Format("Custom Post step fired with metadata : {0}", metaDataString));
        }
Beispiel #36
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            var attributes = new AttributesContainer(metaData["Attributes"]);
            var scriptId   = attributes.Get("scriptId")?.ToString();
            var scriptDb   = attributes.Get("scriptDb")?.ToString() ?? "master";

            var width  = attributes.Get("width")?.ToString() ?? "400";
            var height = attributes.Get("height")?.ToString() ?? "260";

            var str = new UrlString(UIUtil.GetUri("control:PowerShellRunner"));

            str.Append("scriptId", scriptId);
            str.Append("scriptDb", scriptDb);
            JobContext.ShowModalDialog(str.ToString(), width, height);
        }
Beispiel #37
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            foreach (var transformsLayer in transformsOrder)
            {
                var transforms = this.transformProvider.GetTransformsByLayer(transformsLayer);
                foreach (var transform in transforms)
                {
                    var fileToTransformPath = Regex.Replace(transform, "^.*\\\\code", "~").Replace(".transform", "");
                    var fileToTransform     = this.filePathResolver.MapPath(fileToTransformPath);
                    this.ApplyTransform(fileToTransform, transform, fileToTransform);
                }
            }

            this.InstallSecurity(metaData);
        }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            var postInstallationSteps = new List <IPostStep>();
            var files = new string[]
            {
                "Admin.da.resx",
                "Admin.de.resx",
                "Admin.resx",
                "Admin.sv.resx",
                "Definition.da.resx",
                "Definition.de.resx",
                "Definition.resx",
                "Definition.sv.resx",
                "Icons.resx",
                "RoleName.da.resx",
                "RoleName.resx",
                "Search.da.resx",
                "Search.de.resx",
                "Search.resx",
                "Search.sv.resx",
                "Tabs.da.resx",
                "Tabs.de.resx",
                "Tabs.resx",
                "Tabs.sv.resx",
                "OrdersCount.da.resx",
                "OrdersCount.de.resx",
                "OrdersCount.sv.resx",
                "OrdersCount.resx",
                "OrderList.da.resx",
                "OrderList.de.resx",
                "OrderList.sv.resx",
                "OrderList.resx",
                "CatalogSearch.da.resx",
                "CatalogSearch.de.resx",
                "CatalogSearch.sv.resx",
                "CatalogSearch.resx",
            };

            foreach (var file in files)
            {
                postInstallationSteps.Add(new MoveFile(string.Format("~/bin/uCommerce/App_GlobalResources/{0}", file), string.Format("~/App_GlobalResources/{0}", file), false));
            }

            foreach (var postInstallationStep in postInstallationSteps)
            {
                postInstallationStep.Run(output, metaData);
            }
        }
    /// <summary>
    /// Runs this post step
    /// </summary>
    /// <param name="output">The output.</param><param name="metaData">The meta data.</param>
    public void Run(ITaskOutput output, NameValueCollection metaData)
    {
      using (new SecurityDisabler())
      {
        Item pageEventsRootItem = Sitecore.Context.ContentDatabase.GetItem("{633273C1-02A5-4EBC-9B82-BD1A7C684FEA}");
        Assert.IsNotNull(pageEventsRootItem, "Page events root item is null.");

        foreach (Item pageEventItem in pageEventsRootItem.Children)
        {
          using (new EditContext(pageEventItem))
          {
            pageEventItem.Name = pageEventItem.Name;
          }
        }
      }
    }
Beispiel #40
0
        /// <summary>
        /// Runs this post step
        /// </summary>
        /// <param name="output">The output.</param><param name="metaData">The meta data.</param>
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            using (new SecurityDisabler())
            {
                Item pageEventsRootItem = Sitecore.Context.ContentDatabase.GetItem("{633273C1-02A5-4EBC-9B82-BD1A7C684FEA}");
                Assert.IsNotNull(pageEventsRootItem, "Page events root item is null.");

                foreach (Item pageEventItem in pageEventsRootItem.Children)
                {
                    using (new EditContext(pageEventItem))
                    {
                        pageEventItem.Name = pageEventItem.Name;
                    }
                }
            }
        }
Beispiel #41
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            ReadConnectionStringAttribute();

            using (var transformer = new ConfigurationTransformer(_toBeTransformed))
            {
                foreach (var transformation in Transformations)
                {
                    transformer.Transform(
                        new FileInfo(HostingEnvironment.MapPath(transformation.VirtualPath)),
                        transformation.OnlyIfIisIntegrated,
                        ex => new SitecoreInstallerLoggingService().Log <int>(ex));
                }
            }

            SetConnectionStringAttribute();
        }
Beispiel #42
0
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     Assert.ArgumentNotNull(output, "output");
     Assert.ArgumentNotNull(metaData, "metaData");
     try
     {
         Task parent = Task.Factory.StartNew(() =>
         {
             Task.Factory.StartNew(ChangeWebConfig);
         });
         parent.Wait();
         JobContext.SendMessage("sfm:controlpanel");
     }
     catch (Exception ex)
     {
         Log.Error("Sitecore Feedback Module Install:", ex, this);
     }
 }
Beispiel #43
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            var mergeConfig = new MergeConfig(
                "~/web.config",
                new List <Transformation>()
            {
                new Transformation("~/sitecore modules/Shell/ucommerce/install/CleanConfig.config"),
                new Transformation("~/sitecore modules/Shell/ucommerce/install/uCommerce.config"),
                new Transformation("~/sitecore modules/Shell/ucommerce/install/uCommerce.IIS7.config", isIntegrated: true),
                new Transformation("~/sitecore modules/Shell/ucommerce/install/uCommerce.dependencies.sitecore.config"),
                new Transformation("~/sitecore modules/Shell/ucommerce/install/sitecore.config"),
                new Transformation("~/sitecore modules/Shell/ucommerce/install/ClientDependency.config"),
                new Transformation("~/sitecore modules/Shell/ucommerce/install/updateAssemblyBinding.config")
            }
                );

            mergeConfig.Run(output, metaData);
        }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            foreach (var step in _postInstallationSteps)
            {
                IInstallerLoggingService logging = new SitecoreInstallerLoggingService();

                try
                {
                    step.Run(output, metaData);
                    logging.Log <PostInstallationStep>($"Executed: {step.GetType().FullName}");
                }
                catch (Exception ex)
                {
                    logging.Log <PostInstallationStep>(ex, step.GetType().FullName);

                    throw;
                }
            }
        }
Beispiel #45
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            var text = metaData["Comment"] ?? string.Empty;
            if (String.IsNullOrEmpty(text)) { return; }

            var xelement = ToXElement(text);
            if (xelement == null) { return; }

            var items = xelement.Element(Constants.ItemsPrefix);
            if (items != null)
            {
                DeleteItems(items);
            }

            var files = xelement.Element(Constants.FilesPrefix);
            if (files == null) { return; }

            DeleteFiles(files);
        }
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            Assert.ArgumentNotNull(output, "output");
              Assert.ArgumentNotNull(metaData, "metaData");
              try
              {
            Task parent = Task.Factory.StartNew(() =>
            {
              Task.Factory.StartNew(ChangeWebConfig);
            });
            parent.Wait();
            JobContext.SendMessage("sfm:controlpanel");
              }
              catch (Exception ex)
              {

            Log.Error("Sitecore Feedback Module Install:",ex,this);
              }
        }
Beispiel #47
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            //try
            //{
            //    Assert.IsNotNull(_masterDatabase, "Master Database can't be null");
            //    Assert.IsNotNull(_webDatabase, "Web Database can't be null.");

            //    using (new SecurityModel.SecurityDisabler())
            //    {
            //        Item sitecoreRootItem = _masterDatabase.GetItem("/sitecore");

            //        if (sitecoreRootItem == null)
            //        {
            //            throw new NullReferenceException("The '/sitecore' item does not exist in Sitecore.");
            //        }

            //        Language[] languages = _masterDatabase.Languages;

            //        foreach (Language language in languages)
            //        {
            //            PublishOptions publishOptions = new PublishOptions(
            //                _masterDatabase,
            //                _webDatabase,
            //                PublishMode.Smart,
            //                language,
            //                DateTime.Now)
            //            {
            //                Deep = true
            //            };


            //            Publisher publisher = new Publisher(publishOptions);
            //            publisher.Options.RootItem = sitecoreRootItem;
            //            publisher.PublishWithResult();
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Log.Error(ex.Message, ex, this);
            //}
        }
 /// <summary>
 /// Runs this post step.
 /// </summary>
 /// <param name="output">The output.</param><param name="metaData">The meta data.</param>
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
   new RebuildLinkDatabasePostStep().Run(output, metaData);
   new PublishIndexItemsPostStep().Run(output, metaData);
   new RegisterPageEventsPostStep().Run(output, metaData);
 }
    /// <summary>
    /// Runs this post step
    /// </summary>
    /// <param name="output">The output.</param>
    /// <param name="metaData">The meta data.</param>
    public virtual void Run(ITaskOutput output, NameValueCollection metaData)
    {
      using (new SecurityDisabler())
      {
        using (new ProxyDisabler())
        {
          using (new SyncOperationContext())
          {
            foreach (string package in this.packages)
            {
              string dir = Path.Combine(this.SiteRoot, PackagesDirName);
              string path = Path.Combine(dir, package);
              this.SequencedInstaller.Install(path);
              Log.Info(string.Format("The package {0} has been installed", package), this);
            }
          }
        }
      }

      this.LocalizationPostStep.Run(output, metaData);
    }
Beispiel #50
0
 private void GetOutputMenu(ref Gtk.Menu outputMenu,ITaskOutput taskOut )
 {
     MenuItem miC = new MenuItem(MainClass.Languages.Translate("clear"));
     miC.Activated+= delegate {
         taskOut.ClearOutput();
     };
     outputMenu.Add(miC);
 }
 /// <summary>
 /// Runs this post step
 /// </summary>
 /// <param name="output">The output.</param>
 /// <param name="metaData">The meta data.</param>
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     // this.ResetClonedColumnHeadersPostStep.Run(output, metaData);
       this.ResetSampleUserPasswordsPostStep.Run(output, metaData);
       this.LocalizationPostStep.Run(output, metaData);
 }
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     ResetUser.ResetUserAccount("sitecore\\Audrey", "a");
     ResetUser.ResetUserAccount("sitecore\\Bill", "b");
     ResetUser.ResetUserAccount("sitecore\\Lonnie", "l");
 }
 public void Run(ITaskOutput output, NameValueCollection metaData)
 {
     new ImportTranslations("Salesforce Translations").Run(output, metaData);
 }
 void IPostStep.Run(ITaskOutput output, System.Collections.Specialized.NameValueCollection metaData)
 {
     Rebuild();
 }
    /// <summary>
    /// Runs this post step
    /// </summary>
    /// <param name="output">The output.</param>
    /// <param name="metaData">The meta data.</param>
    public virtual void Run(ITaskOutput output, NameValueCollection metaData)
    {
      Assert.ArgumentNotNull(output, "output");
      Assert.ArgumentNotNull(metaData, "metaData");

      foreach (string path in this.GetFilesPathes(metaData))
      {
        foreach (string databaseName in this.databaseNames)
        {
          this.Installer.Install(databaseName, path);
        }
      }
    }