public abstract class AbstractVcsTaskExporter extends AbstractRepositoryAwareTaskExporter implements TaskDefinitionExporter
Modifier and Type | Field and Description |
---|---|
protected VcsRepositoryManager |
vcsRepositoryManager |
repositoryDefinitionManager
Constructor and Description |
---|
AbstractVcsTaskExporter() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,String> |
baseVcsTaskToConfiguration(TaskContainer taskContainer,
com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties)
Implementation of
TaskDefinitionExporter.toTaskConfiguration(TaskContainer, TaskProperties) for exporters of
BaseVcsTaskProperties . |
protected <P extends com.atlassian.bamboo.specs.model.task.BaseVcsTaskProperties,B extends com.atlassian.bamboo.specs.builders.task.BaseVcsTask<B,P>> |
baseVcsTaskToSpecsEntity(TaskDefinition taskDefinition,
B specsEntity)
Implementation of
TaskDefinitionExporter.toSpecsEntity(TaskDefinition) for exporters of BaseVcsTaskProperties . |
protected List<com.atlassian.bamboo.specs.api.validators.common.ValidationProblem> |
baseVcsTaskValidate(TaskValidationContext taskValidationContext,
com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties)
Implementation of
TaskDefinitionExporter.validate(TaskValidationContext, TaskProperties) for exporters of
BaseVcsTaskProperties . |
protected <T> T |
getTypedTaskProperties(com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties,
Class<T> expectedClass)
Get task properties as an instance of the given class if possible.
|
protected abstract com.atlassian.bamboo.specs.api.validators.common.ValidationContext |
getValidationContext()
Get validation context for this task type.
|
protected boolean |
isDefaultRepositoryRef(String repositorySelector,
Map<String,String> configuration)
Whether the given repository identifier points to a default repository of a plan.
|
protected abstract boolean |
isRepositoryTypeSupported(VcsRepositoryModuleDescriptor moduleDescriptor)
Returns true if the given repository type is supported by this task type.
|
getNonDefaultRepositoryRef, getNonDefaultRepositoryRef, getRepositoryIdString, getRepositoryListForTaskContainer, isDefaultRepositoryRef
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toSpecsEntity, toSpecsEntity, toTaskConfiguration, toTaskConfiguration, validate
@Autowired protected VcsRepositoryManager vcsRepositoryManager
@NotNull protected abstract com.atlassian.bamboo.specs.api.validators.common.ValidationContext getValidationContext()
protected abstract boolean isRepositoryTypeSupported(@NotNull VcsRepositoryModuleDescriptor moduleDescriptor)
protected boolean isDefaultRepositoryRef(@NotNull String repositorySelector, @NotNull Map<String,String> configuration)
repositorySelector
- key to select repository identifier from the configurationconfiguration
- task configuration@NotNull protected Map<String,String> baseVcsTaskToConfiguration(@NotNull TaskContainer taskContainer, @NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties)
TaskDefinitionExporter.toTaskConfiguration(TaskContainer, TaskProperties)
for exporters of
BaseVcsTaskProperties
.@NotNull protected <P extends com.atlassian.bamboo.specs.model.task.BaseVcsTaskProperties,B extends com.atlassian.bamboo.specs.builders.task.BaseVcsTask<B,P>> B baseVcsTaskToSpecsEntity(@NotNull TaskDefinition taskDefinition, @NotNull B specsEntity)
TaskDefinitionExporter.toSpecsEntity(TaskDefinition)
for exporters of BaseVcsTaskProperties
.@NotNull protected List<com.atlassian.bamboo.specs.api.validators.common.ValidationProblem> baseVcsTaskValidate(@NotNull TaskValidationContext taskValidationContext, @NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties)
TaskDefinitionExporter.validate(TaskValidationContext, TaskProperties)
for exporters of
BaseVcsTaskProperties
.@NotNull protected <T> T getTypedTaskProperties(@NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties, @NotNull Class<T> expectedClass)
taskProperties
- generic task properties, not yet typed properlyexpectedClass
- expected class of the task propertiesIllegalStateException
- if the task properties are of an incorrect, unsupported typeCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.