Package com.atlassian.confluence.util
Class AbstractPageLinkRenamingBean
- java.lang.Object
-
- com.atlassian.confluence.util.AbstractLinkRenamingBean
-
- 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
Constructors Constructor Description AbstractPageLinkRenamingBean(ContentEntityObject referringContent, SpaceContentEntityObject pageBeingChanged, String newSpaceKey, String newTitle)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
getCurrentLinkPart()
Use theAbstractLinkRenamingBean.getPageBeingChanged()
to calculate (according to the content type's linking rules) the current (before the rename) link part to the page.protected abstract String
getNewLinkPart()
Use theAbstractLinkRenamingBean.getPageBeingChanged()
,AbstractLinkRenamingBean.newSpaceKey
, andAbstractLinkRenamingBean.newTitle
to caclulate (according to the content type's rules) a link to the content after the rename.void
handleText(StringBuffer buffer, String s)
-
Methods inherited from class com.atlassian.confluence.util.AbstractLinkRenamingBean
escapeDollars, getPageBeingChanged, getReferringContentSpaceKey, getRenamedContent, handleMacro, setMacroManager
-
-
-
-
Constructor Detail
-
AbstractPageLinkRenamingBean
public AbstractPageLinkRenamingBean(ContentEntityObject referringContent, SpaceContentEntityObject pageBeingChanged, String newSpaceKey, String newTitle)
-
-
Method Detail
-
handleText
public void handleText(StringBuffer buffer, String s)
- Specified by:
handleText
in interfacecom.atlassian.renderer.v2.components.WikiContentHandler
- Specified by:
handleText
in classAbstractLinkRenamingBean
-
getCurrentLinkPart
protected abstract String getCurrentLinkPart()
Use theAbstractLinkRenamingBean.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 String getNewLinkPart()
Use theAbstractLinkRenamingBean.getPageBeingChanged()
,AbstractLinkRenamingBean.newSpaceKey
, andAbstractLinkRenamingBean.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
-
-