|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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
|
static java.lang.String |
CLEAN_CHECKOUT_PARAM
|
static java.lang.String |
CLEAN_WORKING_DIRECTORY_PARAM
|
protected CustomVariableContext |
customVariableContext
|
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 |
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. |
protected java.lang.String |
createStringFromList(java.util.List list)
Create a string from the collection of value in the given list |
void |
customizeBuildRequirements(PlanKey planKey,
BuildConfiguration buildConfiguration,
RequirementSet requirementSet)
Extension point for adding/customizing requirements when editing a build's builder configuration. |
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)
For Subversion, we use the build name's directory within the system's working directory |
java.io.File |
getSourceCodeDirectory(java.lang.String planKey)
For Subversion, we use the build name's directory within the system's working directory |
java.lang.String |
getTriggerIpAddress()
What's the repositorys optional trigger IP address? |
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 |
isCleanCheckout()
|
boolean |
isCleanWorkingDirectory()
Should the working directory be cleaned when the build is marked BuildState.SUCCESS ? |
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 |
boolean |
referencesDifferentRepository()
Default behaviour is to not support major configuration changes |
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 |
setCleanCheckout(boolean cleanCheckout)
|
void |
setCleanWorkingDirectory(boolean cleanWorkingDirectory)
Set the working directory be cleaned or not cleaned when the build is marked BuildState.SUCCESS ? |
void |
setCustomVariableContext(CustomVariableContext customVariableContext)
|
void |
setFilterFilePatternOption(java.lang.String filterFilePatternOption)
|
void |
setFilterFilePatternRegex(java.lang.String filterFilePatternRegex)
|
void |
setReferencesDifferentRepository(boolean isDifferentRepository)
Mark the repository as having changed/cleared of change, |
void |
setTemplateRenderer(TemplateRenderer templateRenderer)
|
void |
setTextProvider(com.opensymphony.xwork.TextProvider textProvider)
|
void |
setTriggerIpAddress(java.lang.String triggerIpAddress)
Bamboo checks to ensure a repository triggered build request comes from a valid host. |
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 |
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, retrieveSourceCode, retrieveSourceCode |
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin |
---|
prepareConfigObject |
Field Detail |
---|
public static final java.lang.String CLEAN_CHECKOUT_PARAM
public static final java.lang.String CLEAN_WORKING_DIRECTORY_PARAM
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
@Nullable public java.lang.String getMavenPomCheckoutAccessEditHtml(@NotNull BuildConfiguration buildConfiguration)
@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 referencesDifferentRepository()
referencesDifferentRepository
in interface RepositoryV2
public void setReferencesDifferentRepository(boolean isDifferentRepository)
setReferencesDifferentRepository
in interface Repository
isDifferentRepository
- true if it has changed, false it it has clearedpublic void setTriggerIpAddress(java.lang.String triggerIpAddress)
By default Bamboo checks the request came from repository server's primary IP address.
This may not work on machines with multiple ip addresses. The user can use this option to override the IP address.
triggerIpAddress
- The IP address of the repository serverpublic java.lang.String getTriggerIpAddress()
getTriggerIpAddress
in interface Repository
public boolean isCleanCheckout()
isCleanCheckout
in interface CleanCheckoutAwareRepository
public void setCleanCheckout(boolean cleanCheckout)
setCleanCheckout
in interface CleanCheckoutAwareRepository
public boolean isCleanWorkingDirectory()
CleanWorkingDirectoryAwareRepository
BuildState.SUCCESS
?
isCleanWorkingDirectory
in interface CleanWorkingDirectoryAwareRepository
public void setCleanWorkingDirectory(boolean cleanWorkingDirectory)
CleanWorkingDirectoryAwareRepository
BuildState.SUCCESS
?
setCleanWorkingDirectory
in interface CleanWorkingDirectoryAwareRepository
public boolean isQuietPeriodEnabled()
QuietPeriodAwareRepository
isQuietPeriodEnabled
in interface QuietPeriodAwareRepository
public int getQuietPeriod()
QuietPeriodAwareRepository
getQuietPeriod
in interface QuietPeriodAwareRepository
public int getMaxRetries()
QuietPeriodAwareRepository
getMaxRetries
in interface QuietPeriodAwareRepository
public void setWorkingDir(java.io.File workingDir)
public java.io.File getWorkingDirectory()
@NotNull public java.io.File getSourceCodeDirectory(@NotNull PlanKey planKey) throws RepositoryException
getSourceCodeDirectory
in interface RepositoryV2
planKey
- Plan key
RepositoryException
- A generic failure@NotNull public java.io.File getSourceCodeDirectory(@NotNull java.lang.String planKey) throws RepositoryException
getSourceCodeDirectory
in interface RepositoryV2
planKey
-
RepositoryException
- A generic failure@NotNull public ErrorCollection checkConnection()
Repository
checkConnection
in interface Repository
ErrorCollection
must not be null. The errros should be translated to error messages, rather than field errors.protected java.lang.String createStringFromList(java.util.List list)
list
- the list we are using to create the string
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 void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
public void setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
protected boolean isWorkspaceEmpty(java.io.File sourceCodeDirectory)
public void setCustomVariableContext(CustomVariableContext customVariableContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |