public string Execute([NotNull] string databaseName, [NotNull] string itemId, [NotNull] string newName) { Assert.ArgumentNotNull(databaseName, nameof(databaseName)); var database = Factory.GetDatabase(databaseName); if (database == null) { throw new Exception("Database not found"); } var item = database.GetItem(itemId); if (item == null) { throw new Exception("Item not found"); } item.Editing.BeginEdit(); item.Name = newName; item.Editing.EndEdit(); BackgroundJob.Run("Rename Item", "Updating Items", () => Update(item)); return(string.Empty); }
public string Execute([NotNull] string indexName) { Assert.ArgumentNotNull(indexName, nameof(indexName)); BackgroundJob.Run("Rebuild Search Index", "Indexing", () => Rebuild(indexName)); return(string.Empty); }
public string Execute([NotNull] string databaseName) { Assert.ArgumentNotNull(databaseName, nameof(databaseName)); Log.Audit(this, "Rebuild link database: {0}", databaseName); BackgroundJob.Run("Rebuild Search Index", "Indexing", () => RebuildInxdexes(databaseName)); return(string.Empty); }
public string Execute([NotNull] string contextName, [NotNull] string databasesAndLanguages, [NotNull] string inactiveValidations, [NotNull] string customValidations) { Assert.ArgumentNotNull(contextName, nameof(contextName)); Assert.ArgumentNotNull(databasesAndLanguages, nameof(databasesAndLanguages)); Assert.ArgumentNotNull(inactiveValidations, nameof(inactiveValidations)); Assert.ArgumentNotNull(customValidations, nameof(customValidations)); return(BackgroundJob.Run("Validation", "Management", () => Process(contextName, databasesAndLanguages, inactiveValidations, customValidations))); }
public string Execute([NotNull] string contextName, [NotNull] string databaseName, [NotNull] string itemId, [NotNull] string languageName, [NotNull] string version, [NotNull] string inactiveValidations, [NotNull] string customValidations, bool deep) { Assert.ArgumentNotNull(contextName, nameof(contextName)); Assert.ArgumentNotNull(databaseName, nameof(databaseName)); Assert.ArgumentNotNull(itemId, nameof(itemId)); Assert.ArgumentNotNull(languageName, nameof(languageName)); Assert.ArgumentNotNull(version, nameof(version)); Assert.ArgumentNotNull(inactiveValidations, nameof(inactiveValidations)); Assert.ArgumentNotNull(customValidations, nameof(customValidations)); return(BackgroundJob.Run("Validation", "Management", () => Process(contextName, databaseName, itemId, languageName, version, inactiveValidations, customValidations, deep))); }