com.atlassian.confluence.links
Interface LinkManager

All Known Implementing Classes:
DefaultLinkManager

public interface LinkManager


Field Summary
static java.lang.String CAMELCASE_LINK_PATTERN
           
static java.lang.String NORMAL_LINK_PATTERN
           
 
Method Summary
 java.util.List extractLinksFromContent(ContentEntityObject content)
           
 java.lang.String getContentWithRenamedLinks(ContentEntityObject referringContent, SpaceContentEntityObject pageBeingRenamed, java.lang.String newSpaceKey, java.lang.String newPageTitle)
          extracts the text from the referring page, renames links with newSpaceKey and newPageTitle and returns the content with updated links
 java.util.List getIncomingLinksToContent(ContentEntityObject content)
           
 java.util.Collection<ContentEntityObject> getReferringContent(ContentEntityObject content)
           
 java.lang.String getSelfContentWithRenamedLinks(ContentEntityObject referringContent, java.lang.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, java.lang.String existingFileName, java.lang.String newFileName)
          Renames all attachments links on the current page (srcContent) Used for simple renaming of attachments
 void renameOutgoingLinksToMovedAttachments(ContentEntityObject refContent, java.lang.String existingFileName, java.lang.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

static final java.lang.String CAMELCASE_LINK_PATTERN
See Also:
Constant Field Values

NORMAL_LINK_PATTERN

static final java.lang.String NORMAL_LINK_PATTERN
See Also:
Constant Field Values
Method Detail

saveLink

void saveLink(OutgoingLink link)
Save an internal link


removeLink

void removeLink(OutgoingLink link)
Remove an internal link


getSelfContentWithRenamedLinks

java.lang.String getSelfContentWithRenamedLinks(ContentEntityObject referringContent,
                                                java.lang.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

java.util.List getIncomingLinksToContent(ContentEntityObject content)

getContentWithRenamedLinks

java.lang.String getContentWithRenamedLinks(ContentEntityObject referringContent,
                                            SpaceContentEntityObject pageBeingRenamed,
                                            java.lang.String newSpaceKey,
                                            java.lang.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

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

Parameters:
refContent -
existingFileName -
newFileName -

renameOutgoingLinksToMovedAttachments

void renameOutgoingLinksToMovedAttachments(ContentEntityObject refContent,
                                           java.lang.String existingFileName,
                                           java.lang.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

void updateOutgoingLinks(ContentEntityObject content)

extractLinksFromContent

java.util.List extractLinksFromContent(ContentEntityObject content)

getReferringContent

java.util.Collection<ContentEntityObject> getReferringContent(ContentEntityObject content)

removeCorruptOutgoingLinks

void removeCorruptOutgoingLinks()


Copyright © 2003-2010 Atlassian. All Rights Reserved.