com.atlassian.bamboo.v2.build.repository
Interface RepositoryV2

All Superinterfaces:
BambooPluginModule, java.io.Serializable
All Known Subinterfaces:
BranchAwareRepository, BranchDetectionCapableRepository, BranchingAwareRepository, BranchMergingAwareRepository, CachingAwareRepository, CommitIsolationAwareRepository, CustomRevisionDataAwareRepository, CustomSourceDirectoryAwareRepository, CustomVariableProviderRepository, IncludeExcludeAwareRepository, InitialBuildAwareRepository, MavenPomAccessorCapableRepository, PostConfigurableRepository, PushCapableRepository, QuietPeriodAwareRepository, Repository, RepositoryEventAware, RequirementsAwareRepository, SelectableAuthenticationRepository, StandaloneRepository, TaggingAwareRepository
All Known Implementing Classes:
AbstractRepository, AbstractStandaloneRepository, BitbucketRepository, CVSRepository, HgRepository, NullRepository, PerforceRepository, SvnRepository

public interface RepositoryV2
extends java.io.Serializable, BambooPluginModule


Method Summary
 BuildRepositoryChanges collectChangesSinceLastBuild(java.lang.String planKey, java.lang.String lastVcsRevisionKey)
          Collects the changes since the lastVcsRevisionKey.
 java.io.File getSourceCodeDirectory(PlanKey planKey)
          Deprecated. since 3.3 Repository must handle checkout to any sub-directory.
 boolean isRepositoryDifferent(Repository repository)
          Checks if the current repo is the same as the given repository
 

Method Detail

collectChangesSinceLastBuild

@NotNull
BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull
                                                            java.lang.String planKey,
                                                            @Nullable
                                                            java.lang.String lastVcsRevisionKey)
                                                    throws RepositoryException
Collects the changes since the lastVcsRevisionKey. This method is called only on server side (never on agent).

Parameters:
planKey -
lastVcsRevisionKey - can be null, if null you should ensure the correct vcsrevisionkey is returned in the BuildChanges object.
Returns:
A build changes object with the appropriate build changes
Throws:
RepositoryException - if something goes wrong

getSourceCodeDirectory

@NotNull
@Deprecated
java.io.File getSourceCodeDirectory(@NotNull
                                                       PlanKey planKey)
                                    throws RepositoryException
Deprecated. since 3.3 Repository must handle checkout to any sub-directory.

Where has the source code been checked out? Notes: - The method needs to be implemented if the repository doesn't implement CustomSourceDirectoryAwareRepository - The returned path should be absolute

Parameters:
planKey - Plan's key
Returns:
The location of the source code checked out by the repository
Throws:
RepositoryException - A generic failure

isRepositoryDifferent

boolean isRepositoryDifferent(@NotNull
                              Repository repository)
Checks if the current repo is the same as the given repository

Parameters:
repository - to compare against
Returns:
true of repositories are different, false if the same;


Copyright © 2012 Atlassian. All Rights Reserved.