|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin com.atlassian.bamboo.v2.build.BaseConfigurablePlugin com.atlassian.bamboo.repository.AbstractRepository
public abstract class AbstractRepository
This class provides common repository implementation code,
Field Summary | |
---|---|
static java.lang.String |
BUILD_TRIGGER_IP
|
protected BuildDirectoryManager |
buildDirectoryManager
|
protected BuildLoggerManager |
buildLoggerManager
|
protected CustomVariableContext |
customVariableContext
|
static java.lang.String |
REPO_PREFIX
|
protected RepositoryModuleDescriptor |
repositoryModuleDescriptor
|
protected TemplateRenderer |
templateRenderer
|
protected com.opensymphony.xwork.TextProvider |
textProvider
|
Fields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin |
---|
moduleDescriptor |
Fields inherited from interface com.atlassian.bamboo.repository.IncludeExcludeAwareRepository |
---|
FILTER_PATTERN_EXCLUDE, FILTER_PATTERN_INCLUDE, FILTER_PATTERN_OPTION, FILTER_PATTERN_REGEX |
Fields inherited from interface com.atlassian.bamboo.repository.Repository |
---|
SELECTED_REPOSITORY, UNKNOWN_HOST |
Fields inherited from interface com.atlassian.bamboo.repository.FilterChangesetAwareRepository |
---|
CHANGESET_FILTER_PATTERN_REGEX, MAVEN_RELEASE_PLUGIN_EXCLUSION_PATTERN |
Constructor Summary | |
---|---|
AbstractRepository()
|
Method Summary | |
---|---|
void |
addDefaultValues(BuildConfiguration buildConfiguration)
Extension point for adding default values to the form for RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) |
ErrorCollection |
checkConnection()
This method internally validates the current connection for the repository. |
void |
customizeBuildRequirements(PlanKey planKey,
BuildConfiguration buildConfiguration,
RequirementSet requirementSet)
Extension point for adding/customizing requirements when editing a build's builder configuration. |
java.lang.String |
getAdvancedEditHtml(BuildConfiguration buildConfiguration,
Plan plan)
|
java.lang.String |
getAdvancedViewHtml(Plan plan)
|
java.lang.String |
getBranchIntegrationEditHtml()
|
java.lang.String |
getChangesetFilterPatternRegex()
The regex expression on which changeset comments are matched for exclusion. |
java.lang.String |
getDescription()
|
java.lang.String |
getEditHtml(BuildConfiguration buildConfiguration,
Plan plan)
Returns HTML that represents the form fragment for editing the repository. |
java.lang.String |
getFilterFilePatternOption()
Do we want to include files which match pattern or exclude files which match pattern? |
java.lang.String |
getFilterFilePatternRegex()
The regex expression on which fileName (paths) are matched for inclusion/exclusion. |
java.lang.String |
getKey()
The full complete plugin key for the repo |
java.lang.String |
getLocationIdentifier()
A string representing the location of the repository |
java.lang.String |
getMavenPomCheckoutAccessEditHtml(BuildConfiguration buildConfiguration)
|
int |
getMaxRetries()
Returns the maximum number of times to collect changes |
java.lang.String |
getMinimalEditHtml(BuildConfiguration buildConfiguration)
Returns HTML for the minimal configuration of the repository. |
int |
getQuietPeriod()
Returns the number of seconds to wait between each retry |
java.lang.String |
getShortKey()
The mini key from the plugin (should not contain plugin prefix) |
java.io.File |
getSourceCodeDirectory(PlanKey planKey)
Deprecated. since 3.3 Repository must handle checkout to any subdirectory |
java.util.Collection<java.lang.String> |
getSystemWideExclusionPatterns()
Collection of system wide, hardcoded changeset filtering patterns |
java.lang.String |
getViewHtml(Plan plan)
Returns the HTML that represents the view of the repository configuration |
java.io.File |
getWorkingDirectory()
|
void |
init(com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
Initialises the Plugin with the plugin module descriptor |
boolean |
isAdvancedOptionEnabled(BuildConfiguration buildConfiguration)
|
boolean |
isQuietPeriodEnabled()
Returns true if we were to enable the quiet period |
protected boolean |
isWorkspaceEmpty(java.io.File sourceCodeDirectory)
|
void |
populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
Update the current object with data in the HierarchicalConfiguration |
void |
removeBuildRequirements(PlanKey planKey,
BuildConfiguration buildConfiguration,
RequirementSet requirementSet)
Extension point for removing requirements when given plugin is excluded from build's builder configuration. |
void |
setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
|
void |
setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
|
void |
setChangesetFilterPatternRegex(java.lang.String changesetFilterPatternRegex)
|
void |
setCustomVariableContext(CustomVariableContext customVariableContext)
|
void |
setFilterFilePatternOption(java.lang.String filterFilePatternOption)
|
void |
setFilterFilePatternRegex(java.lang.String filterFilePatternRegex)
|
void |
setTemplateRenderer(TemplateRenderer templateRenderer)
|
void |
setTextProvider(com.opensymphony.xwork.TextProvider textProvider)
|
void |
setWorkingDir(java.io.File workingDir)
|
protected java.lang.String |
substituteString(java.lang.String stringWithValuesToSubstitute)
|
org.apache.commons.configuration.HierarchicalConfiguration |
toConfiguration()
Generate a HierarchicalConfiguration from the current state of the object |
static BranchMergingAwareRepository |
toMergeCapableRepository(RepositoryV2 defaultRepository)
|
ErrorCollection |
validate(BuildConfiguration buildConfiguration)
Validates the properties in the BuildConfiguration object. |
Methods inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin |
---|
customizeBuildRequirements, removeBuildRequirements |
Methods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin |
---|
isConfigurationMissing, 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.repository.Repository |
---|
getHost, getName |
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2 |
---|
collectChangesSinceLastBuild, isRepositoryDifferent |
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin |
---|
prepareConfigObject |
Field Detail |
---|
public static final java.lang.String REPO_PREFIX
public static final java.lang.String BUILD_TRIGGER_IP
protected RepositoryModuleDescriptor repositoryModuleDescriptor
protected transient TemplateRenderer templateRenderer
protected transient com.opensymphony.xwork.TextProvider textProvider
protected transient BuildLoggerManager buildLoggerManager
protected transient BuildDirectoryManager buildDirectoryManager
protected transient CustomVariableContext customVariableContext
Constructor Detail |
---|
public AbstractRepository()
Method Detail |
---|
public void init(@NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
InitablePluginModule
init
in interface InitablePluginModule
init
in class BaseBuildConfigurationAwarePlugin
moduleDescriptor
- Plugin module descriptor@NotNull public java.lang.String getKey()
Repository
getKey
in interface Repository
@NotNull public java.lang.String getShortKey()
Repository
getShortKey
in interface Repository
@NotNull public java.lang.String getLocationIdentifier()
Repository
getLocationIdentifier
in interface Repository
public java.lang.String getDescription()
getDescription
in interface DescriptionProvider
public void addDefaultValues(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
addDefaultValues
in interface BuildConfigurationAwarePlugin
addDefaultValues
in class BaseBuildConfigurationAwarePlugin
buildConfiguration
- - @NotNullpublic void customizeBuildRequirements(@NotNull PlanKey planKey, @NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet)
ConfigurablePlugin
customizeBuildRequirements
in interface ConfigurablePlugin
customizeBuildRequirements
in class BaseConfigurablePlugin
planKey
- key of Plan
for which requirements has to be removed.buildConfiguration
- source of information for customizing build requirementsrequirementSet
- requirements to be customizedpublic void removeBuildRequirements(@NotNull PlanKey planKey, @NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet)
ConfigurablePlugin
removeBuildRequirements
in interface ConfigurablePlugin
removeBuildRequirements
in class BaseConfigurablePlugin
planKey
- key of Plan
for which requirements has to be removed.buildConfiguration
- source of information for customizing build requirementsrequirementSet
- requirements to be customized@Nullable public java.lang.String getViewHtml(@NotNull Plan plan)
RenderableBuildConfiguration
getViewHtml
in interface RenderableBuildConfiguration
getViewHtml
in class BaseBuildConfigurationAwarePlugin
@Nullable public java.lang.String getEditHtml(@NotNull BuildConfiguration buildConfiguration, @NotNull Plan plan)
RenderableBuildConfiguration
getEditHtml
in interface RenderableBuildConfiguration
getEditHtml
in class BaseBuildConfigurationAwarePlugin
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.
@Nullable public java.lang.String getMinimalEditHtml(@NotNull BuildConfiguration buildConfiguration)
Repository
getMinimalEditHtml
in interface Repository
buildConfiguration
- BuildConfiguration object
public java.lang.String getAdvancedViewHtml(@NotNull Plan plan)
getAdvancedViewHtml
in interface AdvancedConfigurationAwareRepository
public java.lang.String getAdvancedEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)
getAdvancedEditHtml
in interface AdvancedConfigurationAwareRepository
@Nullable public java.lang.String getMavenPomCheckoutAccessEditHtml(@NotNull BuildConfiguration buildConfiguration)
@Nullable public java.lang.String getBranchIntegrationEditHtml()
@NotNull public ErrorCollection validate(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
BuildConfiguration
object. The name of the properties match those passed
in through the form fragments in RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
template.
validate
in interface BuildConfigurationAwarePlugin
validate
in class BaseBuildConfigurationAwarePlugin
buildConfiguration
- - @NotNull
ErrorCollection
keyed by the field name. @NotNullpublic void populateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config)
ConvertibleFromConfig
HierarchicalConfiguration
populateFromConfig
in interface ConvertibleFromConfig
@NotNull public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
ConvertibleFromConfig
HierarchicalConfiguration
from the current state of the object
toConfiguration
in interface ConvertibleFromConfig
HierarchicalConfiguration
. Never nullpublic boolean isQuietPeriodEnabled()
QuietPeriodAwareRepository
isQuietPeriodEnabled
in interface QuietPeriodAwareRepository
public int getQuietPeriod()
QuietPeriodAwareRepository
getQuietPeriod
in interface QuietPeriodAwareRepository
public int getMaxRetries()
QuietPeriodAwareRepository
getMaxRetries
in interface QuietPeriodAwareRepository
public boolean isAdvancedOptionEnabled(@NotNull BuildConfiguration buildConfiguration)
public void setWorkingDir(java.io.File workingDir)
public java.io.File getWorkingDirectory()
@NotNull @Deprecated public java.io.File getSourceCodeDirectory(@NotNull PlanKey planKey) throws RepositoryException
getSourceCodeDirectory
in interface RepositoryV2
planKey
- Plan key
RepositoryException
- A generic failure@NotNull public ErrorCollection checkConnection()
Repository
checkConnection
in interface Repository
ErrorCollection
must not be null. The errors should be translated to error messages, rather than field errors.protected java.lang.String substituteString(java.lang.String stringWithValuesToSubstitute)
public void setTextProvider(com.opensymphony.xwork.TextProvider textProvider)
public void setTemplateRenderer(TemplateRenderer templateRenderer)
setTemplateRenderer
in class BaseBuildConfigurationAwarePlugin
public java.lang.String getFilterFilePatternOption()
IncludeExcludeAwareRepository
getFilterFilePatternOption
in interface IncludeExcludeAwareRepository
public void setFilterFilePatternOption(java.lang.String filterFilePatternOption)
public java.lang.String getFilterFilePatternRegex()
IncludeExcludeAwareRepository
getFilterFilePatternRegex
in interface IncludeExcludeAwareRepository
public void setFilterFilePatternRegex(java.lang.String filterFilePatternRegex)
public java.lang.String getChangesetFilterPatternRegex()
FilterChangesetAwareRepository
getChangesetFilterPatternRegex
in interface FilterChangesetAwareRepository
public void setChangesetFilterPatternRegex(java.lang.String changesetFilterPatternRegex)
public java.util.Collection<java.lang.String> getSystemWideExclusionPatterns()
FilterChangesetAwareRepository
getSystemWideExclusionPatterns
in interface FilterChangesetAwareRepository
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
public void setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
protected boolean isWorkspaceEmpty(java.io.File sourceCodeDirectory)
public void setCustomVariableContext(CustomVariableContext customVariableContext)
@Nullable public static BranchMergingAwareRepository toMergeCapableRepository(@Nullable RepositoryV2 defaultRepository)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |