com.atlassian.bamboo.ww2.actions.build.admin.config
Class ConfigureBuildArtifact

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.build.admin.config.ConfigureBuildArtifact
All Implemented Interfaces:
ErrorCollection, BambooSessionAware, NavigationAware, DomainObjectSecurityAware, GlobalReadSecurityAware, PlanEditSecurityAware, PlanAware, 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
Direct Known Subclasses:
ToggleArtifactDefinitionSharing

public class ConfigureBuildArtifact
extends PlanActionSupport
implements PlanEditSecurityAware

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
BambooActionSupport.JSONStatus
 
Field Summary
protected  ArtifactDefinition artifactDefinition
           
protected  ArtifactDefinitionManager artifactDefinitionManager
           
protected  long artifactId
           
protected  ArtifactSubscriptionManager artifactSubscriptionManager
           
 
Fields inherited from class com.atlassian.bamboo.ww2.actions.PlanActionSupport
buildNumber, jiraApplinksService, repositoryConfigurationService, resultsSummaryManager
 
Fields inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
ACCESS_DENIED, administrationConfigurationAccessor, administrationConfigurationManager, AGGREGATE_URL_PATTERN, bambooPermissionManager, bambooUserManager, BUILD_KEY_CONTEXT, buildDefinitionManager, cachedPlanManager, CONFIRM, cookieCutter, dashboardCachingManager, environmentService, featureManager, PLAN_KEY_CONTEXT, planExecutionManager, planManager, projectManager, webInterfaceManager
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
ConfigureBuildArtifact()
           
 
Method Summary
protected  com.opensymphony.webwork.dispatcher.json.JSONObject buildJsonObject()
          Builds JSONObject and sets 'status', 'errors' and 'fieldErrors' properties accordingly.
 boolean canToggleSharing(ArtifactDefinition artifactDefinition)
           
 java.lang.String doCreate()
           
 java.lang.String doDefault()
          Default action just sends to the input
 java.lang.String doDelete()
           
 java.lang.String doInput()
           
 java.lang.String doUpdate()
           
 ArtifactDefinition getArtifactDefinition()
           
 java.util.List<ArtifactDefinition> getArtifactDefinitions()
           
 long getArtifactId()
           
 java.util.List<ArtifactSubscription> getArtifactSubscriptions()
          Get Artifact Subscriptions associated with a Plan
 java.lang.String getCopyPattern()
           
 java.util.List<DeploymentProject> getDeploymentProjectsUsingArtifact(ArtifactDefinition artifactDefinition)
           
 com.google.common.collect.Multimap<ChainStage,Job> getJobsSubscribedToArtifact(ArtifactDefinition artifactDefinition)
          Get jobs subscribed to artifact
 java.lang.String getLocation()
           
 java.lang.String getName()
           
 java.lang.String getNiceSizeMessage(long size)
           
protected  boolean hasDependenciesThatRequireConfirmation(ArtifactDefinition artifactDefinition)
           
 boolean isArtifactSubscriptionPossible()
           
 boolean isPlanUsedInDeployments()
           
 boolean isSharedArtifact()
           
 void setArtifactDefinitionManager(ArtifactDefinitionManager artifactDefinitionManager)
           
 void setArtifactId(long artifactId)
           
 void setArtifactSubscriptionManager(ArtifactSubscriptionManager artifactSubscriptionManager)
           
 void setCopyPattern(java.lang.String copyPattern)
           
 void setDeploymentProjectService(DeploymentProjectService deploymentProjectService)
           
 void setLocation(java.lang.String location)
           
 void setName(java.lang.String name)
           
 void setSharedArtifact(boolean sharedArtifact)
           
protected  void validateArtifact(ArtifactDefinition artifact)
           
 
Methods inherited from class com.atlassian.bamboo.ww2.actions.PlanActionSupport
buildWebPanelContext, getBuildKey, getBuildNumber, getCurrentlyBuildingPlans, getErrorAccessor, getImmutablePlan, getJobsWebItemsForSection, getMutablePlan, getPlan, getPlanKey, getPlanResultKey, getProject, getResultsSummaryManager, getSecuredDomainObject, getTypedPlanKey, getTypedPlanResultKey, isJiraApplicationLinkDefined, isRestartable, planNotFound, setBuildKey, setBuildNumber, setErrorAccessor, setJiraApplinksService, setPlan, setPlanExecutionManager, setPlanKey, setPlanResultKey, setRepositoryConfigurationService, setResultsSummaryManager
 
