|
||||||||||
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
|
static java.lang.String |
CLEAN_WORKING_DIRECTORY_PARAM
|
protected RepositoryModuleDescriptor |
repositoryModuleDescriptor
|
protected TemplateRenderer |
templateRenderer
|
protected com.opensymphony.xwork.TextProvider |
textProvider
|
protected VariableSubstitutionBean |
variableSubstitutionBean
|
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 BuildConfigurationAwarePlugin.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(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)
|
java.lang.String |
getMinimalEditHtml(BuildConfiguration buildConfiguration)
Returns HTML for the minimal configuration of the repository. |
java.lang.String |
getShortKey()
The mini key from the plugin (should not contain plugin prefix) |
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(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 ? |
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(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 |
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 |
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 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)
InitablePluginModule
init
in interface InitablePluginModule
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
BuildConfigurationAwarePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
addDefaultValues
in interface BuildConfigurationAwarePlugin
buildConfiguration
- - @NotNullpublic void customizeBuildRequirements(@NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet)
ConfigurablePlugin
customizeBuildRequirements
in interface ConfigurablePlugin
buildConfiguration
- source of information for customizing build requirementsrequirementSet
- requirements to be customizedpublic void removeBuildRequirements(@NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet)
ConfigurablePlugin
removeBuildRequirements
in interface ConfigurablePlugin
buildConfiguration
- source of information for customizing build requirementsrequirementSet
- requirements to be customized@Nullable public java.lang.String getViewHtml(@NotNull Plan plan)
BuildConfigurationAwarePlugin
getViewHtml
in interface BuildConfigurationAwarePlugin
@Nullable public java.lang.String getEditHtml(@NotNull BuildConfiguration buildConfiguration, @NotNull Plan plan)
BuildConfigurationAwarePlugin
getEditHtml
in interface BuildConfigurationAwarePlugin
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 BuildConfigurationAwarePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
template.
validate
in interface BuildConfigurationAwarePlugin
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 boolean isCleanWorkingDirectory()
CleanWorkingDirectoryAwareRepository
BuildState.SUCCESS
?
isCleanWorkingDirectory
in interface CleanWorkingDirectoryAwareRepository
public void setCleanWorkingDirectory(boolean cleanWorkingDirectory)
CleanWorkingDirectoryAwareRepository
BuildState.SUCCESS
?
setCleanWorkingDirectory
in interface CleanWorkingDirectoryAwareRepository
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.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 |