com.atlassian.confluence.links
Class DefaultLinkManager

java.lang.Object
  extended by com.atlassian.confluence.links.DefaultLinkManager
All Implemented Interfaces:
LinkManager

public class DefaultLinkManager
extends java.lang.Object
implements LinkManager


Field Summary
static org.apache.log4j.Category log
          Deprecated. since 5.5. Use private logger.
 
Fields inherited from interface com.atlassian.confluence.links.LinkManager
CAMELCASE_LINK_PATTERN, NORMAL_LINK_PATTERN
 
Constructor Summary
DefaultLinkManager()
           
 
Method Summary
 java.util.List extractLinksFromContent(ContentEntityObject content)
           
 java.lang.String getContentWithRenamedLinks(ContentEntityObject referringContent, SpaceContentEntityObject pageBeingChanged, java.lang.String newSpaceKey, java.lang.String newPageTitle)
          Deprecated. since 4.0
 java.util.List getIncomingLinksToContent(ContentEntityObject content)
           
 java.util.Collection getReferringContent(ContentEntityObject content)
           
 java.lang.String getSelfContentWithRenamedLinks(ContentEntityObject referringContent, java.lang.String newSpaceKey)
          Deprecated. since 4.0
 void removeCorruptOutgoingLinks()
           
 void removeLink(OutgoingLink link)
          Remove an internal link
 void renameOutgoingLinksToAttachments(ContentEntityObject referringContent, java.lang.String existingFileName, java.lang.String newFileName)
          Deprecated. since 4.0. See RelatedContentRefactorer.updateReferences(SpaceContentEntityObject, com.atlassian.confluence.spaces.Space, String)
 void renameOutgoingLinksToMovedAttachments(ContentEntityObject referringContent, java.lang.String existingFileName, java.lang.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
 

Field Detail

log

@Deprecated
public static final org.apache.log4j.Category log
Deprecated. since 5.5. Use private logger.
Constructor Detail

DefaultLinkManager

public DefaultLinkManager()
Method Detail

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 java.util.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 java.util.List extractLinksFromContent(ContentEntityObject content)
Specified by:
extractLinksFromContent in interface LinkManager
Returns:

getSelfContentWithRenamedLinks

@Deprecated
public java.lang.String getSelfContentWithRenamedLinks(ContentEntityObject referringContent,
                                                                  java.lang.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 java.lang.String getContentWithRenamedLinks(ContentEntityObject referringContent,
                                                              SpaceContentEntityObject pageBeingChanged,
                                                              java.lang.String newSpaceKey,
                                                              java.lang.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 pageBeingRenamed
pageBeingChanged - page that is being renamed or moved
newSpaceKey - the new space key of 'pageBeingRenamed'
newPageTitle - the new title for 'pageBeingRenamed'

renameOutgoingLinksToAttachments

@Deprecated
public void renameOutgoingLinksToAttachments(ContentEntityObject referringContent,
                                                        java.lang.String existingFileName,
                                                        java.lang.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,
                                                             java.lang.String existingFileName,
                                                             java.lang.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 java.util.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-2014 Atlassian. All Rights Reserved.