com.atlassian.bamboo.ww2.actions.chains
Class CreateJob

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.bamboo.ww2.BambooActionSupport
          extended by com.atlassian.bamboo.ww2.actions.PlanActionSupport
              extended by com.atlassian.bamboo.ww2.actions.ChainActionSupport
                  extended by com.atlassian.bamboo.ww2.actions.chains.CreateJob
All Implemented Interfaces:
ErrorCollection, BambooSessionAware, BuildConfigurationAware, ChainAware, NavigationAware, DomainObjectSecurityAware, GlobalReadSecurityAware, PlanAdminSecurityAware, PlanAware, PlanLimitAware, ProjectAware, 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 CreateJob
extends ChainActionSupport
implements PlanLimitAware, PlanAdminSecurityAware, BuildConfigurationAware

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
BambooActionSupport.JSONStatus
 
Field Summary
static java.lang.String BUILD_KEY
           
static java.lang.String CHAIN_KEY_TO_CLONE
           
static java.lang.String CLONE_JOB
           
static java.lang.String EXISTING_STAGE
           
static java.lang.String JOB_KEY_TO_CLONE
           
 
Fields inherited from class com.atlassian.bamboo.ww2.actions.ChainActionSupport
chainExecutionManager, planExecutableAgentsHelper, stageStatusHelper
 
Fields inherited from class com.atlassian.bamboo.ww2.actions.PlanActionSupport
buildNumber, resultsSummaryManager
 
Fields inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
administrationConfigurationManager, bambooPermissionManager, 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
CreateJob()
           
 
Method Summary
 java.lang.String doCloneJob()
           
 java.lang.String doCreateJob()
           
 java.lang.String doDefault()
          Default action just sends to the input
 java.util.Collection<java.lang.String> getAvailableJdks()
           
 BuildConfiguration getBuildConfiguration()
           
 java.lang.String getChainKeyToClone()
           
 java.util.Collection<Chain> getChainsToClone()
           
 java.lang.String getEditHtml(Builder builder)
           
 com.google.common.collect.Multimap<ChainStage,Job> getJobsContainingInvalidSubscriptions()
           
 java.util.List<Job> getJobsToClone()
          Used on first render for functional tests
 Plan getPlan()
           
 java.lang.String getSubBuildKey()
           
 UIConfigBean getUiConfigBean()
           
 java.util.List<ArtifactSubscription> getUnclonableSubscriptions()
           
 boolean isAllowStageCreation()
           
 boolean isIgnoreUnclonableSubscriptions()
           
 boolean isPlanEnabled()
           
 boolean isPlanLimitReached()
          Allows UI to check whether the plan limit has been reached
 void setAllowStageCreation(boolean allowStageCreation)
           
 void setArtifactSubscriptionManager(ArtifactSubscriptionManager artifactSubscriptionManager)
           
 void setBuildConfiguration(BuildConfiguration buildConfiguration)
           
 void setIgnoreUnclonableSubscriptions(boolean ignoreUnclonableSubscriptions)
           
 void setJdkManager(JdkManager jdkManager)
           
 void setJobCreationService(PlanCreationService jobCreationService)
           
 void setPlan(Plan plan)
           
 void setPlanLimitReached()
          Called if the interceptor detects that the plan limit has been exhausted.
 void setPlanManager(PlanManager planManager)
           
 void setSubBuildKey(java.lang.String subBuildKey)
           
 void setUiConfigBean(UIConfigBean uiConfigBean)
           
 void validate()
           
 
Methods inherited from class com.atlassian.bamboo.ww2.actions.ChainActionSupport
getChain, getChainExecutionManager, getChainResult, getChainResultNumber, getChainStage, getErrorAccessor, getStageStatusHelper, jobHasExecutableAgents, setAggregatedChainErrorAccessor, setChain, setChainExecutionManager, setChainResult, setChainResultNumber, setChainStage, setPlanExecutableAgentsHelper, setStageStatusHelper
 
Methods inherited from class com.atlassian.bamboo.ww2.actions.PlanActionSupport
buildWebPanelContext, getBuildKey, getBuildNumber, getCurrentlyBuildingPlans, getPlanKey, getPlanResultKey, getProject, getResultsSummaryManager, getSecuredDomainObject, planNotFound, setBuildKey, setBuildNumber, setErrorAccessor, setPlanExecutionManager, setPlanKey, setPlanResultKey, setResultsSummaryManager
 
