public class ViewPageAction extends AbstractPageAction implements CommentAware, Evented<ConfluenceEvent>
Modifier and Type | Field and Description |
---|---|
protected CommentManager |
commentManager |
protected Renderer |
editRenderer |
protected NotificationManager |
notificationManager |
protected ReferralManager |
referralManager |
static String |
REQUEST_KEY_HELPER |
incomingLinks, linkManager, pageManager, PREVIEW, RICHTEXT, viewRenderer, wysiwygConverter
contentPermissionManager, spaceManager
accessModeService, CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, personService, pluginAccessor, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
Constructor and Description |
---|
ViewPageAction() |
Modifier and Type | Method and Description |
---|---|
String |
execute() |
BlogPostsCalendar |
getCalendarForThisMonth() |
CaptchaManager |
getCaptchaManager() |
Boolean |
getChildrenShowing() |
CollaborativeEditingHelper |
getCollaborativeEditingHelper() |
Comment |
getComment()
Gets the currently focused comment.
|
String |
getCommentAsXHtmlForWysiwyg() |
String |
getDateString(Date date) |
String |
getEditingUser() |
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
|
List<ContentPermission> |
getInheritedContentPermissions() |
BlogPost |
getLastPostInPreviousMonth(Calendar postingDate)
Returns the last post in the month before the current postingDay
|
NotificationManager |
getNotificationManager() |
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. |
long |
getReplyToComment() |
List<ContentPermission> |
getThisPagePermissions() |
List |
getViewInheritedContentPermissionSets() |
WebInterfaceContext |
getWebInterfaceContext()
Returns a context which can be passed to web items when rendering them.
|
WebInterfaceContext |
getWebInterfaceContext(Comment comment) |
Map<Comment,String> |
getXHtmlComments() |
boolean |
hasAnyPermissions()
checks if the page has any direct contentpermissions or inherited ones
|
boolean |
hasNextVersion(AbstractPage page) |
boolean |
hasPreviousVersion(AbstractPage page) |
boolean |
isChildrenNotShown()
Used to hide the page children if we are using the left sidebar.
|
boolean |
isEditComment() |
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() |
protected boolean |
pageIsLatestVersionAndDoesNotHaveSpace() |
String |
renderExternalLink(com.atlassian.renderer.links.Link link) |
void |
setCaptchaManager(CaptchaManager captchaManager) |
void |
setCollaborativeEditingHelper(CollaborativeEditingHelper collaborativeEditingHelper) |
void |
setComment(Comment comment)
Sets the currently focused comment.
|
void |
setCommentManager(CommentManager commentManager) |
void |
setEditComment(boolean editComment) |
void |
setEditRenderer(Renderer editRenderer) |
void |
setNavigatingVersions(boolean navigatingVersions) |
void |
setNotificationManager(NotificationManager notificationManager) |
void |
setReferralManager(ReferralManager referralManager) |
void |
setReplyToComment(long replyToComment) |
void |
setShowChildren(Boolean showChildren) |
void |
setShowCommentArea(boolean showCommentArea) |
void |
setThemeManager(ThemeManager themeManager) |
void |
setXhtmlContent(XhtmlContent xhtmlContent) |
displayDatePath, getAttachmentSourceContent, getAvailableSpaces, getBeanKey, getBlogPost, getEditorVersion, getHelper, getIncomingLinks, getLabels, getMode, getNextPost, getNumberOfAttachmentsAsString, getNumberOfLabelsAsString, getPermissionTypes, getPermittedChildren, getPostingDate, getPostingDay, getPreviousPost, getPreviousVersion, getSpaceManager, getSuggestedLabels, getTinyUrl, hasAttachFilePermissions, hasPermittedChildren, isSpaceAdmin, isSuperUser, isUserWatchingOwnContent, setConfluenceWysiwygConverter, setEditorManager, setLinkManager, setMode, setPageManager, setPostingDate, setViewRenderer
getFriendlyDateFormatterHelper, getPage, getPageId, getSpace, getSpaceKey, getTitle, isCollaborativeContent, setContentPermissionManager, setPage, setSpaceManager
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getAccessMode, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getCancel, getCancelResult, getConfluenceAccessManager, getContext, getCurrentRequest, getCurrentSession, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocLink, getEventManager, getFriendlyDateFormatter, getFrontendServiceURL, getGlobalSettings, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionManager, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPersonService, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUserAccessor, getUserByName, getUserFullName, getUserHasBrowseUsersPermission, getUserHasLicensedAccess, getUserInterfaceState, getUserLocaleDefaultDatePattern, getUserProfilePicUrl, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPrintableVersion, isSkipAccessCheck, isUserStatusPluginEnabled, isUsingH2, isUsingHSQL, setAccessModeService, setApiDateFormatService, setApiPersonService, setBootstrapManager, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setServletRequestSupplier, setSettingsManager, setSkipAccessCheck, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager, withServletRequestSupplier
addActionError, addActionMessage, addFieldError, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEditPermissionRequired
validate
public static final String REQUEST_KEY_HELPER
protected ReferralManager referralManager
protected NotificationManager notificationManager
protected CommentManager commentManager
protected Renderer editRenderer
public Comment getComment()
getComment
in interface CommentAware
public void setComment(Comment comment)
Used by the CommentAwareInterceptor
.
setComment
in interface CommentAware
comment
- the comment which is to be focusedpublic void setReferralManager(ReferralManager referralManager)
public Page getParentPage()
Page
of the current Page
or null if the current
AbstractPage
is a root page or a blogpost.public List getExternalReferences()
public boolean isPageRequired()
PageAware
isPageRequired
in interface PageAware
isPageRequired
in class AbstractPageAwareAction
public boolean isLatestVersionRequired()
PageAware
isLatestVersionRequired
in interface PageAware
isLatestVersionRequired
in class AbstractPageAwareAction
public boolean isViewPermissionRequired()
isViewPermissionRequired
in interface PageAware
isViewPermissionRequired
in class AbstractPageAwareAction
@Internal public String getEditingUser()
public String execute() throws Exception
execute
in interface com.opensymphony.xwork.Action
execute
in class com.opensymphony.xwork.ActionSupport
Exception
protected boolean pageIsLatestVersionAndDoesNotHaveSpace()
public ConfluenceEvent getEventToPublish(String result)
Evented
getEventToPublish
in interface Evented<ConfluenceEvent>
result
- the result of the action executing.public String getPageXHtmlContent()
public Boolean getChildrenShowing()
public void setShowChildren(Boolean showChildren)
public NotificationManager getNotificationManager()
public void setNotificationManager(NotificationManager notificationManager)
public boolean isThreadComments()
public boolean isUserWatchingPage()
public boolean isUserWatchingSpace()
public String renderExternalLink(com.atlassian.renderer.links.Link link)
public long getReplyToComment()
public void setReplyToComment(long replyToComment)
public BlogPostsCalendar getCalendarForThisMonth()
public BlogPost getFirstPostInNextMonth(Calendar postingDate)
This method is a duplication of the method in AbstractBlogPostsAction - they really shouldn't be here.
AbstractBlogPostsAction
public BlogPost getLastPostInPreviousMonth(Calendar postingDate)
This method is a duplication of the method in AbstractBlogPostsAction - they really shouldn't be here.
AbstractBlogPostsAction
public List<ContentPermission> getInheritedContentPermissions()
public List<ContentPermission> getThisPagePermissions()
public long getPageIdOfVersionBefore(AbstractPage page)
public long getPageIdOfVersionAfter(AbstractPage page)
public boolean hasPreviousVersion(AbstractPage page)
public boolean hasNextVersion(AbstractPage page)
public boolean isShowCommentArea()
public void setShowCommentArea(boolean showCommentArea)
public boolean isEditComment()
public void setEditComment(boolean editComment)
public boolean isNavigatingVersions()
public void setNavigatingVersions(boolean navigatingVersions)
public void setCommentManager(CommentManager commentManager)
public String getCommentAsXHtmlForWysiwyg()
public WebInterfaceContext getWebInterfaceContext()
WebInterface
Typically, WebWork actions will implement this to provide extra details in the context such as content objects, and so on.
getWebInterfaceContext
in interface WebInterface
getWebInterfaceContext
in class AbstractPageAction
public WebInterfaceContext getWebInterfaceContext(Comment comment)
public CaptchaManager getCaptchaManager()
public void setCaptchaManager(CaptchaManager captchaManager)
public boolean isPermitted()
isPermitted
in class AbstractPageAwareAction
public List getViewInheritedContentPermissionSets()
public boolean hasAnyPermissions()
public void setEditRenderer(Renderer editRenderer)
public void setXhtmlContent(XhtmlContent xhtmlContent)
public void setThemeManager(ThemeManager themeManager)
public boolean isChildrenNotShown()
@ExperimentalApi public void setCollaborativeEditingHelper(CollaborativeEditingHelper collaborativeEditingHelper)
@ExperimentalApi public CollaborativeEditingHelper getCollaborativeEditingHelper()
Copyright © 2003–2021 Atlassian. All rights reserved.