wt.locks
Class LockServiceFwd

java.lang.Object
  extended bywt.locks.LockServiceFwd
All Implemented Interfaces:
LockService, RemoteAccess, Serializable

public class LockServiceFwd
extends Object
implements RemoteAccess, LockService, Serializable

Provides an abstraction that specifies and promotes server-side functionality as a service that's remotely available for use by a client. The intent is that this interface defines all the necessary server-side functionality for locking.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String FC_RESOURCE
           
(package private) static boolean SERVER
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
LockServiceFwd()
           
 
Method Summary
private static Manager getManager()
           
 Lockable lock(Lockable object)
          Defaults the note to be null, the principal to be null, which makes the principal the session's user, and invokes the main lock method.
 Lockable lock(Lockable object, String note)
          Defaults the principal to be null, which makes the principal the session's user, and invokes the main lock method.
 Lockable lock(Lockable object, WTPrincipalReference locker)
          Defaults the note to be null and invokes the main lock method.
 Lockable lock(Lockable object, WTPrincipalReference locker, String note)
          Provides server-side functionality for the locking of business objects.
 Lockable unlock(Lockable object)
          Defaults the principal to be null, which makes the principal the session's user, and invokes the main unlock method.
 Lockable unlock(Lockable object, WTPrincipalReference locker)
          Provides server-side functionality for releasing a business object's lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

LockServiceFwd

public LockServiceFwd()
Method Detail

getManager

private static Manager getManager()
                           throws WTException
Returns:
Manager
Throws:
WTException

lock

public Lockable lock(Lockable object,
                     WTPrincipalReference locker,
                     String note)
              throws WTException,
                     LockException,
                     WTPropertyVetoException,
                     PersistenceException
Provides server-side functionality for the locking of business objects. This type of lock is a logical mechanism to restrict concurrent access, not a database lock. If the given principal is null then the current session's principal is used as the locker. When a lock is placed on an object by a principal, that user or group is typically the only agency able to then modify the object.

However, if an object is lockable but has not yet been locked, then any agency has unrestricted access to the object until it has been locked.



Supported API: false

Specified by:
lock in interface LockService
Parameters:
object -
locker -
note -
Returns:
Lockable
Throws:
WTException
LockException
WTPropertyVetoException
PersistenceException

lock

public Lockable lock(Lockable object,
                     WTPrincipalReference locker)
              throws WTException,
                     LockException,
                     WTPropertyVetoException,
                     PersistenceException
Defaults the note to be null and invokes the main lock method.

Supported API: false

Specified by:
lock in interface LockService
Parameters:
object -
locker -
Returns:
Lockable
Throws:
WTException
LockException
WTPropertyVetoException
PersistenceException
See Also:
LockService.lock(Lockable,WTPrincipalReference,String)

lock

public Lockable lock(Lockable object,
                     String note)
              throws WTException,
                     LockException,
                     WTPropertyVetoException,
                     PersistenceException
Defaults the principal to be null, which makes the principal the session's user, and invokes the main lock method.

Supported API: false

Specified by:
lock in interface LockService
Parameters:
object -
note -
Returns:
Lockable
Throws:
WTException
LockException
WTPropertyVetoException
PersistenceException
See Also:
LockService.lock(Lockable,WTPrincipalReference,String)

lock

public Lockable lock(Lockable object)
              throws WTException,
                     LockException,
                     WTPropertyVetoException,
                     PersistenceException
Defaults the note to be null, the principal to be null, which makes the principal the session's user, and invokes the main lock method.

Supported API: false

Specified by:
lock in interface LockService
Parameters:
object -
Returns:
Lockable
Throws:
WTException
LockException
WTPropertyVetoException
PersistenceException
See Also:
LockService.lock(Lockable,WTPrincipalReference,String)

unlock

public Lockable unlock(Lockable object,
                       WTPrincipalReference locker)
                throws WTException,
                       LockException,
                       WTPropertyVetoException,
                       PersistenceException
Provides server-side functionality for releasing a business object's lock. If the given principal is null then the current session's principal is used as the locker. When a lock is released off of an object, its access becomes unrestricted.

Supported API: false

Specified by:
unlock in interface LockService
Parameters:
object -
locker -
Returns:
Lockable
Throws:
WTException
LockException
WTPropertyVetoException
PersistenceException

unlock

public Lockable unlock(Lockable object)
                throws WTException,
                       LockException,
                       WTPropertyVetoException,
                       PersistenceException
Defaults the principal to be null, which makes the principal the session's user, and invokes the main unlock method.

Supported API: false

Specified by:
unlock in interface LockService
Parameters:
object -
Returns:
Lockable
Throws:
WTException
LockException
WTPropertyVetoException
PersistenceException
See Also:
LockService.unlock(Lockable,WTPrincipalReference)