Package com.atlassian.confluence.util
Class ConfluenceRenderUtils
java.lang.Object
com.atlassian.confluence.util.ConfluenceRenderUtils
Utilities for rendering Confluence wiki content.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic @Nullable StringgetAbsoluteAttachmentRemotePath(@Nullable Attachment attachment) Returns the remote path to the given attachment and its siblings.static @Nullable StringgetAttachmentRemotePath(@Nullable ContentEntityObject content) Returns the remote path to the attachments of the givenContentEntityObject.static @Nullable StringgetAttachmentRemotePath(@Nullable Attachment attachment) Returns the remote path to the given attachment and its siblings.static StringgetAttachmentsPathForContent(@NonNull ContentEntityObject content) Returns the download path for all the attachments on a given content object, excluding the context path and base URL.static @Nullable StringgetAttachmentsRemotePath(@Nullable PageContext context) Returns the remote path to files attached to the contextual page.static StringReturns a default stylesheet for Confluence.static StringrenderSpaceStylesheet(Space space) Returns a default stylesheet for Confluence.
- 
Constructor Details- 
ConfluenceRenderUtilspublic ConfluenceRenderUtils()
 
- 
- 
Method Details- 
getAttachmentsRemotePathReturns the remote path to files attached to the contextual page. The path commences with the application's context path.- Parameters:
- context- must contain an existing ContentEntityObject
- Returns:
- null if context or its CEO is null, or else the path to the attachments of that ceo. Eg "/confluence/download/attachments/34253"
 
- 
getAttachmentRemotePathReturns the remote path to the given attachment and its siblings. NOTE: this path does not include the attachment itself, just the path the attachment is located immediately within. The path commences with the application's context path.- Parameters:
- attachment- must be attached to an existing ContentEntityObject
- Returns:
- null if attachmentis null, or else the path to the attachments of the content to which the attachment belongs. Eg "/confluence/download/attachments/34253"
 
- 
getAbsoluteAttachmentRemotePathReturns the remote path to the given attachment and its siblings. NOTE: this path does not include the attachment itself, just the path the attachment is located immediately within. The path commences with the application's base URL.- Parameters:
- attachment- must be attached to an existing- ContentEntityObject
- Returns:
- null if attachmentis null, or else the path to the attachments of the content to which the attachment belongs. Eg "http://example.com/confluence/download/attachments/34253"
 
- 
getAttachmentRemotePathReturns the remote path to the attachments of the givenContentEntityObject. The path commences with the application's context path.- Returns:
- null if contentis null, or else the path its attachments. Eg "/confluence/download/attachments/34253"
 
- 
getAttachmentsPathForContentReturns the download path for all the attachments on a given content object, excluding the context path and base URL. For example, "/download/attachments/downloads/34253". You can append a slash and a filename to get the path to a particular attachment.
- 
renderDefaultStylesheetReturns a default stylesheet for Confluence. This includes the master styles, default theme styles and the globally configured colour scheme.- Returns:
- string representation of a default stylesheet for Confluence
- See Also:
 
- 
renderSpaceStylesheetReturns a default stylesheet for Confluence. This includes the master styles, default theme styles and the space's configured colour scheme.
 
-