Class AbstractCommentableIssue

All Implemented Interfaces:
OperationContext, ErrorCollection, I18nHelper, IssueSummaryAware, HttpServletVariables, AuthorizationSupport, Serializable, Action, CommandDriven, IllegalArgumentAware
Direct Known Subclasses:
AbstractCommentableAssignableIssue, AbstractIssueLinkAction, AbstractWorklogAction, AddComment, AttachFile, EditComment, ManageAttachments

public class AbstractCommentableIssue extends AbstractViewIssue implements OperationContext
This class should be extended by any action that modifies issues and can have an associated comment.

Subclasses should call super.doValidation() to check commenting permission.

See Also:
  • Field Details

    • userUtil

      protected final transient UserUtil userUtil
  • Constructor Details

  • Method Details

    • doDefault

      public String doDefault() throws Exception
      Description copied from class: ActionSupport
      "default" command
      Overrides:
      doDefault in class ActionSupport
      Throws:
      Exception
    • doValidation

      protected void doValidation()
      Description copied from class: ActionSupport
      Subclasses may override this method to provide validation of input data. The execute() method should call validate() in the beginning of its code (which will delegate to this method), so as to check input data before doing the actual processing.

      If any application errors arise these should be registered by calling addErrorMessage or addError .

      If the validation is dependent on whether a command has been issued, and what that command is, then the isCommand() method should be used.

      Overrides:
      doValidation in class ActionSupport
    • doCommentValidation

      protected void doCommentValidation(boolean allowEmptyComment)
    • populateCommentFields

      protected void populateCommentFields()
    • createComment

      @Nullable protected Comment createComment()
    • getComment

      public String getComment()
    • setComment

      public void setComment(String comment)
    • getCommentLevel

      public String getCommentLevel()
    • setCommentLevel

      public void setCommentLevel(String commentLevel)
    • getGroupLevel

      public String getGroupLevel()
      Returns:
      the name of the group to which comment visibility will be restricted.
    • setGroupLevel

      public void setGroupLevel(String groupLevel)
      Sets the name of the group to which comment visibility will be restricted.
      Parameters:
      groupLevel - a group name.
    • getGroupLevels

      public Collection<com.atlassian.crowd.embedded.api.Group> getGroupLevels()
    • getRoleLevels

      public Collection<ProjectRole> getRoleLevels()
    • getFieldValuesHolder

      public Map<String,Object> getFieldValuesHolder()
      Specified by:
      getFieldValuesHolder in interface OperationContext
    • getIssueOperation

      public IssueOperation getIssueOperation()
      Specified by:
      getIssueOperation in interface OperationContext
    • setFieldValuesHolder

      public void setFieldValuesHolder(Map<String,Object> fieldValuesHolder)
    • getFieldScreenRendererLayoutItemForField

      public FieldScreenRenderLayoutItem getFieldScreenRendererLayoutItemForField(OrderableField field)
    • getDisplayParams

      public Map<String,Object> getDisplayParams()
    • getFieldScreenRendererWithAllFields

      protected FieldScreenRenderer getFieldScreenRendererWithAllFields()
    • getOrderableField

      protected OrderableField getOrderableField(String fieldId)
    • requireAttachmentsResources

      protected void requireAttachmentsResources()
    • populateAttachmentsFieldValuesHolderAndValidate

      protected void populateAttachmentsFieldValuesHolderAndValidate()
    • processAttachments

      protected void processAttachments()
    • processAttachments

      protected void processAttachments(MutableIssue mutableIssue)