com.atlassian.confluence.xhtml.api
Class RichTextLinkBody
java.lang.Object
com.atlassian.confluence.xhtml.api.RichTextLinkBody
- All Implemented Interfaces:
- LinkBody<java.lang.String>
public class RichTextLinkBody
- extends java.lang.Object
- implements LinkBody<java.lang.String>
A RichTextLinkBody is one that contains XHTML data and may be displayed on an XHTML client without requiring any encoding.
It is an unfortunate implementation detail of the Confluence XHTML backend that we actually convert all HTML received from
the editor to XML(XHTML) so while a RichTextLinkBody should actually represent HTML in actual use you can assume it to be
XML.
Developer Notes:
If we want to transition this to be correct we should do the following -
- Change the storage marshalling to store RichTextLinkBody as CDATA (HTML cannot be stored in XHTML in any other way).
- Create an upgrade task to convert any existing link bodies found to contain tags to CDATA
Once this is done the back-end is ready to properly handle HTML link bodies. However we would still be converting HTML
received from the editor to XML higher in the stack which is the reason I haven't done this yet.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
RichTextLinkBody
public RichTextLinkBody(java.lang.String body)
getBody
public java.lang.String getBody()
- Specified by:
getBody
in interface LinkBody<java.lang.String>
- Returns:
- the underlying data represented by this link body.
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2003-2014 Atlassian. All Rights Reserved.