public class

ViewPageAction

extends AbstractPageAction
implements Evented<T> CommentAware
java.lang.Object
   ↳ com.opensymphony.xwork.ActionSupport
     ↳ com.atlassian.confluence.core.ConfluenceActionSupport
       ↳ com.atlassian.confluence.pages.actions.AbstractPageAwareAction
         ↳ com.atlassian.confluence.pages.actions.AbstractPageAction
           ↳ com.atlassian.confluence.pages.actions.ViewPageAction
Known Direct Subclasses

Summary

Constants
int HOT_REFERRERS_COUNT
[Expand]
Inherited Constants
From class com.atlassian.confluence.pages.actions.AbstractPageAction
From class com.atlassian.confluence.core.ConfluenceActionSupport
From interface com.opensymphony.xwork.Action
Fields
protected CommentManager commentManager
protected Renderer editRenderer
protected NotificationManager notificationManager
protected ReferralManager referralManager
[Expand]
Inherited Fields
From class com.atlassian.confluence.pages.actions.AbstractPageAction
From class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
Public Constructors
ViewPageAction()
Public Methods
String execute()
String getAttachmentsWebDavUrl()
String getAttachmentsWebDavUrlForPage()
BlogPostsCalendar getCalendarForThisMonth()
CaptchaManager getCaptchaManager()
Boolean getChildrenShowing()
Comment getComment()
Gets the currently focused comment.
String getCommentAsXHtmlForWysiwyg()
Boolean getCommentsShowing()
String getDateString(Date date)
ConfluenceEvent getEventToPublish(String result)
Gets the event to publish.
List getExternalReferences()
BlogPost getFirstPostInNextMonth(Calendar postingDate)
Returns the first post in the month after the current postingDay This method is a duplication of the method in AbstractBlogPostsAction - they really shouldn't be here.
@Deprecated long getFocusedCommentId()
This method is deprecated. since 2.8 use 'commentId' parameter from the web or getComment() from the application.
List<ReferralLink> getHotReferrers()
Return a list of ReferralLinks that point to this page.
List<ContentPermission> getInheritedContentPermissions()
BlogPost getLastPostInPreviousMonth(Calendar postingDate)
Returns the last post in the month before the current postingDay This method is a duplication of the method in AbstractBlogPostsAction - they really shouldn't be here.
NotificationManager getNotificationManager()
@Deprecated String getPageContent()
This method is deprecated. since 4.0. This is not used anywhere.
long getPageIdOfVersionAfter(AbstractPage page)
long getPageIdOfVersionBefore(AbstractPage page)
String getPageXHtmlContent()
Page getParentPage()
Returns the parent Page of the current Page or null if the current AbstractPage is a root page or a blogpost.
@Deprecated List getPossibleAlternativesElsewhere()
This method is deprecated. since 3.1 This action no longer uses possible alternatives so this method can be deleted. See PageNotFoundAction
@Deprecated List getPossibleAlternativesInSpace()
This method is deprecated. since 3.1 This action no longer uses possible alternatives so this method can be deleted. See PageNotFoundAction
long getReplyToComment()
@Deprecated Comment getRootComment()
This method is deprecated. since 2.8 the default theme no longer uses a "root comment". This method will remain until the other themes do the same.
List<ContentPermission> getThisPagePermissions()
ConfluenceTrackbackUtils getTrackbackUtils()
List getViewInheritedContentPermissionSets()
WebInterfaceContext getWebInterfaceContext(Comment comment)
WebInterfaceContext getWebInterfaceContext()
Returns a context which can be passed to web items when rendering them.
Map<CommentString> getXHtmlComments()
boolean hasAnyPermissions()
checks if the page has any direct contentpermissions or inherited ones
boolean hasNextVersion(AbstractPage page)
boolean hasPreviousVersion(AbstractPage page)
boolean isAttachmentsInWebDavFolder()
boolean isEditComment()
@Deprecated boolean isFavouritePage()
This method is deprecated. since 2.8 use isFavourite(User).
boolean isLatestVersionRequired()
If the action can only work on the most recent version of a page, this will cause the interceptor to silently replace the version that it looks up with the most recent version, if necessary.
boolean isNavigatingVersions()
boolean isPageRequired()
If the action requires that the page be set before being run, then it should return true to this method.
boolean isPermitted()
boolean isShowCommentArea()
boolean isThreadComments()
boolean isUserWatchingPage()
Returns true if the user is watching the current page.
boolean isUserWatchingSpace()
Returns true if the user is watching the page/blog's space for the respective ContentType.
boolean isViewPermissionRequired()
String renderExternalLink(Link link)
@Deprecated String renderLink(String link)
This method is deprecated. Since 4.0. See PageInfoAction#renderWikiLink(String) instead.
void setCaptchaManager(CaptchaManager captchaManager)
void setComment(Comment comment)
Sets the currently focused comment.
void setCommentManager(CommentManager commentManager)
void setEditComment(boolean editComment)
void setEditRenderer(Renderer editRenderer)
@Deprecated void setFocusedCommentId(long focusedCommentId)
This method is deprecated. since 2.8 use 'commentId' parameter from the web or setComment(Comment) from the application.
void setNavigatingVersions(boolean navigatingVersions)
void setNotificationManager(NotificationManager notificationManager)
@Deprecated void setPageContent(String pageContent)
This method is deprecated. since 4.0. This is not used anywhere.
void setReferralManager(ReferralManager referralManager)
void setReplyToComment(long replyToComment)
@Deprecated void setRootCommentId(long rootCommentId)
This method is deprecated. since 2.8 the default theme no longer uses a "root comment". This method will remain until the other themes do the same.
void setShowChildren(Boolean showChildren)
void setShowCommentArea(boolean showCommentArea)
void setShowComments(Boolean showComments)
@Deprecated void setWikiStyleRenderer(WikiStyleRenderer wikiStyleRenderer)
This method is deprecated. Since 4.0. See PageInfoAction#renderWikiLink(String) instead.
void setXhtmlContent(XhtmlContent xhtmlContent)
[Expand]
Inherited Methods
From class com.atlassian.confluence.pages.actions.AbstractPageAction
From class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
From class java.lang.Object
From interface com.atlassian.confluence.event.Evented
From interface com.atlassian.confluence.pages.actions.CommentAware
From interface com.atlassian.confluence.pages.actions.PageAware
From interface com.atlassian.confluence.pages.actions.TinyUrlAware
From interface com.atlassian.confluence.plugin.descriptor.web.WebInterface
From interface com.opensymphony.xwork.Action
From interface com.opensymphony.xwork.LocaleProvider
From interface com.opensymphony.xwork.TextProvider
From interface com.opensymphony.xwork.Validateable
From interface com.opensymphony.xwork.ValidationAware

