private static void SetAlternateCssUrlForWeb(ClientContext context, ShWeb configWeb, Web webToConfigure) { if (!string.IsNullOrEmpty(configWeb.AlternateCssUrl)) { Log.Debug("Setting AlternateCssUrl for web " + configWeb.Name); webToConfigure.AlternateCssUrl = ContentUploadManager.ReplaceTokensInText(configWeb.AlternateCssUrl, context); webToConfigure.Update(); context.ExecuteQuery(); } }
private void UploadFilesInWeb(ClientContext context, Web parentWeb, ShWeb configWeb) { Log.Info("Looking for updated files in web " + configWeb.Url); var webToConfigure = EnsureWeb(context, parentWeb, configWeb); ContentUploadManager.UploadFilesInFolder(context, webToConfigure, configWeb.ContentFolders, IncrementalUpload); foreach (ShWeb subWeb in configWeb.Webs) { UploadFilesInWeb(context, webToConfigure, subWeb); } }
public SiteSetupManager(ClientContext clientContext, ShSiteCollection configurationSiteCollection, string rootConfigurationPath) { ConfigurationSiteCollection = configurationSiteCollection; ClientContext = clientContext; FeatureManager = new FeatureManager(); QuicklaunchManager = new QuicklaunchManager(); PropertyManager = new PropertyManager(); ListManager = new ListManager(); var contentConfigurationPath = Path.Combine(rootConfigurationPath, "content"); ContentUploadManager = new ContentUploadManager(contentConfigurationPath); }
public SiteSetupManager(ClientContext clientContext, ShSiteCollection configurationSiteCollection, string rootConfigurationPath) { ConfigurationSiteCollection = configurationSiteCollection; ClientContext = clientContext; FeatureManager = new FeatureManager(); QuicklaunchManager = new QuicklaunchManager(); PropertyManager = new PropertyManager(); ListManager = new ListManager(); CustomActionsManager = new CustomActionsManager(); PermissionManager = new PermissionManager(); var contentConfigurationPath = Path.Combine(rootConfigurationPath, "content"); ContentUploadManager = new ContentUploadManager(contentConfigurationPath); }
/// <summary> /// Assumptions: /// 1. The order of webs and subwebs in the config file follows the structure of SharePoint sites /// 2. No config element is present without their parent web already being defined in the config file, except the root web /// </summary> private void EnsureAndConfigureWebAndActivateFeatures(ClientContext context, Web parentWeb, ShWeb configWeb) { var webToConfigure = EnsureWeb(context, parentWeb, configWeb); ListManager.CreateLists(context, webToConfigure, configWeb.Lists); FeatureManager.ActivateWebFeatures(context, webToConfigure, configWeb.WebFeatures); QuicklaunchManager.CreateQuicklaunchNodes(context, webToConfigure, configWeb.Quicklaunch); PropertyManager.SetProperties(context, webToConfigure, configWeb.Properties); ContentUploadManager.UploadFilesInFolder(context, webToConfigure, configWeb.ContentFolders, IncrementalUpload); ComposedLookManager.SetComposedLook(context, configWeb, webToConfigure, configWeb.ComposedLook); SearchNavigationManager.CreateSearchNavigationNodes(context, webToConfigure, configWeb.SearchNavigation); SetWelcomePageUrlIfConfigured(context, webToConfigure, configWeb); SetAlternateCssUrlForWeb(context, configWeb, webToConfigure); foreach (ShWeb subWeb in configWeb.Webs) { EnsureAndConfigureWebAndActivateFeatures(context, webToConfigure, subWeb); } }
public SiteSetupManager(ClientContext clientContext, ShSiteCollection configurationSiteCollection, string rootConfigurationPath, bool incrementalUpload) { ConfigurationSiteCollection = configurationSiteCollection; ClientContext = clientContext; IncrementalUpload = incrementalUpload; FeatureManager = new FeatureManager(); QuicklaunchManager = new QuicklaunchManager(); PropertyManager = new PropertyManager(); ListManager = new ListManager(); CustomActionsManager = new CustomActionsManager(); PermissionManager = new PermissionManager(); ComposedLookManager = new ComposedLookManager(); FileListenerAndUploader = new FileListenerAndUploader(); ExportTaskManager = new ExportTaskManager(); ContentConfigurationPath = Path.Combine(rootConfigurationPath, "content"); ContentUploadManager = new ContentUploadManager(ContentConfigurationPath); }