|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.content.render.xhtml.links.XhtmlLinksUpdater
public class XhtmlLinksUpdater
Updates all canonical links in an XHTML document to reflect a modified space key or title or both. This will update space keys and titles in page, blogpost and attachment links.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.confluence.content.render.xhtml.links.LinksUpdater |
---|
LinksUpdater.AttachmentReferenceDetails, LinksUpdater.PartialReferenceDetails |
Constructor Summary | |
---|---|
XhtmlLinksUpdater(XmlEventReaderFactory xmlEventReaderFactory,
javax.xml.stream.XMLOutputFactory xmlOutputFactory,
javax.xml.stream.XMLEventFactory xmlEventFactory,
Marshaller<ResourceIdentifier> resourceIdentifierMarshaller,
ResourceIdentifierFactory resourceIdentifierFactory)
|
Method Summary | |
---|---|
java.lang.String |
contractAbsoluteReferencesInContent(SpaceContentEntityObject content)
A companion method to { LinksUpdater.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'. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XhtmlLinksUpdater(XmlEventReaderFactory xmlEventReaderFactory, javax.xml.stream.XMLOutputFactory xmlOutputFactory, javax.xml.stream.XMLEventFactory xmlEventFactory, Marshaller<ResourceIdentifier> resourceIdentifierMarshaller, ResourceIdentifierFactory resourceIdentifierFactory)
Method Detail |
---|
public java.lang.String updateReferencesInContent(java.lang.String content, LinksUpdater.PartialReferenceDetails oldLinkDetails, LinksUpdater.PartialReferenceDetails newLinkDetails)
LinksUpdater
LinksUpdater.expandRelativeReferencesInContent(SpaceContentEntityObject)
prior to calling this method to ensure there are no relative links in the content to confuse matters.
updateReferencesInContent
in interface LinksUpdater
content
- the content to update references innewLinkDetails
- specifies the reference to be used in place of those identified by 'oldDetails'.
public java.lang.String expandRelativeReferencesInContent(SpaceContentEntityObject content)
LinksUpdater
expandRelativeReferencesInContent
in interface LinksUpdater
content
- the content to be expanded
public java.lang.String updateAttachmentReferencesInContent(java.lang.String content, LinksUpdater.AttachmentReferenceDetails old, LinksUpdater.AttachmentReferenceDetails updated)
LinksUpdater
LinksUpdater.expandRelativeReferencesInContent(SpaceContentEntityObject)
prior to calling this
method to ensure there are no relative attachment references in the content to confuse matters.
updateAttachmentReferencesInContent
in interface LinksUpdater
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
public java.lang.String contractAbsoluteReferencesInContent(SpaceContentEntityObject content)
LinksUpdater
LinksUpdater.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.
contractAbsoluteReferencesInContent
in interface LinksUpdater
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 |