public class

DeletePortalPage

extends JiraWebActionSupport
java.lang.Object
   ↳ webwork.action.ActionSupport
     ↳ com.atlassian.jira.action.JiraActionSupport
       ↳ com.atlassian.jira.web.action.JiraWebActionSupport
         ↳ com.atlassian.jira.web.action.user.DeletePortalPage

Class Overview

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.

Summary

[Expand]
Inherited Constants
From class com.atlassian.jira.web.action.JiraWebActionSupport
From interface webwork.action.Action
[Expand]
Inherited Fields
From class com.atlassian.jira.web.action.JiraWebActionSupport
From class com.atlassian.jira.action.JiraActionSupport
From class webwork.action.ActionSupport
Public Constructors
DeletePortalPage(PortalPageService portalPageService, FavouritesService favouritesService)
Public Methods
boolean canDelete()
Can the current pageId be deleted? This method assumes either doDefault or doValidation has been called previously.
String doDefault()
Validates the passed in pageId and populates errors if needed.
void doValidation()
Validates passed in pageId and populates action with errors if needed.
int getOtherFavouriteCount()
Get the number of people who have added the dashboard as a favourite.
Long getPageId()
String getPageName()
String getTargetUrl()
void setPageId(Long pageId)
Protected Methods
String doExecute()
Performs the delete and redirects back to the manage page
[Expand]
Inherited Methods
From class com.atlassian.jira.web.action.JiraWebActionSupport
From class com.atlassian.jira.action.JiraActionSupport
From class webwork.action.ActionSupport
From class java.lang.Object
From interface com.atlassian.jira.util.ErrorCollection
From interface com.atlassian.jira.util.I18nHelper
From interface com.atlassian.jira.web.HttpServletVariables
From interface com.atlassian.jira.web.util.AuthorizationSupport
From interface webwork.action.Action
From interface webwork.action.CommandDriven
From interface webwork.action.IllegalArgumentAware

Public Constructors

public DeletePortalPage (PortalPageService portalPageService, FavouritesService favouritesService)

Public Methods

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)

public String doDefault ()

Validates the passed in pageId and populates errors if needed.

Throws
Exception

public void doValidation ()

Validates passed in pageId and populates action with errors if needed.

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.

public Long getPageId ()

public String getPageName ()

public String getTargetUrl ()

public void setPageId (Long pageId)

Protected Methods

protected String doExecute ()

Performs the delete and redirects back to the manage page

Throws
Exception