Decision Center API

ilog.rules.teamserver.model
Interface IlrBaselineManagementFacility

All Known Subinterfaces:
IlrSession

public interface IlrBaselineManagementFacility

Baseline management services for a Decision Center session.

See Also:
IlrSession

Method Summary
 boolean addToBaseline(IlrElementHandle element, IlrBaseline baseline)
          Adds the given element to the baseline.
 boolean changeVersionInBaseline(IlrElementHandle element, IlrElementVersion version, IlrBaseline baseline)
          Deprecated. Equivalent function no longer available.
 IlrBaseline cloneToBranch(IlrBaseline baselineSource, String name)
          Deprecated. Use cloneToBranch(IlrBaseline baselineSource, String name, boolean includeDependencies) (with includeDependencies = false) instead.
 IlrBranch cloneToBranch(IlrBaseline baselineSource, String name, boolean includeDependencies)
          Copies the given baseline and converts it to a branch.
 IlrBaseline copyBaseline(IlrBaseline baselineSource, String name)
          Copies the content of the given baseline to a new one.
 IlrBaseline createBaselineFromCurrentState(String name)
          Deprecated. Use createBaselineFromCurrentState(String name, String documentation) instead.
 IlrBaseline createBaselineFromCurrentState(String name, boolean includeDependencies, IlrBaselineKind baselineKind)
          Deprecated. Use createBaselineFromCurrentState(String name, String documentation, boolean includeDependencies, IlrBaselineKind baselineKind) instead.
 IlrBaseline createBaselineFromCurrentState(String name, String documentation)
          Creates a baseline for the current baseline of the working project.
 IlrBaseline createBaselineFromCurrentState(String name, String documentation, boolean includeDependencies, IlrBaselineKind baselineKind)
          Creates a baseline for the current baseline of the working project.
 IlrBranch createBranchFromCurrentState(String name, boolean includeDependencies)
          Creates a branch for the current baseline of the working project.
 IlrBaseline createSnapshotFromBaselineEvent(String snapshotName, String documentation, IlrElementHandle eventHandle)
          Creates a new snapshot that references all elements that were available at the time the given baseline event was created.
 IlrBaseline createSnapshotFromElement(String snapshotName, String documentation, IlrElementHandle projectEltHandle)
          Deprecated. Creates a snapshot that references all elements that were available at the time the given element handle was updated. New method createSnapshotFromElementVersion() should be used instead of this one. This new method can handle deleting of elements, which is not the case with createSnapshotFromElement().
 IlrBaseline createSnapshotFromElementVersion(String snapshotName, String documentation, IlrElementVersion eltVersion)
          Creates a new snapshot that references all elements that were available at the time the given element version was created.
 void deleteBaseline(IlrBaseline baseline, boolean includeDependencies)
          Deletes a baseline.
 boolean deleteFromBranch(IlrElementHandle element, IlrBaseline baseline)
           
 List<IlrElementHandle> findArtifactsCausingMergeConflicts(IlrBranch selectedBaseline)
          Returns the list of elements from the selected baseline that are in conflict when attempting a merge with the working baseline.
 List<IlrElementHandle> findArtifactsDeletedReadyToMerge(IlrBranch selectedBaseline)
          Returns the list of elements that were deleted in the selected baseline, and deleted or not modified in the working baseline.
 List<IlrElementHandle> findArtifactsReadyToMerge(IlrBranch selectedBaseline)
          Returns the list of elements from the selected baseline that can be safely merged with the working baseline without conflict.
 List getBaselinesForVersion(IlrElementVersion version)
          Gets the baselines that reference the given element version.
 boolean removeFromBaseline(IlrElementHandle element, IlrBaseline baseline)
          Deprecated. Make sure the baseline is not frozen, and then use deleteFromBranch().
 void restoreBaseline(IlrBaseline baseline)
          Deprecated. Use restoreBaseline(String name, String comment) instead.
 void restoreBaseline(IlrBaseline baseline, String comment)
          Restores the given baseline.
 

Method Detail

addToBaseline

boolean addToBaseline(IlrElementHandle element,
                      IlrBaseline baseline)
                      throws IlrObjectNotFoundException,
                             IlrPermissionException,
                             IlrFrozenBaselineException
Adds the given element to the baseline. This baseline must be a deployment baseline, or a baseline migrated from an older release of Decision Center. The element must be a project element and must belong to the baseline. To add an element to a branch, use IlrSessionHelper.copyElementFromWorkingBaselineToBranch() or IlrSessionHelper.copyElementFromSourceBaselineToTargetBranch().

