com.atlassian.confluence.util
Class AbstractPageLinkRenamingBean

java.lang.Object
  extended by com.atlassian.confluence.util.AbstractLinkRenamingBean
      extended by com.atlassian.confluence.util.AbstractPageLinkRenamingBean
All Implemented Interfaces:
LinkRenamingBean, com.atlassian.renderer.v2.components.WikiContentHandler
Direct Known Subclasses:
BlogPostLinkRenamingBean, PageLinkRenamingBean

public abstract class AbstractPageLinkRenamingBean
extends AbstractLinkRenamingBean

Common base class for renaming links to different page types.


Field Summary
 
Fields inherited from class com.atlassian.confluence.util.AbstractLinkRenamingBean
newSpaceKey, newTitle, pageBeingChanged, referringContent
 
Constructor Summary
AbstractPageLinkRenamingBean(ContentEntityObject referringContent, SpaceContentEntityObject pageBeingChanged, java.lang.String newSpaceKey, java.lang.String newTitle)
           
 
Method Summary
protected abstract  java.lang.String getCurrentLinkPart()
          Use the AbstractLinkRenamingBean.getPageBeingChanged() to calculate (according to the content type's linking rules) the current (before the rename) link part to the page.
protected abstract  java.lang.String getNewLinkPart()
          Use the AbstractLinkRenamingBean.getPageBeingChanged(), AbstractLinkRenamingBean.newSpaceKey, and AbstractLinkRenamingBean.newTitle to caclulate (according to the content type's rules) a link to the content after the rename.
 void handleText(java.lang.StringBuffer buffer, java.lang.String s)
           
 
Methods inherited from class com.atlassian.confluence.util.AbstractLinkRenamingBean
escapeDollars, getPageBeingChanged, getReferringContentSpaceKey, getRenamedContent, handleMacro, setMacroManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPageLinkRenamingBean

public AbstractPageLinkRenamingBean(ContentEntityObject referringContent,
                                    SpaceContentEntityObject pageBeingChanged,
                                    java.lang.String newSpaceKey,
                                    java.lang.String newTitle)
Method Detail

handleText

public void handleText(java.lang.StringBuffer buffer,
                       java.lang.String s)
Specified by:
handleText in interface com.atlassian.renderer.v2.components.WikiContentHandler
Specified by:
handleText in class AbstractLinkRenamingBean

getCurrentLinkPart

protected abstract java.lang.String getCurrentLinkPart()
Use the AbstractLinkRenamingBean.getPageBeingChanged() to calculate (according to the content type's linking rules) the current (before the rename) link part to the page. The link part is the part of a wiki link that is used to identify the page by title or other unique identifier.

Returns:
the current link part of the page

getNewLinkPart

protected abstract java.lang.String getNewLinkPart()
Use the AbstractLinkRenamingBean.getPageBeingChanged(), AbstractLinkRenamingBean.newSpaceKey, and AbstractLinkRenamingBean.newTitle to caclulate (according to the content type's rules) a link to the content after the rename.

Returns:
the new link part of the page


Copyright © 2003-2010 Atlassian. All Rights Reserved.