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.descriptors.WeightedDescriptor
public class VcsRepositoryModuleDescriptorImpl extends AbstractBambooModuleDescriptor<VcsWorkingCopyManager> implements VcsRepositoryModuleDescriptor
-
-
Field Summary
Fields Modifier and Type Field Description static String
DOWNLOAD_RESOURCE_TYPE
static String
ICON_RESOURCE
static String
POLLING_TRIGGER_KEY
-
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
Constructors Constructor Description VcsRepositoryModuleDescriptorImpl(com.atlassian.plugin.module.ModuleFactory moduleFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BambooSpecsHandler
getBambooSpecsHandler()
@Nullable VcsBranchCreator
getBranchCreator()
@Nullable VcsBranchDetector
getBranchDetector()
@Nullable VcsBuildWarningsUpdater
getBuildWarningsUpdater()
@NotNull VcsChangeDetector
getChangeDetector()
@Nullable VcsConnectionTester
getConnectionTester()
@NotNull String
getDefaultTriggerKey()
Default trigger key for this repository If none was set polling trigger key will be returned@NotNull String
getDefaultVcsViewerKey()
Default web viewer for this repository.@NotNull VcsRepositoryDataExporter
getExporter()
@Nullable String
getIcon()
Returns IMAGE (icon) for specific repository.@Nullable String
getOptionDescription()
Additional description rendered in repository selection UI.@Nullable VcsPullRequestDetector
getPullRequestDetector()
@Nullable VcsTagCreator
getTagCreator()
@Nullable VcsTagsHandler
getTagsHandler()
@Nullable String
getTooltipKey()
Returns TRANSLATION key which is used in tooltips.@NotNull String
getTypeString()
Returns "type" of vcs to be used for variable generation.@Nullable VcsVariableGenerator
getVariableGenerator()
@Nullable VcsBranchConfigurator
getVcsBranchConfigurator()
@Nullable VcsBranchDetectionOptionsConfigurator
getVcsBranchDetectionOptionsConfigurator()
@Nullable VcsChangeDetectionOptionsConfigurator
getVcsChangeDetectionOptionsConfigurator()
@Nullable VcsCommitCommenter
getVcsCommitCommenter()
@NotNull VcsLocationConfigurator
getVcsLocationConfigurator()
@Nullable VcsMavenPomAccessor
getVcsMavenPomAccessor()
int
getWeight()
@NotNull VcsWorkingCopyManager
getWorkingCopyManager()
void
init(com.atlassian.plugin.Plugin plugin, org.dom4j.Element element)
protected boolean
isMutable()
Whether modules of this descriptor are supposed to be mutated by external components.boolean
isPrimary()
Marks repository for PRIMARY (in our case Stash & Bitbucket), is used for rendering.boolean
providesCustomVariables()
boolean
revisionIdsAreUnique()
Return true for vcs systems that uses revision ids that can be considered unique.boolean
supportsBranchCreation()
boolean
supportsBranchDetection()
boolean
supportsBranchOverrides()
boolean
supportsImportFromMaven()
boolean
supportsMerging()
boolean
supportsRemoteUpdates()
boolean
supportsTagCreation()
boolean
supportsTestingConnection()
-
Methods inherited from class com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor
disabled, getElementAsString, getFreeMarkerResourceLocation, getModule, getVelocityResourceLocation, instantiateClass, instantiateSubmodule, postInit, preInit
-
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, provideValidationRules, 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, init, 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.bamboo.vcs.module.VcsRepositoryModuleDescriptor
isDistributedVcs, providesWorkingCopyStatus, supportsBuildWarnings, supportsCommitComment, supportsForkedPullRequestDetection, supportsPullRequestDetection
-
-
-
-
Field Detail
-
ICON_RESOURCE
public static final String ICON_RESOURCE
- See Also:
- Constant Field Values
-
DOWNLOAD_RESOURCE_TYPE
public static final String DOWNLOAD_RESOURCE_TYPE
- See Also:
- Constant Field Values
-
POLLING_TRIGGER_KEY
public static final String POLLING_TRIGGER_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(com.atlassian.plugin.Plugin plugin, org.dom4j.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
@NotNull public @NotNull VcsLocationConfigurator 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
@NotNull public @NotNull VcsChangeDetector getChangeDetector()
- Specified by:
getChangeDetector
in interfaceVcsRepositoryModuleDescriptor
-
getTagsHandler
@Nullable public @Nullable VcsTagsHandler getTagsHandler()
- Specified by:
getTagsHandler
in interfaceVcsRepositoryModuleDescriptor
-
getWorkingCopyManager
@NotNull public @NotNull VcsWorkingCopyManager getWorkingCopyManager()
- Specified by:
getWorkingCopyManager
in interfaceVcsRepositoryModuleDescriptor
-
getVcsBranchConfigurator
@Nullable public @Nullable VcsBranchConfigurator getVcsBranchConfigurator()
- Specified by:
getVcsBranchConfigurator
in interfaceVcsRepositoryModuleDescriptor
-
getBranchDetector
@Nullable public @Nullable VcsBranchDetector getBranchDetector()
- Specified by:
getBranchDetector
in interfaceVcsRepositoryModuleDescriptor
-
getPullRequestDetector
@Nullable public @Nullable VcsPullRequestDetector getPullRequestDetector()
- Specified by:
getPullRequestDetector
in interfaceVcsRepositoryModuleDescriptor
-
getVcsCommitCommenter
@Nullable public @Nullable VcsCommitCommenter getVcsCommitCommenter()
- Specified by:
getVcsCommitCommenter
in interfaceVcsRepositoryModuleDescriptor
-
getBuildWarningsUpdater
@Nullable public @Nullable VcsBuildWarningsUpdater getBuildWarningsUpdater()
- Specified by:
getBuildWarningsUpdater
in interfaceVcsRepositoryModuleDescriptor
-
getBranchCreator
@Nullable public @Nullable VcsBranchCreator getBranchCreator()
- Specified by:
getBranchCreator
in interfaceVcsRepositoryModuleDescriptor
-
getTagCreator
@Nullable public @Nullable VcsTagCreator getTagCreator()
- Specified by:
getTagCreator
in interfaceVcsRepositoryModuleDescriptor
-
getConnectionTester
@Nullable public @Nullable VcsConnectionTester getConnectionTester()
- Specified by:
getConnectionTester
in interfaceVcsRepositoryModuleDescriptor
-
getVariableGenerator
@Nullable public @Nullable VcsVariableGenerator getVariableGenerator()
- Specified by:
getVariableGenerator
in interfaceVcsRepositoryModuleDescriptor
-
getVcsMavenPomAccessor
@Nullable public @Nullable VcsMavenPomAccessor getVcsMavenPomAccessor()
- Specified by:
getVcsMavenPomAccessor
in interfaceVcsRepositoryModuleDescriptor
-
getExporter
@NotNull public @NotNull VcsRepositoryDataExporter getExporter()
- Specified by:
getExporter
in interfaceVcsRepositoryModuleDescriptor
-
getBambooSpecsHandler
public BambooSpecsHandler getBambooSpecsHandler()
- Specified by:
getBambooSpecsHandler
in interfaceVcsRepositoryModuleDescriptor
-
getOptionDescription
@Nullable public @Nullable String getOptionDescription()
Description copied from interface:VcsRepositoryModuleDescriptor
Additional description rendered in repository selection UI.- Specified by:
getOptionDescription
in interfaceVcsRepositoryModuleDescriptor
-
getIcon
@Nullable public @Nullable String getIcon()
Description copied from interface:VcsRepositoryModuleDescriptor
Returns IMAGE (icon) for specific repository.- Specified by:
getIcon
in interfaceVcsRepositoryModuleDescriptor
- Returns:
- IMAGE path
-
getTooltipKey
@Nullable public @Nullable String 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.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
@NotNull public @NotNull String getTypeString()
Description copied from interface:VcsRepositoryModuleDescriptor
Returns "type" of vcs to be used for variable generation.- Specified by:
getTypeString
in interfaceVcsRepositoryModuleDescriptor
-
getDefaultTriggerKey
@NotNull public @NotNull String 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
@NotNull public @NotNull String getDefaultVcsViewerKey()
Description copied from interface:VcsRepositoryModuleDescriptor
Default web viewer for this repository.- Specified by:
getDefaultVcsViewerKey
in interfaceVcsRepositoryModuleDescriptor
-
-