Ejemplo n.º 1
0
        public SiteSetupManager(ClientContext clientContext, ShSiteCollection configurationSiteCollection, string rootConfigurationPath, bool incrementalUpload)
        {
            ConfigurationSiteCollection = configurationSiteCollection;
            ClientContext = clientContext;

            FeatureManager = new FeatureManager();
            QuicklaunchManager = new QuicklaunchManager();
            PropertyManager = new PropertyManager();
            ListManager = new ListManager();
            CustomActionsManager = new CustomActionsManager();
            PermissionManager = new PermissionManager();
            ComposedLookManager = new ComposedLookManager();

            var contentConfigurationPath = Path.Combine(rootConfigurationPath, "content");
            ContentUploadManager = new ContentUploadManager(contentConfigurationPath, incrementalUpload);
        }
Ejemplo n.º 2
0
        /// <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);
            }
        }
Ejemplo n.º 3
0
        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);
        }