Class PageHelper

  • All Implemented Interfaces:
    TinyUrlAware, ThemeHelper

    public class PageHelper
    extends GlobalHelper
    implements TinyUrlAware
    Note - this is not a helper for the Page object but rather a helper for rendering pages in Confluence themes in general.

    Its behaviours are to be called from a velocity context to make it easy, and uniform, for the invoking of behaviours which all pages in Confluence will need.

    • Constructor Detail

      • PageHelper

        public PageHelper()
    • Method Detail

      • isHistoricalVersion

        public boolean isHistoricalVersion()
      • isChildrenShowing

        public boolean isChildrenShowing()
        Returns:
        false if the page is not an instance of ViewPageAction, otherwise it will return the value of viewPageAction.getChildrenShowing
      • getNumberOfAttachments

        public int getNumberOfAttachments()
      • getCustomHeader

        public String getCustomHeader​(String key)
      • getCustomFooter

        public String getCustomFooter​(String key)
      • getNumberOfAttachmentsAsString

        public String getNumberOfAttachmentsAsString()
      • getNumberOfLabels

        public int getNumberOfLabels()
      • getNumberOfLabelsAsString

        public String getNumberOfLabelsAsString()
      • getViewableLabels

        public List getViewableLabels()
      • shouldRenderCommentAsUpdated

        public boolean shouldRenderCommentAsUpdated​(Comment comment,
                                                    int thresholdSeconds)
        Should this comment be flagged as having been updated in any rendering
        Parameters:
        comment - Comment to render
        thresholdSeconds - Number of seconds grace since creation in which edits to the comment will not be flagged as an update
        Returns:
        Whether the comment should be rendered as updated