Package com.atlassian.bamboo.vcs.module
Class VcsRepositoryModuleDescriptorImpl
java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor<VcsWorkingCopyManager>
com.atlassian.bamboo.vcs.module.VcsRepositoryModuleDescriptorImpl
- All Implemented Interfaces:
NameProvider
,VcsRepositoryModuleDescriptor
,com.atlassian.plugin.ModuleDescriptor<VcsWorkingCopyManager>
,com.atlassian.plugin.Resourced
,com.atlassian.plugin.ScopeAware
,com.atlassian.plugin.StateAware
,com.atlassian.plugin.web.api.descriptors.WeightedDescriptor
public class VcsRepositoryModuleDescriptorImpl
extends AbstractBambooModuleDescriptor<VcsWorkingCopyManager>
implements VcsRepositoryModuleDescriptor
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor
AbstractBambooModuleDescriptor.ClassNameSource, AbstractBambooModuleDescriptor.ModuleAvailability
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from class com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor
CLASS
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources
Fields inherited from interface com.atlassian.bamboo.vcs.module.VcsRepositoryModuleDescriptor
SELECTED_REPOSITORY
-
Constructor Summary
ConstructorDescriptionVcsRepositoryModuleDescriptorImpl
(com.atlassian.plugin.module.ModuleFactory moduleFactory) -
Method Summary
Modifier and TypeMethodDescription@Nullable VcsBranchCreator
@Nullable VcsBranchDetector
@Nullable VcsBuildWarningsUpdater
@NotNull VcsChangeDetector
@Nullable VcsConnectionTester
@NotNull String
Default trigger key for this repository If none was set polling trigger key will be returned@NotNull String
Default web viewer for this repository.@NotNull VcsRepositoryDataExporter
@Nullable GitPluginConfigurationTransformer
@Nullable String
getIcon()
Returns IMAGE (icon) for specific repository.@Nullable String
Additional description rendered in repository selection UI.@Nullable VcsPullRequestDetector
@Nullable VcsTagCreator
@Nullable VcsTagsHandler
@Nullable String
Returns TRANSLATION key which is used in tooltips.@NotNull String
Returns "type" of vcs to be used for variable generation.@Nullable VcsVariableGenerator
@Nullable VcsBranchConfigurator
@Nullable VcsBranchDetectionOptionsConfigurator
@Nullable VcsChangeDetectionOptionsConfigurator
@Nullable VcsCommitCommenter
@NotNull VcsLocationConfigurator
@Nullable VcsMavenPomAccessor
int
@NotNull VcsWorkingCopyManager
void
init
(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element) protected boolean
Whether modules of this descriptor are supposed to be mutated by external components.boolean
Marks repository for PRIMARY (in our case Stash & Bitbucket), is used for rendering.boolean
boolean
Return true for vcs systems that uses revision ids that can be considered unique.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Methods inherited from class com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor
disabled, getElementAsString, getFreeMarkerResourceLocation, getModule, getVelocityResourceLocation, instantiateClass, instantiateSubmodule, postInit, preInit, prepareSubModuleConfiguration, prepareSubModuleConfiguration
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, checkPermissions, destroy, enabled, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceLocation, getScopeKey, hashCode, isBroken, isEnabled, isEnabledByDefault, isSystemModule, loadClass, satisfiesMinJavaVersion, setBroken, setPlugin, toString, validate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.plugin.ModuleDescriptor
destroy, equals, getCompleteKey, getDescription, getDescriptionKey, getDisplayName, getI18nNameKey, getKey, getMinJavaVersion, getModule, getModuleClass, getName, getParams, getPlugin, getPluginKey, hashCode, isBroken, isEnabled, isEnabledByDefault, isSystemModule, satisfiesMinJavaVersion, setBroken
Methods inherited from interface com.atlassian.bamboo.utils.NameProvider
getName
Methods inherited from interface com.atlassian.plugin.Resourced
getResourceDescriptor, getResourceDescriptors, getResourceLocation
Methods inherited from interface com.atlassian.plugin.ScopeAware
getScopeKey
Methods inherited from interface com.atlassian.bamboo.vcs.module.VcsRepositoryModuleDescriptor
isDistributedVcs, providesWorkingCopyStatus, supportsBuildWarnings, supportsCommitComment, supportsForkedPullRequestDetection, supportsPullRequestDetection
-
Field Details
-
ICON_RESOURCE
- See Also:
-
DOWNLOAD_RESOURCE_TYPE
- See Also:
-
POLLING_TRIGGER_KEY
- See Also:
-
PLUGIN_TYPE
- See Also:
-
-
Constructor Details
-
VcsRepositoryModuleDescriptorImpl
public VcsRepositoryModuleDescriptorImpl(com.atlassian.plugin.module.ModuleFactory moduleFactory)
-
-
Method Details
-
init
public void init(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element) throws com.atlassian.plugin.PluginParseException - Specified by:
init
in interfacecom.atlassian.plugin.ModuleDescriptor<VcsWorkingCopyManager>
- Overrides:
init
in classcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<VcsWorkingCopyManager>
- Throws:
com.atlassian.plugin.PluginParseException
-
isMutable
protected boolean isMutable()Description copied from class:AbstractBambooModuleDescriptor
Whether modules of this descriptor are supposed to be mutated by external components. By default this returnstrue
, which means a fresh module instance will be created each timeAbstractBambooModuleDescriptor.getModule()
is called.Subclasses that are safe to cache a singleton instance of module throughout the life span of this descriptor can override this method and return
false
.- Overrides:
isMutable
in classAbstractBambooModuleDescriptor<VcsWorkingCopyManager>
- Returns:
true
if modules of this descriptor are mutable
-
getVcsLocationConfigurator
- Specified by:
getVcsLocationConfigurator
in interfaceVcsRepositoryModuleDescriptor
-
getVcsChangeDetectionOptionsConfigurator
@Nullable public @Nullable VcsChangeDetectionOptionsConfigurator getVcsChangeDetectionOptionsConfigurator()- Specified by:
getVcsChangeDetectionOptionsConfigurator
in interfaceVcsRepositoryModuleDescriptor
-
getVcsBranchDetectionOptionsConfigurator
@Nullable public @Nullable VcsBranchDetectionOptionsConfigurator getVcsBranchDetectionOptionsConfigurator()- Specified by:
getVcsBranchDetectionOptionsConfigurator
in interfaceVcsRepositoryModuleDescriptor
-
getChangeDetector
- Specified by:
getChangeDetector
in interfaceVcsRepositoryModuleDescriptor
-
getTagsHandler
- Specified by:
getTagsHandler
in interfaceVcsRepositoryModuleDescriptor
-
getWorkingCopyManager
- Specified by:
getWorkingCopyManager
in interfaceVcsRepositoryModuleDescriptor
-
getVcsBranchConfigurator
- Specified by:
getVcsBranchConfigurator
in interfaceVcsRepositoryModuleDescriptor
-
getBranchDetector
- Specified by:
getBranchDetector
in interfaceVcsRepositoryModuleDescriptor
-
getPullRequestDetector
- Specified by:
getPullRequestDetector
in interfaceVcsRepositoryModuleDescriptor
-
getVcsCommitCommenter
- Specified by:
getVcsCommitCommenter
in interfaceVcsRepositoryModuleDescriptor
-
getBuildWarningsUpdater
- Specified by:
getBuildWarningsUpdater
in interfaceVcsRepositoryModuleDescriptor
-
getBranchCreator
- Specified by:
getBranchCreator
in interfaceVcsRepositoryModuleDescriptor
-
getTagCreator
- Specified by:
getTagCreator
in interfaceVcsRepositoryModuleDescriptor
-
getConnectionTester
- Specified by:
getConnectionTester
in interfaceVcsRepositoryModuleDescriptor
-
getVariableGenerator
- Specified by:
getVariableGenerator
in interfaceVcsRepositoryModuleDescriptor
-
getVcsMavenPomAccessor
- Specified by:
getVcsMavenPomAccessor
in interfaceVcsRepositoryModuleDescriptor
-
getExporter
- Specified by:
getExporter
in interfaceVcsRepositoryModuleDescriptor
-
getBambooSpecsHandler
- Specified by:
getBambooSpecsHandler
in interfaceVcsRepositoryModuleDescriptor
-
getGitPluginConfigurationTransformer
- Specified by:
getGitPluginConfigurationTransformer
in interfaceVcsRepositoryModuleDescriptor
-
getOptionDescription
Description copied from interface:VcsRepositoryModuleDescriptor
Additional description rendered in repository selection UI.- Specified by:
getOptionDescription
in interfaceVcsRepositoryModuleDescriptor
-
getIcon
Description copied from interface:VcsRepositoryModuleDescriptor
Returns IMAGE (icon) for specific repository.- Specified by:
getIcon
in interfaceVcsRepositoryModuleDescriptor
- Returns:
- IMAGE path
-
getTooltipKey
Description copied from interface:VcsRepositoryModuleDescriptor
Returns TRANSLATION key which is used in tooltips.- Specified by:
getTooltipKey
in interfaceVcsRepositoryModuleDescriptor
- Returns:
- TRANSLATION key
-
isPrimary
public boolean isPrimary()Description copied from interface:VcsRepositoryModuleDescriptor
Marks repository for PRIMARY (in our case Stash & Bitbucket), is used for rendering.- Specified by:
isPrimary
in interfaceVcsRepositoryModuleDescriptor
-
getWeight
public int getWeight()- Specified by:
getWeight
in interfacecom.atlassian.plugin.web.api.descriptors.WeightedDescriptor
-
supportsBranchDetection
public boolean supportsBranchDetection()- Specified by:
supportsBranchDetection
in interfaceVcsRepositoryModuleDescriptor
-
supportsBranchOverrides
public boolean supportsBranchOverrides()- Specified by:
supportsBranchOverrides
in interfaceVcsRepositoryModuleDescriptor
-
supportsBranchCreation
public boolean supportsBranchCreation()- Specified by:
supportsBranchCreation
in interfaceVcsRepositoryModuleDescriptor
-
supportsTagCreation
public boolean supportsTagCreation()- Specified by:
supportsTagCreation
in interfaceVcsRepositoryModuleDescriptor
-
providesCustomVariables
public boolean providesCustomVariables()- Specified by:
providesCustomVariables
in interfaceVcsRepositoryModuleDescriptor
-
supportsMerging
public boolean supportsMerging()- Specified by:
supportsMerging
in interfaceVcsRepositoryModuleDescriptor
-
supportsRemoteUpdates
public boolean supportsRemoteUpdates()- Specified by:
supportsRemoteUpdates
in interfaceVcsRepositoryModuleDescriptor
-
supportsTestingConnection
public boolean supportsTestingConnection()- Specified by:
supportsTestingConnection
in interfaceVcsRepositoryModuleDescriptor
-
supportsImportFromMaven
public boolean supportsImportFromMaven()- Specified by:
supportsImportFromMaven
in interfaceVcsRepositoryModuleDescriptor
-
revisionIdsAreUnique
public boolean revisionIdsAreUnique()Description copied from interface:VcsRepositoryModuleDescriptor
Return true for vcs systems that uses revision ids that can be considered unique. For example Git uses hashes that have low collision chance, so it follows that 2 commits with that same revision id are in fact the same commit. Subversion, on the other hand, uses cardinal numbers which are obviously not unique.- Specified by:
revisionIdsAreUnique
in interfaceVcsRepositoryModuleDescriptor
-
getTypeString
Description copied from interface:VcsRepositoryModuleDescriptor
Returns "type" of vcs to be used for variable generation.- Specified by:
getTypeString
in interfaceVcsRepositoryModuleDescriptor
-
getDefaultTriggerKey
Description copied from interface:VcsRepositoryModuleDescriptor
Default trigger key for this repository If none was set polling trigger key will be returned- Specified by:
getDefaultTriggerKey
in interfaceVcsRepositoryModuleDescriptor
- Returns:
- trigger key
-
getDefaultVcsViewerKey
Description copied from interface:VcsRepositoryModuleDescriptor
Default web viewer for this repository.- Specified by:
getDefaultVcsViewerKey
in interfaceVcsRepositoryModuleDescriptor
-