Interface ArtifactsStorageSettingsManager

  • All Known Implementing Classes:
    ArtifactsStorageSettingsManagerImpl

    public interface ArtifactsStorageSettingsManager
    Created by Nikita.Skvortsov date: 01.03.2017. Manage settings of artifacts storage for a project.
    Since:
    2017.1
    • Method Detail

      • addSettings

        @NotNull
        SProjectFeatureDescriptor addSettings​(@NotNull
                                              SProject project,
                                              @Nullable
                                              String artifactStorageId,
                                              @NotNull
                                              ArtifactStorageType artifactsStorageType,
                                              boolean isActive,
                                              @NotNull
                                              Map<String,​String> addParams)
        Add new storage settings to a project.
        Parameters:
        project - target project
        storageSettingsId - ID to be used for this storage. If no ID is provided, then it will be generated automatically
        artifactsStorageType - storage to be used
        isActive - make storage active for the project
        addParams - parameters to use as settings
        Returns:
        project feature of type ArtifactStorageSettings.STORAGE_FEATURE_TYPE with settings.
      • activateSettings

        void activateSettings​(@NotNull
                              SProject project,
                              @NotNull
                              String settingsId)
        Make particular settings active for a project. Only one settings can be active in a project at any time.
        Parameters:
        project - target project
        settingsId - id (SProjectFeatureDescriptor.getId()) of settings to be activated
      • removeSettings

        @NotNull
        Set<SProject> removeSettings​(@NotNull
                                     SProject project,
                                     @NotNull
                                     String settingsId)
        Removes settings having the specified id, and deactivates them in current project and all its sub projects. Returns set of projects whose settings were affected.
        Parameters:
        project - project, where settings belong to
        settingsId - id (SProjectFeatureDescriptor.getId()) of settings to delete
        Returns:
        set of affected projects
      • updateSettings

        void updateSettings​(@NotNull
                            SProject project,
                            @NotNull
                            String settingsId,
                            @NotNull
                            Map<String,​String> newParams)
        Update settings
        Parameters:
        project - project, where settings belong to
        settingsId - id (SProjectFeatureDescriptor.getId()) of settings to delete
        newParams - new settings. Will replace all existing settings
      • isActive

        boolean isActive​(@NotNull
                         SProject project,
                         @NotNull
                         String id)
        Check if settings are explicitly active in a project
        Parameters:
        project - target project
        id - id (SProjectFeatureDescriptor.getId()) of settings
        Returns:
        true if settings are explicitly activated, false otherwise
      • deactivateSettings

        boolean deactivateSettings​(@NotNull
                                   SProject project,
                                   @NotNull
                                   String id)
        De-activate settings with given id in given project.
        Parameters:
        project - target project.
        Returns:
        true if settings were deactivated
      • findEffectiveSettings

        @Nullable
        String findEffectiveSettings​(@NotNull
                                     SProject project)
        Find id (SProjectFeatureDescriptor.getId()) of settings, that will be used by builds in a project. Effective settings can are explicitly active in the project or are inherited from some parent project (nearest explicitly active)
        Parameters:
        project - project to find
        Returns:
        feature id or null if no storage settings are used (artifacts will be published to TeamCity server)