예제 #1
0
        public override void DeploySiteModel(ModelNode model)
        {
            var scope = GetScopeHash();

            if (!SiteUrls.Any())
            {
                throw new SPMeta2Exception("SiteUrls is empty");
            }

            foreach (var siteUrl in SiteUrls)
            {
                //var siteUrl = GetTargetSiteCollectionUrl();

                ContainerTraceUtils.WriteLine(string.Format("[INF]    Running on site: [{0}]", siteUrl));

                for (var provisionGeneration = 0; provisionGeneration < ProvisionGenerationCount; provisionGeneration++)
                {
                    WithSSOMSiteAndWebContext(siteUrl, (site, web) =>
                    {
                        if (EnableDefinitionProvision)
                        {
                            _provisionService.DeployModel(SiteModelHost.FromSite(site), model);
                        }

                        if (EnableDefinitionValidation)
                        {
                            _validationService.DeployModel(SiteModelHost.FromSite(site), model);
                        }
                    });
                }
            }
        }
예제 #2
0
        public override void DeploySiteModel(ModelNode model)
        {
            var scope = GetScopeHash();

            //foreach (var siteUrl in SiteUrls)
            //{
            var siteUrl = GetTargetSiteCollectionUrl();

            Trace.WriteLine(string.Format("[INF]    Running on site: [{0}]", siteUrl));

            for (var provisionGeneration = 0; provisionGeneration < ProvisionGenerationCount; provisionGeneration++)
            {
                WithSSOMSiteAndWebContext(siteUrl, (site, web) =>
                {
                    if (EnableDefinitionProvision)
                    {
                        _provisionService.DeployModel(SiteModelHost.FromSite(site), model);
                    }

                    if (EnableDefinitionValidation)
                    {
                        _validationService.DeployModel(SiteModelHost.FromSite(site), model);
                    }
                });
            }
            //}
        }
        protected override void InternalDeploySiteModel(ProvisionServiceContext context)
        {
            var site  = context.Context as SPSite;
            var model = context.Model;

            ModelService.DeployModel(SiteModelHost.FromSite(site), model);
        }
예제 #4
0
 /// <summary>
 /// A shortcut for incremental provision
 /// Sets incremental provision mode with IncrementalProvisionConfig.AutoDetectSharePointPersistenceStorage = true
 /// Once done, reverts back to default provision mode
 /// Callback on IncrementalProvisionConfig makes it easy to configure IncrementalProvisionConfig instance
 /// </summary>
 public static void DeploySiteModelIncrementally(this SSOMProvisionService modelHost,
                                                 SPSite site,
                                                 ModelNode model,
                                                 string incrementalModelId,
                                                 Action <IncrementalProvisionConfig> config)
 {
     modelHost.DeployModelIncrementally(SiteModelHost.FromSite(site), model, incrementalModelId);
 }
예제 #5
0
 public override void DeploySiteModel(ModelNode model)
 {
     WithSSOMContext((site, web) =>
     {
         _provisionService.DeployModel(SiteModelHost.FromSite(site), model);
         _validationService.DeployModel(SiteModelHost.FromSite(site), model);
     });
 }
예제 #6
0
        public override void DeploySiteModel(ModelNode model)
        {
            foreach (var siteUrl in SiteUrls)
            {
                Trace.WriteLine(string.Format("[INF]    Running on site: [{0}]", siteUrl));

                for (var provisionGeneration = 0; provisionGeneration < ProvisionGenerationCount; provisionGeneration++)
                {
                    WithSSOMSiteAndWebContext(siteUrl, (site, web) =>
                    {
                        _provisionService.DeployModel(SiteModelHost.FromSite(site), model);
                        _validationService.DeployModel(SiteModelHost.FromSite(site), model);
                    });
                }
            }
        }
예제 #7
0
 public static void DeploySiteModel(this SSOMProvisionService modelHost, SPSite site, ModelNode model)
 {
     modelHost.DeployModel(SiteModelHost.FromSite(site), model);
 }