Interface ProjectConfigurationService

All Known Implementing Classes:
ProjectConfigurationServiceImpl

public interface ProjectConfigurationService
Utility service for seamless configuration of projects.
Since:
6.2
  • Method Details

    • validateProjectForCreation

      @NotNull @NotNull ErrorCollection validateProjectForCreation(@Nullable @Nullable String projectKey, @Nullable @Nullable String projectName, @Nullable @Nullable String projectDescription)
      Perform validation of data for creation of a new Project.
      Parameters:
      projectKey - key of the project
      projectName - project name
      projectDescription - project description
      Returns:
      collection of all validation errors, empty if validation was successful
    • validateProjectForCreation

      @NotNull @NotNull ErrorCollection validateProjectForCreation(@NotNull @NotNull String projectKeyField, @Nullable @Nullable String projectKey, @NotNull @NotNull String projectNameField, @Nullable @Nullable String projectName, @NotNull @NotNull String projectDescriptionField, @Nullable @Nullable String projectDescription)
      Perform validation of data for creation of a new Project.

      This is a more specific version of validateProjectForCreation(String, String, String), allowing configuration of field names to generate more accurate ErrorCollection.

      Parameters:
      projectKeyField - field used to configure project key
      projectKey - key of the project
      projectNameField - field used to configure project name
      projectName - project name
      projectDescriptionField - field used to configure project description
      projectDescription - project description
      Returns:
      collection of all validation errors, empty if validation was successful
    • createProject

      @NotNull @Deprecated default @NotNull Project createProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String projectName, @Nullable @Nullable String projectDescription) throws WebValidationException
      Creates and persists a new Project, throwing an exception on invalid data. Prior to calling this method data should be validated by calling validateProjectForCreation(String, String, String).
      Parameters:
      projectKey - key of the project
      projectName - project name
      projectDescription - project description
      Returns:
      new instance of the project, after persisting it to the database
      Throws:
      WebValidationException - in case of validation errors
    • createProject

      @NotNull @NotNull Project createProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String projectName, @Nullable @Nullable String projectDescription, boolean grantAllUsersReadAccess) throws WebValidationException
      Creates and persists a new Project, throwing an exception on invalid data. Prior to calling this method data should be validated by calling validateProjectForCreation(String, String, String).
      Parameters:
      projectKey - key of the project
      projectName - project name
      projectDescription - project description
      grantAllUsersReadAccess - grant anonymous and logged-in users READ permissions
      Returns:
      new instance of the project, after persisting it to the database
      Throws:
      WebValidationException - in case of validation errors
    • validateProjectForUpdate

      @NotNull @NotNull ErrorCollection validateProjectForUpdate(@NotNull @NotNull String projectKey, @Nullable @Nullable String projectName, @Nullable @Nullable String projectDescription)
      Perform validation of data for updating details of an existing Project.
      Parameters:
      projectKey - key of the project
      projectName - new project name
      projectDescription - new project description
      Returns:
      collection of all validation errors, empty if validation was successful
    • validateProjectForUpdate

      @NotNull @NotNull ErrorCollection validateProjectForUpdate(@NotNull @NotNull String projectKey, @NotNull @NotNull String projectNameField, @Nullable @Nullable String projectName, @NotNull @NotNull String projectDescriptionField, @Nullable @Nullable String projectDescription)
      Perform validation of data for updating details of an existing Project.

      This is a more specific version of validateProjectForUpdate(String, String, String), allowing configuration of field names to generate more accurate ErrorCollection.

      Parameters:
      projectKey - key of the project
      projectNameField - field used to configure project name
      projectName - new project name
      projectDescriptionField - field used to configure project description
      projectDescription - new project description
      Returns:
      collection of all validation errors, empty if validation was successful
    • updateProject

      void updateProject(@NotNull @NotNull Project project, @NotNull @NotNull String projectName, @Nullable @Nullable String projectDescription) throws WebValidationException
      Updates and persists changes for an existing Project, throwing exception on invalid data. Prior to calling this method data should be validated by calling validateProjectForUpdate(String, String, String).
      Parameters:
      project - project to update
      projectName - new project name
      projectDescription - new project description
      Throws:
      WebValidationException - in case of validation errors
    • markProjectForDeletion

      void markProjectForDeletion(@NotNull @NotNull Project project) throws IllegalStateException
      Marks a project for deletion. Project will be deleted from the database according to background deletion schedule. Project must be empty prior to calling this method (there can't be any plans within the project that are not marked for deletion).
      Parameters:
      project - project to delete
      Throws:
      IllegalStateException - in case of illegal state of the project