Constants

public static final int HOT_REFERRERS_COUNT

Constant Value: 10 (0x0000000a)

Fields

protected CommentManager commentManager

protected Renderer editRenderer

protected NotificationManager notificationManager

protected ReferralManager referralManager

Public Constructors

public ViewPageAction ()

Public Methods

public String execute ()

Throws
Exception

public String getAttachmentsWebDavUrl ()

public String getAttachmentsWebDavUrlForPage ()

public BlogPostsCalendar getCalendarForThisMonth ()

public CaptchaManager getCaptchaManager ()

public Boolean getChildrenShowing ()

public Comment getComment ()

Gets the currently focused comment. Might be the comment from a permalink, a comment being replied to, or a comment being edited. Returns null if no comment is active.

Returns
  • the comment which is focused

public String getCommentAsXHtmlForWysiwyg ()

public Boolean getCommentsShowing ()

public String getDateString (Date date)

public ConfluenceEvent getEventToPublish (String result)

Gets the event to publish.

Parameters
result the result of the action executing.
Returns
  • the event. Can be null, in which case no event will be published.

public List getExternalReferences ()

public BlogPost getFirstPostInNextMonth (Calendar postingDate)

Returns the first post in the month after the current postingDay This method is a duplication of the method in AbstractBlogPostsAction - they really shouldn't be here.

Returns
  • BlogPost for the first post in the next month, null otherwise

@Deprecated public long getFocusedCommentId ()

This method is deprecated.
since 2.8 use 'commentId' parameter from the web or getComment() from the application.

public List<ReferralLink> getHotReferrers ()

Return a list of ReferralLinks that point to this page.

Returns
  • a list of ReferralLinks, empty if referrers are disabled.

public List<ContentPermission> getInheritedContentPermissions ()

public BlogPost getLastPostInPreviousMonth (Calendar postingDate)

Returns the last post in the month before the current postingDay This method is a duplication of the method in AbstractBlogPostsAction - they really shouldn't be here.

Returns
  • BlogPost for the last post in the previous month, null otherwise

public NotificationManager getNotificationManager ()

@Deprecated public String getPageContent ()

This method is deprecated.
since 4.0. This is not used anywhere.

public long getPageIdOfVersionAfter (AbstractPage page)

