com.atlassian.bamboo.ww2.actions.build.admin
Class DeleteBuilds

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.bamboo.ww2.BambooActionSupport
          extended by com.atlassian.bamboo.ww2.actions.build.admin.DeleteBuilds
All Implemented Interfaces:
ErrorCollection, BulkActionScope, BambooSessionAware, NavigationAware, DomainObjectSecurityAware, GlobalAdminSecurityAware, GlobalReadSecurityAware, ReturnUrlAware, com.atlassian.core.i18n.I18nTextProvider, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, com.uwyn.rife.continuations.ContinuableObject, java.io.Serializable, java.lang.Cloneable

public class DeleteBuilds
extends BambooActionSupport
implements GlobalAdminSecurityAware, BulkActionScope

This class provides a UI action to remove one or more build.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
BambooActionSupport.JSONStatus
 
Field Summary
 
Fields inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
administrationConfigurationManager, bambooPermissionManager, bambooUserManager, buildDefinitionManager, CONFIRM, cookieCutter, dashboardCachingManager, planExecutionManager, planManager, projectManager
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
DeleteBuilds()
           
 
Method Summary
 java.lang.String doConfirm()
           
 java.lang.String doExecute()
          Remove the selected builds
 java.util.List<TopLevelPlan> getBuildsToConfirm()
           
 java.util.List<Job> getJobsToConfirm(Plan plan)
           
 java.util.List<Project> getProjectsToConfirm()
           
 java.lang.String[] getSelectedBuilds()
           
 java.lang.String[] getSelectedProjects()
           
 java.util.List<? extends Plan> getSortedPlans(Project project)
           
 java.util.List<Project> getSortedProjects()
           
 boolean isApplicable(BulkActionScope bulkAction, Project project)
           
 boolean isApplicable(Plan plan)
          Returns whether or not a plan is applicable for a certain bulk action, eg.
 boolean isApplicableForRepositories()
           
 boolean isPlanSelected(java.lang.String planKey)
           
 boolean isProjectSelected(java.lang.String projectKey)
           
 void setDeletionService(DeletionService deletionService)
           
 void setEventManager(com.atlassian.event.EventManager eventManager)
           
 void setSelectedBuilds(java.lang.String[] selectedBuilds)
          The checkboxes all have the same name, but with different value.
 void setSelectedProjects(java.lang.String[] selectedProjects)
           
 void setStopBuildManager(StopBuildManager stopBuildManager)
           
 void validate()
           
 
Methods inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
addError, addError, addErrorCollection, addErrorMessage, addErrorMessage, addErrorMessages, addErrors, addIllegalArgumentException, areCheckBoxesEmpty, buildJsonObject, buildWebPanelContext, checkFieldXssSafety, createFieldValidator, doDefault, doesHelpLinkHaveMatchingTitle, doesLabelKeyHaveMatchingDescription, execute, getAdministrationConfiguration, getBamboo, getBambooLicenseManager, getBambooPermissionManager, getBambooSession, getBambooUserManager, getBaseUrl, getBootstrapManager, getBreadCrumbs, getChainEquiv, getConcurrentBuildsEnabled, getConglomerateCookieValue, getCookieCutter, getCookieValue, getCurrentFormTheme, getCurrentSystemTime, getCurrentUrl, getDefaultPersister, getDescriptionFromLabelKey, getFlushedErrorMessages, getFormattedActionErrors, getFormattedActionMessages, getFormattedErrorMessages, getInstanceName, getJobEquiv, getJsonObject, getNavigationContext, getNavigationUrl, getNumberOfCurrentlyBuildingPlans, getPlan, getPlanManager, getPluginAccessor, getReturnUrl, getSecuredDomainObject, getServerLifecycleState, getSessionUser, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, getTextWithArgs, getTotalErrors, getUser, getValidatorContext, getWebFragmentsContextMap, getWebItemsForSection, getWebPanelContext, getWebSectionsForLocation, hasAdminPermission, hasAnyErrors, hasBuilds, hasGlobalAdminPermission, hasGlobalPermission, hasKey, hasPlanPermission, hasPlanPermission, hasRestrictedAdminPermission, isCheckboxSetInAction, isEnableJavascript, isEnableSignup, isRestrictedAdminEnabled, isSelectFieldAndNull, renderFreemarkerTemplate, setAdministrationConfigurationManager, setAuthenticationContext, setBambooLicenseManager, setBambooPermissionManager, setBambooUserManager, setBuildDefinitionManager, setChainEquiv, setCheckBoxFields, setCookieCutter, setCurrentFormTheme, setDashboardCachingManager, setEnableJavascript, setErrorMessages, setI18nBeanFactory, setJobEquiv, setNavigationContext, setPlanExecutionManager, setPlanManager, setPluginAccessor, setProjectManager, setReturnUrl, setServerLifecycleProvider, setWebInterfaceManager
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doInput, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, pause, setActionErrors, setActionMessages, setFieldErrors
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.ww2.aware.permissions.DomainObjectSecurityAware
getSecuredDomainObject
 
Methods inherited from interface com.atlassian.bamboo.utils.error.ErrorCollection
getErrorMessages, getErrors, getFieldErrors
 

Constructor Detail

DeleteBuilds

public DeleteBuilds()
Method Detail

setSelectedBuilds

public void setSelectedBuilds(java.lang.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 java.lang.String[] getSelectedBuilds()

getSelectedProjects

public java.lang.String[] getSelectedProjects()

setSelectedProjects

public void setSelectedProjects(java.lang.String[] selectedProjects)

validate

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

doExecute

public java.lang.String doExecute()
                           throws java.lang.Exception
Remove the selected builds

Overrides:
doExecute in class BambooActionSupport
Returns:
The webwork success status
Throws:
java.lang.Exception - A generic failure

doConfirm

public java.lang.String doConfirm()
                           throws java.lang.Exception
Throws:
java.lang.Exception

getJobsToConfirm

@NotNull
public java.util.List<Job> getJobsToConfirm(Plan plan)

getBuildsToConfirm

@NotNull
public java.util.List<TopLevelPlan> getBuildsToConfirm()

getProjectsToConfirm

@NotNull
public java.util.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(Plan 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(java.lang.String projectKey)

isPlanSelected

public boolean isPlanSelected(java.lang.String planKey)

getSortedProjects

public java.util.List<Project> getSortedProjects()

getSortedPlans

public java.util.List<? extends Plan> getSortedPlans(Project project)

setStopBuildManager

public void setStopBuildManager(StopBuildManager stopBuildManager)

setEventManager

public void setEventManager(com.atlassian.event.EventManager eventManager)

setDeletionService

public void setDeletionService(DeletionService deletionService)


Copyright © 2011 Atlassian. All Rights Reserved.