lumis.portal.lock
Class LockManager

Package class diagram package LockManager
java.lang.Object
  extended by lumis.portal.lock.LockManager
All Implemented Interfaces:
ILockManager

public class LockManager
extends Object
implements ILockManager

Manager implementation for lock-related operations

Since:
4.0.9

Constructor Summary
LockManager()
           
 
Method Summary
 void addLockType(SessionConfig sessionConfig, LockTypeConfig lockTypeConfig, ITransaction transaction)
          Add a type of lock.
 void addOrUpdateLockType(SessionConfig sessionConfig, LockTypeConfig lockTypeConfig, ITransaction transaction)
          Adds or updates a lockType entry
 void deleteLockType(SessionConfig sessionConfig, String lockTypeId, boolean force, ITransaction transaction)
          Remove a type of lock.
 LockTypeConfig getLockType(SessionConfig sessionConfig, String lockTypeId, ITransaction transaction)
           
 Collection<String> getLockTypeIdsByServiceId(SessionConfig sessionConfig, String serviceId, ITransaction transaction)
          Returns the ids of the types of locks given the serviceId.
 String lock(SessionConfig sessionConfig, LockConfig lockConfig)
          Set lock on.
 boolean unlock(SessionConfig sessionConfig, String lockId)
          Set lock off.
 void unlockExpiredLocks(SessionConfig sessionConfig)
          Delete all the locks that have expired.
 void updateLockType(SessionConfig sessionConfig, LockTypeConfig lockTypeConfig, ITransaction transaction)
          Updates a lockType entry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockManager

public LockManager()
Method Detail

addLockType

public void addLockType(SessionConfig sessionConfig,
                        LockTypeConfig lockTypeConfig,
                        ITransaction transaction)
                 throws ManagerException,
                        PortalException
Description copied from interface: ILockManager
Add a type of lock.

Specified by:
addLockType in interface ILockManager
Throws:
ManagerException
PortalException

deleteLockType

public void deleteLockType(SessionConfig sessionConfig,
                           String lockTypeId,
                           boolean force,
                           ITransaction transaction)
                    throws ManagerException,
                           PortalException
Description copied from interface: ILockManager
Remove a type of lock.

Specified by:
deleteLockType in interface ILockManager
Throws:
ManagerException
PortalException

getLockTypeIdsByServiceId

public Collection<String> getLockTypeIdsByServiceId(SessionConfig sessionConfig,
                                                    String serviceId,
                                                    ITransaction transaction)
                                             throws ManagerException,
                                                    PortalException
Description copied from interface: ILockManager
Returns the ids of the types of locks given the serviceId.

Specified by:
getLockTypeIdsByServiceId in interface ILockManager
Returns:
an array of Strings.
Throws:
ManagerException
PortalException

getLockType

public LockTypeConfig getLockType(SessionConfig sessionConfig,
                                  String lockTypeId,
                                  ITransaction transaction)
                           throws ManagerException,
                                  PortalException
Throws:
ManagerException
PortalException

lock

public String lock(SessionConfig sessionConfig,
                   LockConfig lockConfig)
            throws ManagerException,
                   PortalException
Description copied from interface: ILockManager
Set lock on.

Specified by:
lock in interface ILockManager
Returns:
a String.
Throws:
ManagerException
PortalException

unlock

public boolean unlock(SessionConfig sessionConfig,
                      String lockId)
               throws ManagerException,
                      PortalException
Description copied from interface: ILockManager
Set lock off.

Specified by:
unlock in interface ILockManager
Returns:
true, if the lock was released; false, if the lock was previously released
Throws:
ManagerException
PortalException

unlockExpiredLocks

public void unlockExpiredLocks(SessionConfig sessionConfig)
                        throws ManagerException,
                               PortalException
Description copied from interface: ILockManager
Delete all the locks that have expired.

Specified by:
unlockExpiredLocks in interface ILockManager
Throws:
ManagerException
PortalException

addOrUpdateLockType

public void addOrUpdateLockType(SessionConfig sessionConfig,
                                LockTypeConfig lockTypeConfig,
                                ITransaction transaction)
                         throws ManagerException,
                                PortalException
Description copied from interface: ILockManager
Adds or updates a lockType entry

Specified by:
addOrUpdateLockType in interface ILockManager
Throws:
ManagerException
PortalException

updateLockType

public void updateLockType(SessionConfig sessionConfig,
                           LockTypeConfig lockTypeConfig,
                           ITransaction transaction)
                    throws ManagerException,
                           PortalException
Description copied from interface: ILockManager
Updates a lockType entry

Specified by:
updateLockType in interface ILockManager
Throws:
ManagerException
PortalException


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.