Class ConvertLocalToGlobalRepository

All Implemented Interfaces:
JsonStreamingAction, ErrorCollection, BambooSessionAware, BareBuildConfigurationAware, BuildConfigurationAware, NavigationAware, DomainObjectSecurityAware, GlobalReadSecurityAware, PlanViewConfigurationSecurityAware, PlanAware, ProjectAware, ReturnUrlAware, UserAware, com.atlassian.core.i18n.I18nTextProvider, Serializable, org.apache.struts2.action.Action, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.locale.LocaleProvider, org.apache.struts2.Preparable, org.apache.struts2.text.TextProvider, org.apache.struts2.Validateable

public class ConvertLocalToGlobalRepository extends ConfigureRepository
See Also:
  • Constructor Details

    • ConvertLocalToGlobalRepository

      public ConvertLocalToGlobalRepository()
  • Method Details

    • input

      public String input()
      Overrides:
      input in class org.apache.struts2.ActionSupport
    • execute

      public String execute()
      Specified by:
      execute in interface org.apache.struts2.action.Action
      Overrides:
      execute in class org.apache.struts2.ActionSupport
    • validate

      public void validate()
      Specified by:
      validate in interface org.apache.struts2.Validateable
      Overrides:
      validate in class org.apache.struts2.ActionSupport
    • getRepositoriesForConvertion

      @NotNull public @NotNull List<RepositoryOption> getRepositoriesForConvertion()
    • findCompatibleGlobalRepositories

      @NotNull protected @NotNull List<VcsRepositoryData> findCompatibleGlobalRepositories(VariableSubstitutor variableSubstitutor, List<PlanRepositoryDefinition> planRepositoryDefinitions)
      Find global repositories that: 1. Match the branch/configuration of the repository being converted 2. Won't create duplicates with other repositories already in the plan
    • matchesCurrentRepository

      protected boolean matchesCurrentRepository(VariableSubstitutor variableSubstitutor, VcsRepositoryData globalRepo)
      Check if the global repository matches the configuration of the repository being converted
    • wouldCreateDuplicate

      protected boolean wouldCreateDuplicate(VariableSubstitutor variableSubstitutor, VcsRepositoryData globalRepo, List<PlanRepositoryDefinition> otherPlanRepos)
      Check if adding this global repository would create a duplicate with any other repository in the plan
    • validateName

      protected void validateName()
      Overrides:
      validateName in class ConfigureRepository
    • setSelectedRepository

      public void setSelectedRepository(long selectedRepository)