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

All Superinterfaces:
BambooPluginModule, java.io.Serializable
All Known Subinterfaces:
CleanCheckoutAwareRepository, CleanWorkingDirectoryAwareRepository, IncludeExcludeAwareRepository, InitialBuildAwareRepository, MavenPomAccessorCapableRepository, MutableQuietPeriodAwareRepository, PostConfigurableRepository, QuietPeriodAwareRepository, Repository, RepositoryEventAware, SelectableAuthenticationRepository
All Known Implementing Classes:
AbstractRepository, CVSRepository, HgRepository, PerforceRepository, SvnRepository

public interface RepositoryV2
extends java.io.Serializable, BambooPluginModule


Method Summary
 BuildChanges collectChangesSinceLastBuild(java.lang.String planKey, java.lang.String lastVcsRevisionKey)
          Collects the changes since the lastVcsRevisionKey
 java.io.File getSourceCodeDirectory(java.lang.String planKey)
          Where has the source code been checked out?
 boolean isRepositoryDifferent(Repository repository)
          Checks if the current repo is the same as the given repository
 boolean referencesDifferentRepository()
          Has the repository's configuration been updated so that it now references a completely different build?
 java.lang.String retrieveSourceCode(BuildContext buildContext, java.lang.String vcsRevisionKey)
          Checks out the latest source code to an appropriate repository
 java.lang.String retrieveSourceCode(java.lang.String planKey, java.lang.String vcsRevisionKey)
          Deprecated.  
 

Method Detail

collectChangesSinceLastBuild

@NotNull
BuildChanges collectChangesSinceLastBuild(@NotNull
                                                  java.lang.String planKey,
                                                  @Nullable
                                                  java.lang.String lastVcsRevisionKey)
                                          throws RepositoryException
Collects the changes since the lastVcsRevisionKey

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

retrieveSourceCode

@Deprecated
@NotNull
java.lang.String retrieveSourceCode(@NotNull
                                                       java.lang.String planKey,
                                                       @Nullable
                                                       java.lang.String vcsRevisionKey)
                                    throws RepositoryException
Deprecated. 

Checks out the latest source code to an appropriate repository

Parameters:
planKey -
vcsRevisionKey - - may be null if you want latest code
Returns:
vcsRevisionKey - the revision
Throws:
RepositoryException

retrieveSourceCode

@NotNull
java.lang.String retrieveSourceCode(@NotNull
                                            BuildContext buildContext,
                                            @Nullable
                                            java.lang.String vcsRevisionKey)
                                    throws RepositoryException
Checks out the latest source code to an appropriate repository

Parameters:
buildContext -
vcsRevisionKey - - may be null if you want latest code
Returns:
vcsRevisionKey - the revision
Throws:
RepositoryException

getSourceCodeDirectory

@NotNull
java.io.File getSourceCodeDirectory(@NotNull
                                            java.lang.String planKey)
                                    throws RepositoryException
Where has the source code been checked out?

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

referencesDifferentRepository

boolean referencesDifferentRepository()
Has the repository's configuration been updated so that it now references a completely different build?

Returns:
true iff the repository now references a different build

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 © 2010 Atlassian. All Rights Reserved.