Package 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
-
Fields inherited from interface com.atlassian.confluence.links.LinkManager
CAMELCASE_LINK_PATTERN, NORMAL_LINK_PATTERN
-
-
Constructor Summary
Constructors Constructor Description DefaultLinkManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Stream<OutgoingLinkMeta>countIncomingLinksForContents(SpaceContentEntityObject rootPage, SpaceContentEntityObject parentPage)Helping method to get all incoming links of multiple contents at once.intcountPagesWithIncomingLinks(SpaceContentEntityObject rootPage)Get the number of pages in a page hierarchy that have incoming links.List<OutgoingLink>getIncomingLinksToContent(ContentEntityObject content)Collection<ContentEntityObject>getReferringContent(ContentEntityObject content)Collection<ContentEntityObject>getReferringContent(String spaceKey, List<ContentEntityObject> collection)Gets collection of referring content with given set of pages within single spacevoidremoveCorruptOutgoingLinks()voidremoveLink(OutgoingLink link)Remove an internal linkvoidsaveLink(OutgoingLink link)Save an internal linkvoidsetAttachmentLinksUpdater(AttachmentLinksUpdater attachmentLinksUpdater)Deprecated.since 7.7 unusedvoidsetLinkDao(LinkDao linkDao)voidsetLinkResolver(com.atlassian.renderer.links.LinkResolver linkResolver)Deprecated.since 7.7 unusedvoidsetLinksUpdater(LinksUpdater linksUpdater)Deprecated.since 7.7 unusedvoidsetMacroManager(com.atlassian.renderer.v2.macro.MacroManager macroManager)Deprecated.since 7.7 unusedvoidsetOutgoingLinksExtractor(OutgoingLinksExtractor outgoingLinksExtractor)voidsetSettingsManager(SettingsManager settingsManager)Deprecated.since 7.7 unusedvoidupdateOutgoingLinks(ContentEntityObject content)
-
-
-
Method Detail
-
setLinkDao
public void setLinkDao(LinkDao linkDao)
-
setLinkResolver
@Deprecated public void setLinkResolver(com.atlassian.renderer.links.LinkResolver linkResolver)
Deprecated.since 7.7 unused
-
removeLink
public void removeLink(OutgoingLink link)
Description copied from interface:LinkManagerRemove an internal link- Specified by:
removeLinkin interfaceLinkManager
-
saveLink
public void saveLink(OutgoingLink link)
Description copied from interface:LinkManagerSave an internal link- Specified by:
saveLinkin interfaceLinkManager
-
getIncomingLinksToContent
public List<OutgoingLink> getIncomingLinksToContent(ContentEntityObject content)
- Specified by:
getIncomingLinksToContentin interfaceLinkManager- Parameters:
content-- Returns:
- a sorted list of link objects to the content object passed in. does _not_ sort out duplicate links
-
countIncomingLinksForContents
public Stream<OutgoingLinkMeta> countIncomingLinksForContents(SpaceContentEntityObject rootPage, SpaceContentEntityObject parentPage)
Description copied from interface:LinkManagerHelping method to get all incoming links of multiple contents at once.- Specified by:
countIncomingLinksForContentsin interfaceLinkManager- Returns:
- Stream of OutgoingLinkMeta
-
countPagesWithIncomingLinks
public int countPagesWithIncomingLinks(SpaceContentEntityObject rootPage)
Description copied from interface:LinkManagerGet the number of pages in a page hierarchy that have incoming links. Note that this excludes links within the hierarchy.- Specified by:
countPagesWithIncomingLinksin interfaceLinkManager- Parameters:
rootPage- the root page of the hierarchy. Links to this page are also counted.- Returns:
- The number of pages in the hierarchy that have incoming links, excluding links within the hierarchy.
-
updateOutgoingLinks
public void updateOutgoingLinks(ContentEntityObject content)
- Specified by:
updateOutgoingLinksin interfaceLinkManager
-
getReferringContent
public Collection<ContentEntityObject> getReferringContent(ContentEntityObject content)
- Specified by:
getReferringContentin interfaceLinkManager- Parameters:
content-- Returns:
- a collection of content that currently links to the content object passed in here
-
getReferringContent
public Collection<ContentEntityObject> getReferringContent(String spaceKey, List<ContentEntityObject> collection)
Description copied from interface:LinkManagerGets collection of referring content with given set of pages within single space- Specified by:
getReferringContentin interfaceLinkManager
-
removeCorruptOutgoingLinks
public void removeCorruptOutgoingLinks()
- Specified by:
removeCorruptOutgoingLinksin interfaceLinkManager
-
setSettingsManager
@Deprecated public void setSettingsManager(SettingsManager settingsManager)
Deprecated.since 7.7 unused
-
setMacroManager
@Deprecated public void setMacroManager(com.atlassian.renderer.v2.macro.MacroManager macroManager)
Deprecated.since 7.7 unused
-
setOutgoingLinksExtractor
public void setOutgoingLinksExtractor(OutgoingLinksExtractor outgoingLinksExtractor)
-
setLinksUpdater
@Deprecated public void setLinksUpdater(LinksUpdater linksUpdater)
Deprecated.since 7.7 unused
-
setAttachmentLinksUpdater
@Deprecated public void setAttachmentLinksUpdater(AttachmentLinksUpdater attachmentLinksUpdater)
Deprecated.since 7.7 unused
-
-