|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LinksUpdater
Used to update the links on a piece of content. This is required when the destination of a link has been updated. This includes when the destination is moved to a different space, renamed or both.
Nested Class Summary | |
---|---|
static class |
LinksUpdater.AttachmentReferenceDetails
|
static class |
LinksUpdater.PartialReferenceDetails
|
Method Summary | |
---|---|
java.lang.String |
contractAbsoluteReferencesInContent(SpaceContentEntityObject content)
A companion method to { expandRelativeReferencesInContent(SpaceContentEntityObject) that will convert any absolute
references to itself to be relative. |
java.lang.String |
expandRelativeReferencesInContent(SpaceContentEntityObject content)
Expand any relative links or embedded images encountered in the supplied content. |
java.lang.String |
updateAttachmentReferencesInContent(java.lang.String content,
LinksUpdater.AttachmentReferenceDetails old,
LinksUpdater.AttachmentReferenceDetails updated)
Update all the attachment references in the content that referred to the 'old' attachment to now refer to the 'updated' attachment. |
java.lang.String |
updateReferencesInContent(java.lang.String content,
LinksUpdater.PartialReferenceDetails oldLinkDetails,
LinksUpdater.PartialReferenceDetails newLinkDetails)
Update all the links and embedded image references in the content that referred to 'oldDetails' to now refer to 'newDetails'. |
Method Detail |
---|
java.lang.String updateReferencesInContent(java.lang.String content, LinksUpdater.PartialReferenceDetails oldLinkDetails, LinksUpdater.PartialReferenceDetails newLinkDetails)
expandRelativeReferencesInContent(SpaceContentEntityObject)
prior to calling this method to ensure there are no relative links in the content to confuse matters.
content
- the content to update references inoldDetails
- specifies the references to be modifiednewLinkDetails
- specifies the reference to be used in place of those identified by 'oldDetails'.
java.lang.String updateAttachmentReferencesInContent(java.lang.String content, LinksUpdater.AttachmentReferenceDetails old, LinksUpdater.AttachmentReferenceDetails updated)
expandRelativeReferencesInContent(SpaceContentEntityObject)
prior to calling this
method to ensure there are no relative attachment references in the content to confuse matters.
content
- the content to update attachment references inold
- specifies the attachment references to be modifiedupdated
- specifies the new attachment reference to replace the old one with
java.lang.String expandRelativeReferencesInContent(SpaceContentEntityObject content)
content
- the content to be expanded
java.lang.String contractAbsoluteReferencesInContent(SpaceContentEntityObject content)
expandRelativeReferencesInContent(SpaceContentEntityObject)
that will convert any absolute
references to itself to be relative. So in a ResourceIdentifier, if a space key is present for the same space as the supplied
content then this will be dropped. If the ResourceIdentifier actually refers to the SpaceContentEntityObject supplied then it
will be dropped altogether.
content
- the content to have any suitable absolute references contracted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |