Interface SaveParticipant


@OpenApiAll public interface SaveParticipant
Interface declares functionality for save process participant. Save participant can do some custom actions before and after project saving procedure.
  • Method Details

    • isReadyForSave

      boolean isReadyForSave(Project project, ProjectDescriptor descriptor)
      Indicates ability to save project. Save mechanism checks this status of all save participants. Project will not be saved if some of save participants are not ready.
      Parameters:
      project - the project prepared for saving.
      descriptor - the project location descriptor.
      Returns:
      false if project can't be saved.
    • doBeforeSave

      void doBeforeSave(Project project, ProjectDescriptor descriptor)
      Describes any actions to do before project saving. Will be executed only if isReadyForSave() returns true.
      Parameters:
      project - the project prepared for saving.
      descriptor - the project location descriptor.
    • doAfterSave

      void doAfterSave(Project project, ProjectDescriptor descriptor)
      Describes any actions to do after project saving. Will be executed only if project was saved successfully.
      Parameters:
      project - the project.
      descriptor - the project location descriptor.
    • isReadyForCommit

      default boolean isReadyForCommit(com.nomagic.ci.persistence.IProject project, @CheckForNull String comment)
      Indicates ability to commit project. Save mechanism checks this status of all save participants. Project will not be committed if some of save participants are not ready.
      Parameters:
      project - the project prepared for saving.
      comment - commit comment
      Returns:
      false if project can't be committed.