com.atlassian.bamboo.repository
Interface Repository

All Superinterfaces:
BambooPluginModule, ConfigurablePlugin, ConvertibleFromConfig, DescriptionProvider, InitablePluginModule, NameProvider, RepositoryV2, java.io.Serializable
All Known Subinterfaces:
AdHocAccessAwareRepository, CleanCheckoutAwareRepository, CleanWorkingDirectoryAwareRepository, IncludeExcludeAwareRepository, InitialBuildAwareRepository, MavenPomAccessorCapableRepository, MutableQuietPeriodAwareRepository, PostConfigurableRepository, QuietPeriodAwareRepository, RepositoryEventAware, SelectableAuthenticationRepository
All Known Implementing Classes:
AbstractRepository, CVSRepository, PerforceRepository, SvnRepository

public interface Repository
extends ConvertibleFromConfig, RepositoryV2, ConfigurablePlugin, DescriptionProvider

Basic contract for interfacing with various version control repository systems.


Field Summary
static java.lang.String SELECTED_REPOSITORY
          Constant for fetching out the selected repository key from a BuildConfiguration
static java.lang.String UNKNOWN_HOST
          A marker string to return when the host is not known
 
Method Summary
 ErrorCollection checkConnection()
          This method internally validates the current connection for the repository.
 java.lang.String getChangedDetectionEditHtml(BuildConfiguration buildConfiguration, Plan plan)
          Returns HTML that represents the form fragment for editing the change detection repository configuration.
 java.lang.String getChangedDetectionViewHtml(Plan plan)
          Returns the HTML that represents the view of the change detection repository configuration
 java.lang.String getHost()
          What's the repository server host
 java.lang.String getKey()
          The full complete plugin key for the repo
 java.lang.String getName()
          The display name for the repository type
 java.lang.String getShortKey()
          The mini key from the plugin (should not contain plugin prefix)
 java.lang.String getTriggerIpAddress()
          What's the repository's optional trigger IP address?
 boolean isRepositoryDifferent(Repository repository)
          Checks if the current repo is the same or not and sets the referencesDifferentRepository flag accordingly
 void setReferencesDifferentRepository(boolean isDifferentRepository)
          Record that the repository configutation
 
Methods inherited from interface com.atlassian.bamboo.fieldvalue.ConvertibleFromConfig
populateFromConfig, toConfiguration
 
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2
collectChangesSinceLastBuild, getSourceCodeDirectory, referencesDifferentRepository, retrieveSourceCode, retrieveSourceCode
 
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
addDefaultValues, customizeBuildRequirements, getEditHtml, getViewHtml, prepareConfigObject, removeBuildRequirements, validate
 
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
 
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
 

Field Detail

UNKNOWN_HOST

static final java.lang.String UNKNOWN_HOST
A marker string to return when the host is not known

See Also:
Constant Field Values

SELECTED_REPOSITORY

static final java.lang.String SELECTED_REPOSITORY
Constant for fetching out the selected repository key from a BuildConfiguration

See Also:
Constant Field Values
Method Detail

getKey

@NotNull
java.lang.String getKey()
The full complete plugin key for the repo

Returns:

getShortKey

@NotNull
java.lang.String getShortKey()
The mini key from the plugin (should not contain plugin prefix)

Returns:

getName

@NotNull
java.lang.String getName()
The display name for the repository type

Specified by:
getName in interface DescriptionProvider
Specified by:
getName in interface NameProvider
Returns:

getHost

java.lang.String getHost()
What's the repository server host

Returns:
The host!

checkConnection

@NotNull
ErrorCollection checkConnection()
This method internally validates the current connection for the repository. Usually the same as running validate

Returns:
ErrorCollection must not be null. The errros should be translated to error messages, rather than field errors.

getTriggerIpAddress

@Nullable
java.lang.String getTriggerIpAddress()
What's the repository's optional trigger IP address?

Returns:
the ip address, null if it does not have a trigger address.

isRepositoryDifferent

boolean isRepositoryDifferent(@NotNull
                              Repository repository)
Checks if the current repo is the same or not and sets the referencesDifferentRepository flag accordingly

Parameters:
repository -

setReferencesDifferentRepository

void setReferencesDifferentRepository(boolean isDifferentRepository)
Record that the repository configutation

Parameters:
isDifferentRepository - true iff the repository now references a different repostory

getChangedDetectionViewHtml

@Nullable
java.lang.String getChangedDetectionViewHtml(@NotNull
                                                      Plan plan)
Returns the HTML that represents the view of the change detection repository configuration

Returns:
HTML string. May be null.

getChangedDetectionEditHtml

@Nullable
java.lang.String getChangedDetectionEditHtml(@NotNull
                                                      BuildConfiguration buildConfiguration,
                                                      @NotNull
                                                      Plan plan)
Returns HTML that represents the form fragment for editing the change detection repository configuration. No opening and closing form tags are required.

Returns:
HTMK string. May be null.


Copyright © 2010 Atlassian. All Rights Reserved.