Methods inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
addActionError, addActionWarning, addError, addError, addErrorCollection, addErrorMessage, addErrorMessage, addErrorMessages, addErrors, addHelpPanel, addIllegalArgumentException, areCheckBoxesEmpty, checkFieldXssSafety, createFieldValidator, doesHelpLinkHaveMatchingTitle, doesLabelKeyHaveMatchingDescription, doExecute, execute, forceRelativeReturnUrl, getActionWarnings, getAdministrationConfiguration, getBamboo, getBambooLicenseManager, getBambooPermissionManager, getBambooSession, getBambooUrl, getBambooUserManager, getBaseUrl, getBestBaseUrl, getBootstrapManager, getBreadCrumbs, getChainEquiv, getConcurrentBuildsEnabled, getConglomerateCookieValue, getCookieCutter, getCookieValue, getCurrentFormTheme, getCurrentSystemTime, getCurrentUrl, getDefaultPersister, getDeploymentProject, getDescriptionFromLabelKey, getElasticConfig, getFeatureManager, getFieldErrorAccessTracker, getFieldErrors, getFlushedErrorMessages, getFormattedActionErrors, getFormattedActionMessages, getFormattedErrorMessages, getHelpPanels, getInstanceName, getJobEquiv, getJsonObject, getNavigationContext, getNavigationUrl, getNumberOfCurrentlyBuildingPlans, getPlan, getPlanManager, getPluginAccessor, getReturnUrl, getServerLifecycleState, getSessionUser, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, getTextWithArgs, getTotalErrors, getUser, getValidatorContext, getWebFragmentsContextMap, getWebItemsForSection, getWebPanelContext, getWebSectionsForLocation, hasActionWarnings, hasAdminPermission, hasAnyErrors, hasBuilds, hasEntityPermission, hasGlobalAdminPermission, hasGlobalPermission, hasGlobalPermission, hasKey, hasLinkedDeployments, hasPlanPermission, hasPlanPermission, hasRestrictedAdminPermission, isCheckboxSetInAction, isEc2ConfigurationWarningRequired, isEnableJavascript, isEnableSignup, isInlineDialog, isRestrictedAdminEnabled, isSelectFieldAndNull, isViewContactDetailsEnabled, renderFreemarkerTemplate, setAdministrationConfigurationAccessor, setAdministrationConfigurationManager, setAuthenticationContext, setBambooLicenseManager, setBambooPermissionManager, setBambooUserManager, setBuildDefinitionManager, setCachedPlanManager, setChainEquiv, setCheckBoxFields, setCookieCutter, setCurrentFormTheme, setDashboardCachingManager, setDecorator, setEnableJavascript, setEnvironmentService, setErrorMessages, setFeatureManager, setI18nBeanFactory, setJobEquiv, setJsonator, setLinkedDeploymentProjectCacheService, setNavigationContext, setPlanManager, setPluginAccessor, setProfile, setProjectManager, setReturnUrl, setServerLifecycleProvider, setWebInterfaceManager, toJson, toJson
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionMessage, addFieldError, clearErrorsAndMessages, clone, getActionErrors, getActionMessages, getErrorMessages, getErrors, getLocale, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
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
 

Field Detail

artifactId

protected long artifactId

artifactDefinition

protected ArtifactDefinition artifactDefinition

artifactDefinitionManager

protected ArtifactDefinitionManager artifactDefinitionManager

artifactSubscriptionManager

protected ArtifactSubscriptionManager artifactSubscriptionManager
Constructor Detail

ConfigureBuildArtifact

public ConfigureBuildArtifact()
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

doInput

public java.lang.String doInput()
                         throws java.lang.Exception
Overrides:
doInput in class com.opensymphony.xwork.ActionSupport
Throws:
java.lang.Exception

doCreate

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

doUpdate

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

doDelete

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

buildJsonObject

@NotNull
protected com.opensymphony.webwork.dispatcher.json.JSONObject buildJsonObject()
                                                                       throws com.opensymphony.webwork.dispatcher.json.JSONException
Description copied from class: BambooActionSupport
Builds JSONObject and sets 'status', 'errors' and 'fieldErrors' properties accordingly. If descending classes need to add anything to JSON response these should override this method.

Overrides:
buildJsonObject in class BambooActionSupport
Returns:
Initialized JSONObject
Throws:
com.opensymphony.webwork.dispatcher.json.JSONException

getDeploymentProjectsUsingArtifact

@NotNull
public java.util.List<DeploymentProject> getDeploymentProjectsUsingArtifact(@NotNull
                                                                                    ArtifactDefinition artifactDefinition)

isPlanUsedInDeployments

public boolean isPlanUsedInDeployments()

canToggleSharing

public boolean canToggleSharing(ArtifactDefinition artifactDefinition)

validateArtifact

protected void validateArtifact(ArtifactDefinition artifact)

hasDependenciesThatRequireConfirmation

protected boolean hasDependenciesThatRequireConfirmation(@NotNull
                                                         ArtifactDefinition artifactDefinition)

setArtifactDefinitionManager

public void setArtifactDefinitionManager(ArtifactDefinitionManager artifactDefinitionManager)

setArtifactSubscriptionManager

public void setArtifactSubscriptionManager(ArtifactSubscriptionManager artifactSubscriptionManager)

setDeploymentProjectService

public void setDeploymentProjectService(DeploymentProjectService deploymentProjectService)
Overrides:
setDeploymentProjectService in class BambooActionSupport

getArtifactId

public long getArtifactId()

setArtifactId

public void setArtifactId(long artifactId)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getLocation

public java.lang.String getLocation()

setLocation

public void setLocation(java.lang.String location)

getCopyPattern

public java.lang.String getCopyPattern()

setCopyPattern

public void setCopyPattern(java.lang.String copyPattern)

isSharedArtifact

public boolean isSharedArtifact()

setSharedArtifact

public void setSharedArtifact(boolean sharedArtifact)

getArtifactDefinition

public ArtifactDefinition getArtifactDefinition()

getArtifactDefinitions

public java.util.List<ArtifactDefinition> getArtifactDefinitions()

getArtifactSubscriptions

public java.util.List<ArtifactSubscription> getArtifactSubscriptions()
Get Artifact Subscriptions associated with a Plan


isArtifactSubscriptionPossible

public boolean isArtifactSubscriptionPossible()

getNiceSizeMessage

public java.lang.String getNiceSizeMessage(long size)

getJobsSubscribedToArtifact

public com.google.common.collect.Multimap<ChainStage,Job> getJobsSubscribedToArtifact(@NotNull
                                                                                      ArtifactDefinition artifactDefinition)
Get jobs subscribed to artifact

Parameters:
artifactDefinition -
Returns:


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.