Package com.atlassian.bamboo.repository
Class AbstractRepository
java.lang.Object
com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
com.atlassian.bamboo.repository.AbstractRepository
- All Implemented Interfaces:
ConvertibleFromConfig
,InitablePluginModule
,AdvancedConfigurationAwareRepository
,FilterChangesetAwareRepository
,IncludeExcludeAwareRepository
,OnceOffCapableRepository
,QuietPeriodAwareRepository
,Repository
,DescriptionProvider
,NameProvider
,BambooPluginModule
,BuildConfigurationAwarePlugin
,ConfigurablePlugin
,RenderableBuildConfiguration
,RepositoryV2
,Serializable
- Direct Known Subclasses:
AbstractStandaloneRepository
@Deprecated
public abstract class AbstractRepository
extends BaseConfigurablePlugin
implements Repository, IncludeExcludeAwareRepository, QuietPeriodAwareRepository, AdvancedConfigurationAwareRepository, FilterChangesetAwareRepository, OnceOffCapableRepository
Deprecated.
since 5.14 use new repository plugin API instead
This class provides common repository implementation code.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected AdministrationConfigurationAccessor
Deprecated.since 6.8 inject your ownstatic final String
Deprecated.protected BuildDirectoryManager
Deprecated.since 6.8 inject your ownprotected BuildLoggerManager
Deprecated.since 6.8 inject your ownprotected CustomVariableContext
Deprecated.since 6.8 inject your ownprotected FeatureManager
Deprecated.since 6.8 inject your ownstatic final String
Deprecated.protected RepositoryModuleDescriptorImpl
Deprecated.protected TemplateRenderer
Deprecated.since 6.8 inject your ownprotected com.opensymphony.xwork2.TextProvider
Deprecated.since 6.8 inject your ownFields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
moduleDescriptor
Fields inherited from interface com.atlassian.bamboo.repository.FilterChangesetAwareRepository
CHANGESET_FILTER_PATTERN_REGEX, MAVEN_RELEASE_PLUGIN_EXCLUSION_PATTERN
Fields inherited from interface com.atlassian.bamboo.repository.IncludeExcludeAwareRepository
FILTER_PATTERN_EXCLUDE, FILTER_PATTERN_INCLUDE, FILTER_PATTERN_NONE, FILTER_PATTERN_OPTION, FILTER_PATTERN_REGEX
Fields inherited from interface com.atlassian.bamboo.repository.Repository
SELECTED_REPOSITORY, UNKNOWN_HOST
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDefaultValues
(@NotNull BuildConfiguration buildConfiguration) Deprecated.Extension point for adding default values to the form forRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
@NotNull ErrorCollection
Deprecated.This method internally validates the current connection for the repository.@NotNull BuildRepositoryChanges
collectChangesForRevision
(@NotNull PlanKey planKey, @NotNull String targetRevision) Deprecated.Collects the changes for the targetRevision.void
customizeBuildRequirements
(@NotNull PlanKey planKey, @NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet) Deprecated.Extension point for adding/customizing requirements when editing a build's builder configuration.getAdvancedEditHtml
(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan) Deprecated.getAdvancedViewHtml
(@NotNull Plan plan) Deprecated.since 5.5 useStandaloneRepository.getAdvancedViewHtml()
@Nullable String
Deprecated.Deprecated.The regex expression on which changeset comments are matched for exclusion.Deprecated.since 5.14Deprecated.@Nullable String
getEditHtml
(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan) Deprecated.Deprecated.Do we want to include files which match pattern or exclude files which match pattern?Deprecated.The regex expression on which fileName (paths) are matched for inclusion/exclusion.@NotNull String
getKey()
Deprecated.The full complete plugin key for the repo@NotNull String
Deprecated.A string representing the location of the repository@Nullable String
getMavenPomCheckoutAccessEditHtml
(@NotNull BuildConfiguration buildConfiguration) Deprecated.protected int
Deprecated.int
Deprecated.Returns the maximum number of times to collect changes@Nullable String
getMinimalEditHtml
(@NotNull BuildConfiguration buildConfiguration) Deprecated.Returns HTML for the minimal configuration of the repository.static TriggerModuleDescriptor
Deprecated.since 5.14int
Deprecated.Returns the number of seconds to wait between each retry@NotNull String
Deprecated.The mini key from the plugin (should not contain plugin prefix)@NotNull File
getSourceCodeDirectory
(@NotNull PlanKey planKey) Deprecated.For Subversion, we use the build name's directory within the system's working directoryDeprecated.Collection of system wide, hardcoded changeset filtering patterns@Nullable String
getViewHtml
(@NotNull Plan plan) Deprecated.since 5.5 useStandaloneRepository.getViewHtml()
Deprecated.void
init
(@NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor) Deprecated.Initialises the Plugin with the plugin module descriptorboolean
isAdvancedOptionEnabled
(@NotNull BuildConfiguration buildConfiguration) Deprecated.boolean
Deprecated.Returns true if we were to enable the quiet periodprotected boolean
isWorkspaceEmpty
(File sourceCodeDirectory) Deprecated.void
populateFromConfig
(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config) Deprecated.Update the current object with data in theHierarchicalConfiguration
void
removeBuildRequirements
(@NotNull PlanKey planKey, @NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet) Deprecated.Extension point for removing requirements when given plugin is excluded from build's builder configuration.void
setAdministrationConfigurationAccessor
(AdministrationConfigurationAccessor administrationConfigurationAccessor) Deprecated.void
setBuildDirectoryManager
(BuildDirectoryManager buildDirectoryManager) Deprecated.void
setBuildLoggerManager
(BuildLoggerManager buildLoggerManager) Deprecated.void
setChangesetFilterPatternRegex
(String changesetFilterPatternRegex) Deprecated.void
setCustomVariableContext
(CustomVariableContext customVariableContext) Deprecated.void
setFeatureManager
(FeatureManager featureManager) Deprecated.void
setFilterFilePatternOption
(String filterFilePatternOption) Deprecated.void
setFilterFilePatternRegex
(String filterFilePatternRegex) Deprecated.void
setTemplateRenderer
(TemplateRenderer templateRenderer) Deprecated.since 6.8 use constructor injection or annotation injectionvoid
setTextProvider
(com.opensymphony.xwork2.TextProvider textProvider) Deprecated.void
setWorkingDir
(File workingDir) Deprecated.protected String
substituteString
(@Nullable String stringWithValuesToSubstitute) Deprecated.@NotNull org.apache.commons.configuration.HierarchicalConfiguration
Deprecated.Generate aHierarchicalConfiguration
from the current state of the objectstatic @Nullable BranchMergingAwareRepository
toMergeCapableRepository
(@Nullable RepositoryV2 defaultRepository) Deprecated.@NotNull ErrorCollection
validate
(@NotNull BuildConfiguration buildConfiguration) Deprecated.Validates the properties in theBuildConfiguration
object.Methods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
getTemplateRenderer, populateContextForEdit, populateContextForView, prepareConfigObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
isConfigurationMissing, prepareConfigObject
Methods inherited from interface com.atlassian.bamboo.repository.Repository
getHost, getName
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2
collectChangesSinceLastBuild, isRepositoryDifferent
-
Field Details
-
REPO_PREFIX
Deprecated.- See Also:
-
BUILD_TRIGGER_IP
Deprecated.- See Also:
-
repositoryModuleDescriptor
Deprecated. -
templateRenderer
Deprecated.since 6.8 inject your own -
textProvider
Deprecated.since 6.8 inject your own -
buildLoggerManager
Deprecated.since 6.8 inject your own -
buildDirectoryManager
Deprecated.since 6.8 inject your own -
customVariableContext
Deprecated.since 6.8 inject your own -
featureManager
Deprecated.since 6.8 inject your own -
administrationConfigurationAccessor
@Deprecated protected transient AdministrationConfigurationAccessor administrationConfigurationAccessorDeprecated.since 6.8 inject your own
-
-
Constructor Details
-
AbstractRepository
public AbstractRepository()Deprecated.
-
-
Method Details
-
init
public void init(@NotNull @NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor) Deprecated.Description copied from interface:InitablePluginModule
Initialises the Plugin with the plugin module descriptor- Specified by:
init
in interfaceInitablePluginModule
- Overrides:
init
in classBaseBuildConfigurationAwarePlugin
- Parameters:
moduleDescriptor
- Plugin module descriptor
-
getKey
Deprecated.Description copied from interface:Repository
The full complete plugin key for the repo- Specified by:
getKey
in interfaceRepository
- Returns:
-
getShortKey
Deprecated.Description copied from interface:Repository
The mini key from the plugin (should not contain plugin prefix)- Specified by:
getShortKey
in interfaceRepository
- Returns:
-
getLocationIdentifier
Deprecated.Description copied from interface:Repository
A string representing the location of the repository- Specified by:
getLocationIdentifier
in interfaceRepository
- Returns:
-
getDescription
Deprecated.- Specified by:
getDescription
in interfaceDescriptionProvider
-
addDefaultValues
Deprecated.Description copied from interface:BuildConfigurationAwarePlugin
Extension point for adding default values to the form forRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
- Specified by:
addDefaultValues
in interfaceBuildConfigurationAwarePlugin
- Overrides:
addDefaultValues
in classBaseBuildConfigurationAwarePlugin
- Parameters:
buildConfiguration
- -
-
customizeBuildRequirements
public void customizeBuildRequirements(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BuildConfiguration buildConfiguration, @NotNull @NotNull RequirementSet requirementSet) Deprecated.Description copied from interface:ConfigurablePlugin
Extension point for adding/customizing requirements when editing a build's builder configuration.- Specified by:
customizeBuildRequirements
in interfaceConfigurablePlugin
- Overrides:
customizeBuildRequirements
in classBaseConfigurablePlugin
- Parameters:
planKey
- key ofPlan
for which requirements has to be removed.buildConfiguration
- source of information for customizing build requirementsrequirementSet
- requirements to be customized
-
removeBuildRequirements
public void removeBuildRequirements(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BuildConfiguration buildConfiguration, @NotNull @NotNull RequirementSet requirementSet) Deprecated.Description copied from interface:ConfigurablePlugin
Extension point for removing requirements when given plugin is excluded from build's builder configuration.- Specified by:
removeBuildRequirements
in interfaceConfigurablePlugin
- Overrides:
removeBuildRequirements
in classBaseConfigurablePlugin
- Parameters:
planKey
- key ofPlan
for which requirements has to be removed.buildConfiguration
- source of information for customizing build requirementsrequirementSet
- requirements to be customized
-
getMaxCommitsToReturn
protected int getMaxCommitsToReturn()Deprecated. -
collectChangesForRevision
@NotNull public @NotNull BuildRepositoryChanges collectChangesForRevision(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull String targetRevision) throws RepositoryException Deprecated.Description copied from interface:OnceOffCapableRepository
Collects the changes for the targetRevision. This method is called only on server side (never on agent).- Specified by:
collectChangesForRevision
in interfaceOnceOffCapableRepository
- Returns:
- A build changes object with the appropriate build changes (that is - with the single commit data relevant for targetRevision)
- Throws:
RepositoryException
- if something goes wrong
-
getViewHtml
Deprecated.since 5.5 useStandaloneRepository.getViewHtml()
Description copied from interface:RenderableBuildConfiguration
Returns the HTML that represents the view of the repository configuration- Specified by:
getViewHtml
in interfaceRenderableBuildConfiguration
- Overrides:
getViewHtml
in classBaseBuildConfigurationAwarePlugin
- Parameters:
plan
- for which view HTML has to be rendered.- Returns:
- HTML string. May be null.
-
getEditHtml
@Nullable @Deprecated public @Nullable String getEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration, @Nullable @Nullable Plan plan) Deprecated.Description copied from interface:RenderableBuildConfiguration
Returns HTML that represents the form fragment for editing the repository. No opening and closing form tags are required.- Specified by:
getEditHtml
in interfaceRenderableBuildConfiguration
- Overrides:
getEditHtml
in classBaseBuildConfigurationAwarePlugin
- Parameters:
buildConfiguration
-BuildConfiguration
for which edit HTML has to be rendered.plan
-Plan
for which edit HTML has to be rendered. May be null during creation phase of plan.- Returns:
- HTML string. May be null.
-
getMinimalEditHtml
@Nullable public @Nullable String getMinimalEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration) Deprecated.Description copied from interface:Repository
Returns HTML for the minimal configuration of the repository. i.e. the basic config required to get it working.- Specified by:
getMinimalEditHtml
in interfaceRepository
- Parameters:
buildConfiguration
- BuildConfiguration object- Returns:
- HTML for the minimal configuration of the repository
-
getAdvancedViewHtml
Deprecated.since 5.5 useStandaloneRepository.getAdvancedViewHtml()
- Specified by:
getAdvancedViewHtml
in interfaceAdvancedConfigurationAwareRepository
-
getAdvancedEditHtml
@Deprecated public String getAdvancedEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration, @Nullable @Nullable Plan plan) Deprecated.- Specified by:
getAdvancedEditHtml
in interfaceAdvancedConfigurationAwareRepository
-
getMavenPomCheckoutAccessEditHtml
@Nullable public @Nullable String getMavenPomCheckoutAccessEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration) Deprecated. -
getBranchIntegrationEditHtml
Deprecated. -
validate
@NotNull public @NotNull ErrorCollection validate(@NotNull @NotNull BuildConfiguration buildConfiguration) Deprecated.Description copied from interface:BuildConfigurationAwarePlugin
Validates the properties in theBuildConfiguration
object. The name of the properties match those passed in through the form fragments inRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
template.- Specified by:
validate
in interfaceBuildConfigurationAwarePlugin
- Overrides:
validate
in classBaseBuildConfigurationAwarePlugin
- Parameters:
buildConfiguration
- -- Returns:
ErrorCollection
keyed by the field name.
-
populateFromConfig
public void populateFromConfig(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration config) Deprecated.Description copied from interface:ConvertibleFromConfig
Update the current object with data in theHierarchicalConfiguration
- Specified by:
populateFromConfig
in interfaceConvertibleFromConfig
-
toConfiguration
@NotNull public @NotNull org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()Deprecated.Description copied from interface:ConvertibleFromConfig
Generate aHierarchicalConfiguration
from the current state of the object- Specified by:
toConfiguration
in interfaceConvertibleFromConfig
- Returns:
- Always returns an
HierarchicalConfiguration
. Never null
-
isQuietPeriodEnabled
public boolean isQuietPeriodEnabled()Deprecated.Description copied from interface:QuietPeriodAwareRepository
Returns true if we were to enable the quiet period- Specified by:
isQuietPeriodEnabled
in interfaceQuietPeriodAwareRepository
- Returns:
-
getQuietPeriod
public int getQuietPeriod()Deprecated.Description copied from interface:QuietPeriodAwareRepository
Returns the number of seconds to wait between each retry- Specified by:
getQuietPeriod
in interfaceQuietPeriodAwareRepository
- Returns:
- seconds between retries
-
getMaxRetries
public int getMaxRetries()Deprecated.Description copied from interface:QuietPeriodAwareRepository
Returns the maximum number of times to collect changes- Specified by:
getMaxRetries
in interfaceQuietPeriodAwareRepository
- Returns:
-
isAdvancedOptionEnabled
Deprecated. -
setWorkingDir
Deprecated. -
getWorkingDirectory
Deprecated. -
getSourceCodeDirectory
@NotNull public @NotNull File getSourceCodeDirectory(@NotNull @NotNull PlanKey planKey) throws RepositoryException Deprecated.For Subversion, we use the build name's directory within the system's working directory- Specified by:
getSourceCodeDirectory
in interfaceRepositoryV2
- Parameters:
planKey
- Plan key- Returns:
- the source code directory
- Throws:
RepositoryException
- A generic failure
-
checkConnection
Deprecated.Description copied from interface:Repository
This method internally validates the current connection for the repository. Usually the same as running validate- Specified by:
checkConnection
in interfaceRepository
- Returns:
ErrorCollection
must not be null. The errors should be translated to error messages, rather than field errors.
-
substituteString
Deprecated. -
setTextProvider
public void setTextProvider(com.opensymphony.xwork2.TextProvider textProvider) Deprecated. -
setTemplateRenderer
Deprecated.since 6.8 use constructor injection or annotation injection- Overrides:
setTemplateRenderer
in classBaseBuildConfigurationAwarePlugin
-
getFilterFilePatternOption
Deprecated.Description copied from interface:IncludeExcludeAwareRepository
Do we want to include files which match pattern or exclude files which match pattern?- Specified by:
getFilterFilePatternOption
in interfaceIncludeExcludeAwareRepository
- Returns:
-
setFilterFilePatternOption
Deprecated. -
getFilterFilePatternRegex
Deprecated.Description copied from interface:IncludeExcludeAwareRepository
The regex expression on which fileName (paths) are matched for inclusion/exclusion.- Specified by:
getFilterFilePatternRegex
in interfaceIncludeExcludeAwareRepository
- Returns:
-
setFilterFilePatternRegex
Deprecated. -
getChangesetFilterPatternRegex
Deprecated.Description copied from interface:FilterChangesetAwareRepository
The regex expression on which changeset comments are matched for exclusion.- Specified by:
getChangesetFilterPatternRegex
in interfaceFilterChangesetAwareRepository
- Returns:
-
setChangesetFilterPatternRegex
Deprecated. -
getSystemWideExclusionPatterns
Deprecated.Description copied from interface:FilterChangesetAwareRepository
Collection of system wide, hardcoded changeset filtering patterns- Specified by:
getSystemWideExclusionPatterns
in interfaceFilterChangesetAwareRepository
- Returns:
-
setBuildLoggerManager
Deprecated. -
setBuildDirectoryManager
Deprecated. -
isWorkspaceEmpty
Deprecated. -
setCustomVariableContext
Deprecated. -
setFeatureManager
Deprecated. -
setAdministrationConfigurationAccessor
public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor) Deprecated. -
toMergeCapableRepository
@Nullable public static @Nullable BranchMergingAwareRepository toMergeCapableRepository(@Nullable @Nullable RepositoryV2 defaultRepository) Deprecated. -
getPollingTriggerModule
Deprecated.since 5.14 -
getDefaultTriggerModule
Deprecated.since 5.14
-