Class AddCommentAction
java.lang.Object
org.apache.struts2.ActionSupport
com.atlassian.confluence.core.AbstractI18nActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
com.atlassian.confluence.pages.actions.AbstractPageAwareAction
com.atlassian.confluence.pages.actions.AbstractPageAction
com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
com.atlassian.confluence.pages.actions.AddCommentAction
- All Implemented Interfaces:
Beanable,PageAware,TinyUrlAware,WebInterface,CaptchaAware,MessageHolderAware,Serializable,org.apache.struts2.action.Action,org.apache.struts2.interceptor.ValidationAware,org.apache.struts2.locale.LocaleProvider,org.apache.struts2.text.TextProvider,org.apache.struts2.Validateable
- See Also:
-
Field Summary
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
back, bean, formatConverter, inPreview, preview, storageFormat, wikiStyleRenderer, wysiwygContentFields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
incomingLinks, linkManager, pageManager, PREVIEW, RICHTEXT, viewRenderer, wysiwygConverterFields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
contentPermissionManager, spaceManagerFields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
accessModeService, CANCEL, confluenceAccessManager, contentUiSupport, eventPublisher, formatSettingsManager, globalSettingsManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, localeManager, loginManager, messageHolder, permissionManager, pluginAccessor, request, response, spacePermissionManager, strutsHelper, systemInformationService, userAccessor, webInterfaceManagerFields inherited from class org.apache.struts2.ActionSupport
containerFields inherited from interface org.apache.struts2.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WebInterfaceContextcreateWebInterfaceContextWithComment(WebInterfaceContext context, Comment comment) execute()longDeprecated, for removal: This API element is subject to removal in a future version.since 8.8.0.longgetWebInterfaceContext(Comment comment) Override since the base implementation will return the content of a page, instead of the comment.booleanConsulted byPermissionCheckInterceptor.voidsetCaptchaManager(CaptchaManager captchaManager) voidsetCommentService(CommentService commentService) voidsetNotificationManager(NotificationManager notificationManager) voidsetParentId(long parentId) voidsetTextContent(String textContent) voidsetWatchPageAfterComment(boolean watchPageAfterComment) voidvalidate()Convert the editor content to storageFormat, catching and reporting any problems in the process.Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
getBean, getContentForSaving, getConversionContext, getEditorFormattedContent, getInPreview, getRenderContext, getStorageFormat, getxHtmlContent, setBack, setFormatConverter, setInPreview, setPreview, setWikiStyleRenderer, setWysiwygContent, updateXHtmlContentMethods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
displayDatePath, getAttachmentSourceContent, getAvailableSpaces, getBeanKey, getBlogPost, getEditorVersion, getHelper, getIncomingLinks, getLabels, getMode, getNextPost, getNumberOfAttachmentsAsString, getNumberOfLabelsAsString, getPermissionTypes, getPostingDateAsDate, getPostingDay, getPostingTimeAsTime, getPreviousPost, getPreviousVersion, getSpaceManager, getSuggestedLabels, getTinyUrl, getWebInterfaceContext, hasAttachFilePermissions, hasPermittedChildren, isSpaceAdmin, isSuperUser, isUserWatchingOwnContent, setConfluenceWysiwygConverter, setEditorManager, setLinkManager, setMode, setPageManager, setPostingDate, setPostingTime, setViewRendererMethods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
getCustomPageUrl, getPage, getPageId, getPageUrl, getSpace, getSpaceKey, getTitle, isCollaborativeContent, isLatestVersionRequired, isPageRequired, isViewPermissionRequired, setContentPermissionManager, setPage, setSpaceManagerMethods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, getActionErrors, getActionMessages, getActionName, getActiveRequest, getActiveResponse, getAuthenticatedUser, getBootstrapStatusProvider, getDateFormatter, getDefaultTimeZone, getFieldErrors, getGlobalSettings, getI18n, getLocale, getMessageHolder, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getTimeZone, getUserByName, getUserInterfaceState, isAnonymousUser, isEmailVisible, setAccessModeService, setBootstrapStatusProvider, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventPublisher, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setStrutsHelper, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManagerMethods inherited from class com.atlassian.confluence.core.AbstractI18nActionSupport
getText, getText, getText, getText, getText, getText, getText, getText, getTextStrictMethods inherited from class org.apache.struts2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getContainer, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocaleMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.security.CaptchaAware
mustValidateCaptchaMethods inherited from interface com.atlassian.confluence.pages.actions.PageAware
isEditPermissionRequired
-
Constructor Details
-
AddCommentAction
public AddCommentAction()
-
-
Method Details
-
validate
public void validate()Description copied from class:AbstractPreviewPageActionConvert the editor content to storageFormat, catching and reporting any problems in the process. On successful validation, the storageFormat field will be populated with a storage format representation of the editor content, ready for saving.- Specified by:
validatein interfaceMessageHolderAware- Specified by:
validatein interfaceorg.apache.struts2.Validateable- Overrides:
validatein classAbstractPreviewPageAction
-
execute
- Specified by:
executein interfaceorg.apache.struts2.action.Action- Overrides:
executein classorg.apache.struts2.ActionSupport- Throws:
Exception
-
getWysiwygContent
Override since the base implementation will return the content of a page, instead of the comment.- Overrides:
getWysiwygContentin classAbstractPreviewPageAction- Returns:
- the editor formatted content for the CEO being edited.
-
getComment
Deprecated, for removal: This API element is subject to removal in a future version.since 8.8.0. Hibernate objects are not supported in Struts anymore. Use action's direct method calls. -
getAddCommentId
public long getAddCommentId() -
isPermitted
public boolean isPermitted()Description copied from class:ConfluenceActionSupportConsulted byPermissionCheckInterceptor.- Overrides:
isPermittedin classAbstractPageAwareAction
-
getPermittedChildren
- Overrides:
getPermittedChildrenin classAbstractPageAction
-
setParentId
public void setParentId(long parentId) -
getParentId
public long getParentId() -
getTextContent
-
setTextContent
-
getCancelResult
- Overrides:
getCancelResultin classConfluenceActionSupport
-
setCommentService
-
setNotificationManager
-
setWatchPageAfterComment
public void setWatchPageAfterComment(boolean watchPageAfterComment) -
getCaptchaManager
-
setCaptchaManager
-
getWebInterfaceContext
-
createWebInterfaceContextWithComment
public static WebInterfaceContext createWebInterfaceContextWithComment(WebInterfaceContext context, Comment comment)
-