Class 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, org.apache.struts2.action.Action, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.Validateable

public class AddCommentAction extends AbstractPreviewPageAction implements CaptchaAware
See Also:
  • Constructor Details

    • AddCommentAction

      public AddCommentAction()
  • Method Details

    • validate

      public void validate()
      Description copied from class: AbstractPreviewPageAction
      Convert 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:
      validate in interface MessageHolderAware
      Specified by:
      validate in interface org.apache.struts2.Validateable
      Overrides:
      validate in class AbstractPreviewPageAction
    • execute

      public String execute() throws Exception
      Specified by:
      execute in interface org.apache.struts2.action.Action
      Overrides:
      execute in class org.apache.struts2.ActionSupport
      Throws:
      Exception
    • getWysiwygContent

      public String getWysiwygContent()
      Override since the base implementation will return the content of a page, instead of the comment.
      Overrides:
      getWysiwygContent in class AbstractPreviewPageAction
      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()
      Description copied from class: ConfluenceActionSupport
      Overrides:
      isPermitted in class AbstractPageAwareAction
    • getPermittedChildren

      public List getPermittedChildren()
      Overrides:
      getPermittedChildren in class AbstractPageAction
    • 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:
      getCancelResult in class ConfluenceActionSupport
    • 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)