Class AddCommentAction
- java.lang.Object
-
- com.opensymphony.xwork2.ActionSupport
-
- 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,com.opensymphony.xwork2.Action,com.opensymphony.xwork2.interceptor.ValidationAware,com.opensymphony.xwork2.LocaleProvider,com.opensymphony.xwork2.TextProvider,com.opensymphony.xwork2.Validateable,Serializable
public class AddCommentAction extends AbstractPreviewPageAction implements CaptchaAware
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
back, bean, formatConverter, inPreview, preview, storageFormat, wikiStyleRenderer, wysiwygContent
-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
incomingLinks, linkManager, pageManager, PREVIEW, RICHTEXT, viewRenderer, wysiwygConverter
-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
contentPermissionManager, spaceManager
-
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
accessModeService, CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, personService, pluginAccessor, settingsManager, spacePermissionManager, systemInformationService, userAccessor, webInterfaceManager
-
-
Constructor Summary
Constructors Constructor Description AddCommentAction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static WebInterfaceContextcreateWebInterfaceContextWithComment(WebInterfaceContext context, Comment comment)Stringexecute()longgetAddCommentId()StringgetCancelResult()CaptchaManagergetCaptchaManager()CommentgetComment()Deprecated, for removal: This API element is subject to removal in a future version.since 8.8.0.longgetParentId()ListgetPermittedChildren()StringgetTextContent()WebInterfaceContextgetWebInterfaceContext(Comment comment)StringgetWysiwygContent()Override since the base implementation will return the content of a page, instead of the comment.booleanisPermitted()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, updateXHtmlContent
-
Methods 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, setViewRenderer
-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
getCustomPageUrl, getFriendlyDateFormatterHelper, getPage, getPageId, getPageUrl, getSpace, getSpaceKey, getTitle, isCollaborativeContent, isLatestVersionRequired, isPageRequired, isViewPermissionRequired, setContentPermissionManager, setPage, setSpaceManager
-
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getAccessMode, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getBootstrapStatusProvider, getCancel, getConfluenceAccessManager, getContentUiSupport, getContext, getCurrentRequest, getCurrentSession, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocBean, getDocLink, getEventManager, getFriendlyDateFormatter, getFrontendServiceURL, getGlobalSettings, getI18n, getInstalledLanguages, getLabelManager, getLanguageJs, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionManager, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPersonService, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, 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, setBootstrapStatusProvider, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setServletRequestSupplier, setSettingsManager, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager, useSkipAccessCheck, withServletRequestSupplier
-
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.security.CaptchaAware
mustValidateCaptcha
-
Methods inherited from interface com.opensymphony.xwork2.LocaleProvider
isValidLocale, isValidLocaleString
-
Methods inherited from interface com.atlassian.confluence.pages.actions.PageAware
isEditPermissionRequired
-
-
-
-
Method Detail
-
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 interfacecom.opensymphony.xwork2.Validateable- Overrides:
validatein classAbstractPreviewPageAction
-
execute
public String execute() throws Exception
- Specified by:
executein interfacecom.opensymphony.xwork2.Action- Overrides:
executein classcom.opensymphony.xwork2.ActionSupport- Throws:
Exception
-
getWysiwygContent
public String 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(since="8.8.0", forRemoval=true) public Comment 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()
- Overrides:
isPermittedin classAbstractPageAwareAction
-
getPermittedChildren
public List getPermittedChildren()
- Overrides:
getPermittedChildrenin classAbstractPageAction
-
setParentId
public void setParentId(long parentId)
-
getParentId
public long getParentId()
-
getTextContent
public String getTextContent()
-
setTextContent
public void setTextContent(String textContent)
-
getCancelResult
public String getCancelResult()
- Overrides:
getCancelResultin classConfluenceActionSupport
-
setCommentService
public void setCommentService(CommentService commentService)
-
setNotificationManager
public void setNotificationManager(NotificationManager notificationManager)
-
setWatchPageAfterComment
public void setWatchPageAfterComment(boolean watchPageAfterComment)
-
getCaptchaManager
public CaptchaManager getCaptchaManager()
-
setCaptchaManager
public void setCaptchaManager(CaptchaManager captchaManager)
-
getWebInterfaceContext
public WebInterfaceContext getWebInterfaceContext(Comment comment)
-
createWebInterfaceContextWithComment
public static WebInterfaceContext createWebInterfaceContextWithComment(WebInterfaceContext context, Comment comment)
-
-