com.atlassian.bamboo.repository
Interface RepositoryDefinitionManager

All Known Implementing Classes:
RepositoryDefinitionManagerImpl

public interface RepositoryDefinitionManager

Interface to handle access to repository data.


Method Summary
 java.util.List<RepositoryData> getGlobalRepositoryDefinitions()
           
 PlanRepositoryLink getPlanRepositoryLink(Plan plan, long repositoryId)
          Get persistent representation of a relation between Plan and repository
 java.util.List<PlanRepositoryLink> getPlanRepositoryLinks(Plan plan)
          Get persistent representation of relation between Plan and repositories
 java.util.List<PlanRepositoryLink> getPlansUsingRepository(long repositoryId)
           
 RepositoryDataEntity getRepositoryDataEntity(long id)
          Get persistent representation of a repository
 RepositoryDefinitionEntity getRepositoryDefinitionEntity(long id)
          Deprecated. since 4.0 usegetRepositoryDataEntity(long)
 java.util.List<RepositoryDefinition> getRepositoryDefinitionsForPlan(ImmutablePlan plan)
          Get all repositories attached to a plan ordered by position.
 void removeRepositoriesForPlan(Plan plan)
          Remove all repositories from Plan that are not global repositories.
 void removeRepositoryFromPlan(PlanRepositoryLink planRepository)
          Removes relation between repository and plan.
 void removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity)
          Marks repository for deletion if it is referenced by a RepositoryChangeset, removes it otherwise.
 void removeUnusedRepositories()
          Removes all repositories that has been previously markedForDeletion and are no longer referenced by any RepositoryChangeset
 void savePlanRepositoryLink(PlanRepositoryLink planRepository)
           
 void savePlanRepositoryLinks(java.util.List<PlanRepositoryLink> planRepositories)
          Saves the collection of plan to repository relations.
 long savePlanRepositoryWithDefinition(PlanRepositoryLink planRepository)
          Saves plan to repository relation definition with cascade to RepositoryDataEntity
 long saveRepositoryDefinition(RepositoryDataEntity repositoryData)
          Save repository definition.
 long saveRepositoryDefinition(RepositoryDefinitionEntity repositoryData)
          Deprecated. since 4.0 use saveRepositoryDefinition(RepositoryDataEntity)
 void saveRepositoryDefinitions(java.util.Collection<RepositoryDataEntity> repositoriesBeingCreated)
          Saves all repository definitions in the collection.
 

Method Detail

getPlanRepositoryLink

@Nullable
PlanRepositoryLink getPlanRepositoryLink(@NotNull
                                                  Plan plan,
                                                  long repositoryId)
Get persistent representation of a relation between Plan and repository

Parameters:
plan -
repositoryId -

getPlanRepositoryLinks

@NotNull
java.util.List<PlanRepositoryLink> getPlanRepositoryLinks(@NotNull
                                                                  Plan plan)
Get persistent representation of relation between Plan and repositories

Parameters:
plan -

getRepositoryDataEntity

@Nullable
RepositoryDataEntity getRepositoryDataEntity(long id)
Get persistent representation of a repository

Parameters:
id -
Returns:

getRepositoryDefinitionEntity

@Deprecated
@Nullable
RepositoryDefinitionEntity getRepositoryDefinitionEntity(long id)
Deprecated. since 4.0 usegetRepositoryDataEntity(long)

Get persistent representation of a repository

Parameters:
id -
Returns:

getRepositoryDefinitionsForPlan

@NotNull
java.util.List<RepositoryDefinition> getRepositoryDefinitionsForPlan(@NotNull
                                                                             ImmutablePlan plan)
Get all repositories attached to a plan ordered by position.

Parameters:
plan -
Returns:

removeRepositoriesForPlan

void removeRepositoriesForPlan(Plan plan)
Remove all repositories from Plan that are not global repositories.

Parameters:
plan -

saveRepositoryDefinition

long saveRepositoryDefinition(RepositoryDataEntity repositoryData)
Save repository definition.

Parameters:
repositoryData -
Returns:
id of saved definition

saveRepositoryDefinition

@Deprecated
long saveRepositoryDefinition(RepositoryDefinitionEntity repositoryData)
Deprecated. since 4.0 use saveRepositoryDefinition(RepositoryDataEntity)

Save repository definition.

Parameters:
repositoryDefinitionEntity -
Returns:
id of saved definition

saveRepositoryDefinitions

void saveRepositoryDefinitions(@NotNull
                               java.util.Collection<RepositoryDataEntity> repositoriesBeingCreated)
Saves all repository definitions in the collection.

Parameters:
repositoriesBeingCreated -

savePlanRepositoryWithDefinition

long savePlanRepositoryWithDefinition(@NotNull
                                      PlanRepositoryLink planRepository)
Saves plan to repository relation definition with cascade to RepositoryDataEntity

Parameters:
planRepository -
Returns:

savePlanRepositoryLink

void savePlanRepositoryLink(@NotNull
                            PlanRepositoryLink planRepository)

savePlanRepositoryLinks

void savePlanRepositoryLinks(@NotNull
                             java.util.List<PlanRepositoryLink> planRepositories)
Saves the collection of plan to repository relations.

Parameters:
planRepositories -

removeRepositoryIfUnused

void removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity)
Marks repository for deletion if it is referenced by a RepositoryChangeset, removes it otherwise.

Parameters:
repositoryDataEntity -

removeUnusedRepositories

void removeUnusedRepositories()
Removes all repositories that has been previously markedForDeletion and are no longer referenced by any RepositoryChangeset


removeRepositoryFromPlan

void removeRepositoryFromPlan(@NotNull
                              PlanRepositoryLink planRepository)
Removes relation between repository and plan. If the repository is not a global repository, removeRepositoryIfUnused(RepositoryDataEntity) is called.

Parameters:
planRepository -

getGlobalRepositoryDefinitions

java.util.List<RepositoryData> getGlobalRepositoryDefinitions()

getPlansUsingRepository

java.util.List<PlanRepositoryLink> getPlansUsingRepository(long repositoryId)


Copyright © 2012 Atlassian. All Rights Reserved.