Package com.polarion.alm.tracker
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 Summary
Modifier and TypeMethodDescriptioncreateBaseline
(String name, String description, String revision, IUser author) Creates a project baseline.createObjectBaseline
(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.createObjectBaselineForChange
(IPObject baseObject) Creates an object baseline for the current change of the base object.void
deleteBaseline
(IBaseline baseline) void
deleteExistingReport
(String reportId) Delete the existing report from the reports repository.Returns a list of project baselines defined in the given project.getExistingReport
(String reportId) getRevisionBaseline
(String revision) boolean
boolean
Determines if there is a comparison job active for this project.Returns existing comparison reports.scheduleComparisonJob
(String r1, String r2, IUser author) Schedules the comparison job.
-
Method Details
-
getBaselines
Returns a list of project baselines defined in the given project. (Sorted by the base revision in descending order.) -
getRevisionBaseline
- Returns:
- Returns the project baseline that corresponds to the given revision. Returns null if there is no project baseline for the revision.
-
createBaseline
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
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
andIBaselineCollection
are allowed as the base object.The baseline is not saved. Users must call
IPObject.save()
manually.- Throws:
IllegalArgumentException
- if thebaseObject
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
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 thebaseObject
is a versioned instance, or is not of a supported prototype, or it was not committed yet- Since:
- 3.19.2
-
deleteBaseline
- Since:
- 3.5.3
-
scheduleComparisonJob
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
- 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. Otherwisefalse
.
-
listExistingReports
Returns existing comparison reports.- Returns:
- An array containing existing reports from newest to oldest.
-
getExistingReport
-
deleteExistingReport
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
-