com.atlassian.confluence.content.render.xhtml.definition
Class PlainTextMacroBody

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.definition.PlainTextMacroBody
All Implemented Interfaces:
MacroBody

public class PlainTextMacroBody
extends java.lang.Object
implements MacroBody

Holds plain text and preserves white space.

When presented for use in the editor, HTML content will be escaped.

When presented for use in storage, the body will be wrapped in a CDATA section.


Constructor Summary
PlainTextMacroBody(java.lang.String body)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getBody()
           
 Streamable getBodyStream()
           
 Streamable getStorageBodyStream()
           
 Streamable getTransformedBodyStream()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlainTextMacroBody

public PlainTextMacroBody(java.lang.String body)
Method Detail

getBodyStream

public Streamable getBodyStream()
Specified by:
getBodyStream in interface MacroBody
Returns:
the macro body as a {code Streamable}. May be transformed, if that is the required format.
See Also:
MacroBody.getStorageBodyStream(), MacroBody.getTransformedBodyStream(), RequiresFormat

getBody

public java.lang.String getBody()
Specified by:
getBody in interface MacroBody
Returns:
the macro body as a string. May be transformed, if that is the required format.
See Also:
MacroBody.getStorageBodyStream(), MacroBody.getTransformedBodyStream(), RequiresFormat

getTransformedBodyStream

public Streamable getTransformedBodyStream()
Specified by:
getTransformedBodyStream in interface MacroBody
Returns:
the macro body, transformed by the current pipeline (if transformation was enabled). Can be null.

getStorageBodyStream

public Streamable getStorageBodyStream()
Specified by:
getStorageBodyStream in interface MacroBody
Returns:
the storage format of the macro body, without any transforms applied.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2003-2014 Atlassian. All Rights Reserved.