Decision Center API

ilog.rules.teamserver.model
Interface ActivityLockingFacility

All Known Subinterfaces:
IlrSession

public interface ActivityLockingFacility

Provides change activity locking facilities. A new activity lock is created when an element is edited in a change activity. This prevents editing the same element in another change activity until the lock is released. These methods expect the working baseline to be a release or a change activity.


Method Summary
 IlrActivityLock eltNameLockVisible(IlrChangeAct ca, IlrElementDetails eltDtls)
          Returns an activity lock valid in the context of a given change activity for the same element fully qualified name.
 String getActivityLockOwner(IlrElementHandle element)
          Returns the name of the change activity that owns this element lock.
 boolean isActivityElementBusy(IlrElementHandle element)
          Returns true if the working branch is a change activity and there is an activity lock set on this element by a different change activity.
 IlrActivityLock lockActivityElement(IlrElementDetails eltDtls)
          Attempts to acquire a new activity lock on a given element for a given change activity.
 boolean ownsActivityLock(IlrElementHandle element)
          Returns true if the working branch is a change activity that owns an activity lock on a given element.
 void releaseActivityLock(IlrElementHandle element)
          Deletes the activity lock set on a given element, even if there are still justifying activities for this element in the release.
 void unlockActivityElements(IlrRelease release)
          Should be called when an activity is closed.
 

Method Detail

lockActivityElement

IlrActivityLock lockActivityElement(IlrElementDetails eltDtls)
                                    throws IlrInvalidElementException,
                                           IlrApplicationException,
                                           ilog.rules.teamserver.model.IlrAPIException
Attempts to acquire a new activity lock on a given element for a given change activity.

Throws:
IlrInvalidElementException
IlrApplicationException
ilog.rules.teamserver.model.IlrAPIException - if the element is not a project element.
Parameters:
eltDtls - The element to lock.

unlockActivityElements

void unlockActivityElements(IlrRelease release)
                            throws IlrApplicationException
Should be called when an activity is closed. This will release (delete) all activity locks within a given release for which there is no longer justifying activities.

Throws:
IlrApplicationException
Parameters:
release - The release.

ownsActivityLock

boolean ownsActivityLock(IlrElementHandle element)
                         throws IlrApplicationException,
                                ilog.rules.teamserver.model.IlrAPIException
Returns true if the working branch is a change activity that owns an activity lock on a given element.

Throws:
IlrApplicationException
ilog.rules.teamserver.model.IlrAPIException - if the element is not a project element.
Parameters:
element - The element.
Returns:
true if the working branch is a change activity that owns an activity lock on a given element.

isActivityElementBusy

boolean isActivityElementBusy(IlrElementHandle element)
                              throws IlrApplicationException,
                                     ilog.rules.teamserver.model.IlrAPIException
Returns true if the working branch is a change activity and there is an activity lock set on this element by a different change activity.

Throws:
IlrApplicationException
ilog.rules.teamserver.model.IlrAPIException - if the element is not a project element.
Parameters:
element - The element.
Returns:
true if the working branch is a change activity and there is an activity lock set on this element by a different change activity.

getActivityLockOwner

String getActivityLockOwner(IlrElementHandle element)
                            throws IlrApplicationException
Returns the name of the change activity that owns this element lock.

Throws:
IlrApplicationException
Parameters:
element - The element.
Returns:
the name of the change activity that owns this element lock.

eltNameLockVisible

IlrActivityLock eltNameLockVisible(IlrChangeAct ca,
                                   IlrElementDetails eltDtls)
                                   throws IlrApplicationException
Returns an activity lock valid in the context of a given change activity for the same element fully qualified name. If no element lock can be found with the same element fully qualified name (same name in same package), or if this lock is not valid in the context of this change activity (this change activity is created after this lock is justified), then the returned value is null.

Throws:
IlrApplicationException
Parameters:
ca - The change activity.
eltDtls - The element details.
Returns:
the activity lock associated to this change activity for this element if any.

releaseActivityLock

void releaseActivityLock(IlrElementHandle element)
                         throws IlrApplicationException
Deletes the activity lock set on a given element, even if there are still justifying activities for this element in the release. This may cause conflicts later on, when trying to close those justifying activities.

Throws:
IlrApplicationException
Parameters:
element - The element.

Decision Center API

© Copyright IBM Corp. 1987, 2013