Interface CloudProfilePersistor

    • Method Detail

      • getProfiles

        Collection<CloudProfile> getProfiles​(@NotNull
                                             String projectId)
        Get profiles based on configured project features.
        Parameters:
        project -
        Returns:
        profiles
      • getProfiles

        Collection<CloudProfile> getProfiles​(@NotNull
                                             SProject project)
        Get profiles based on configured project features.
        Parameters:
        project -
        Returns:
        profiles
      • getImages

        @NotNull
        Collection<CloudImageParameters> getImages​(@NotNull
                                                   String projectId)
        Get images based on configured project features. Both - configured in profiles and inherited from parent projects.
        Parameters:
        project -
        Returns:
        all cloud images (own and inherited)
      • getImages

        @NotNull
        Collection<CloudImageParameters> getImages​(@NotNull
                                                   SProject project)
        Get images based on configured project features. Both - configured in profiles and inherited from parent projects.
        Parameters:
        project -
        Returns:
        all cloud images (own and inherited)
      • createImage

        @NotNull
        CloudImageParameters createImage​(@NotNull
                                         String projectId,
                                         @NotNull
                                         CloudImageData imageData)
        Create image with given parameters in a roject with given id
        Parameters:
        projectId -
        imageParameters -
        Returns:
        Newly created image
      • updateImage

        @NotNull
        CloudImageParameters updateImage​(@NotNull
                                         String projectId,
                                         @NotNull
                                         CloudImageData imageData)
        Updates currently persisted image.
        Parameters:
        projectId -
        profileId -
        imageInternalId -
        newData - new values
      • updateImageWithInternalId

        @NotNull
        CloudImageParameters updateImageWithInternalId​(@NotNull
                                                       String projectId,
                                                       @NotNull
                                                       String imageInternalId,
                                                       @NotNull
                                                       CloudImageData imageData)
        Updates currently persisted image.
        Parameters:
        projectId -
        profileId -
        imageInternalId -
        newData - new values
      • removeImage

        boolean removeImage​(@NotNull
                            String projectId,
                            @NotNull
                            String profileId,
                            @NotNull
                            String imageId)
        Remove image located in given project and profile and with given id
        Parameters:
        projectId -
        profileId -
        imageId -
        Returns:
        true if image was actually removed, False otherwise
      • removeImageWithInternalId

        boolean removeImageWithInternalId​(@NotNull
                                          String projectId,
                                          @NotNull
                                          String imageInternalId)
        Remove image located in given project and with given internal id
        Parameters:
        projectId -
        imageInternalId -
        Returns:
        true if image was actually removed, False otherwise
      • isIntegrationEnabled

        boolean isIntegrationEnabled​(@NotNull
                                     String projectId)
        Returns:
        true if integration is enabled in a project considering project hierarchy
      • getIntegrationStatus

        @NotNull
        ProjectCloudIntegrationStatus getIntegrationStatus​(@NotNull
                                                           String projectId)
        returns project's cloud integration status
        Parameters:
        projectId -
        Returns:
      • isConfigurable

        boolean isConfigurable​(@NotNull
                               String projectId)
        Returns:
        true if cloud configuration is available in a project considering project hierarchy
      • hasCloudRelatedConfiguration

        boolean hasCloudRelatedConfiguration​(@NotNull
                                             String projectId)
        Returns true if settings of the project with given id contain cloud related configuration
        Parameters:
        projectId -
        Returns:
      • createProfile

        @NotNull
        CloudProfile createProfile​(@NotNull
                                   String projectId,
                                   @NotNull
                                   CloudProfileData data)
        Creates new profile and persists it Calling this method may trigger CloudEventListener#profilesUpdated(java.util.Collection, boolean) call.
        Parameters:
        data - profile info to save
      • removeProfile

        boolean removeProfile​(@NotNull
                              String projectId,
                              @NotNull
                              String profileId)
        Removes profile with specified id
        Parameters:
        profileId - profileId to remove
        Returns:
        True if profile was actually removed, False otherwise
      • updateProfile

        @NotNull
        CloudProfile updateProfile​(@NotNull
                                   String projectId,
                                   @NotNull
                                   String profileId,
                                   @NotNull
                                   CloudProfileData newData)
        Updates currently persisted profile.
        Parameters:
        profileId - profile id to update
        newData - new values
      • updateStatus

        void updateStatus​(@NotNull
                          String projectId,
                          ProjectCloudIntegrationStatus status)
        Marks cloud integration as enabled or disabled in this project.
        Parameters:
        status - false to disable could integration
      • setProfileEnabled

        boolean setProfileEnabled​(@NotNull
                                  String projectId,
                                  String profileId,
                                  boolean isEnabled)
        Marks certain cloud profile as enabled or disabled.
        Parameters:
        profileId - id of profile to update
        isEnabled - false to disable profile
        Returns:
        is change applied successfully