Class DeletePortalPage

java.lang.Object
webwork.action.ActionSupport
com.atlassian.jira.web.action.JiraWebActionSupport
com.atlassian.jira.web.action.user.DeletePortalPage
All Implemented Interfaces:
ErrorCollection, I18nHelper, HttpServletVariables, AuthorizationSupport, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware

public class DeletePortalPage extends JiraWebActionSupport
Action for deleting PortalPage objects. Previously this was done by the behemoth ConfigurePortalPages but was extracted as we now have a confirmation page for deletions.
Since:
v3.13
See Also:
  • Constructor Details

  • Method Details

    • doDefault

      public String doDefault() throws Exception
      Validates the passed in pageId and populates errors if needed.
      Overrides:
      doDefault in class webwork.action.ActionSupport
      Throws:
      Exception
    • doExecute

      protected String doExecute() throws Exception
      Performs the delete and redirects back to the manage page
      Overrides:
      doExecute in class webwork.action.ActionSupport
      Throws:
      Exception
    • doValidation

      public void doValidation()
      Validates passed in pageId and populates action with errors if needed.
      Overrides:
      doValidation in class webwork.action.ActionSupport
    • canDelete

      public boolean canDelete()
      Can the current pageId be deleted? This method assumes either doDefault or doValidation has been called previously.
      Returns:
      true if this action contains no errors (i.e. validation was successful)
    • getOtherFavouriteCount

      public int getOtherFavouriteCount()
      Get the number of people who have added the dashboard as a favourite. Used to warn against deleting.
      Returns:
      the number of users (not including owner) that has favourited the dashboard.
    • getPageName

      public String getPageName()
    • getPageId

      public Long getPageId()
    • setPageId

      public void setPageId(Long pageId)
    • getTargetUrl

      public String getTargetUrl()