com.atlassian.bamboo.repository
Interface RepositoryConfigurationService

All Known Implementing Classes:
RepositoryConfigurationServiceImpl

public interface RepositoryConfigurationService


Method Summary
 RepositoryDefinition attachGlobalRepositoryToPlan(Plan plan, long selectedGlobalRepositoryId, boolean buildTrigger)
          Creates relationship between global repository and a plan
 RepositoryData createGlobalRepository(java.lang.String repositoryName, java.lang.String pluginKey, java.lang.String webRepositoryKey, org.apache.commons.configuration.HierarchicalConfiguration configuration, boolean buildTrigger)
          Creates new global repository.
 RepositoryDefinition createRepository(Plan plan, java.lang.String repositoryName, java.lang.String pluginKey, java.lang.String webRepositoryKey, org.apache.commons.configuration.HierarchicalConfiguration configuration, boolean buildTrigger)
          Creates new repository and adds it to the plan configuration
 void deleteGlobalRepository(long repositoryId)
          Removes global repository
 void deleteRepository(Plan plan, long repositoryId)
          Removes repository definition for plan
 void deleteRepository(Plan plan, long repositoryId, long replacementRepositoryId)
          Removes repository definition for plan
 RepositoryData editGlobalRepository(java.lang.String repositoryName, java.lang.String pluginKey, java.lang.String webRepositoryKey, RepositoryData repositoryData, org.apache.commons.configuration.HierarchicalConfiguration configuration)
          Changes definition of a global repository.
 RepositoryDefinition editRepository(Plan plan, java.lang.String repositoryName, java.lang.String selectedRepositoryKey, java.lang.String webRepositoryKey, RepositoryDefinition repositoryDefinition, org.apache.commons.configuration.HierarchicalConfiguration configuration)
          Changes (replaces) repository definition.
 java.util.Map<Job,java.util.List<TaskDefinition>> getRelevantJobsForRepositoryIdChange(Plan plan, long repositoryId)
          Returns mapping between Job and TaskDefinition for tasks using repository by given repository id
 void moveRepository(PlanKey planKey, long repositoryId, long beforePosition, long afterPosition)
          Changes position of repository in the repository list.
 RepositoryDefinition toggleTriggerBuild(PlanKey planKey, long repositoryId)
          Changes flag indicating, if repository is taking part in change detection
 void updateTriggerBuild(Plan plan, java.util.Set<java.lang.Long> repositoryIds)
           
 boolean validateGlobalRepositoryName(java.lang.String name, RepositoryData repositoryData)
          Checks if name of global repository is unique.
 boolean validateRepositoryName(Plan plan, java.lang.String name, RepositoryDefinition repositoryDefinition)
          Checks if provided name for repository is unique in the Plan
 boolean validateRestartableStatus(ResultsSummary resultSummary)
           
 

Method Detail

createRepository

RepositoryDefinition createRepository(@NotNull
                                      Plan plan,
                                      @NotNull
                                      java.lang.String repositoryName,
                                      @NotNull
                                      java.lang.String pluginKey,
                                      @Nullable
                                      java.lang.String webRepositoryKey,
                                      @NotNull
                                      org.apache.commons.configuration.HierarchicalConfiguration configuration,
                                      boolean buildTrigger)
                                      throws java.lang.IllegalArgumentException
Creates new repository and adds it to the plan configuration

Parameters:
plan -
repositoryName - repository name presented to the user, must be unique in plan
pluginKey - pluginKey of repository
webRepositoryKey - plugin key of web repository viewer
configuration - xml configuration of repository
buildTrigger - flag indicating if repository is taking part in change detection
Returns:
Throws:
java.lang.IllegalArgumentException

editRepository

RepositoryDefinition editRepository(@NotNull
                                    Plan plan,
                                    @NotNull
                                    java.lang.String repositoryName,
                                    @NotNull
                                    java.lang.String selectedRepositoryKey,
                                    @Nullable
                                    java.lang.String webRepositoryKey,
                                    @NotNull
                                    RepositoryDefinition repositoryDefinition,
                                    @NotNull
                                    org.apache.commons.configuration.HierarchicalConfiguration configuration)
                                    throws java.lang.IllegalArgumentException,
                                           java.lang.IllegalStateException
Changes (replaces) repository definition. Build trigger can not be changed in this method.

Parameters:
plan -
repositoryName - repository name presented to the user, must be unique in plan
selectedRepositoryKey - plugin key of repository or id of a global repository
webRepositoryKey - plugin key of web repository viewer
configuration - xml configuration of repository
Returns:
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

deleteRepository

void deleteRepository(@NotNull
                      Plan plan,
                      long repositoryId)
                      throws java.lang.IllegalArgumentException,
                             java.lang.IllegalStateException
Removes repository definition for plan

Parameters:
plan -
repositoryId -
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

