com.atlassian.confluence.links
Class DefaultLinkManager
java.lang.Object
com.atlassian.confluence.links.DefaultLinkManager
- All Implemented Interfaces:
- LinkManager
public class DefaultLinkManager
- extends Object
- implements LinkManager
|
Field Summary |
static org.apache.log4j.Category |
log
|
|
Method Summary |
List |
extractLinksFromContent(ContentEntityObject content)
|
String |
getContentWithRenamedLinks(ContentEntityObject referringContent,
SpaceContentEntityObject pageBeingChanged,
String newSpaceKey,
String newPageTitle)
Deprecated. since 4.0 |
List |
getIncomingLinksToContent(ContentEntityObject content)
|
Collection |
getReferringContent(ContentEntityObject content)
|
String |
getSelfContentWithRenamedLinks(ContentEntityObject referringContent,
String newSpaceKey)
Deprecated. since 4.0 |
void |
removeCorruptOutgoingLinks()
|
void |
removeLink(OutgoingLink link)
Remove an internal link |
void |
renameOutgoingLinksToAttachments(ContentEntityObject referringContent,
String existingFileName,
String newFileName)
Deprecated. since 4.0. See RelatedContentRefactorer.updateReferences(SpaceContentEntityObject, com.atlassian.confluence.spaces.Space, String) |
void |
renameOutgoingLinksToMovedAttachments(ContentEntityObject referringContent,
String existingFileName,
String newFileName,
ContentEntityObject srcContent,
ContentEntityObject destContent)
Deprecated. |
void |
saveLink(OutgoingLink link)
Save an internal link |
void |
setAttachmentLinksUpdater(AttachmentLinksUpdater attachmentLinksUpdater)
|
void |
setLinkDao(LinkDao linkDao)
|
void |
setLinkResolver(com.atlassian.renderer.links.LinkResolver linkResolver)
|
void |
setLinksUpdater(LinksUpdater linksUpdater)
|
void |
setMacroManager(com.atlassian.renderer.v2.macro.MacroManager macroManager)
|
void |
setOutgoingLinksExtractor(OutgoingLinksExtractor outgoingLinksExtractor)
|
void |
setSettingsManager(SettingsManager settingsManager)
|
void |
updateOutgoingLinks(ContentEntityObject content)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final org.apache.log4j.Category log
DefaultLinkManager
public DefaultLinkManager()
setLinkDao
public void setLinkDao(LinkDao linkDao)
setLinkResolver
public void setLinkResolver(com.atlassian.renderer.links.LinkResolver linkResolver)
removeLink
public void removeLink(OutgoingLink link)
- Description copied from interface:
LinkManager
- Remove an internal link
- Specified by:
removeLink in interface LinkManager
saveLink
public void saveLink(OutgoingLink link)
- Description copied from interface:
LinkManager
- Save an internal link
- Specified by:
saveLink in interface LinkManager
getIncomingLinksToContent
public List getIncomingLinksToContent(ContentEntityObject content)
- Specified by:
getIncomingLinksToContent in interface LinkManager
- Parameters:
content -
- Returns:
- a sorted list of link objects to the content object passed in. does _not_ sort out duplicate links
extractLinksFromContent
public List extractLinksFromContent(ContentEntityObject content)
- Specified by:
extractLinksFromContent in interface LinkManager
- Returns:
getSelfContentWithRenamedLinks
@Deprecated
public String getSelfContentWithRenamedLinks(ContentEntityObject referringContent,
String newSpaceKey)
- Deprecated. since 4.0
- Description copied from interface:
LinkManager
- extracts the text from the page to be moved, renames links which target the old space and returns the content with the updated links
- Specified by:
getSelfContentWithRenamedLinks in interface LinkManager
getContentWithRenamedLinks
@Deprecated
public String getContentWithRenamedLinks(ContentEntityObject referringContent,
SpaceContentEntityObject pageBeingChanged,
String newSpaceKey,
String newPageTitle)
- Deprecated. since 4.0
- Description copied from interface:
LinkManager
- extracts the text from the referring page, renames links with newSpaceKey and newPageTitle and returns the content with updated links
- Specified by:
getContentWithRenamedLinks in interface LinkManager
- Parameters:
referringContent - page that contains a link to the pageBeingRenamedpageBeingChanged - page that is being renamed or movednewSpaceKey - the new space key of 'pageBeingRenamed'newPageTitle - the new title for 'pageBeingRenamed'
renameOutgoingLinksToAttachments
@Deprecated
public void renameOutgoingLinksToAttachments(ContentEntityObject referringContent,
String existingFileName,
String newFileName)
- Deprecated. since 4.0. See
RelatedContentRefactorer.updateReferences(SpaceContentEntityObject, com.atlassian.confluence.spaces.Space, String)
- Description copied from interface:
LinkManager
- Renames all attachments links on the current page (srcContent)
Used for simple renaming of attachments
- Specified by:
renameOutgoingLinksToAttachments in interface LinkManager
renameOutgoingLinksToMovedAttachments
@Deprecated
public void renameOutgoingLinksToMovedAttachments(ContentEntityObject referringContent,
String existingFileName,
String newFileName,
ContentEntityObject srcContent,
ContentEntityObject destContent)
throws LinksUpdateException
- Deprecated.
- Description copied from interface:
LinkManager
- Renames all attachment links on the current page.
This function has to be used when the attachment is moved.
- Specified by:
renameOutgoingLinksToMovedAttachments in interface LinkManager
- Throws:
LinksUpdateException
updateOutgoingLinks
public void updateOutgoingLinks(ContentEntityObject content)
- Specified by:
updateOutgoingLinks in interface LinkManager
getReferringContent
public Collection getReferringContent(ContentEntityObject content)
- Specified by:
getReferringContent in interface LinkManager
- Parameters:
content -
- Returns:
- a collection of content that currently links to the content object passed in here
removeCorruptOutgoingLinks
public void removeCorruptOutgoingLinks()
- Specified by:
removeCorruptOutgoingLinks in interface LinkManager
setSettingsManager
public void setSettingsManager(SettingsManager settingsManager)
setMacroManager
public void setMacroManager(com.atlassian.renderer.v2.macro.MacroManager macroManager)
setOutgoingLinksExtractor
public void setOutgoingLinksExtractor(OutgoingLinksExtractor outgoingLinksExtractor)
setLinksUpdater
public void setLinksUpdater(LinksUpdater linksUpdater)
setAttachmentLinksUpdater
public void setAttachmentLinksUpdater(AttachmentLinksUpdater attachmentLinksUpdater)
Copyright © 2003-2012 Atlassian. All Rights Reserved.