Class AbstractVcsTaskExporter

    • Method Detail

      • getValidationContext

        @NotNull
        protected abstract @NotNull com.atlassian.bamboo.specs.api.validators.common.ValidationContext getValidationContext()
        Get validation context for this task type.
      • isRepositoryTypeSupported

        protected abstract boolean isRepositoryTypeSupported​(@NotNull
                                                             @NotNull VcsRepositoryModuleDescriptor moduleDescriptor)
        Returns true if the given repository type is supported by this task type.
      • isDefaultRepositoryRef

        protected boolean isDefaultRepositoryRef​(@NotNull
                                                 @NotNull String repositorySelector,
                                                 @NotNull
                                                 @NotNull Map<String,​String> configuration)
        Whether the given repository identifier points to a default repository of a plan.
        Parameters:
        repositorySelector - key to select repository identifier from the configuration
        configuration - task configuration
        Returns:
        true if the repository identifier points to a default plan's repository
      • baseVcsTaskToSpecsEntity

        @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
                                                                                                                                                                                                     @NotNull TaskDefinition taskDefinition,
                                                                                                                                                                                                     @NotNull
                                                                                                                                                                                                     B specsEntity)
        Implementation of TaskDefinitionExporter.toSpecsEntity(TaskDefinition) for exporters of BaseVcsTaskProperties.
      • getTypedTaskProperties

        @NotNull
        protected <T> T getTypedTaskProperties​(@NotNull
                                               @NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties,
                                               @NotNull
                                               @NotNull Class<T> expectedClass)
        Get task properties as an instance of the given class if possible.
        Parameters:
        taskProperties - generic task properties, not yet typed properly
        expectedClass - expected class of the task properties
        Returns:
        typed task properties
        Throws:
        IllegalStateException - if the task properties are of an incorrect, unsupported type