deleteRepository

void deleteRepository(@NotNull
                      Plan plan,
                      long repositoryId,
                      long replacementRepositoryId)
                      throws java.lang.IllegalArgumentException,
                             java.lang.IllegalStateException
Removes repository definition for plan

Parameters:
plan -
repositoryId -
replacementRepositoryId - repository id to replace removed one in tasks depending on it
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

toggleTriggerBuild

RepositoryDefinition toggleTriggerBuild(@NotNull
                                        PlanKey planKey,
                                        long repositoryId)
                                        throws java.lang.IllegalArgumentException,
                                               java.lang.IllegalStateException
Changes flag indicating, if repository is taking part in change detection

Parameters:
planKey -
repositoryId -
Returns:
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

moveRepository

void moveRepository(@NotNull
                    PlanKey planKey,
                    long repositoryId,
                    long beforePosition,
                    long afterPosition)
                    throws java.lang.IllegalArgumentException,
                           java.lang.IllegalStateException
Changes position of repository in the repository list. Important for setting default repository

Parameters:
planKey -
repositoryId - the RepositoryDefinition to move
beforePosition - position of the RepositoryDefinition that will be before the moving Repository, -1 if the beginning of the list
afterPosition - position of the RepositoryDefinition that will be after the moving Repository, -1 if the end of the list
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

validateRepositoryName

boolean validateRepositoryName(@NotNull
                               Plan plan,
                               @NotNull
                               java.lang.String name,
                               @Nullable
                               RepositoryDefinition repositoryDefinition)
Checks if provided name for repository is unique in the Plan

Parameters:
plan -
name - new name for repository
repositoryDefinition - existing repository definition being edited on null when repository is created
Returns:
true if name is unique or false when name already exists for other repository for the same plan

updateTriggerBuild

void updateTriggerBuild(@NotNull
                        Plan plan,
                        java.util.Set<java.lang.Long> repositoryIds)
                        throws java.lang.IllegalArgumentException,
                               java.lang.IllegalStateException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

validateRestartableStatus

boolean validateRestartableStatus(@NotNull
                                  ResultsSummary resultSummary)

editGlobalRepository

RepositoryData editGlobalRepository(@NotNull
                                    java.lang.String repositoryName,
                                    @NotNull
                                    java.lang.String pluginKey,
                                    @Nullable
                                    java.lang.String webRepositoryKey,
                                    @NotNull
                                    RepositoryData repositoryData,
                                    @NotNull
                                    org.apache.commons.configuration.HierarchicalConfiguration configuration)
                                    throws java.lang.IllegalArgumentException,
                                           java.lang.IllegalStateException
Changes definition of a global repository.

Parameters:
repositoryName -
pluginKey -
webRepositoryKey -
repositoryDefinition -
configuration -
Returns:
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

createGlobalRepository

RepositoryData createGlobalRepository(@NotNull
                                      java.lang.String repositoryName,
                                      @NotNull
                                      java.lang.String pluginKey,
                                      @Nullable
                                      java.lang.String webRepositoryKey,
                                      @NotNull
                                      org.apache.commons.configuration.HierarchicalConfiguration configuration,
                                      boolean buildTrigger)
                                      throws java.lang.IllegalArgumentException
Creates new global repository.

Parameters:
repositoryName -
pluginKey -
webRepositoryKey -
configuration -
buildTrigger -
Returns:
Throws:
java.lang.IllegalArgumentException

attachGlobalRepositoryToPlan

RepositoryDefinition attachGlobalRepositoryToPlan(Plan plan,
                                                  long selectedGlobalRepositoryId,
                                                  boolean buildTrigger)
                                                  throws java.lang.IllegalArgumentException,
                                                         java.lang.IllegalStateException
Creates relationship between global repository and a plan

Parameters:
plan -
selectedGlobalRepositoryId -
buildTrigger -
Returns:
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

deleteGlobalRepository

void deleteGlobalRepository(long repositoryId)
                            throws java.lang.IllegalArgumentException,
                                   java.lang.IllegalStateException
Removes global repository

Parameters:
repositoryId -
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

validateGlobalRepositoryName

boolean validateGlobalRepositoryName(@NotNull
                                     java.lang.String name,
                                     @Nullable
                                     RepositoryData repositoryData)
Checks if name of global repository is unique.

Parameters:
name -
repositoryData -
Returns:

getRelevantJobsForRepositoryIdChange

java.util.Map<Job,java.util.List<TaskDefinition>> getRelevantJobsForRepositoryIdChange(@NotNull
                                                                                       Plan plan,
                                                                                       long repositoryId)
Returns mapping between Job and TaskDefinition for tasks using repository by given repository id

Parameters:
plan -
repositoryId -
Returns:


Copyright © 2012 Atlassian. All Rights Reserved.