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 StringDOWNLOAD_RESOURCE_TYPEstatic StringICON_RESOURCEstatic StringPOLLING_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 BambooSpecsHandlergetBambooSpecsHandler()@Nullable VcsBranchCreatorgetBranchCreator()@Nullable VcsBranchDetectorgetBranchDetector()@Nullable VcsBuildWarningsUpdatergetBuildWarningsUpdater()@NotNull VcsChangeDetectorgetChangeDetector()@Nullable VcsConnectionTestergetConnectionTester()@NotNull StringgetDefaultTriggerKey()Default trigger key for this repository If none was set polling trigger key will be returned@NotNull StringgetDefaultVcsViewerKey()Default web viewer for this repository.@NotNull VcsRepositoryDataExportergetExporter()@Nullable StringgetIcon()Returns IMAGE (icon) for specific repository.@Nullable StringgetOptionDescription()Additional description rendered in repository selection UI.@Nullable VcsPullRequestDetectorgetPullRequestDetector()@Nullable VcsTagCreatorgetTagCreator()@Nullable VcsTagsHandlergetTagsHandler()@Nullable StringgetTooltipKey()Returns TRANSLATION key which is used in tooltips.@NotNull StringgetTypeString()Returns "type" of vcs to be used for variable generation.@Nullable VcsVariableGeneratorgetVariableGenerator()@Nullable VcsBranchConfiguratorgetVcsBranchConfigurator()@Nullable VcsBranchDetectionOptionsConfiguratorgetVcsBranchDetectionOptionsConfigurator()@Nullable VcsChangeDetectionOptionsConfiguratorgetVcsChangeDetectionOptionsConfigurator()@Nullable VcsCommitCommentergetVcsCommitCommenter()@NotNull VcsLocationConfiguratorgetVcsLocationConfigurator()@Nullable VcsMavenPomAccessorgetVcsMavenPomAccessor()intgetWeight()@NotNull VcsWorkingCopyManagergetWorkingCopyManager()voidinit(com.atlassian.plugin.Plugin plugin, org.dom4j.Element element)protected booleanisMutable()Whether modules of this descriptor are supposed to be mutated by external components.booleanisPrimary()Marks repository for PRIMARY (in our case Stash & Bitbucket), is used for rendering.booleanprovidesCustomVariables()booleanrevisionIdsAreUnique()Return true for vcs systems that uses revision ids that can be considered unique.booleansupportsBranchCreation()booleansupportsBranchDetection()booleansupportsBranchOverrides()booleansupportsImportFromMaven()booleansupportsMerging()booleansupportsRemoteUpdates()booleansupportsTagCreation()booleansupportsTestingConnection()-
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
-
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.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:
initin interfacecom.atlassian.plugin.ModuleDescriptor<VcsWorkingCopyManager>- Overrides:
initin classcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<VcsWorkingCopyManager>- Throws:
com.atlassian.plugin.PluginParseException
-
isMutable
protected boolean isMutable()
Description copied from class:AbstractBambooModuleDescriptorWhether 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:
isMutablein classAbstractBambooModuleDescriptor<VcsWorkingCopyManager>- Returns:
trueif modules of this descriptor are mutable
-
getVcsLocationConfigurator
@NotNull public @NotNull VcsLocationConfigurator getVcsLocationConfigurator()
- Specified by:
getVcsLocationConfiguratorin interfaceVcsRepositoryModuleDescriptor
-
getVcsChangeDetectionOptionsConfigurator
@Nullable public @Nullable VcsChangeDetectionOptionsConfigurator getVcsChangeDetectionOptionsConfigurator()
- Specified by:
getVcsChangeDetectionOptionsConfiguratorin interfaceVcsRepositoryModuleDescriptor
-
getVcsBranchDetectionOptionsConfigurator
@Nullable public @Nullable VcsBranchDetectionOptionsConfigurator getVcsBranchDetectionOptionsConfigurator()
- Specified by:
getVcsBranchDetectionOptionsConfiguratorin interfaceVcsRepositoryModuleDescriptor
-
getChangeDetector
@NotNull public @NotNull VcsChangeDetector getChangeDetector()
- Specified by:
getChangeDetectorin interfaceVcsRepositoryModuleDescriptor
-
getTagsHandler
@Nullable public @Nullable VcsTagsHandler getTagsHandler()
- Specified by:
getTagsHandlerin interfaceVcsRepositoryModuleDescriptor
-
getWorkingCopyManager
@NotNull public @NotNull VcsWorkingCopyManager getWorkingCopyManager()
- Specified by:
getWorkingCopyManagerin interfaceVcsRepositoryModuleDescriptor
-
getVcsBranchConfigurator
@Nullable public @Nullable VcsBranchConfigurator getVcsBranchConfigurator()
- Specified by:
getVcsBranchConfiguratorin interfaceVcsRepositoryModuleDescriptor
-
getBranchDetector
@Nullable public @Nullable VcsBranchDetector getBranchDetector()
- Specified by:
getBranchDetectorin interfaceVcsRepositoryModuleDescriptor
-
getPullRequestDetector
@Nullable public @Nullable VcsPullRequestDetector getPullRequestDetector()
- Specified by:
getPullRequestDetectorin interfaceVcsRepositoryModuleDescriptor
-
getVcsCommitCommenter
@Nullable public @Nullable VcsCommitCommenter getVcsCommitCommenter()
- Specified by:
getVcsCommitCommenterin interfaceVcsRepositoryModuleDescriptor
-
getBuildWarningsUpdater
@Nullable public @Nullable VcsBuildWarningsUpdater getBuildWarningsUpdater()
- Specified by:
getBuildWarningsUpdaterin interfaceVcsRepositoryModuleDescriptor
-
getBranchCreator
@Nullable public @Nullable VcsBranchCreator getBranchCreator()
- Specified by:
getBranchCreatorin interfaceVcsRepositoryModuleDescriptor
-
getTagCreator
@Nullable public @Nullable VcsTagCreator getTagCreator()
- Specified by:
getTagCreatorin interfaceVcsRepositoryModuleDescriptor
-
getConnectionTester
@Nullable public @Nullable VcsConnectionTester getConnectionTester()
- Specified by:
getConnectionTesterin interfaceVcsRepositoryModuleDescriptor
-
getVariableGenerator
@Nullable public @Nullable VcsVariableGenerator getVariableGenerator()
- Specified by:
getVariableGeneratorin interfaceVcsRepositoryModuleDescriptor
-
getVcsMavenPomAccessor
@Nullable public @Nullable VcsMavenPomAccessor getVcsMavenPomAccessor()
- Specified by:
getVcsMavenPomAccessorin interfaceVcsRepositoryModuleDescriptor
-
getExporter
@NotNull public @NotNull VcsRepositoryDataExporter getExporter()
- Specified by:
getExporterin interfaceVcsRepositoryModuleDescriptor
-
getBambooSpecsHandler
public BambooSpecsHandler getBambooSpecsHandler()
- Specified by:
getBambooSpecsHandlerin interfaceVcsRepositoryModuleDescriptor
-
getOptionDescription
@Nullable public @Nullable String getOptionDescription()
Description copied from interface:VcsRepositoryModuleDescriptorAdditional description rendered in repository selection UI.- Specified by:
getOptionDescriptionin interfaceVcsRepositoryModuleDescriptor
-
getIcon
@Nullable public @Nullable String getIcon()
Description copied from interface:VcsRepositoryModuleDescriptorReturns IMAGE (icon) for specific repository.- Specified by:
getIconin interfaceVcsRepositoryModuleDescriptor- Returns:
- IMAGE path
-
getTooltipKey
@Nullable public @Nullable String getTooltipKey()
Description copied from interface:VcsRepositoryModuleDescriptorReturns TRANSLATION key which is used in tooltips.- Specified by:
getTooltipKeyin interfaceVcsRepositoryModuleDescriptor- Returns:
- TRANSLATION key
-
isPrimary
public boolean isPrimary()
Description copied from interface:VcsRepositoryModuleDescriptorMarks repository for PRIMARY (in our case Stash & Bitbucket), is used for rendering.- Specified by:
isPrimaryin interfaceVcsRepositoryModuleDescriptor
-
getWeight
public int getWeight()
- Specified by:
getWeightin interfacecom.atlassian.plugin.web.descriptors.WeightedDescriptor
-
supportsBranchDetection
public boolean supportsBranchDetection()
- Specified by:
supportsBranchDetectionin interfaceVcsRepositoryModuleDescriptor
-
supportsBranchOverrides
public boolean supportsBranchOverrides()
- Specified by:
supportsBranchOverridesin interfaceVcsRepositoryModuleDescriptor
-
supportsBranchCreation
public boolean supportsBranchCreation()
- Specified by:
supportsBranchCreationin interfaceVcsRepositoryModuleDescriptor
-
supportsTagCreation
public boolean supportsTagCreation()
- Specified by:
supportsTagCreationin interfaceVcsRepositoryModuleDescriptor
-
providesCustomVariables
public boolean providesCustomVariables()
- Specified by:
providesCustomVariablesin interfaceVcsRepositoryModuleDescriptor
-
supportsMerging
public boolean supportsMerging()
- Specified by:
supportsMergingin interfaceVcsRepositoryModuleDescriptor
-
supportsRemoteUpdates
public boolean supportsRemoteUpdates()
- Specified by:
supportsRemoteUpdatesin interfaceVcsRepositoryModuleDescriptor
-
supportsTestingConnection
public boolean supportsTestingConnection()
- Specified by:
supportsTestingConnectionin interfaceVcsRepositoryModuleDescriptor
-
supportsImportFromMaven
public boolean supportsImportFromMaven()
- Specified by:
supportsImportFromMavenin interfaceVcsRepositoryModuleDescriptor
-
revisionIdsAreUnique
public boolean revisionIdsAreUnique()
Description copied from interface:VcsRepositoryModuleDescriptorReturn 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:
revisionIdsAreUniquein interfaceVcsRepositoryModuleDescriptor
-
getTypeString
@NotNull public @NotNull String getTypeString()
Description copied from interface:VcsRepositoryModuleDescriptorReturns "type" of vcs to be used for variable generation.- Specified by:
getTypeStringin interfaceVcsRepositoryModuleDescriptor
-
getDefaultTriggerKey
@NotNull public @NotNull String getDefaultTriggerKey()
Description copied from interface:VcsRepositoryModuleDescriptorDefault trigger key for this repository If none was set polling trigger key will be returned- Specified by:
getDefaultTriggerKeyin interfaceVcsRepositoryModuleDescriptor- Returns:
- trigger key
-
getDefaultVcsViewerKey
@NotNull public @NotNull String getDefaultVcsViewerKey()
Description copied from interface:VcsRepositoryModuleDescriptorDefault web viewer for this repository.- Specified by:
getDefaultVcsViewerKeyin interfaceVcsRepositoryModuleDescriptor
-
-