com.atlassian.confluence.xhtml.api
Class RichTextLinkBody

java.lang.Object
  extended by com.atlassian.confluence.xhtml.api.RichTextLinkBody
All Implemented Interfaces:
LinkBody<String>

public class RichTextLinkBody
extends Object
implements LinkBody<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 -

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.


Constructor Summary
RichTextLinkBody(String body)
           
 
Method Summary
 boolean equals(Object other)
           
 String getBody()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RichTextLinkBody

public RichTextLinkBody(String body)
Method Detail

getBody

public String getBody()
Specified by:
getBody in interface LinkBody<String>
Returns:
the underlying data represented by this link body.

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2012 Atlassian. All Rights Reserved.