public long getPageIdOfVersionBefore (AbstractPage page)

public String getPageXHtmlContent ()

public Page getParentPage ()

Returns the parent Page of the current Page or null if the current AbstractPage is a root page or a blogpost.

@Deprecated public List getPossibleAlternativesElsewhere ()

This method is deprecated.
since 3.1 This action no longer uses possible alternatives so this method can be deleted. See PageNotFoundAction

@Deprecated public List getPossibleAlternativesInSpace ()

This method is deprecated.
since 3.1 This action no longer uses possible alternatives so this method can be deleted. See PageNotFoundAction

public long getReplyToComment ()

@Deprecated public Comment getRootComment ()

This method is deprecated.
since 2.8 the default theme no longer uses a "root comment". This method will remain until the other themes do the same.

When you have a comment thread that is too deep to display all at once, only a portion of it is displayed. To see the rest of the thread you can specify the rootCommentId of a comment in the middle of the thread to start rendering from

public List<ContentPermission> getThisPagePermissions ()

public ConfluenceTrackbackUtils getTrackbackUtils ()

public List getViewInheritedContentPermissionSets ()

public WebInterfaceContext getWebInterfaceContext (Comment comment)

public WebInterfaceContext getWebInterfaceContext ()

Returns a context which can be passed to web items when rendering them.

Typically, WebWork actions will implement this to provide extra details in the context such as content objects, and so on.

public Map<CommentString> getXHtmlComments ()

public boolean hasAnyPermissions ()

checks if the page has any direct contentpermissions or inherited ones

public boolean hasNextVersion (AbstractPage page)

public boolean hasPreviousVersion (AbstractPage page)

public boolean isAttachmentsInWebDavFolder ()

public boolean isEditComment ()

@Deprecated public boolean isFavouritePage ()

This method is deprecated.
since 2.8 use isFavourite(User).

public boolean isLatestVersionRequired ()

If the action can only work on the most recent version of a page, this will cause the interceptor to silently replace the version that it looks up with the most recent version, if necessary.

Returns
  • true if the action requires the most recent version of a page

public boolean isNavigatingVersions ()

public boolean isPageRequired ()

If the action requires that the page be set before being run, then it should return true to this method. If the action requires a page, but no page is available, then the interceptor will automatically redirect to the 'pagenotfound' result

Returns
  • true if the action requires a page in order to execute

public boolean isPermitted ()

public boolean isShowCommentArea ()

public boolean isThreadComments ()

public boolean isUserWatchingPage ()

Returns true if the user is watching the current page. Returns false otherwise, or if the user is anonymous.

public boolean isUserWatchingSpace ()

Returns true if the user is watching the page/blog's space for the respective ContentType. For example, if getPage returns a BlogPost and the user is only watching Pages in the Space, this method returns false.

public boolean isViewPermissionRequired ()

public String renderExternalLink (Link link)

@Deprecated public String renderLink (String link)

This method is deprecated.
Since 4.0. See PageInfoAction#renderWikiLink(String) instead.

@return

public void setCaptchaManager (CaptchaManager captchaManager)

public void setComment (Comment comment)

Sets the currently focused comment. Might be the comment from a permalink, a comment being replied to, or a comment being edited. Set to null if no comment is active.

Used by the CommentAwareInterceptor.
Parameters
comment the comment which is to be focused

public void setCommentManager (CommentManager commentManager)

public void setEditComment (boolean editComment)

public void setEditRenderer (Renderer editRenderer)

@Deprecated public void setFocusedCommentId (long focusedCommentId)

This method is deprecated.
since 2.8 use 'commentId' parameter from the web or setComment(Comment) from the application.

public void setNavigatingVersions (boolean navigatingVersions)

public void setNotificationManager (NotificationManager notificationManager)

@Deprecated public void setPageContent (String pageContent)

This method is deprecated.
since 4.0. This is not used anywhere.

public void setReferralManager (ReferralManager referralManager)

public void setReplyToComment (long replyToComment)

@Deprecated public void setRootCommentId (long rootCommentId)

This method is deprecated.
since 2.8 the default theme no longer uses a "root comment". This method will remain until the other themes do the same.

public void setShowChildren (Boolean showChildren)

public void setShowCommentArea (boolean showCommentArea)

public void setShowComments (Boolean showComments)

@Deprecated public void setWikiStyleRenderer (WikiStyleRenderer wikiStyleRenderer)

This method is deprecated.
Since 4.0. See PageInfoAction#renderWikiLink(String) instead.

public void setXhtmlContent (XhtmlContent xhtmlContent)