Package com.atlassian.confluence.links
Class DefaultLinkManager
java.lang.Object
com.atlassian.confluence.links.DefaultLinkManager
- All Implemented Interfaces:
LinkManager
-
Field Summary
Fields inherited from interface com.atlassian.confluence.links.LinkManager
CAMELCASE_LINK_PATTERN, NORMAL_LINK_PATTERN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncountIncomingLinksForContents
(SpaceContentEntityObject rootPage, SpaceContentEntityObject parentPage) Helping method to get all incoming links of multiple contents at once.int
Get the number of pages in a page hierarchy that have incoming links.getReferringContent
(ContentEntityObject content) getReferringContent
(String spaceKey, List<ContentEntityObject> collection) Gets collection of referring content with given set of pages within single spacevoid
void
removeLink
(OutgoingLink link) Remove an internal linkvoid
saveLink
(OutgoingLink link) Save an internal linkvoid
setAttachmentLinksUpdater
(AttachmentLinksUpdater attachmentLinksUpdater) Deprecated.since 7.7 unusedvoid
setLinkDao
(LinkDao linkDao) void
setLinkResolver
(com.atlassian.renderer.links.LinkResolver linkResolver) Deprecated.since 7.7 unusedvoid
setLinksUpdater
(LinksUpdater linksUpdater) Deprecated.since 7.7 unusedvoid
setMacroManager
(com.atlassian.renderer.v2.macro.MacroManager macroManager) Deprecated.since 7.7 unusedvoid
setOutgoingLinksExtractor
(OutgoingLinksExtractor outgoingLinksExtractor) void
setSettingsManager
(SettingsManager settingsManager) Deprecated.since 7.7 unusedvoid
updateOutgoingLinks
(ContentEntityObject content)
-
Constructor Details
-
DefaultLinkManager
public DefaultLinkManager()
-
-
Method Details
-
setLinkDao
-
setLinkResolver
Deprecated.since 7.7 unused -
removeLink
Description copied from interface:LinkManager
Remove an internal link- Specified by:
removeLink
in interfaceLinkManager
-
saveLink
Description copied from interface:LinkManager
Save an internal link- Specified by:
saveLink
in interfaceLinkManager
-
getIncomingLinksToContent
- Specified by:
getIncomingLinksToContent
in 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:LinkManager
Helping method to get all incoming links of multiple contents at once.- Specified by:
countIncomingLinksForContents
in interfaceLinkManager
- Returns:
- Stream of OutgoingLinkMeta
-
countPagesWithIncomingLinks
Description copied from interface:LinkManager
Get the number of pages in a page hierarchy that have incoming links. Note that this excludes links within the hierarchy.- Specified by:
countPagesWithIncomingLinks
in 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
- Specified by:
updateOutgoingLinks
in interfaceLinkManager
-
getReferringContent
- Specified by:
getReferringContent
in 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:LinkManager
Gets collection of referring content with given set of pages within single space- Specified by:
getReferringContent
in interfaceLinkManager
-
removeCorruptOutgoingLinks
public void removeCorruptOutgoingLinks()- Specified by:
removeCorruptOutgoingLinks
in interfaceLinkManager
-
setSettingsManager
Deprecated.since 7.7 unused -
setMacroManager
Deprecated.since 7.7 unused -
setOutgoingLinksExtractor
-
setLinksUpdater
Deprecated.since 7.7 unused -
setAttachmentLinksUpdater
Deprecated.since 7.7 unused
-