com.atlassian.confluence.pages.actions
Class ViewPageAction

java.lang.Object
  extended bycom.opensymphony.xwork.ActionSupport
      extended bycom.atlassian.confluence.core.ConfluenceActionSupport
          extended bycom.atlassian.confluence.pages.actions.AbstractPageAction
              extended bycom.atlassian.confluence.pages.actions.ViewPageAction
All Implemented Interfaces:
com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, PageAware, Serializable, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware
Direct Known Subclasses:
AbstractDiffPagesAction, PageInfoAction, ViewSourceAction

public class ViewPageAction
extends AbstractPageAction
implements PageAware

See Also:
Serialized Form

Field Summary
protected  CommentManager commentManager
           
static int HOT_REFERRERS_COUNT
           
protected  NotificationManager notificationManager
           
protected  ReferralManager referralManager
           
protected  WikiStyleRenderer wikiStyleRenderer
           
 
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
contentPermissionManager, expertView, incomingLinks, isXHtml, linkManager, MARKUP, pageManager, postingDay, PREVIEW, RICHTEXT, spaceManager, wysiwygConverter
 
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, log, permissionManager, permitted, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
ViewPageAction()
           
 
Method Summary
 String execute()
           
 String getAttachmentsWebDavUrl()
           
 String getAttachmentsWebDavUrlForPage()
           
 BlogPostsCalendar getCalendarForThisMonth()
           
 CaptchaManager getCaptchaManager()
           
 Boolean getChildrenShowing()
           
 Boolean getCommentsShowing()
           
 Comment getCommentToEdit()
           
 String getDateString(Date date)
           
 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.
 long getFocusedCommentId()
           
 List getHotReferrers()
           
 List 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()
           
 String getPageContent()
           
 long getPageIdOfVersionAfter(AbstractPage page)
           
 long getPageIdOfVersionBefore(AbstractPage page)
           
 String getPageXHtmlContent()
           
 List getPossibleAlternativesElsewhere()
           
 List getPossibleAlternativesInSpace()
          If the page doesn't exist, we look for pages that it may have been renamed to.
 long getReplyToComment()
           
 Comment getRootComment()
          When you have a comment thread that is too deep to display all at once, only a portion of it is displayed.
 ConfluenceTrackbackUtils getTrackbackUtils()
           
 Map getXHtmlComments()
           
 boolean hasNextVersion(AbstractPage page)
           
 boolean hasPreviousVersion(AbstractPage page)
           
 boolean isAttachmentsInWebDavFolder()
           
 boolean isEditComment()
           
 boolean isFavouritePage()
           
 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 isShowCommentArea()
           
 boolean isThreadComments()
           
 boolean isUserWatchingPage()
           
 boolean isUserWatchingSpace()
           
 boolean isViewPermissionRequired()
           
 String renderExternalLink(Link link)
           
 String renderLink(String link)
           
 void setCaptchaManager(CaptchaManager captchaManager)
           
 void setCommentManager(CommentManager commentManager)
           
 void setCommentToEdit(Comment commentToEdit)
           
 void setEditComment(boolean editComment)
           
 void setFocusedCommentId(long focusedCommentId)
           
 void setNavigatingVersions(boolean navigatingVersions)
           
 void setNotificationManager(NotificationManager notificationManager)
           
 void setPageContent(String pageContent)
           
 void setReferralManager(ReferralManager referralManager)
           
 void setReplyToComment(long replyToComment)
           
 void setRootCommentId(long rootCommentId)
           
 void setShowChildren(Boolean showChildren)
           
 void setShowCommentArea(boolean showCommentArea)
           
 void setShowComments(Boolean showComments)
           
 void setWikiStyleRenderer(WikiStyleRenderer wikiStyleRenderer)
           
 
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
extractPageTitle, extractSpaceKey, generateAncestryBreadcrumbs, getAvailableSpaces, getBeanKey, getBlogPost, getCaptchaId, getEditor, getExpertView, getHelper, getIncomingLinks, getMARKUP, getMode, getNextPost, getPage, getPageId, getPermissionTypes, getPermittedChildren, getPostingDate, getPostingDay, getPostingDayOfMonth, getPostingMonth, getPostingMonthNumeric, getPostingYear, getPREVIEW, getPreviousPost, getPreviousVersion, getRICHTEXT, getShowMarkup, getSpace, getSpaceKey, getSpaceManager, getSubscribableName, getSuggestedLabels, getSupportWysiwyg, getTinyUrl, getTitle, getUseWysiwyg, getXhtml, hasAttachFilePermissions, hasInvalidTitleCharacters, hasPermittedChildren, hasSetPagePermissionsPermission, hasViewPagePermission, isPermitted, isSpaceAdmin, setBreadcrumbsManager, setCaptchaId, setConfluenceWysiwygConverter, setContentPermissionManager, setEditorManager, setLinkManager, setMode, setPage, setPageManager, setSpaceManager, setXhtml
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addPermissionTypeTo, addToHistory, doDefault, getActionName, getBootstrapManager, getCancelResult, getDateFormatter, getDefaultResourceBundle, getEditorLanguage, getEventManager, getGlobalHelper, getGlobalSettings, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getNiceContentType, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSpaceHelper, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserFullName, getUserInterfaceState, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermittedAsString, isPrintableVersion, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setPermissionCheck, setPermissionManager, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setUserAccessor, setWebInterfaceManager
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.confluence.pages.actions.PageAware
getPage, setPage
 

