Class AbstractIssueLinkAction

All Implemented Interfaces:
OperationContext, ErrorCollection, I18nHelper, IssueSummaryAware, HttpServletVariables, AuthorizationSupport, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
Direct Known Subclasses:
AddWebLink, LinkConfluencePage, LinkExistingIssue, LinkJiraIssue

public abstract class AbstractIssueLinkAction extends AbstractCommentableIssue implements OperationContext
Base class for an issue link action.
Since:
v5.0
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • doValidation

      protected void doValidation()
      Validate that the user has permission to link issues, and that the comment field is valid. Override this method to perform validation specific to the concrete action. It is recommended that this method be invoked by any overriding methods.
      Overrides:
      doValidation in class AbstractCommentableIssue
    • doDefault

      public String doDefault() throws Exception
      The "default" command. Checks that the current issue exists and that the user has permission to view it.
      Overrides:
      doDefault in class AbstractCommentableIssue
      Returns:
      INPUT if success, ERROR if otherwise
      Throws:
      Exception
    • createLink

      Creates the link and publishes an event for the creation
      Returns:
      create result
    • createLink

      Creates the link and publishes an event for the creation
      Parameters:
      validationResult - the CreateValidationResult to be used to create the link
      Returns:
      create result
    • isValidToView

      public boolean isValidToView()
      Returns true if the contents of the action should be shown, false if otherwise.
      Returns:
      true if the contents of the action should be shown, false if otherwise
    • createAndDispatchComment

      protected Comment createAndDispatchComment()
      Create a comment and dispatch event
    • getRedirectUrl

      protected String getRedirectUrl()
      Returns the URL to redirect to after successfully creating the issue link.
      Returns:
      the URL to redirect to after successfully creating the issue link
    • handleCredentialsRequired

      protected void handleCredentialsRequired()
    • dispatchCommentEvents

      protected void dispatchCommentEvents(Issue issue, Comment comment)
    • isRequiresCredentials

      public boolean isRequiresCredentials()
    • getDisplayParams

      public Map<String,Object> getDisplayParams()
      Overrides:
      getDisplayParams in class AbstractCommentableIssue
    • getCommentSectionHtml

      public String getCommentSectionHtml()
    • getModifierKey

      public static String getModifierKey()
    • getKeyboardShortcutContext

      public static KeyboardShortcutManager.Context getKeyboardShortcutContext()