|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.repository.RepositoryConfigurationServiceImpl
public class RepositoryConfigurationServiceImpl
Constructor Summary | |
---|---|
RepositoryConfigurationServiceImpl(PlanManager planManager,
RepositoryManager repositoryManager,
WebRepositoryViewerManager webRepositoryViewerManager,
RepositoryDefinitionManager repositoryDefinitionManager,
AuditLogService auditLogService,
TaskConfigurationService taskConfigurationService,
BuildDefinitionManager buildDefinitionManager,
ChainBranchManager chainBranchManager,
BranchDetectionService branchDetectionService,
ScopedExclusionService scopedExclusionService,
com.atlassian.event.api.EventPublisher eventPublisher)
|
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 replacementReposiotryId)
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 pluginKey,
java.lang.String webRepositoryKey,
RepositoryDefinition repositoryDefinition,
org.apache.commons.configuration.HierarchicalConfiguration configuration)
AOP advice cannot handle RepositoryDataEntity type so call to {@link RepositoryDefinitionManager#saveRepositoryDefinition(RepositoryDataEntity)
will be unadvised. |
protected java.util.List<PlanRepositoryLink> |
getNewRepositoryList(java.util.List<PlanRepositoryLink> originalRepositories,
PlanRepositoryLink toMove,
long beforeId,
long afterId)
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RepositoryConfigurationServiceImpl(@NotNull PlanManager planManager, @NotNull RepositoryManager repositoryManager, @NotNull WebRepositoryViewerManager webRepositoryViewerManager, @NotNull RepositoryDefinitionManager repositoryDefinitionManager, @NotNull AuditLogService auditLogService, @NotNull TaskConfigurationService taskConfigurationService, @NotNull BuildDefinitionManager buildDefinitionManager, @NotNull ChainBranchManager chainBranchManager, @NotNull BranchDetectionService branchDetectionService, @NotNull ScopedExclusionService scopedExclusionService, @NotNull com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail |
---|
public 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
RepositoryConfigurationService
createRepository
in interface RepositoryConfigurationService
repositoryName
- repository name presented to the user, must be unique in planpluginKey
- pluginKey of repositorywebRepositoryKey
- plugin key of web repository viewerconfiguration
- xml configuration of repositorybuildTrigger
- flag indicating if repository is taking part in change detection
java.lang.IllegalArgumentException
public RepositoryDefinition editRepository(@NotNull Plan plan, @NotNull java.lang.String repositoryName, @NotNull java.lang.String pluginKey, @Nullable java.lang.String webRepositoryKey, @NotNull RepositoryDefinition repositoryDefinition, @NotNull org.apache.commons.configuration.HierarchicalConfiguration configuration) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
RepositoryDataEntity
type so call to {@link RepositoryDefinitionManager#saveRepositoryDefinition(RepositoryDataEntity)
will be unadvised. Therefore we need to add @PlanConfigurationModification annotation here
editRepository
in interface RepositoryConfigurationService
repositoryName
- repository name presented to the user, must be unique in planpluginKey
- plugin key of repository or id of a global repositorywebRepositoryKey
- plugin key of web repository viewerconfiguration
- xml configuration of repository
java.lang.IllegalArgumentException
java.lang.IllegalStateException
public java.util.Map<Job,java.util.List<TaskDefinition>> getRelevantJobsForRepositoryIdChange(@NotNull Plan plan, long repositoryId)
RepositoryConfigurationService
Job
and TaskDefinition
for tasks using repository by given repository id
getRelevantJobsForRepositoryIdChange
in interface RepositoryConfigurationService
public 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
RepositoryConfigurationService
editGlobalRepository
in interface RepositoryConfigurationService
java.lang.IllegalArgumentException
java.lang.IllegalStateException
public 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
RepositoryConfigurationService
createGlobalRepository
in interface RepositoryConfigurationService
java.lang.IllegalArgumentException
public RepositoryDefinition attachGlobalRepositoryToPlan(Plan plan, long selectedGlobalRepositoryId, boolean buildTrigger)
RepositoryConfigurationService
attachGlobalRepositoryToPlan
in interface RepositoryConfigurationService
public void deleteGlobalRepository(long repositoryId) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
RepositoryConfigurationService
deleteGlobalRepository
in interface RepositoryConfigurationService
java.lang.IllegalArgumentException
java.lang.IllegalStateException
public RepositoryDefinition toggleTriggerBuild(@NotNull PlanKey planKey, long repositoryId) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
RepositoryConfigurationService
toggleTriggerBuild
in interface RepositoryConfigurationService
java.lang.IllegalArgumentException
java.lang.IllegalStateException
public void updateTriggerBuild(@NotNull Plan plan, java.util.Set<java.lang.Long> repositoryIds) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
updateTriggerBuild
in interface RepositoryConfigurationService
java.lang.IllegalArgumentException
java.lang.IllegalStateException
public void deleteRepository(@NotNull Plan plan, long repositoryId) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
RepositoryConfigurationService
deleteRepository
in interface RepositoryConfigurationService
java.lang.IllegalArgumentException
java.lang.IllegalStateException
public void deleteRepository(@NotNull Plan plan, long repositoryId, long replacementReposiotryId) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
RepositoryConfigurationService
deleteRepository
in interface RepositoryConfigurationService
replacementReposiotryId
- repository id to replace removed one in tasks depending on it
java.lang.IllegalArgumentException
java.lang.IllegalStateException
public void moveRepository(@NotNull PlanKey planKey, long repositoryId, long beforePosition, long afterPosition) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
RepositoryConfigurationService
moveRepository
in interface RepositoryConfigurationService
repositoryId
- the RepositoryDefinition to movebeforePosition
- position of the RepositoryDefinition that will be before the moving Repository, -1 if the beginning of the listafterPosition
- position of the RepositoryDefinition that will be after the moving Repository, -1 if the end of the list
java.lang.IllegalArgumentException
java.lang.IllegalStateException
public boolean validateRepositoryName(@NotNull Plan plan, @NotNull java.lang.String name, @Nullable RepositoryDefinition repositoryDefinition)
RepositoryConfigurationService
validateRepositoryName
in interface RepositoryConfigurationService
name
- new name for repositoryrepositoryDefinition
- existing repository definition being edited on null when repository is created
public boolean validateGlobalRepositoryName(@NotNull java.lang.String name, @Nullable RepositoryData repositoryData)
RepositoryConfigurationService
validateGlobalRepositoryName
in interface RepositoryConfigurationService
public boolean validateRestartableStatus(@NotNull ResultsSummary resultSummary)
validateRestartableStatus
in interface RepositoryConfigurationService
@NotNull protected java.util.List<PlanRepositoryLink> getNewRepositoryList(@NotNull java.util.List<PlanRepositoryLink> originalRepositories, @NotNull PlanRepositoryLink toMove, long beforeId, long afterId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |