com.atlassian.confluence.links
Interface LinkManager

All Known Implementing Classes:
DefaultLinkManager

public interface LinkManager


Field Summary
static String CAMELCASE_LINK_PATTERN
           
static String NORMAL_LINK_PATTERN
           
 
Method Summary
 List extractLinksFromContent(ContentEntityObject content)
           
 String getContentWithRenamedLinks(ContentEntityObject referringContent, SpaceContentEntityObject pageBeingRenamed, String newSpaceKey, String newPageTitle)
          extracts the text from the referring page, renames links with newSpaceKey and newPageTitle and returns the content with updated links
 List getIncomingLinksToContent(ContentEntityObject content)
           
 Collection getReferringContent(ContentEntityObject content)
           
 String getSelfContentWithRenamedLinks(ContentEntityObject referringContent, String newSpaceKey)
          extracts the text from the page to be moved, renames links which target the old space and returns the content with the updated links
 void removeCorruptOutgoingLinks()
           
 void removeLink(OutgoingLink link)
          Remove an internal link
 void renameOutgoingLinksToAttachments(ContentEntityObject refContent, String existingFileName, String newFileName)
          Renames all attachments links on the current page (srcContent) Used for simple renaming of attachments
 void renameOutgoingLinksToMovedAttachments(ContentEntityObject refContent, String existingFileName, String newFileName, ContentEntityObject srcContent, ContentEntityObject destContent)
          Renames all attachment links on the current page.
 void saveLink(OutgoingLink link)
          Save an internal link
 void updateOutgoingLinks(ContentEntityObject content)
           
 

Field Detail

CAMELCASE_LINK_PATTERN

public static final String CAMELCASE_LINK_PATTERN
See Also:
Constant Field Values

NORMAL_LINK_PATTERN

public static final String NORMAL_LINK_PATTERN
See Also:
Constant Field Values
Method Detail

saveLink

public void saveLink(OutgoingLink link)
Save an internal link


removeLink

public void removeLink(OutgoingLink link)
Remove an internal link


getSelfContentWithRenamedLinks

public String getSelfContentWithRenamedLinks(ContentEntityObject referringContent,
                                             String newSpaceKey)
extracts the text from the page to be moved, renames links which target the old space and returns the content with the updated links

Parameters:
referringContent -
newSpaceKey -
Returns:

getIncomingLinksToContent

public List getIncomingLinksToContent(ContentEntityObject content)

getContentWithRenamedLinks

public String getContentWithRenamedLinks(ContentEntityObject referringContent,
                                         SpaceContentEntityObject pageBeingRenamed,
                                         String newSpaceKey,
                                         String newPageTitle)
extracts the text from the referring page, renames links with newSpaceKey and newPageTitle and returns the content with updated links

Parameters:
referringContent - page that contains a link to the pageBeingRenamed
pageBeingRenamed - page that is being renamed or moved
newSpaceKey - the new space key of 'pageBeingRenamed'
newPageTitle - the new title for 'pageBeingRenamed'

renameOutgoingLinksToAttachments

public void renameOutgoingLinksToAttachments(ContentEntityObject refContent,
                                             String existingFileName,
                                             String newFileName)
Renames all attachments links on the current page (srcContent) Used for simple renaming of attachments

Parameters:
refContent -
existingFileName -
newFileName -

renameOutgoingLinksToMovedAttachments

public void renameOutgoingLinksToMovedAttachments(ContentEntityObject refContent,
                                                  String existingFileName,
                                                  String newFileName,
                                                  ContentEntityObject srcContent,
                                                  ContentEntityObject destContent)
Renames all attachment links on the current page. This function has to be used when the attachment is moved.

Parameters:
refContent -
existingFileName -
newFileName -
srcContent -
destContent -

updateOutgoingLinks

public void updateOutgoingLinks(ContentEntityObject content)

extractLinksFromContent

public List extractLinksFromContent(ContentEntityObject content)

getReferringContent

public Collection getReferringContent(ContentEntityObject content)

removeCorruptOutgoingLinks

public void removeCorruptOutgoingLinks()


Confluence is developed by Atlassian.