Field Detail

HOT_REFERRERS_COUNT

public static final int HOT_REFERRERS_COUNT
See Also:
Constant Field Values

referralManager

protected ReferralManager referralManager

notificationManager

protected NotificationManager notificationManager

commentManager

protected CommentManager commentManager

wikiStyleRenderer

protected WikiStyleRenderer wikiStyleRenderer
Constructor Detail

ViewPageAction

public ViewPageAction()
Method Detail

setWikiStyleRenderer

public void setWikiStyleRenderer(WikiStyleRenderer wikiStyleRenderer)

setReferralManager

public void setReferralManager(ReferralManager referralManager)

setPageContent

public void setPageContent(String pageContent)

getPageContent

public String getPageContent()

getHotReferrers

public List getHotReferrers()

getExternalReferences

public List getExternalReferences()

isPageRequired

public boolean isPageRequired()
Description copied from interface: PageAware
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

Specified by:
isPageRequired in interface PageAware
Overrides:
isPageRequired in class AbstractPageAction

isLatestVersionRequired

public boolean isLatestVersionRequired()
Description copied from interface: PageAware
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.

Specified by:
isLatestVersionRequired in interface PageAware
Overrides:
isLatestVersionRequired in class AbstractPageAction

isViewPermissionRequired

public boolean isViewPermissionRequired()
Specified by:
isViewPermissionRequired in interface PageAware
Overrides:
isViewPermissionRequired in class AbstractPageAction

execute

public String execute()
               throws Exception
Specified by:
execute in interface com.opensymphony.xwork.Action
Throws:
Exception

getPageXHtmlContent

public String getPageXHtmlContent()

getXHtmlComments

public Map getXHtmlComments()

getCommentsShowing

public Boolean getCommentsShowing()

setShowComments

public void setShowComments(Boolean showComments)

getChildrenShowing

public Boolean getChildrenShowing()

setShowChildren

public void setShowChildren(Boolean showChildren)

getNotificationManager

public NotificationManager getNotificationManager()

setNotificationManager

public void setNotificationManager(NotificationManager notificationManager)

isThreadComments

public boolean isThreadComments()

getPossibleAlternativesInSpace

public List getPossibleAlternativesInSpace()
If the page doesn't exist, we look for pages that it may have been renamed to.


getPossibleAlternativesElsewhere

public List getPossibleAlternativesElsewhere()

isUserWatchingPage

public boolean isUserWatchingPage()

isUserWatchingSpace

public boolean isUserWatchingSpace()

getTrackbackUtils

public ConfluenceTrackbackUtils getTrackbackUtils()

getDateString

public String getDateString(Date date)

isAttachmentsInWebDavFolder

public boolean isAttachmentsInWebDavFolder()

getAttachmentsWebDavUrl

public String getAttachmentsWebDavUrl()

getAttachmentsWebDavUrlForPage

public String getAttachmentsWebDavUrlForPage()

renderLink

public String renderLink(String link)

renderExternalLink

public String renderExternalLink(Link link)

getReplyToComment

public long getReplyToComment()

setReplyToComment

public void setReplyToComment(long replyToComment)

getRootComment

public Comment getRootComment()
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


setRootCommentId

public void setRootCommentId(long rootCommentId)

setFocusedCommentId

public void setFocusedCommentId(long focusedCommentId)

getFocusedCommentId

public long getFocusedCommentId()

getCalendarForThisMonth

public BlogPostsCalendar getCalendarForThisMonth()

getFirstPostInNextMonth

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.

Parameters:
postingDate -
Returns:
BlogPost for the first post in the next month, null otherwise
See Also:
AbstractBlogPostsAction

getLastPostInPreviousMonth

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.

Parameters:
postingDate -
Returns:
BlogPost for the last post in the previous month, null otherwise
See Also:
AbstractBlogPostsAction

getInheritedContentPermissions

public List getInheritedContentPermissions()

getPageIdOfVersionBefore

public long getPageIdOfVersionBefore(AbstractPage page)

getPageIdOfVersionAfter

public long getPageIdOfVersionAfter(AbstractPage page)

hasPreviousVersion

public boolean hasPreviousVersion(AbstractPage page)

hasNextVersion

public boolean hasNextVersion(AbstractPage page)

isShowCommentArea

public boolean isShowCommentArea()

setShowCommentArea

public void setShowCommentArea(boolean showCommentArea)

getCommentToEdit

public Comment getCommentToEdit()

setCommentToEdit

public void setCommentToEdit(Comment commentToEdit)

isEditComment

public boolean isEditComment()

setEditComment

public void setEditComment(boolean editComment)

isFavouritePage

public boolean isFavouritePage()

setCaptchaManager

public void setCaptchaManager(CaptchaManager captchaManager)
Overrides:
setCaptchaManager in class AbstractPageAction

getCaptchaManager

public CaptchaManager getCaptchaManager()
Overrides:
getCaptchaManager in class AbstractPageAction

isNavigatingVersions

public boolean isNavigatingVersions()

setNavigatingVersions

public void setNavigatingVersions(boolean navigatingVersions)

setCommentManager

public void setCommentManager(CommentManager commentManager)


Confluence is developed by Atlassian.