Class AbstractRepositoryAwareTaskExporter

    • Constructor Detail

      • AbstractRepositoryAwareTaskExporter

        public AbstractRepositoryAwareTaskExporter​(@NotNull
                                                   @NotNull RepositoryDefinitionManager repositoryDefinitionManager)
    • Method Detail

      • isDefaultRepositoryRef

        protected boolean isDefaultRepositoryRef​(@NotNull
                                                 @NotNull String repositoryString)
        Whether the given repository identifier points to a default repository of a plan.
        Parameters:
        repositoryString - repository identifier string from the task configuration
        Returns:
        true if the repository identifier points to a default plan's repository
      • getNonDefaultRepositoryRef

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.api.builders.repository.VcsRepositoryIdentifier getNonDefaultRepositoryRef​(@NotNull
                                                                                                                              @NotNull String repositorySelector,
                                                                                                                              @NotNull
                                                                                                                              @NotNull Map<String,​String> configuration)
        Get a Specs repository reference for a non-default repository.
        Parameters:
        repositorySelector - key to select repository identifier from the configuration
        configuration - task configuration
        Returns:
        VCS repository identifier
        Throws:
        IllegalArgumentException - if the repository selector points to a default repository
        IllegalStateException - if the repository does not exist
      • getNonDefaultRepositoryRef

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.api.builders.repository.VcsRepositoryIdentifier getNonDefaultRepositoryRef​(@NotNull
                                                                                                                              @NotNull String repositoryString)
        Get a repository reference Specs entity for a non-default repository.
        Parameters:
        repositoryString - repository identifier string from the task configuration
        Returns:
        VCS repository identifier
        Throws:
        IllegalArgumentException - if the repository selector points to a default repository
        IllegalStateException - if the repository does not exist
      • getRepositoryIdString

        @NotNull
        protected @NotNull String getRepositoryIdString​(@NotNull
                                                        @NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryIdentifierProperties repository,
                                                        @NotNull
                                                        @NotNull TaskContainer taskContainer)
        Get database ID of a repository based on the passed identifier and task container.
        Parameters:
        repository - Specs repository identifier
        taskContainer - task container
        Returns:
        ID of the repository as String
        Throws:
        IllegalArgumentException - if repository can't be found
      • getRepositoryListForTaskContainer

        @NotNull
        public @NotNull List<? extends VcsRepositoryData> getRepositoryListForTaskContainer​(@NotNull
                                                                                            @NotNull TaskContainer taskContainer)