|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object 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
|
protected RepositoryModuleDescriptor |
repositoryModuleDescriptor
|
protected TemplateRenderer |
templateRenderer
|
protected com.opensymphony.xwork.TextProvider |
textProvider
|
protected VariableSubstitutionBean |
variableSubstitutionBean
|
static java.lang.String |
WEB_REPO_MODULE_NAME
|
static java.lang.String |
WEB_REPO_URL
|
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 #getEditHtml() |
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(BuildConfiguration buildConfiguration,
RequirementSet requirementSet)
Extension point for adding/customizing requiremnents when editing a build's builder configuration. |
java.lang.String |
getEditHtml(BuildConfiguration buildConfiguration,
Build build)
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.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? |
VariableSubstitutionBean |
getVariableSubstitutionBean()
|
java.lang.String |
getViewHtml(Build build)
Returns the HTML that represents the view of the repository configuration |
java.lang.String |
getWebRepositoryUrlForCommit(Commit commit)
|
java.io.File |
getWorkingDirectory()
|
void |
init(com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
Initialises the Plugin with the plugin module descriptor |
boolean |
isCleanCheckout()
|
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 |
setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
|
void |
setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
|
void |
setCleanCheckout(boolean cleanCheckout)
|
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 |
setVariableSubstitutionBean(VariableSubstitutionBean variableSubstitutionBean)
|
void |
setWorkingDir(java.io.File workingDir)
|
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 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, isRepositoryDifferent |
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2 |
---|
collectChangesSinceLastBuild, retrieveSourceCode |
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin |
---|
prepareConfigObject |
Field Detail |
---|
public static final java.lang.String WEB_REPO_URL
public static final java.lang.String WEB_REPO_MODULE_NAME
public static final java.lang.String CLEAN_CHECKOUT_PARAM
public static final java.lang.String BUILD_TRIGGER_IP
protected RepositoryModuleDescriptor repositoryModuleDescriptor
protected transient VariableSubstitutionBean variableSubstitutionBean
protected transient TemplateRenderer templateRenderer
protected transient com.opensymphony.xwork.TextProvider textProvider
protected transient BuildLoggerManager buildLoggerManager
protected transient BuildDirectoryManager buildDirectoryManager
Constructor Detail |
---|
public AbstractRepository()
Method Detail |
---|
public void init(@NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
ConfigurablePlugin
init
in interface ConfigurablePlugin
@NotNull public java.lang.String getKey()
Repository
getKey
in interface Repository
public void addDefaultValues(@NotNull BuildConfiguration buildConfiguration)
ConfigurablePlugin
#getEditHtml()
addDefaultValues
in interface ConfigurablePlugin
buildConfiguration
- - @NotNullpublic void customizeBuildRequirements(@NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet)
ConfigurablePlugin
customizeBuildRequirements
in interface ConfigurablePlugin
@Nullable public java.lang.String getViewHtml(@NotNull Build build)
ConfigurablePlugin
getViewHtml
in interface ConfigurablePlugin
@Nullable public java.lang.String getEditHtml(@NotNull BuildConfiguration buildConfiguration, @NotNull Build build)
ConfigurablePlugin
getEditHtml
in interface ConfigurablePlugin
@NotNull public ErrorCollection validate(@NotNull BuildConfiguration buildConfiguration)
ConfigurablePlugin
BuildConfiguration
object. The name of the properties match those passed
in through the form fragments in #getEditHtml()
template.
validate
in interface ConfigurablePlugin
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)
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 void setWorkingDir(java.io.File workingDir)
public java.io.File getWorkingDirectory()
@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.@Nullable public java.lang.String getWebRepositoryUrlForCommit(@NotNull Commit commit)
protected java.lang.String createStringFromList(java.util.List list)
list
- the list we are using to create the string
public void setTextProvider(com.opensymphony.xwork.TextProvider textProvider)
public void setTemplateRenderer(TemplateRenderer templateRenderer)
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 VariableSubstitutionBean getVariableSubstitutionBean()
public void setVariableSubstitutionBean(VariableSubstitutionBean variableSubstitutionBean)
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
public void setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
protected boolean isWorkspaceEmpty(java.io.File sourceCodeDirectory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |