com.atlassian.confluence.themes
Class PageHelper

java.lang.Object
  extended by com.atlassian.confluence.themes.GlobalHelper
      extended by com.atlassian.confluence.themes.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 Summary
PageHelper()
           
PageHelper(AbstractPageAction action)
           
 
Method Summary
 LabelManager getLabelManager()
           
 int getNumberOfAttachments()
           
 java.lang.String getNumberOfAttachmentsAsString()
           
 int getNumberOfLabels()
           
 java.lang.String getNumberOfLabelsAsString()
           
 java.lang.String getTinyUrl()
           
 java.util.List getViewableLabels()
           
 boolean isChildrenShowing()
           
 boolean isHistoricalVersion()
           
 boolean shouldRenderCommentAsUpdated(Comment comment)
          Should this comment be flagged as having been updated in any rendering, using a default grace threshold
 boolean shouldRenderCommentAsUpdated(Comment comment, int thresholdSeconds)
          Should this comment be flagged as having been updated in any rendering
 
Methods inherited from class com.atlassian.confluence.themes.GlobalHelper
getAction, getBreadcrumbs, getDomainName, getEllipsisCrumbs, getLabel, getPage, getSiteTitle, getSpace, getSpaceKey, getSpaceName, getSpaceType, getText, getText, getWikiStyleRenderer, renderConfluenceMacro, renderConfluenceMacro
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageHelper

public PageHelper()

PageHelper

public PageHelper(AbstractPageAction action)
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()

getNumberOfAttachmentsAsString

public java.lang.String getNumberOfAttachmentsAsString()

getNumberOfLabels

public int getNumberOfLabels()

getNumberOfLabelsAsString

public java.lang.String getNumberOfLabelsAsString()

getTinyUrl

public java.lang.String getTinyUrl()
Specified by:
getTinyUrl in interface TinyUrlAware

getLabelManager

public LabelManager getLabelManager()

getViewableLabels

public java.util.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

shouldRenderCommentAsUpdated

public boolean shouldRenderCommentAsUpdated(Comment comment)
Should this comment be flagged as having been updated in any rendering, using a default grace threshold

Parameters:
comment - Comment to be rendered
Returns:
Whether the comment should be rendered as updated
See Also:
shouldRenderCommentAsUpdated(com.atlassian.confluence.pages.Comment, int)


Copyright © 2003-2014 Atlassian. All Rights Reserved.