Throws:
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrFrozenBaselineException - If the baseline is frozen and thus cannot be updated.
Parameters:
element - Handle on the element to add.
baseline - The baseline to update.
Returns:
false If the baseline cannot be updated.

findArtifactsDeletedReadyToMerge

List<IlrElementHandle> findArtifactsDeletedReadyToMerge(IlrBranch selectedBaseline)
                                                        throws IlrObjectNotFoundException,
                                                               IlrPermissionException,
                                                               IlrFrozenBaselineException,
                                                               IlrInvalidElementException
Returns the list of elements that were deleted in the selected baseline, and deleted or not modified in the working baseline.

Throws:
IlrFrozenBaselineException - If the working baseline is not frozen.
IlrInvalidElementException - If a baseline with the same name already exists.
IlrObjectNotFoundException
IlrPermissionException
Parameters:
selectedBaseline - The selected baseline.
Returns:
The list of elements.

findArtifactsReadyToMerge

List<IlrElementHandle> findArtifactsReadyToMerge(IlrBranch selectedBaseline)
                                                 throws IlrFrozenBaselineException,
                                                        IlrObjectNotFoundException,
                                                        IlrPermissionException,
                                                        IlrInvalidElementException
Returns the list of elements from the selected baseline that can be safely merged with the working baseline without conflict. If the working baseline is null, the finder uses the current baseline of the project of the selected baseline. It returns the list of elements that were modified in the selected branch, and not modified in the working baseline. It does not return elements that were deleted in the selected or in the working baselines.

Throws:
IlrFrozenBaselineException - If the working baseline is not frozen.
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrInvalidElementException - If a baseline with the same name already exists.
Parameters:
selectedBaseline - The selected baseline.
Returns:
The list of elements.

findArtifactsCausingMergeConflicts

List<IlrElementHandle> findArtifactsCausingMergeConflicts(IlrBranch selectedBaseline)
                                                          throws IlrFrozenBaselineException,
                                                                 IlrObjectNotFoundException,
                                                                 IlrPermissionException,
                                                                 IlrInvalidElementException
Returns the list of elements from the selected baseline that are in conflict when attempting a merge with the working baseline. If the working baseline is null, the finder uses the current baseline of the project of the selected baseline.

Throws:
IlrFrozenBaselineException - If the working baseline is not frozen.
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrInvalidElementException - If a baseline with the same name already exists.
Parameters:
selectedBaseline - The selected baseline.
Returns:
The list of elements.

deleteFromBranch

boolean deleteFromBranch(IlrElementHandle element,
                         IlrBaseline baseline)
                         throws IlrApplicationException
Throws:
IlrApplicationException

removeFromBaseline

boolean removeFromBaseline(IlrElementHandle element,
                           IlrBaseline baseline)
                           throws IlrObjectNotFoundException,
                                  IlrPermissionException,
                                  IlrFrozenBaselineException
Deprecated. Make sure the baseline is not frozen, and then use deleteFromBranch().

Removes the given element from the baseline. This baseline must not be a current baseline. The element must be a project element and must belong to the baseline.

Throws:
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrFrozenBaselineException - If the baseline is frozen and thus cannot be updated.
Parameters:
element - Handle on the element to remove.
baseline - The baseline to update.
Returns:
false if the baseline cannot be updated.

changeVersionInBaseline

boolean changeVersionInBaseline(IlrElementHandle element,
                                IlrElementVersion version,
                                IlrBaseline baseline)
                                throws IlrObjectNotFoundException,
                                       IlrPermissionException,
                                       IlrFrozenBaselineException
Deprecated. Equivalent function no longer available.

Changes the version of an element in a baseline. This baseline must not be a current baseline. The element must be a project element and must belong to the baseline.

Throws:
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrFrozenBaselineException - If the baseline is frozen and thus cannot be updated.
Parameters:
element - Handle on the element to remove.
version - The new version of the element the baseline should refer to.
baseline - The baseline to update.
Returns:
false if the baseline cannot be updated.

createBaselineFromCurrentState

IlrBaseline createBaselineFromCurrentState(String name)
                                           throws IlrApplicationException
Deprecated. Use createBaselineFromCurrentState(String name, String documentation) instead.

Creates a baseline for the current baseline of the working project. This is a snapshot of the current state of the project.

Throws:
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrBaselineNotCurrentException - If the working baseline is not the current one.
IlrInvalidElementException - If a baseline with the same name already exists.
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
name - The name of the baseline to create.
Returns:
The created baseline.

createBaselineFromCurrentState

