Class ContentRepresentation
- java.lang.Object
-
- com.atlassian.confluence.api.model.BaseApiEnum
-
- com.atlassian.confluence.api.model.content.ContentRepresentation
-
- All Implemented Interfaces:
ApiEnum
@ExperimentalApi public final class ContentRepresentation extends BaseApiEnum
Enumeration of the different built-in ways that Confluence content bodies can be represented.
-
-
Field Summary
Fields Modifier and Type Field Description static ContentRepresentationANONYMOUS_EXPORT_VIEWHTML representation for viewing, but with absolute urls, instead of relative urls in the markup, and macros are rendered as though it is viewed by an anonymous user.static ContentRepresentationEDITORRepresentation suitable for use in the rich text editorstatic ContentRepresentationEXPORT_VIEWHTML representation for viewing, but with absolute urls, instead of relative urls in the markup.static Iterable<ContentRepresentation>INPUT_CONVERSION_TO_STORAGE_ORDERAn ordered enumeration of ContentRepresentations that can be converted to STORAGE format.static ContentRepresentationPLAINRaw database format as plain text with no XHTML or WIKI markup.static ContentRepresentationRAWRaw "database" format.static ContentRepresentationSTORAGERaw database format, for content that stores data in our XML storage formatstatic ContentRepresentationSTYLED_VIEWA rendered view that includes inline styles in a <style> element, wrapped in an entire <html> structure.static ContentRepresentationVIEWHTML representation for viewing in a web pagestatic ContentRepresentationWIKILegacy WIKI representation-
Fields inherited from class com.atlassian.confluence.api.model.BaseApiEnum
value
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconvertsFromStorage()booleanconvertsToStorage()StringgetRepresentation()StringtoString()FIXME (CRA-176) - the currently returns the string representation of the ContentReprentation.static ContentRepresentationvalueOf(String representation)
-
-
-
Field Detail
-
RAW
public static final ContentRepresentation RAW
Raw "database" format.
-
STORAGE
public static final ContentRepresentation STORAGE
Raw database format, for content that stores data in our XML storage format
-
EDITOR
public static final ContentRepresentation EDITOR
Representation suitable for use in the rich text editor
-
VIEW
public static final ContentRepresentation VIEW
HTML representation for viewing in a web page
-
EXPORT_VIEW
public static final ContentRepresentation EXPORT_VIEW
HTML representation for viewing, but with absolute urls, instead of relative urls in the markup. Useful for exporting.
-
ANONYMOUS_EXPORT_VIEW
public static final ContentRepresentation ANONYMOUS_EXPORT_VIEW
HTML representation for viewing, but with absolute urls, instead of relative urls in the markup, and macros are rendered as though it is viewed by an anonymous user. Useful for exporting in situations where you might not want to reveal sensitive data , or you do not want to pay the cost of a permission check for the export. The output of this can be cached as long as the underlying content has not changed.
-
WIKI
public static final ContentRepresentation WIKI
Legacy WIKI representation
-
PLAIN
public static final ContentRepresentation PLAIN
Raw database format as plain text with no XHTML or WIKI markup.Can be converted to VIEW representation by converting newlines to <br> and representing URLs as HTML links.
-
STYLED_VIEW
public static final ContentRepresentation STYLED_VIEW
A rendered view that includes inline styles in a <style> element, wrapped in an entire <html> structure.
-
INPUT_CONVERSION_TO_STORAGE_ORDER
public static final Iterable<ContentRepresentation> INPUT_CONVERSION_TO_STORAGE_ORDER
An ordered enumeration of ContentRepresentations that can be converted to STORAGE format. When given the option of converting multipleContentBodys to a STORAGE representation, the body chosen for conversion will be the first one encountered in this list.
-
-
Method Detail
-
valueOf
public static ContentRepresentation valueOf(String representation)
-
convertsFromStorage
public boolean convertsFromStorage()
-
convertsToStorage
public boolean convertsToStorage()
-
getRepresentation
public String getRepresentation()
-
toString
public String toString()
FIXME (CRA-176) - the currently returns the string representation of the ContentReprentation. It should return more information, but is this way at the moment to support correct serialization in Jackson.- Overrides:
toStringin classBaseApiEnum
-
-