Methods inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
addError, addError, addErrorCollection, addErrorMessage, addErrorMessage, addErrorMessages, addErrors, addIllegalArgumentException, areCheckBoxesEmpty, buildJsonObject, checkFieldXssSafety, createFieldValidator, doesHelpLinkHaveMatchingTitle, doesLabelKeyHaveMatchingDescription, doExecute, 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, 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, setPluginAccessor, setProjectManager, setReturnUrl, 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
 

Field Detail

EXISTING_STAGE

public static final java.lang.String EXISTING_STAGE
See Also:
Constant Field Values

BUILD_KEY

public static final java.lang.String BUILD_KEY
See Also:
Constant Field Values

CLONE_JOB

public static final java.lang.String CLONE_JOB
See Also:
Constant Field Values

JOB_KEY_TO_CLONE

public static final java.lang.String JOB_KEY_TO_CLONE
See Also:
Constant Field Values

CHAIN_KEY_TO_CLONE

public static final java.lang.String CHAIN_KEY_TO_CLONE
See Also:
Constant Field Values
Constructor Detail

CreateJob

public CreateJob()
Method Detail

doDefault

public java.lang.String doDefault()
                           throws java.lang.Exception
Description copied from class: BambooActionSupport
Default action just sends to the input

Overrides:
doDefault in class BambooActionSupport
Throws:
java.lang.Exception

validate

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

doCreateJob

public java.lang.String doCreateJob()

doCloneJob

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

getChainsToClone

public java.util.Collection<Chain> getChainsToClone()

getJobsToClone

@NotNull
public java.util.List<Job> getJobsToClone()
Used on first render for functional tests

Returns:
all builds that are available to be cloned on the system(Does this follow permissions???)

getEditHtml

public java.lang.String getEditHtml(Builder builder)

getBuildConfiguration

public BuildConfiguration getBuildConfiguration()
Specified by:
getBuildConfiguration in interface BuildConfigurationAware

setBuildConfiguration

public void setBuildConfiguration(BuildConfiguration buildConfiguration)
Specified by:
setBuildConfiguration in interface BuildConfigurationAware

getPlan

public Plan getPlan()
Specified by:
getPlan in interface PlanAware
Overrides:
getPlan in class PlanActionSupport

setPlan

public void setPlan(Plan plan)
Specified by:
setPlan in interface PlanAware
Overrides:
setPlan in class PlanActionSupport

getSubBuildKey

public java.lang.String getSubBuildKey()

setSubBuildKey

public void setSubBuildKey(java.lang.String subBuildKey)

getChainKeyToClone

public java.lang.String getChainKeyToClone()

isPlanEnabled

public boolean isPlanEnabled()

isPlanLimitReached

public boolean isPlanLimitReached()
Description copied from interface: PlanLimitAware
Allows UI to check whether the plan limit has been reached

Specified by:
isPlanLimitReached in interface PlanLimitAware
Returns:
true if the plan limit has been reached or not.

setPlanLimitReached

public void setPlanLimitReached()
Description copied from interface: PlanLimitAware
Called if the interceptor detects that the plan limit has been exhausted. Its up to the actions as to how they react

Specified by:
setPlanLimitReached in interface PlanLimitAware

getUnclonableSubscriptions

public java.util.List<ArtifactSubscription> getUnclonableSubscriptions()

isIgnoreUnclonableSubscriptions

public boolean isIgnoreUnclonableSubscriptions()

setIgnoreUnclonableSubscriptions

public void setIgnoreUnclonableSubscriptions(boolean ignoreUnclonableSubscriptions)

getUiConfigBean

public UIConfigBean getUiConfigBean()

setUiConfigBean

public void setUiConfigBean(UIConfigBean uiConfigBean)

setJdkManager

public void setJdkManager(JdkManager jdkManager)

setArtifactSubscriptionManager

public void setArtifactSubscriptionManager(ArtifactSubscriptionManager artifactSubscriptionManager)

getAvailableJdks

public java.util.Collection<java.lang.String> getAvailableJdks()

isAllowStageCreation

public boolean isAllowStageCreation()

setAllowStageCreation

public void setAllowStageCreation(boolean allowStageCreation)

setJobCreationService

public void setJobCreationService(PlanCreationService jobCreationService)

setPlanManager

public void setPlanManager(PlanManager planManager)
Overrides:
setPlanManager in class BambooActionSupport

getJobsContainingInvalidSubscriptions

public com.google.common.collect.Multimap<ChainStage,Job> getJobsContainingInvalidSubscriptions()


Copyright © 2011 Atlassian. All Rights Reserved.