IlrBaseline createBaselineFromCurrentState(String name,
                                           String documentation)
                                           throws IlrApplicationException
Creates a baseline for the current baseline of the working project. This is a snapshot of the current state of the project.

Throws:
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrBaselineNotCurrentException - If the working baseline is not the current one.
IlrInvalidElementException - If a baseline with the same name already exists.
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
name - The name of the baseline to create.
documentation - Text to describe the new baseline.
Returns:
The created baseline.

createBaselineFromCurrentState

IlrBaseline createBaselineFromCurrentState(String name,
                                           boolean includeDependencies,
                                           IlrBaselineKind baselineKind)
                                           throws IlrApplicationException
Deprecated. Use createBaselineFromCurrentState(String name, String documentation, boolean includeDependencies, IlrBaselineKind baselineKind) instead.

Creates a baseline for the current baseline of the working project. This is a snapshot of the current state of the project.

Throws:
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrFrozenBaselineException - If the working baseline is not frozen.
IlrInvalidElementException - If a baseline with the same name already exists.
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
name - The name of the baseline to create.
includeDependencies - If true, a baseline with the same name will also be created for all dependent projects.
Returns:
The created baseline.

createBaselineFromCurrentState

IlrBaseline createBaselineFromCurrentState(String name,
                                           String documentation,
                                           boolean includeDependencies,
                                           IlrBaselineKind baselineKind)
                                           throws IlrApplicationException
Creates a baseline for the current baseline of the working project. This is a snapshot of the current state of the project.

Throws:
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrFrozenBaselineException - If the working baseline is not frozen.
IlrInvalidElementException - If a baseline with the same name already exists.
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
name - The name of the baseline to create.
documentation - Text to describe the new baseline.
includeDependencies - If true, a baseline with the same name will also be created for all dependent projects.
Returns:
The created baseline.

createBranchFromCurrentState

IlrBranch createBranchFromCurrentState(String name,
                                       boolean includeDependencies)
                                       throws IlrApplicationException
Creates a branch for the current baseline of the working project.

Throws:
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrFrozenBaselineException - If the working baseline is not frozen.
IlrInvalidElementException - If a baseline with the same name already exists.
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
name - The name of the branch to create.
includeDependencies - If true, a baseline with the same name will also be created for all dependent projects.
Returns:
The created branch.

createSnapshotFromElement

IlrBaseline createSnapshotFromElement(String snapshotName,
                                      String documentation,
                                      IlrElementHandle projectEltHandle)
                                      throws ilog.rules.teamserver.model.IlrAPIException,
                                             IlrApplicationException
Deprecated. Creates a snapshot that references all elements that were available at the time the given element handle was updated. New method createSnapshotFromElementVersion() should be used instead of this one. This new method can handle deleting of elements, which is not the case with createSnapshotFromElement().

Throws:
IlrInvalidElementException - If a snapshot with the same name already exists or if the handle is not a project element handle.
ilog.rules.teamserver.model.IlrAPIException
ilog.rules.teamserver.model.IlrTransactionStoppedException
IlrKnownUUIDException
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
documentation - The text to describe the new snapshot.

createSnapshotFromElementVersion

IlrBaseline createSnapshotFromElementVersion(String snapshotName,
                                             String documentation,
                                             IlrElementVersion eltVersion)
                                             throws ilog.rules.teamserver.model.IlrAPIException,
                                                    IlrApplicationException
Creates a new snapshot that references all elements that were available at the time the given element version was created.

Throws:
IlrInvalidElementException - If a snapshot with the same name already exists or if the handle is not a project element handle.
IlrPermissionException
IlrObjectNotFoundException
IlrKnownUUIDException
ilog.rules.teamserver.model.IlrTransactionStoppedException
ilog.rules.teamserver.model.IlrAPIException
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
snapshotName -
documentation -
eltVersion - An element version.
Returns:
The snapshot.

createSnapshotFromBaselineEvent

IlrBaseline createSnapshotFromBaselineEvent(String snapshotName,
                                            String documentation,
                                            IlrElementHandle eventHandle)
                                            throws ilog.rules.teamserver.model.IlrAPIException,
                                                   IlrApplicationException
Creates a new snapshot that references all elements that were available at the time the given baseline event was created. Each update of a baseline generate a system event. Use one of those events to create the snapshot.

Throws:
IlrInvalidElementException
IlrPermissionException
IlrObjectNotFoundException
IlrKnownUUIDException
ilog.rules.teamserver.model.IlrTransactionStoppedException
ilog.rules.teamserver.model.IlrAPIException
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
snapshotName -
documentation -
eventHandle - A baseline event handle
Returns:
The snapshot.

