當前位置: 首頁>>代碼示例>>Java>>正文


Java AbstractPage類代碼示例

本文整理匯總了Java中com.atlassian.confluence.pages.AbstractPage的典型用法代碼示例。如果您正苦於以下問題:Java AbstractPage類的具體用法?Java AbstractPage怎麽用?Java AbstractPage使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AbstractPage類屬於com.atlassian.confluence.pages包,在下文中一共展示了AbstractPage類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: updateSpecification

import com.atlassian.confluence.pages.AbstractPage; //導入依賴的package包/類
private void updateSpecification(Event evt) throws GreenPepperServerException
{
	PageUpdateEvent pageEvt = (PageUpdateEvent) evt;
	AbstractPage oldPage = pageEvt.getOriginalPage();
	Page newPage = pageEvt.getPage();

	if(newPage != null && oldPage != null && !newPage.getTitle().equals(oldPage.getTitle()))
	{
		Specification oldSpecification = Specification.newInstance(oldPage.getTitle());
		oldSpecification.setRepository(gp.getHomeRepository(newPage.getSpace().getKey()));
		try
		{
			Specification newSpecification = Specification.newInstance(newPage.getTitle());
			newSpecification.setRepository(gp.getHomeRepository(newPage.getSpace().getKey()));
			gp.getGPServerService().updateSpecification(oldSpecification, newSpecification);
		}
		catch (GreenPepperServerException e)
		{
			gp.getGPServerService().removeSpecification(oldSpecification);
		}
	}
}
 
開發者ID:strator-dev,項目名稱:greenpepper,代碼行數:23,代碼來源:GreenPepperPageListener.java

示例2: onLabelAddEvent

import com.atlassian.confluence.pages.AbstractPage; //導入依賴的package包/類
@EventListener
public void onLabelAddEvent(LabelAddEvent labelAddEvent) {
    if (labelAddEvent.getLabelled() instanceof AbstractPage) {
        Labelable labelled = labelAddEvent.getLabelled();
        Namespace namespace = labelAddEvent.getLabel().getNamespace();
        String visibility = namespace != null ? namespace.getVisibility() : "";
        String prefix = namespace != null ? namespace.getPrefix() : "";
        String source = labelled instanceof Page ? "page" : "blogpost";
        metricCollector.labelAddCounter(visibility, prefix, source, ((AbstractPage) labelled).getSpaceKey());
    }
}
 
開發者ID:AndreyVMarkelov,項目名稱:prom-confluence-exporter,代碼行數:12,代碼來源:MetricListener.java

示例3: onLabelRemoveEvent

import com.atlassian.confluence.pages.AbstractPage; //導入依賴的package包/類
@EventListener
public void onLabelRemoveEvent(LabelRemoveEvent labelRemoveEvent) {
    if (labelRemoveEvent.getLabelled() instanceof AbstractPage) {
        Labelable labelled = labelRemoveEvent.getLabelled();
        Namespace namespace = labelRemoveEvent.getLabel().getNamespace();
        String visibility = namespace != null ? namespace.getVisibility() : "";
        String prefix = namespace != null ? namespace.getPrefix() : "";
        String source = labelled instanceof Page ? "page" : "blogpost";
        metricCollector.labelRemoveCounter(visibility, prefix, source, ((AbstractPage) labelled).getSpaceKey());
    }
}
 
開發者ID:AndreyVMarkelov,項目名稱:prom-confluence-exporter,代碼行數:12,代碼來源:MetricListener.java

示例4: getImplementedPage

import com.atlassian.confluence.pages.AbstractPage; //導入依賴的package包/類
/**
 * Retrieves the content of the specification at the implemented version.
 *
 * @param page a {@link com.atlassian.confluence.pages.Page} object.
 * @return the content of the specification at the implemented version.
 * @throws com.greenpepper.server.GreenPepperServerException if any.
 */
public AbstractPage getImplementedPage(Page page) throws GreenPepperServerException {
    Integer version = getImplementedVersion(page);
    if (version == null)
        throw new GreenPepperServerException(NEVER_IMPLEMENTED, "Never Implemented");

    return getPageManager().getPageByVersion(page, version);
}
 
開發者ID:strator-dev,項目名稱:greenpepper,代碼行數:15,代碼來源:ConfluenceGreenPepper.java

示例5: getPageContent

import com.atlassian.confluence.pages.AbstractPage; //導入依賴的package包/類
public String getPageContent(Page currentPage, Boolean implementedVersion) throws LivingDocServerException {
    AbstractPage page = currentPage;
    if (implementedVersion) {
        page = getImplementedPage(currentPage);
    }

    return page.getBodyAsString();
}
 
開發者ID:testIT-LivingDoc,項目名稱:livingdoc-confluence,代碼行數:9,代碼來源:LivingDocConfluenceManager.java

示例6: getImplementedPage

import com.atlassian.confluence.pages.AbstractPage; //導入依賴的package包/類
/**
 * Retrieves the content of the specification at the implemented version.
 * 
 * @param page
 * @return the content of the specification at the implemented version.
 * @throws LivingDocServerException
 */
public AbstractPage getImplementedPage(Page page) throws LivingDocServerException {
    Integer version = getImplementedVersion(page);
    if (version == null)
        throw new LivingDocServerException(NEVER_IMPLEMENTED, "Never Implemented");

    return getPageManager().getPageByVersion(page, version);
}
 
開發者ID:testIT-LivingDoc,項目名稱:livingdoc-confluence,代碼行數:15,代碼來源:LivingDocConfluenceManager.java

示例7: containsPageMacro

import com.atlassian.confluence.pages.AbstractPage; //導入依賴的package包/類
private boolean containsPageMacro(AbstractPage page) {
    String content = page.getBodyAsString();
    return StringUtils.contains(content, LivingDocPage.MACRO_KEY);
}
 
開發者ID:testIT-LivingDoc,項目名稱:livingdoc-confluence,代碼行數:5,代碼來源:LivingDocPageListener.java

示例8: getPageContent

import com.atlassian.confluence.pages.AbstractPage; //導入依賴的package包/類
/**
 * <p>getPageContent.</p>
 *
 * @param currentPage a {@link com.atlassian.confluence.pages.Page} object.
 * @param implementedVersion a {@link java.lang.Boolean} object.
 * @return a {@link java.lang.String} object.
 * @throws com.greenpepper.server.GreenPepperServerException if any.
 */
public String getPageContent(Page currentPage, Boolean implementedVersion) throws GreenPepperServerException {
    AbstractPage page = currentPage;
    if (implementedVersion) {
        page = getImplementedPage(currentPage);
    }
    return getBodyTypeAwareRenderer().render(page);
}
 
開發者ID:strator-dev,項目名稱:greenpepper,代碼行數:16,代碼來源:ConfluenceGreenPepper.java


注:本文中的com.atlassian.confluence.pages.AbstractPage類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。