com.plumtree.server
Interface IPTObjectLock


public interface IPTObjectLock

Internal interface used for locking and unlocking Plumtree objects.

Author:
Joseph Chen

Method Summary
 boolean CheckLock()
          Check to see if the object is locked.
 com.plumtree.openfoundation.util.XPDateTime GetAcquiredDate()
          Returns the acquisition date of the lock.
 int GetClassID()
          Returns the class ID of the object.
 com.plumtree.openfoundation.util.XPDateTime GetExpirationDate()
          Returns the expiration date of the lock.
 java.lang.String GetLockingMachine()
          Returns the name of the locking machine.
 int GetLockingUserID()
          Returns the user ID of the locking user.
 int GetObjectID()
          Returns the object ID of the object.
 void RenewLock()
          Renews the lock by resetting the expiration date to 24 hours after the current time.
 void UnlockObject()
          Unlock the object.
 

Method Detail

GetObjectID

int GetObjectID()
Returns the object ID of the object.

Returns:
Object ID

GetClassID

int GetClassID()
Returns the class ID of the object.

Returns:
The class ID (from PT_CLASSIDS).

GetLockingUserID

int GetLockingUserID()
Returns the user ID of the locking user.

Returns:
User ID of the locking user.

GetLockingMachine

java.lang.String GetLockingMachine()
Returns the name of the locking machine.

Returns:
Name of the locking machine.

GetAcquiredDate

com.plumtree.openfoundation.util.XPDateTime GetAcquiredDate()
Returns the acquisition date of the lock.

Returns:
Acquisition date of lock.

GetExpirationDate

com.plumtree.openfoundation.util.XPDateTime GetExpirationDate()
Returns the expiration date of the lock.

Returns:
Expiration date of lock.

UnlockObject

void UnlockObject()
Unlock the object. If the lock does not support unlocking or if the object has already been unlocked, then an exception is thrown.


RenewLock

void RenewLock()
Renews the lock by resetting the expiration date to 24 hours after the current time.


CheckLock

boolean CheckLock()
Check to see if the object is locked.

Returns:
True if object is locked.