public class DefaultLinkManager extends Object implements LinkManager
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Category |
log
Deprecated.
since 5.5. Use private logger.
|
CAMELCASE_LINK_PATTERN, NORMAL_LINK_PATTERN
Constructor and Description |
---|
DefaultLinkManager() |
Modifier and Type | Method and Description |
---|---|
Stream<OutgoingLinkMeta> |
countIncomingLinksForContents(SpaceContentEntityObject rootPage,
SpaceContentEntityObject parentPage)
Helping method to get all incoming links of multiple contents at once.
|
int |
countPagesWithIncomingLinks(SpaceContentEntityObject rootPage)
Get the number of pages in a page hierarchy that have incoming links.
|
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) |
Collection<ContentEntityObject> |
getReferringContent(String spaceKey,
List<ContentEntityObject> collection)
Gets collection of referring content with given set of pages within single space
|
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)
|
void |
renameOutgoingLinksToMovedAttachments(ContentEntityObject referringContent,
String existingFileName,
String newFileName,
ContentEntityObject srcContent,
ContentEntityObject destContent)
Deprecated.
since 4.0.
|
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) |
@Deprecated public static final org.apache.log4j.Category log
public void setLinkDao(LinkDao linkDao)
public void setLinkResolver(com.atlassian.renderer.links.LinkResolver linkResolver)
public void removeLink(OutgoingLink link)
LinkManager
removeLink
in interface LinkManager
public void saveLink(OutgoingLink link)
LinkManager
saveLink
in interface LinkManager
public List getIncomingLinksToContent(ContentEntityObject content)
getIncomingLinksToContent
in interface LinkManager
content
- public List extractLinksFromContent(ContentEntityObject content)
extractLinksFromContent
in interface LinkManager
@Deprecated public String getSelfContentWithRenamedLinks(ContentEntityObject referringContent, String newSpaceKey)
LinkManager
getSelfContentWithRenamedLinks
in interface LinkManager
@Deprecated public String getContentWithRenamedLinks(ContentEntityObject referringContent, SpaceContentEntityObject pageBeingChanged, String newSpaceKey, String newPageTitle)
LinkManager
getContentWithRenamedLinks
in interface LinkManager
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'public Stream<OutgoingLinkMeta> countIncomingLinksForContents(SpaceContentEntityObject rootPage, SpaceContentEntityObject parentPage)
LinkManager
countIncomingLinksForContents
in interface LinkManager
public int countPagesWithIncomingLinks(SpaceContentEntityObject rootPage)
LinkManager
countPagesWithIncomingLinks
in interface LinkManager
rootPage
- the root page of the hierarchy. Links to this page are also counted.@Deprecated public void renameOutgoingLinksToAttachments(ContentEntityObject referringContent, String existingFileName, String newFileName)
RelatedContentRefactorer.updateReferences(SpaceContentEntityObject, com.atlassian.confluence.spaces.Space, String)
LinkManager
renameOutgoingLinksToAttachments
in interface LinkManager
@Deprecated public void renameOutgoingLinksToMovedAttachments(ContentEntityObject referringContent, String existingFileName, String newFileName, ContentEntityObject srcContent, ContentEntityObject destContent) throws LinksUpdateException
LinkManager
renameOutgoingLinksToMovedAttachments
in interface LinkManager
LinksUpdateException
public void updateOutgoingLinks(ContentEntityObject content)
updateOutgoingLinks
in interface LinkManager
public Collection getReferringContent(ContentEntityObject content)
getReferringContent
in interface LinkManager
content
- public Collection<ContentEntityObject> getReferringContent(String spaceKey, List<ContentEntityObject> collection)
LinkManager
getReferringContent
in interface LinkManager
public void removeCorruptOutgoingLinks()
removeCorruptOutgoingLinks
in interface LinkManager
public void setSettingsManager(SettingsManager settingsManager)
public void setMacroManager(com.atlassian.renderer.v2.macro.MacroManager macroManager)
public void setOutgoingLinksExtractor(OutgoingLinksExtractor outgoingLinksExtractor)
public void setLinksUpdater(LinksUpdater linksUpdater)
public void setAttachmentLinksUpdater(AttachmentLinksUpdater attachmentLinksUpdater)
Copyright © 2003–2017 Atlassian. All rights reserved.