Class NullRepository
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
-
- com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
-
- com.atlassian.bamboo.repository.AbstractRepository
-
- com.atlassian.bamboo.repository.AbstractStandaloneRepository
-
- com.atlassian.bamboo.repository.nullrepository.NullRepository
-
- All Implemented Interfaces:
ConvertibleFromConfig
,InitablePluginModule
,AdvancedConfigurationAwareRepository
,FilterChangesetAwareRepository
,IncludeExcludeAwareRepository
,OnceOffCapableRepository
,QuietPeriodAwareRepository
,Repository
,StandaloneRepository
,DescriptionProvider
,NameProvider
,BambooPluginModule
,BuildConfigurationAwarePlugin
,ConfigurablePlugin
,RenderableBuildConfiguration
,CustomSourceDirectoryAwareRepository
,RepositoryV2
,Serializable
public class NullRepository extends AbstractStandaloneRepository implements CustomSourceDirectoryAwareRepository
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY
-
Fields inherited from class com.atlassian.bamboo.repository.AbstractRepository
administrationConfigurationAccessor, BUILD_TRIGGER_IP, buildDirectoryManager, buildLoggerManager, customVariableContext, featureManager, REPO_PREFIX, repositoryModuleDescriptor, templateRenderer, textProvider
-
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 NullRepository(@NotNull com.opensymphony.xwork2.TextProvider textProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull BuildRepositoryChanges
collectChangesSinceLastBuild(@NotNull String planKey, @Nullable String lastVcsRevisionKey)
Collects the changes since the lastVcsRevisionKey.String
getAdvancedEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)
String
getAdvancedEditHtml(@NotNull org.apache.commons.configuration.HierarchicalConfiguration repositoryConfiguration)
Return HTML that represents the form fragment for editing advanced options of the repository.String
getAdvancedViewHtml()
Returns the HTML that represents the view of the advanced repository configurationString
getEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)
Returns HTML that represents the form fragment for editing the repository.String
getEditHtml(@NotNull org.apache.commons.configuration.HierarchicalConfiguration repositoryConfiguration)
This implementation uses the same ftl templates asAbstractRepository.getEditHtml(BuildConfiguration, Plan)
String
getHost()
What's the repository server host@NotNull String
getKey()
The full complete plugin key for the repoString
getMinimalEditHtml(@NotNull BuildConfiguration buildConfiguration)
Returns HTML for the minimal configuration of the repository.@NotNull String
getName()
The display name for the repository typeString
getViewHtml()
This implementation uses the same ftl templates asAbstractRepository.getViewHtml(Plan)
.boolean
isRepositoryDifferent(@NotNull Repository repository)
Checks if the current repo is the same as the given repository@NotNull String
retrieveSourceCode(@NotNull BuildContext buildContext, @Nullable String vcsRevisionKey, @NotNull File sourceDirectory)
Checks out the latest source code from an appropriate repository to specified directory-
Methods inherited from class com.atlassian.bamboo.repository.AbstractStandaloneRepository
getViewHtml
-
Methods inherited from class com.atlassian.bamboo.repository.AbstractRepository
addDefaultValues, checkConnection, collectChangesForRevision, customizeBuildRequirements, getAdvancedViewHtml, getBranchIntegrationEditHtml, getChangesetFilterPatternRegex, getDefaultTriggerModule, getDescription, getFilterFilePatternOption, getFilterFilePatternRegex, getLocationIdentifier, getMavenPomCheckoutAccessEditHtml, getMaxCommitsToReturn, getMaxRetries, getPollingTriggerModule, getQuietPeriod, getShortKey, getSourceCodeDirectory, getSystemWideExclusionPatterns, getViewHtml, getWorkingDirectory, init, isAdvancedOptionEnabled, isQuietPeriodEnabled, isWorkspaceEmpty, populateFromConfig, removeBuildRequirements, setAdministrationConfigurationAccessor, setBuildDirectoryManager, setBuildLoggerManager, setChangesetFilterPatternRegex, setCustomVariableContext, setFeatureManager, setFilterFilePatternOption, setFilterFilePatternRegex, setTemplateRenderer, setTextProvider, setWorkingDir, substituteString, toConfiguration, toMergeCapableRepository, validate
-
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
addDefaultValues, isConfigurationMissing, prepareConfigObject, validate
-
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
-
Methods inherited from interface com.atlassian.bamboo.fieldvalue.ConvertibleFromConfig
populateFromConfig, toConfiguration
-
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
-
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
-
Methods inherited from interface com.atlassian.bamboo.v2.build.RenderableBuildConfiguration
getViewHtml
-
Methods inherited from interface com.atlassian.bamboo.repository.Repository
checkConnection, getLocationIdentifier, getShortKey
-
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2
getSourceCodeDirectory
-
-
-
-
Field Detail
-
KEY
public static final String KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getKey
@NotNull public @NotNull String getKey()
Description copied from interface:Repository
The full complete plugin key for the repo- Specified by:
getKey
in interfaceRepository
- Overrides:
getKey
in classAbstractRepository
- Returns:
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:Repository
The display name for the repository type- Specified by:
getName
in interfaceDescriptionProvider
- Specified by:
getName
in interfaceNameProvider
- Specified by:
getName
in interfaceRepository
-
getHost
public String getHost()
Description copied from interface:Repository
What's the repository server host- Specified by:
getHost
in interfaceRepository
- Returns:
- The host!
-
collectChangesSinceLastBuild
@NotNull public @NotNull BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull @NotNull String planKey, @Nullable @Nullable String lastVcsRevisionKey) throws RepositoryException
Description copied from interface:RepositoryV2
Collects the changes since the lastVcsRevisionKey. This method is called only on server side (never on agent).- Specified by:
collectChangesSinceLastBuild
in interfaceRepositoryV2
lastVcsRevisionKey
- can be null, if null you should ensure the correct vcsrevisionkey is returned in the BuildChanges object.- Returns:
- A build changes object with the appropriate build changes
- Throws:
RepositoryException
- if something goes wrong
-
retrieveSourceCode
@NotNull public @NotNull String retrieveSourceCode(@NotNull @NotNull BuildContext buildContext, @Nullable @Nullable String vcsRevisionKey, @NotNull @NotNull File sourceDirectory) throws RepositoryException
Description copied from interface:CustomSourceDirectoryAwareRepository
Checks out the latest source code from an appropriate repository to specified directory- Specified by:
retrieveSourceCode
in interfaceCustomSourceDirectoryAwareRepository
vcsRevisionKey
- - may be null if you want latest codesourceDirectory
- - directory to checkout to- Returns:
- vcsRevisionKey - the revision
- Throws:
RepositoryException
-
isRepositoryDifferent
public boolean isRepositoryDifferent(@NotNull @NotNull Repository repository)
Description copied from interface:RepositoryV2
Checks if the current repo is the same as the given repository- Specified by:
isRepositoryDifferent
in interfaceRepositoryV2
- Parameters:
repository
- to compare against- Returns:
- true of repositories are different, false if the same;
-
getMinimalEditHtml
public String getMinimalEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration)
Description copied from interface:Repository
Returns HTML for the minimal configuration of the repository. i.e. the basic config required to get it working.- Specified by:
getMinimalEditHtml
in interfaceRepository
- Overrides:
getMinimalEditHtml
in classAbstractRepository
- Parameters:
buildConfiguration
- BuildConfiguration object- Returns:
- HTML for the minimal configuration of the repository
-
getEditHtml
public String getEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration, @Nullable @Nullable Plan plan)
Description copied from interface:RenderableBuildConfiguration
Returns HTML that represents the form fragment for editing the repository. No opening and closing form tags are required.- Specified by:
getEditHtml
in interfaceRenderableBuildConfiguration
- Overrides:
getEditHtml
in classAbstractRepository
- Parameters:
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.- Returns:
- HTML string. May be null.
-
getAdvancedEditHtml
public String getAdvancedEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration, @Nullable @Nullable Plan plan)
- Specified by:
getAdvancedEditHtml
in interfaceAdvancedConfigurationAwareRepository
- Overrides:
getAdvancedEditHtml
in classAbstractRepository
-
getEditHtml
public String getEditHtml(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration repositoryConfiguration)
Description copied from class:AbstractStandaloneRepository
This implementation uses the same ftl templates asAbstractRepository.getEditHtml(BuildConfiguration, Plan)
- Specified by:
getEditHtml
in interfaceStandaloneRepository
- Overrides:
getEditHtml
in classAbstractStandaloneRepository
- Parameters:
repositoryConfiguration
-HierarchicalConfiguration
for which edit HTML has to be rendered.- Returns:
- HTML string. May be null.
-
getViewHtml
public String getViewHtml()
Description copied from class:AbstractStandaloneRepository
This implementation uses the same ftl templates asAbstractRepository.getViewHtml(Plan)
. This is not used anywhere.- Specified by:
getViewHtml
in interfaceStandaloneRepository
- Overrides:
getViewHtml
in classAbstractStandaloneRepository
- Returns:
- HTML string. May be null.
-
getAdvancedEditHtml
public String getAdvancedEditHtml(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration repositoryConfiguration)
Description copied from interface:StandaloneRepository
Return HTML that represents the form fragment for editing advanced options of the repository.- Specified by:
getAdvancedEditHtml
in interfaceStandaloneRepository
- Overrides:
getAdvancedEditHtml
in classAbstractStandaloneRepository
- Parameters:
repositoryConfiguration
-HierarchicalConfiguration
for which edit HTML has to be rendered.- Returns:
-
getAdvancedViewHtml
public String getAdvancedViewHtml()
Description copied from interface:StandaloneRepository
Returns the HTML that represents the view of the advanced repository configuration- Specified by:
getAdvancedViewHtml
in interfaceStandaloneRepository
- Overrides:
getAdvancedViewHtml
in classAbstractStandaloneRepository
- Returns:
- HTML string. May be null.
-
-