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 AdministrationConfigurationAccessoradministrationConfigurationAccessorDeprecated.since 6.8 inject your ownstatic StringBUILD_TRIGGER_IPDeprecated.protected BuildDirectoryManagerbuildDirectoryManagerDeprecated.since 6.8 inject your ownprotected BuildLoggerManagerbuildLoggerManagerDeprecated.since 6.8 inject your ownprotected CustomVariableContextcustomVariableContextDeprecated.since 6.8 inject your ownprotected FeatureManagerfeatureManagerDeprecated.since 6.8 inject your ownstatic StringREPO_PREFIXDeprecated.protected RepositoryModuleDescriptorImplrepositoryModuleDescriptorDeprecated.protected TemplateRenderertemplateRendererDeprecated.since 6.8 inject your ownprotected com.opensymphony.xwork2.TextProvidertextProviderDeprecated.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 voidaddDefaultValues(@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 ErrorCollectioncheckConnection()Deprecated.This method internally validates the current connection for the repository.@NotNull BuildRepositoryChangescollectChangesForRevision(@NotNull PlanKey planKey, @NotNull String targetRevision)Deprecated.Collects the changes for the targetRevision.voidcustomizeBuildRequirements(@NotNull PlanKey planKey, @NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet)Deprecated.Extension point for adding/customizing requirements when editing a build's builder configuration.StringgetAdvancedEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)Deprecated.StringgetAdvancedViewHtml(@NotNull Plan plan)Deprecated.since 5.5 useStandaloneRepository.getAdvancedViewHtml()@Nullable StringgetBranchIntegrationEditHtml()Deprecated.StringgetChangesetFilterPatternRegex()Deprecated.The regex expression on which changeset comments are matched for exclusion.TriggerModuleDescriptorgetDefaultTriggerModule()Deprecated.since 5.14StringgetDescription()Deprecated.@Nullable StringgetEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)Deprecated.StringgetFilterFilePatternOption()Deprecated.Do we want to include files which match pattern or exclude files which match pattern?StringgetFilterFilePatternRegex()Deprecated.The regex expression on which fileName (paths) are matched for inclusion/exclusion.@NotNull StringgetKey()Deprecated.The full complete plugin key for the repo@NotNull StringgetLocationIdentifier()Deprecated.A string representing the location of the repository@Nullable StringgetMavenPomCheckoutAccessEditHtml(@NotNull BuildConfiguration buildConfiguration)Deprecated.protected intgetMaxCommitsToReturn()Deprecated.intgetMaxRetries()Deprecated.Returns the maximum number of times to collect changes@Nullable StringgetMinimalEditHtml(@NotNull BuildConfiguration buildConfiguration)Deprecated.Returns HTML for the minimal configuration of the repository.static TriggerModuleDescriptorgetPollingTriggerModule()Deprecated.since 5.14intgetQuietPeriod()Deprecated.Returns the number of seconds to wait between each retry@NotNull StringgetShortKey()Deprecated.The mini key from the plugin (should not contain plugin prefix)@NotNull FilegetSourceCodeDirectory(@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 StringgetViewHtml(@NotNull Plan plan)Deprecated.since 5.5 useStandaloneRepository.getViewHtml()FilegetWorkingDirectory()Deprecated.voidinit(@NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor)Deprecated.Initialises the Plugin with the plugin module descriptorbooleanisAdvancedOptionEnabled(@NotNull BuildConfiguration buildConfiguration)Deprecated.booleanisQuietPeriodEnabled()Deprecated.Returns true if we were to enable the quiet periodprotected booleanisWorkspaceEmpty(File sourceCodeDirectory)Deprecated.voidpopulateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config)Deprecated.Update the current object with data in theHierarchicalConfigurationvoidremoveBuildRequirements(@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.voidsetAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)Deprecated.voidsetBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)Deprecated.voidsetBuildLoggerManager(BuildLoggerManager buildLoggerManager)Deprecated.voidsetChangesetFilterPatternRegex(String changesetFilterPatternRegex)Deprecated.voidsetCustomVariableContext(CustomVariableContext customVariableContext)Deprecated.voidsetFeatureManager(FeatureManager featureManager)Deprecated.voidsetFilterFilePatternOption(String filterFilePatternOption)Deprecated.voidsetFilterFilePatternRegex(String filterFilePatternRegex)Deprecated.voidsetTemplateRenderer(TemplateRenderer templateRenderer)Deprecated.since 6.8 use constructor injection or annotation injectionvoidsetTextProvider(com.opensymphony.xwork2.TextProvider textProvider)Deprecated.voidsetWorkingDir(File workingDir)Deprecated.protected StringsubstituteString(@Nullable String stringWithValuesToSubstitute)Deprecated.@NotNull org.apache.commons.configuration.HierarchicalConfigurationtoConfiguration()Deprecated.Generate aHierarchicalConfigurationfrom the current state of the objectstatic @Nullable BranchMergingAwareRepositorytoMergeCapableRepository(@Nullable RepositoryV2 defaultRepository)Deprecated.@NotNull ErrorCollectionvalidate(@NotNull BuildConfiguration buildConfiguration)Deprecated.Validates the properties in theBuildConfigurationobject.-
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:InitablePluginModuleInitialises the Plugin with the plugin module descriptor- Specified by:
initin interfaceInitablePluginModule- Overrides:
initin classBaseBuildConfigurationAwarePlugin- Parameters:
moduleDescriptor- Plugin module descriptor
-
getKey
@NotNull public @NotNull String getKey()
Deprecated.Description copied from interface:RepositoryThe full complete plugin key for the repo- Specified by:
getKeyin interfaceRepository- Returns:
-
getShortKey
@NotNull public @NotNull String getShortKey()
Deprecated.Description copied from interface:RepositoryThe mini key from the plugin (should not contain plugin prefix)- Specified by:
getShortKeyin interfaceRepository- Returns:
-
getLocationIdentifier
@NotNull public @NotNull String getLocationIdentifier()
Deprecated.Description copied from interface:RepositoryA string representing the location of the repository- Specified by:
getLocationIdentifierin interfaceRepository- Returns:
-
getDescription
public String getDescription()
Deprecated.- Specified by:
getDescriptionin interfaceDescriptionProvider
-
addDefaultValues
public void addDefaultValues(@NotNull @NotNull BuildConfiguration buildConfiguration)Deprecated.Description copied from interface:BuildConfigurationAwarePluginExtension 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:
addDefaultValuesin interfaceBuildConfigurationAwarePlugin- Overrides:
addDefaultValuesin classBaseBuildConfigurationAwarePlugin- Parameters:
buildConfiguration- -
-
customizeBuildRequirements
public void customizeBuildRequirements(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BuildConfiguration buildConfiguration, @NotNull @NotNull RequirementSet requirementSet)Deprecated.Description copied from interface:ConfigurablePluginExtension point for adding/customizing requirements when editing a build's builder configuration.- Specified by:
customizeBuildRequirementsin interfaceConfigurablePlugin- Overrides:
customizeBuildRequirementsin classBaseConfigurablePlugin- Parameters:
planKey- key ofPlanfor 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:ConfigurablePluginExtension point for removing requirements when given plugin is excluded from build's builder configuration.- Specified by:
removeBuildRequirementsin interfaceConfigurablePlugin- Overrides:
removeBuildRequirementsin classBaseConfigurablePlugin- Parameters:
planKey- key ofPlanfor 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:OnceOffCapableRepositoryCollects the changes for the targetRevision. This method is called only on server side (never on agent).- Specified by:
collectChangesForRevisionin 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:RenderableBuildConfigurationReturns the HTML that represents the view of the repository configuration- Specified by:
getViewHtmlin interfaceRenderableBuildConfiguration- Overrides:
getViewHtmlin 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:RenderableBuildConfigurationReturns HTML that represents the form fragment for editing the repository. No opening and closing form tags are required.- Specified by:
getEditHtmlin interfaceRenderableBuildConfiguration- Overrides:
getEditHtmlin classBaseBuildConfigurationAwarePlugin- Parameters:
buildConfiguration-BuildConfigurationfor which edit HTML has to be rendered.plan-Planfor 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:RepositoryReturns HTML for the minimal configuration of the repository. i.e. the basic config required to get it working.- Specified by:
getMinimalEditHtmlin 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:
getAdvancedViewHtmlin interfaceAdvancedConfigurationAwareRepository
-
getAdvancedEditHtml
@Deprecated public String getAdvancedEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration, @Nullable @Nullable Plan plan)
Deprecated.- Specified by:
getAdvancedEditHtmlin 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:BuildConfigurationAwarePluginValidates the properties in theBuildConfigurationobject. 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:
validatein interfaceBuildConfigurationAwarePlugin- Overrides:
validatein classBaseBuildConfigurationAwarePlugin- Parameters:
buildConfiguration- -- Returns:
ErrorCollectionkeyed by the field name.
-
populateFromConfig
public void populateFromConfig(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration config)Deprecated.Description copied from interface:ConvertibleFromConfigUpdate the current object with data in theHierarchicalConfiguration- Specified by:
populateFromConfigin interfaceConvertibleFromConfig
-
toConfiguration
@NotNull public @NotNull org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
Deprecated.Description copied from interface:ConvertibleFromConfigGenerate aHierarchicalConfigurationfrom the current state of the object- Specified by:
toConfigurationin interfaceConvertibleFromConfig- Returns:
- Always returns an
HierarchicalConfiguration. Never null
-
isQuietPeriodEnabled
public boolean isQuietPeriodEnabled()
Deprecated.Description copied from interface:QuietPeriodAwareRepositoryReturns true if we were to enable the quiet period- Specified by:
isQuietPeriodEnabledin interfaceQuietPeriodAwareRepository- Returns:
-
getQuietPeriod
public int getQuietPeriod()
Deprecated.Description copied from interface:QuietPeriodAwareRepositoryReturns the number of seconds to wait between each retry- Specified by:
getQuietPeriodin interfaceQuietPeriodAwareRepository- Returns:
- seconds between retries
-
getMaxRetries
public int getMaxRetries()
Deprecated.Description copied from interface:QuietPeriodAwareRepositoryReturns the maximum number of times to collect changes- Specified by:
getMaxRetriesin 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:
getSourceCodeDirectoryin 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:RepositoryThis method internally validates the current connection for the repository. Usually the same as running validate- Specified by:
checkConnectionin interfaceRepository- Returns:
ErrorCollectionmust 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:
setTemplateRendererin classBaseBuildConfigurationAwarePlugin
-
getFilterFilePatternOption
public String getFilterFilePatternOption()
Deprecated.Description copied from interface:IncludeExcludeAwareRepositoryDo we want to include files which match pattern or exclude files which match pattern?- Specified by:
getFilterFilePatternOptionin interfaceIncludeExcludeAwareRepository- Returns:
-
setFilterFilePatternOption
public void setFilterFilePatternOption(String filterFilePatternOption)
Deprecated.
-
getFilterFilePatternRegex
public String getFilterFilePatternRegex()
Deprecated.Description copied from interface:IncludeExcludeAwareRepositoryThe regex expression on which fileName (paths) are matched for inclusion/exclusion.- Specified by:
getFilterFilePatternRegexin interfaceIncludeExcludeAwareRepository- Returns:
-
setFilterFilePatternRegex
public void setFilterFilePatternRegex(String filterFilePatternRegex)
Deprecated.
-
getChangesetFilterPatternRegex
public String getChangesetFilterPatternRegex()
Deprecated.Description copied from interface:FilterChangesetAwareRepositoryThe regex expression on which changeset comments are matched for exclusion.- Specified by:
getChangesetFilterPatternRegexin interfaceFilterChangesetAwareRepository- Returns:
-
setChangesetFilterPatternRegex
public void setChangesetFilterPatternRegex(String changesetFilterPatternRegex)
Deprecated.
-
getSystemWideExclusionPatterns
public Collection<String> getSystemWideExclusionPatterns()
Deprecated.Description copied from interface:FilterChangesetAwareRepositoryCollection of system wide, hardcoded changeset filtering patterns- Specified by:
getSystemWideExclusionPatternsin 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
-
-