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 insteadThis class provides common repository implementation code.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AdministrationConfigurationAccessor
administrationConfigurationAccessor
Deprecated.since 6.8 inject your ownstatic String
BUILD_TRIGGER_IP
Deprecated.protected BuildDirectoryManager
buildDirectoryManager
Deprecated.since 6.8 inject your ownprotected BuildLoggerManager
buildLoggerManager
Deprecated.since 6.8 inject your ownprotected CustomVariableContext
customVariableContext
Deprecated.since 6.8 inject your ownprotected FeatureManager
featureManager
Deprecated.since 6.8 inject your ownstatic String
REPO_PREFIX
Deprecated.protected RepositoryModuleDescriptorImpl
repositoryModuleDescriptor
Deprecated.protected TemplateRenderer
templateRenderer
Deprecated.since 6.8 inject your ownprotected com.opensymphony.xwork2.TextProvider
textProvider
Deprecated.since 6.8 inject your own-
Fields 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
Constructors Constructor Description AbstractRepository()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
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
checkConnection()
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.String
getAdvancedEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)
Deprecated.String
getAdvancedViewHtml(@NotNull Plan plan)
Deprecated.since 5.5 useStandaloneRepository.getAdvancedViewHtml()
@Nullable String
getBranchIntegrationEditHtml()
Deprecated.String
getChangesetFilterPatternRegex()
Deprecated.The regex expression on which changeset comments are matched for exclusion.TriggerModuleDescriptor
getDefaultTriggerModule()
Deprecated.since 5.14String
getDescription()
Deprecated.@Nullable String
getEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)
Deprecated.String
getFilterFilePatternOption()
Deprecated.Do we want to include files which match pattern or exclude files which match pattern?String
getFilterFilePatternRegex()
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
getLocationIdentifier()
Deprecated.A string representing the location of the repository@Nullable String
getMavenPomCheckoutAccessEditHtml(@NotNull BuildConfiguration buildConfiguration)
Deprecated.protected int
getMaxCommitsToReturn()
Deprecated.int
getMaxRetries()
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
getPollingTriggerModule()
Deprecated.since 5.14int
getQuietPeriod()
Deprecated.Returns the number of seconds to wait between each retry@NotNull String
getShortKey()
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 directoryCollection<String>
getSystemWideExclusionPatterns()
Deprecated.Collection of system wide, hardcoded changeset filtering patterns@Nullable String
getViewHtml(@NotNull Plan plan)
Deprecated.since 5.5 useStandaloneRepository.getViewHtml()
File
getWorkingDirectory()
Deprecated.void
init(@NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
Deprecated.Initialises the Plugin with the plugin module descriptorboolean
isAdvancedOptionEnabled(@NotNull BuildConfiguration buildConfiguration)
Deprecated.boolean
isQuietPeriodEnabled()
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
toConfiguration()
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 Detail
-
REPO_PREFIX
public static final String REPO_PREFIX
Deprecated.- See Also:
- Constant Field Values
-
BUILD_TRIGGER_IP
public static final String BUILD_TRIGGER_IP
Deprecated.- See Also:
- Constant Field Values
-
repositoryModuleDescriptor
protected RepositoryModuleDescriptorImpl repositoryModuleDescriptor
Deprecated.
-
templateRenderer
@Deprecated protected transient TemplateRenderer templateRenderer
Deprecated.since 6.8 inject your own
-
textProvider
@Deprecated protected transient com.opensymphony.xwork2.TextProvider textProvider
Deprecated.since 6.8 inject your own
-
buildLoggerManager
@Deprecated protected transient BuildLoggerManager buildLoggerManager
Deprecated.since 6.8 inject your own
-
buildDirectoryManager
@Deprecated protected transient BuildDirectoryManager buildDirectoryManager
Deprecated.since 6.8 inject your own
-
customVariableContext
@Deprecated protected transient CustomVariableContext customVariableContext
Deprecated.since 6.8 inject your own
-
featureManager
@Deprecated protected transient FeatureManager featureManager
Deprecated.since 6.8 inject your own
-
administrationConfigurationAccessor
@Deprecated protected transient AdministrationConfigurationAccessor administrationConfigurationAccessor
Deprecated.since 6.8 inject your own
-
-
Method Detail
-
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
@NotNull public @NotNull String getKey()
Deprecated.Description copied from interface:Repository
The full complete plugin key for the repo- Specified by:
getKey
in interfaceRepository
- Returns:
-
getShortKey
@NotNull public @NotNull String 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
@NotNull public @NotNull String getLocationIdentifier()
Deprecated.Description copied from interface:Repository
A string representing the location of the repository- Specified by:
getLocationIdentifier
in interfaceRepository
- Returns:
-
getDescription
public String getDescription()
Deprecated.- Specified by:
getDescription
in interfaceDescriptionProvider
-
addDefaultValues
public void addDefaultValues(@NotNull @NotNull BuildConfiguration buildConfiguration)
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
@Nullable @Deprecated public @Nullable String getViewHtml(@NotNull @NotNull Plan plan)
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 public String getAdvancedViewHtml(@NotNull @NotNull Plan plan)
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
@Nullable public @Nullable String 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
public boolean isAdvancedOptionEnabled(@NotNull @NotNull BuildConfiguration buildConfiguration)
Deprecated.
-
setWorkingDir
public void setWorkingDir(File workingDir)
Deprecated.
-
getWorkingDirectory
public File 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
@NotNull public @NotNull ErrorCollection 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
protected String substituteString(@Nullable @Nullable String stringWithValuesToSubstitute)
Deprecated.
-
setTextProvider
public void setTextProvider(com.opensymphony.xwork2.TextProvider textProvider)
Deprecated.
-
setTemplateRenderer
@Deprecated public void setTemplateRenderer(TemplateRenderer templateRenderer)
Deprecated.since 6.8 use constructor injection or annotation injection- Overrides:
setTemplateRenderer
in classBaseBuildConfigurationAwarePlugin
-
getFilterFilePatternOption
public String 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
public void setFilterFilePatternOption(String filterFilePatternOption)
Deprecated.
-
getFilterFilePatternRegex
public String 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
public void setFilterFilePatternRegex(String filterFilePatternRegex)
Deprecated.
-
getChangesetFilterPatternRegex
public String 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
public void setChangesetFilterPatternRegex(String changesetFilterPatternRegex)
Deprecated.
-
getSystemWideExclusionPatterns
public Collection<String> getSystemWideExclusionPatterns()
Deprecated.Description copied from interface:FilterChangesetAwareRepository
Collection of system wide, hardcoded changeset filtering patterns- Specified by:
getSystemWideExclusionPatterns
in interfaceFilterChangesetAwareRepository
- Returns:
-
setBuildLoggerManager
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
Deprecated.
-
setBuildDirectoryManager
public void setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
Deprecated.
-
isWorkspaceEmpty
protected boolean isWorkspaceEmpty(File sourceCodeDirectory)
Deprecated.
-
setCustomVariableContext
public void setCustomVariableContext(CustomVariableContext customVariableContext)
Deprecated.
-
setFeatureManager
public void setFeatureManager(FeatureManager featureManager)
Deprecated.
-
setAdministrationConfigurationAccessor
public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)
Deprecated.
-
toMergeCapableRepository
@Nullable public static @Nullable BranchMergingAwareRepository toMergeCapableRepository(@Nullable @Nullable RepositoryV2 defaultRepository)
Deprecated.
-
getPollingTriggerModule
@Deprecated public static TriggerModuleDescriptor getPollingTriggerModule()
Deprecated.since 5.14
-
getDefaultTriggerModule
@Deprecated public TriggerModuleDescriptor getDefaultTriggerModule()
Deprecated.since 5.14
-
-