Interface IBaselinesManager


public interface IBaselinesManager
Functionality related to baselines. Each instance of IBaselinesManager is bound to a particular project, therefore the methods lack the project parameter.
Author:
dobisekm
See Also:
  • Method Details

    • getBaselines

      @NotNull IPObjectList<IBaseline> getBaselines()
      Returns a list of project baselines defined in the given project. (Sorted by the base revision in descending order.)
    • getRevisionBaseline

      @Nullable IBaseline getRevisionBaseline(@NotNull String revision)
      Returns:
      Returns the project baseline that corresponds to the given revision. Returns null if there is no project baseline for the revision.
    • createBaseline

      @NotNull IBaseline createBaseline(String name, String description, String revision, IUser author)
      Creates a project baseline.

      The baseline is not saved. Users must call IPObject.save() manually.

      Parameters:
      name - Baseline name that will be rendered to users.
      description - Baseline description that will be rendered to users.
      Returns:
      The baseline object with the given content.
    • createObjectBaseline

      @NotNull IBaseline createObjectBaseline(@NotNull IPObject baseObject)
      Creates an object baseline for a versioned base object; the revision of the base object (baseObject.getRevision()) will be used as the base revision.

      Currently, only IModule and IBaselineCollection are allowed as the base object.

      The baseline is not saved. Users must call IPObject.save() manually.

      Throws:
      IllegalArgumentException - if the baseObject is not a versioned instance, or is not of a supported prototype.
      RuntimeException - if a baseline for this base object and revision already exists.
      Since:
      3.19.2
    • createObjectBaselineForChange

      @NotNull IBaseline createObjectBaselineForChange(@NotNull IPObject baseObject)
      Creates an object baseline for the current change of the base object. (For the change that will be committed in the same transaction as the baseline.) This is useful when the baseline is created automatically as part of one of the base object's workflow transitions. The base object must have already been committed, (have the data revision filled in), so it is not possible to create the base object and its baseline in a single transaction. The base object may be saved as part of the call. The base revision of the baseline will only be available once the transaction is complete.

      Currently, only IModule is allowed as the base object.

      The baseline is not saved. Users must call IPObject.save() manually.

      Throws:
      IllegalArgumentException - if the baseObject is a versioned instance, or is not of a supported prototype, or it was not committed yet
      Since:
      3.19.2
    • deleteBaseline

      void deleteBaseline(@NotNull IBaseline baseline)
      Since:
      3.5.3
    • scheduleComparisonJob

      @NotNull IJob scheduleComparisonJob(String r1, String r2, IUser author)
      Schedules the comparison job. Only one job can run at a time, therefore the new job might be started in the "waiting" state. After the job is successfully finished, then its result will appear in the Reports listing. If it fails, then no result will be produced. (The appropriate jobs API can then be used by users to evaluate the results.)
      Returns:
      instance of the scheduled job
    • getCurrentJobStatus

      @Nullable String getCurrentJobStatus()
      Returns:
      Either a user-friendly job status message (multiple lines of text - a log) or null if no job is currently running in the given project, or if the job is still "waiting".
    • isJobRunning

      boolean isJobRunning()
      Determines if there is a comparison job active for this project.
      Returns:
      true, if there is at least one comparison job "running" or "waiting" for this project. Otherwise false.
    • listExistingReports

      @NotNull IComparisonReport[] listExistingReports()
      Returns existing comparison reports.
      Returns:
      An array containing existing reports from newest to oldest.
    • getExistingReport

      @Nullable IComparisonReport getExistingReport(String reportId)
    • deleteExistingReport

      void deleteExistingReport(String reportId)
      Delete the existing report from the reports repository. No error is produced if no such report exists.
      Parameters:
      reportId -
    • isHistoryAvailable

      boolean isHistoryAvailable()
      Since:
      3.6.0