当前位置: 首页>>代码示例>>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;未经允许,请勿转载。