Example #1
0
        public int CountWorkflowAssociations(SPWorkflowTemplateInstance template, SPSiteInstance site)
        {
            if (template == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "An instance of a SPWorkflowTemplate object must be supplied as the first argument.");
            }

            if (site == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "An instance of a SPSite object must be supplied as the second argument.");
            }

            return(m_workflowManager.CountWorkflowAssociations(template.SPWorkflowTemplate, site.Site));
        }
        public Base64EncodedByteArrayInstance ListCacheContents(SPSiteInstance site)
        {
            if (site == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "An instance of a site object must be specified as the first argument.");
            }

            using (var ms = new MemoryStream())
            {
                PublishingCache.ListCacheContents(ms, false, site.Site);
                var blob = new Base64EncodedByteArrayInstance(this.Engine.Object.InstancePrototype, ms.ToArray());
                return(blob);
            }
        }
 public void UpdateUsedTermsOnSite(SPSiteInstance site)
 {
     m_termStore.UpdateUsedTermsOnSite(site.Site);
 }
 public void ResyncHiddenList(SPSiteInstance site)
 {
     m_termStore.ResyncHiddenList(site.Site);
 }
        public TermGroupInstance GetSystemGroup(SPSiteInstance site)
        {
            var group = m_termStore.SystemGroup;

            return(new TermGroupInstance(Engine.Object.InstancePrototype, group));
        }
        public TermGroupInstance GetSiteCollectionGroup(SPSiteInstance site)
        {
            var group = m_termStore.GetSiteCollectionGroup(site.Site);

            return(new TermGroupInstance(Engine.Object.InstancePrototype, group));
        }