Class DeleteBuilds

java.lang.Object
com.opensymphony.xwork2.ActionSupport
com.atlassian.bamboo.ww2.BambooActionSupport
com.atlassian.bamboo.ww2.actions.build.admin.DeleteBuilds
All Implemented Interfaces:
JsonStreamingAction, ErrorCollection, BulkActionScope, BambooSessionAware, NavigationAware, DomainObjectSecurityAware, GlobalAdminSecurityAware, GlobalReadSecurityAware, ReturnUrlAware, com.atlassian.core.i18n.I18nTextProvider, com.atlassian.struts.TextProvider, com.atlassian.struts.ValidationAware, com.opensymphony.xwork.ValidationAware, com.opensymphony.xwork2.Action, com.opensymphony.xwork2.interceptor.ValidationAware, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, Serializable

public class DeleteBuilds extends BambooActionSupport implements GlobalAdminSecurityAware, BulkActionScope
This class provides a UI action to remove one or more build.
See Also:
  • Constructor Details

    • DeleteBuilds

      public DeleteBuilds()
  • Method Details

    • setSelectedBuilds

      public void setSelectedBuilds(String[] selectedBuilds)
      The checkboxes all have the same name, but with different value. WebWork passes all values as a String array list. The values represent the build keys.
      Parameters:
      selectedBuilds - The key of the builds that have been selected for deletion.
    • getSelectedBuilds

      public String[] getSelectedBuilds()
    • getSelectedProjects

      public String[] getSelectedProjects()
    • setSelectedProjects

      public void setSelectedProjects(String[] selectedProjects)
    • validate

      public void validate()
      Specified by:
      validate in interface com.opensymphony.xwork2.Validateable
      Overrides:
      validate in class com.opensymphony.xwork2.ActionSupport
    • execute

      public String execute() throws Exception
      Remove the selected builds
      Specified by:
      execute in interface com.opensymphony.xwork2.Action
      Overrides:
      execute in class com.opensymphony.xwork2.ActionSupport
      Returns:
      The webwork success status
      Throws:
      Exception - A generic failure
    • confirm

      public String confirm() throws Exception
      Throws:
      Exception
    • getJobsToConfirm

      @NotNull public @NotNull List<Job> getJobsToConfirm(Plan plan)
    • getBuildsToConfirm

      @NotNull public @NotNull List<Chain> getBuildsToConfirm()
    • getProjectsToConfirm

      @NotNull public @NotNull List<Project> getProjectsToConfirm()
    • isApplicableForRepositories

      public boolean isApplicableForRepositories()
      Specified by:
      isApplicableForRepositories in interface BulkActionScope
    • isApplicable

      public boolean isApplicable(BulkActionScope bulkAction, Project project)
    • isApplicable

      public boolean isApplicable(ImmutablePlan plan)
      Description copied from interface: BulkActionScope
      Returns whether or not a plan is applicable for a certain bulk action, eg. only plans with svn repositories for an action updating svn details
      Specified by:
      isApplicable in interface BulkActionScope
      Returns:
      true if applicable
    • isProjectSelected

      public boolean isProjectSelected(String projectKey)
    • isPlanSelected

      public boolean isPlanSelected(String planKey)
    • getSortedProjects

      public List<Project> getSortedProjects()
    • getSuccessMessage

      public String getSuccessMessage()
    • setSuccessMessage

      public void setSuccessMessage(String successMessage)
    • getSortedPlans

      public List<? extends Plan> getSortedPlans(Project project)
    • getSortedTopLevelPlans

      public List<ImmutableTopLevelPlan> getSortedTopLevelPlans(Project project)