deleteBaseline

void deleteBaseline(IlrBaseline baseline,
                    boolean includeDependencies)
                    throws IlrApplicationException
Deletes a baseline.

Throws:
IlrObjectNotFoundException - If the given element cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrFrozenBaselineException - If the baseline is frozen and thus cannot be updated.
IlrActivityObjectLockedException
ilog.rules.teamserver.model.IlrAPIException
IlrApplicationException
Parameters:
baseline - The baseline to delete.
includeDependencies - If true, all dependent baselines with the same name will also be deleted.

getBaselinesForVersion

List getBaselinesForVersion(IlrElementVersion version)
Gets the baselines that reference the given element version.

Parameters:
version - The element version to test.
Returns:
A list of IlrElementSummary objects, instance of brm.Baseline.

restoreBaseline

void restoreBaseline(IlrBaseline baseline)
                     throws IlrApplicationException
Deprecated. Use restoreBaseline(String name, String comment) instead.

Restores the given baseline. This replaces the content of the current baseline with the element versions referenced by the given baseline. This operation creates new versions of the elements, which are copies of the versions referenced in the baseline.

Throws:
IlrCannotDeleteException - If some of the elements of the current baseline are not in the restored baseline and cannot be deleted.
IlrPermissionException - If the security on the elements of the current baseline prevents the restore operation.
IlrObjectNotFoundException - If the given baseline cannot be found.
IlrObjectLockedException - If one object of the current baseline is locked and cannot be deleted or overwritten.
IlrFolderLockedException - If a rule package of the working baseline is locked.
IlrFrozenBaselineException - If the working baseline is not frozen.
IlrInvalidElementException - If some of the elements to restore cause a duplicate conflict with a new element added into the current baseline.
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
baseline - The baseline to restore.

restoreBaseline

void restoreBaseline(IlrBaseline baseline,
                     String comment)
                     throws IlrApplicationException
Restores the given baseline. This replaces the content of the current baseline with the element versions referenced by the given baseline. This operation creates new versions of the elements, which are copies of the versions referenced in the baseline.

Throws:
IlrCannotDeleteException - If some of the elements of the current baseline are not in the restored baseline and cannot be deleted.
IlrPermissionException - If the security on the elements of the current baseline prevents the restore operation.
IlrObjectNotFoundException - If the given baseline cannot be found.
IlrObjectLockedException - If one object of the current baseline is locked and cannot be deleted or overwritten.
IlrFolderLockedException - If a rule package of the working baseline is locked.
IlrFrozenBaselineException - If the working baseline is not frozen.
IlrInvalidElementException - If some of the elements to restore cause a duplicate conflict with a new element added into the current baseline.
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
baseline - The baseline to restore.
comment - User-provided comment (optional) to describe the reason for this restore.

copyBaseline

IlrBaseline copyBaseline(IlrBaseline baselineSource,
                         String name)
                         throws IlrApplicationException
Copies the content of the given baseline to a new one.

Throws:
IlrObjectNotFoundException - If the source baseline cannot be found in the database.
IlrPermissionException - If the user is neither a configuration manager nor an administrator.
IlrInvalidElementException - If a baseline with the same name already exists.
IlrActivityObjectLockedException
IlrApplicationException
Parameters:
baselineSource - The baseline to copy.
name - The name of the new baseline.
Returns:
The new baseline.

cloneToBranch

IlrBaseline cloneToBranch(IlrBaseline baselineSource,
                          String name)
                          throws IlrApplicationException
Deprecated. Use cloneToBranch(IlrBaseline baselineSource, String name, boolean includeDependencies) (with includeDependencies = false) instead.

Copies the given baseline and converts it to a branch.

Throws:
IlrApplicationException - If an error occurred when converting the baseline.
Parameters:
baselineSource - The baseline to copy.
name - The name of the new branch.
Returns:
The branch.

cloneToBranch

IlrBranch cloneToBranch(IlrBaseline baselineSource,
                        String name,
                        boolean includeDependencies)
                        throws IlrApplicationException
Copies the given baseline and converts it to a branch.

Throws:
IlrApplicationException - If an error occurred when converting the baseline.
Parameters:
baselineSource - The baseline to copy.
name - The name of the new branch.
includeDependencies - If true, all dependent baselines with the same name will also be cloned with the given name. If false, the new branch is created with the same dependencies as the original baseline.
Returns:
The branch.

Decision Center API

© Copyright IBM Corp. 1987, 2013