public Page getPage(string spaceKey, string pageTitle)
        {
            RemotePage page     = null;
            string     cacheKey = spaceKey + pageTitle;

            if (pageCache.Contains(cacheKey))
            {
                page = pageCache[cacheKey];
            }
            if (page == null)
            {
                checkCredentials();
                page = confluence.getPage(credentials, spaceKey, pageTitle);
                pageCache.Add(cacheKey, page);
            }
            return(new Page(page));
        }
Esempio n. 2
0
        /// <summary>
        /// Uppfærir Wiki-skjal eftir númeri.
        /// </summary>
        /// <param name="page_id">Númer Wiki-skjals sem skal uppfæra.</param>
        /// <param name="content">Wiki-kóði sem með skal uppfæra viðkomandi Wiki-skjal.</param>
        /// <param name="overwrite">Ef ekki true er reynt að uppfæra aðeins Lýsingar- Inntaks-, Úttaks- og Dæmskafla Wiki-skjals en halda öðrum
        /// hlutum þess óbreyttum, annars er Wiki-skjal yfirskrifað.</param>
        /// <returns>RemotePage-hlutur sem samsvarar uppfærðu Wiki-skjali.</returns>
        private RemotePage UpdatePage(long page_id, string page_title, string content, bool overwrite)
        {
            RemotePage page = confluence.getPage(wiki_access_token, page_id);

            page.content = overwrite ? content : Helper.MergePage(content, page.content);
            page.title   = page_title;

            return(confluence.updatePage(wiki_access_token, page, new RemotePageUpdateOptions()
            {
                versionComment = VERSION_COMMENT
            }));
        }
Esempio n. 3
0
        RemotePage GetPage(string title, string parentTitle, string space)
        {
            RemotePage page;

            try
            {
                page = m_soapService.getPage(m_soapAuthToken, space, title);
            }
            catch
            {
                page = new RemotePage();
            }

            page.space = space;
            page.title = title;

            if (parentTitle != "")
            {
                page.parentId = m_soapService.getPage(m_soapAuthToken, space, parentTitle).id;
            }

            return(page);
        }
Esempio n. 4
0
 public RemotePage GetPage(long pageId)
 {
     return(_service.getPage(_authToken, pageId));
 }
        public Page GetPage(long pageId)
        {
            var page = m_client.getPage(m_token, pageId);

            return(ToPage(page));
        }